1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00
OpenMW/apps/opencs/model/world/tablemimedata.hpp

40 lines
1.2 KiB
C++
Raw Normal View History

/*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 <vector>
2014-02-09 15:33:00 +01:00
#include <QtCore/QMimeData>
2014-02-04 11:40:48 +01:00
#include <QStringList>
#include "universalid.hpp"
2014-02-13 10:21:49 +01:00
#include "columnbase.hpp"
2014-02-04 11:40:48 +01:00
namespace CSMWorld
{
class TableMimeData : public QMimeData
{
public:
2014-02-04 11:40:48 +01:00
TableMimeData(UniversalId id);
TableMimeData(std::vector<UniversalId>& id);
~TableMimeData();
virtual QStringList formats() const;
std::string getIcon() const;
std::vector<UniversalId> getData() const;
2014-02-13 10:21:49 +01:00
bool holdsType(UniversalId::Type type) const;
bool holdsType(CSMWorld::ColumnBase::Display type);
UniversalId returnMatching(UniversalId::Type type) const;
UniversalId returnMatching(CSMWorld::ColumnBase::Display type);
private:
std::vector<UniversalId> mUniversalId;
QStringList mObjectsFormats;
2014-02-13 10:21:49 +01:00
CSMWorld::UniversalId::Type convertEnums(CSMWorld::ColumnBase::Display type);
};
}
2014-02-13 10:21:49 +01:00
#endif // TABLEMIMEDATA_H