mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 11:23:51 +00:00
Attempt to get basic tablemimedata subclass.
This commit is contained in:
parent
a36cc26434
commit
dc80bfff55
3 changed files with 40 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "../../model/world/idtable.hpp"
|
||||
#include "../../model/world/record.hpp"
|
||||
#include "../../model/world/columns.hpp"
|
||||
#include "../../model/world/tablemimedata.hpp"
|
||||
|
||||
#include "recordstatusdelegate.hpp"
|
||||
#include "util.hpp"
|
||||
|
|
Loading…
Reference in a new issue