17#include <QAbstractItemModel>
37 QVariant
data(
const QModelIndex&
index,
int role)
const override;
38 bool setData(
const QModelIndex&
index,
const QVariant& value,
40 Qt::ItemFlags
flags(
const QModelIndex&
index)
const override;
42 QVariant
headerData(
int section, Qt::Orientation orientation,
43 int role = Qt::DisplayRole)
const override;
44 QModelIndex
index(
int row,
int column,
45 const QModelIndex&
parent = QModelIndex())
const override;
46 QModelIndex
parent(
const QModelIndex&
index)
const override;
48 const QModelIndex&
parent)
override;
49 int rowCount(
const QModelIndex&
parent = QModelIndex())
const override;
Objects nodes for the TreeModel.
A hierarchical model for a tree implemented as a double-linked list.
void setupModelData(const QStringList &lines, TreeItem *parent)
bool removeRows(int position, int count, const QModelIndex &parent) override
TreeItem * getItem(const QModelIndex &index) const
int rowCount(const QModelIndex &parent=QModelIndex()) const override
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
QVariant data(const QModelIndex &index, int role) const override
QModelIndex parent(const QModelIndex &index) const override
TreeItem * rootItem() const
TreeModel(QObject *parent=nullptr)
int columnCount(const QModelIndex &parent=QModelIndex()) const override
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Qt::ItemFlags flags(const QModelIndex &index) const override
bool setData(const QModelIndex &index, const QVariant &value, int role) override