OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
tablemimedata.hpp
Go to the documentation of this file.
1 #ifndef TABLEMIMEDATA_H
2 #define TABLEMIMEDATA_H
3 
4 #include <vector>
5 
6 #include <QtCore/QMimeData>
7 #include <QStringList>
8 
9 #include "universalid.hpp"
10 #include "columnbase.hpp"
11 
12 namespace CSMDoc
13 {
14  class Document;
15 }
16 
17 namespace CSMWorld
18 {
19 
26 
27  class TableMimeData : public QMimeData
28  {
29  std::vector<UniversalId> mUniversalId;
30  QStringList mObjectsFormats;
32  public:
33  TableMimeData(UniversalId id, const CSMDoc::Document& document);
34 
35  TableMimeData(const std::vector<UniversalId>& id, const CSMDoc::Document& document);
36 
38 
39  virtual QStringList formats() const;
40 
41  std::string getIcon() const;
42 
43  std::vector<UniversalId> getData() const;
44 
45  bool holdsType(UniversalId::Type type) const;
46 
48 
49  bool fromDocument(const CSMDoc::Document& document) const;
50 
52 
53  const CSMDoc::Document* getDocumentPtr() const;
54 
56 
58 
60 
62  private:
64 
65  };
66 }
67 #endif // TABLEMIMEDATA_H
std::string getIcon() const
Definition: tablemimedata.cpp:35
Display
Definition: columnbase.hpp:39
Type
Definition: universalid.hpp:40
std::vector< UniversalId > mUniversalId
Definition: tablemimedata.hpp:29
static CSMWorld::UniversalId::Type convertEnums(CSMWorld::ColumnBase::Display type)
Definition: tablemimedata.cpp:274
bool fromDocument(const CSMDoc::Document &document) const
Definition: tablemimedata.cpp:207
const CSMDoc::Document * getDocumentPtr() const
Definition: tablemimedata.cpp:292
bool holdsType(UniversalId::Type type) const
Definition: tablemimedata.cpp:118
~TableMimeData()
Definition: tablemimedata.cpp:31
const CSMDoc::Document & mDocument
Definition: tablemimedata.hpp:31
UniversalId returnMatching(UniversalId::Type type) const
Definition: tablemimedata.cpp:162
virtual QStringList formats() const
Definition: tablemimedata.cpp:26
std::vector< UniversalId > getData() const
Definition: tablemimedata.cpp:66
Definition: document.hpp:57
TableMimeData(UniversalId id, const CSMDoc::Document &document)
Definition: tablemimedata.cpp:10
Subclass of QmimeData, augmented to contain and transport UniversalIds.
Definition: tablemimedata.hpp:27
QStringList mObjectsFormats
Definition: tablemimedata.hpp:30
static bool isReferencable(CSMWorld::UniversalId::Type type)
Definition: tablemimedata.cpp:94
Definition: universalid.hpp:12