Go to the documentation of this file.
30 #include <QStringList>
33 : QAbstractItemModel(parent)
57 if (role != Qt::DisplayRole)
77 return QAbstractItemModel::flags(
index) & (~Qt::ItemIsEnabled);
81 return QAbstractItemModel::flags(
index) | (Qt::ItemIsEnabled);
88 if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
99 if (!hasIndex(row, column,
parent))
101 return QModelIndex();
109 QModelIndex result = createIndex(row, column, childItem);
114 return QModelIndex();
120 if (!
index.isValid())
122 return QModelIndex();
128 if (parentItem ==
rootItem || parentItem ==
nullptr)
130 return QModelIndex();
133 return createIndex(parentItem->
row(), 0, parentItem);
169 beginInsertColumns(
parent, position, position);
180 beginRemoveColumns(
parent, position, position);
197 beginInsertRows(
parent, position, position);
209 beginRemoveRows(
parent, position, position);
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
ScalarT Orientation(const VectorXD< 2, ScalarT > &p1, const VectorXD< 2, ScalarT > &p2, const VectorXD< 2, ScalarT > &c)
bool insertRow(int position, TreeItem *item, const QModelIndex &parent=QModelIndex())
bool removeColumn(int position)
virtual QVariant data(int column) const
bool insertChild(int position, TreeItem *child)
Qt::ItemFlags flags(const QModelIndex &index) const override
QModelIndex parent(const QModelIndex &index) const override
bool removeColumn(int position, const QModelIndex &parent=QModelIndex())
TreeItem * child(int row)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
QVariant data(const QModelIndex &index, int role) const override
TreeItem * getItem(const QModelIndex &index) const
TreeModel(QObject *parent=0)
bool removeRow(int position, const QModelIndex &parent=QModelIndex())
bool insertColumn(int position, QVariant data, const QModelIndex &parent=QModelIndex())
bool removeChild(int position)
bool insertColumn(int position, QVariant data)
int columnCount(const QModelIndex &parent=QModelIndex()) const override
int rowCount(const QModelIndex &parent=QModelIndex()) const override