Attempt to get basic tablemimedata subclass.
parent
a36cc26434
commit
dc80bfff55
@ -1 +1,22 @@
|
||||
#include "tablemimedata.hpp"
|
||||
#include "universalid.hpp"
|
||||
|
||||
CSMWorld::TableMimeData::TableMimeData (CSMWorld::UniversalId& UniversalId) :
|
||||
mUniversalId(UniversalId)
|
||||
{
|
||||
mSupportedFormats << UniversalId.toString().c_str();
|
||||
}
|
||||
|
||||
QStringList CSMWorld::TableMimeData::formats() const
|
||||
{
|
||||
return QMimeData::formats();
|
||||
}
|
||||
|
||||
CSMWorld::TableMimeData::~TableMimeData()
|
||||
{
|
||||
}
|
||||
|
||||
CSMWorld::UniversalId& CSMWorld::TableMimeData::getId()
|
||||
{
|
||||
return mUniversalId;
|
||||
}
|
||||
|
@ -1,10 +1,26 @@
|
||||
/*This class provides way to construct mimedata object holding the reference to the
|
||||
* universalid. universalid is used in the majority of the tables to store type, id, argument types*/
|
||||
|
||||
#ifndef TABLEMIMEDATA_H
|
||||
#define TABLEMIMEDATA_H
|
||||
|
||||
#include <qt4/QtCore/QMimeData>
|
||||
#include <QVariant>
|
||||
|
||||
class TableMimeData : public QMimeData
|
||||
namespace CSMWorld
|
||||
{
|
||||
};
|
||||
class UniversalId;
|
||||
class TableMimeData : public QMimeData
|
||||
{
|
||||
public:
|
||||
TableMimeData(UniversalId& UniversalId);
|
||||
~TableMimeData();
|
||||
virtual QStringList formats() const;
|
||||
UniversalId& getId();
|
||||
|
||||
private:
|
||||
QStringList mSupportedFormats;
|
||||
UniversalId& mUniversalId;
|
||||
};
|
||||
}
|
||||
#endif // TABLEMIMEDATA_H
|
||||
|
Loading…
Reference in New Issue