1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

40 lines
792 B
C++
Raw Normal View History

#ifndef MODELITEM_HPP
#define MODELITEM_HPP
2013-09-07 15:57:40 -05:00
#include <QMimeData>
#include <QList>
namespace ContentSelectorModel
{
2013-09-07 15:57:40 -05:00
class ModelItem : public QMimeData
{
Q_OBJECT
public:
2020-11-13 11:39:47 +04:00
ModelItem(ModelItem *parent = nullptr);
2013-09-07 15:57:40 -05:00
//ModelItem(const ModelItem *parent = 0);
~ModelItem();
2013-09-07 15:57:40 -05:00
ModelItem *parent() const;
int row() const;
int childCount() const;
int childRow(ModelItem *child) const;
ModelItem *child(int row);
void appendChild(ModelItem *child);
void removeChild(int row);
bool hasFormat(const QString &mimetype) const override;
2013-09-07 15:57:40 -05:00
//virtual bool acceptChild(ModelItem *child);
protected:
ModelItem *mParentItem;
QList<ModelItem*> mChildItems;
};
}
#endif