OpenMW
components/contentselector/model/modelitem.hpp
Go to the documentation of this file.
00001 #ifndef MODELITEM_HPP
00002 #define MODELITEM_HPP
00003 
00004 #include <QMimeData>
00005 #include <QList>
00006 
00007 namespace ContentSelectorModel
00008 {
00009     class ModelItem : public QMimeData
00010     {
00011         Q_OBJECT
00012 
00013     public:
00014         ModelItem(ModelItem *parent = 0);
00015         //ModelItem(const ModelItem *parent = 0);
00016 
00017         ~ModelItem();
00018 
00019         ModelItem *parent() const;
00020         int row() const;
00021 
00022         int childCount() const;
00023         int childRow(ModelItem *child) const;
00024         ModelItem *child(int row);
00025 
00026         void appendChild(ModelItem *child);
00027         void removeChild(int row);
00028 
00029         bool hasFormat(const QString &mimetype) const;
00030 
00031         //virtual bool acceptChild(ModelItem *child);
00032 
00033     protected:
00034         ModelItem *mParentItem;
00035         QList<ModelItem*> mChildItems;
00036     };
00037 }
00038 
00039 #endif