1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 21:32:42 +00:00

40 lines
794 B
C++
Raw Normal View History

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