1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 00:23:53 +00:00
openmw/components/contentselector/model/modelitem.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
794 B
C++
Raw Normal View History

#ifndef MODELITEM_HPP
#define MODELITEM_HPP
#include <QList>
2013-09-07 20:57:40 +00:00
#include <QMimeData>
namespace ContentSelectorModel
{
2013-09-07 20:57:40 +00:00
class ModelItem : public QMimeData
{
Q_OBJECT
public:
2020-11-13 07:39:47 +00:00
ModelItem(ModelItem* parent = nullptr);
2013-09-07 20:57:40 +00:00
// ModelItem(const ModelItem *parent = 0);
~ModelItem();
2013-09-07 20:57:40 +00: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 20:57:40 +00:00
// virtual bool acceptChild(ModelItem *child);
protected:
ModelItem* mParentItem;
QList<ModelItem*> mChildItems;
};
}
#endif