OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
modelitem.hpp
Go to the documentation of this file.
1 #ifndef MODELITEM_HPP
2 #define MODELITEM_HPP
3 
4 #include <QMimeData>
5 #include <QList>
6 
7 namespace ContentSelectorModel
8 {
9  class ModelItem : public QMimeData
10  {
11  Q_OBJECT
12 
13  public:
15  //ModelItem(const ModelItem *parent = 0);
16 
17  ~ModelItem();
18 
19  ModelItem *parent() const;
20  int row() const;
21 
22  int childCount() const;
23  int childRow(ModelItem *child) const;
24  ModelItem *child(int row);
25 
26  void appendChild(ModelItem *child);
27  void removeChild(int row);
28 
29  bool hasFormat(const QString &mimetype) const;
30 
31  //virtual bool acceptChild(ModelItem *child);
32 
33  protected:
35  QList<ModelItem*> mChildItems;
36  };
37 }
38 
39 #endif
int childCount() const
Definition: modelitem.cpp:43
QList< ModelItem * > mChildItems
Definition: modelitem.hpp:35
bool hasFormat(const QString &mimetype) const
Definition: modelitem.cpp:25
ModelItem * child(int row)
Definition: modelitem.cpp:55
int childRow(ModelItem *child) const
Definition: modelitem.cpp:48
ModelItem(ModelItem *parent=0)
Definition: modelitem.cpp:3
Definition: modelitem.hpp:9
void appendChild(ModelItem *child)
Definition: modelitem.cpp:61
ModelItem * mParentItem
Definition: modelitem.hpp:34
void removeChild(int row)
Definition: modelitem.cpp:66
~ModelItem()
Definition: modelitem.cpp:14
ModelItem * parent() const
Definition: modelitem.cpp:20
int row() const
Definition: modelitem.cpp:32