#include <TreeModel.hxx>
|
| TreeModel (const QStringList &headers, QObject *parent=0) |
|
| ~TreeModel () |
|
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
|
QModelIndex | parent (const QModelIndex &index) const |
|
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
|
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
|
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
|
bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole) |
|
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
|
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
|
Qt::ItemFlags | flags (const QModelIndex &index) const |
|
bool | addData (DataObject *dataObject) |
|
bool | addData (DataObject *dataObject, const QStringList &path) |
|
bool | removeData (DataObject *dataObject) |
|
TreeItem * | getRootItem () |
|
◆ TreeModel()
TreeModel::TreeModel |
( |
const QStringList & |
headers, |
|
|
QObject * |
parent = 0 |
|
) |
| |
◆ ~TreeModel()
TreeModel::~TreeModel |
( |
| ) |
|
◆ addData() [1/2]
bool TreeModel::addData |
( |
DataObject * |
dataObject | ) |
|
◆ addData() [2/2]
bool TreeModel::addData |
( |
DataObject * |
dataObject, |
|
|
const QStringList & |
path |
|
) |
| |
◆ columnCount()
int TreeModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
◆ data()
QVariant TreeModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
This function is used by the tree model to inform the tree view of what data used for rendering of the item in the different possible role (edition, ...).
References TreeItem::data(), getItem(), and index().
◆ flags()
Qt::ItemFlags TreeModel::flags |
( |
const QModelIndex & |
index | ) |
const |
◆ getItem()
TreeItem * TreeModel::getItem |
( |
const QModelIndex & |
index = QModelIndex() | ) |
const |
|
private |
This retrieves the item asociated to the specified index.
References _rootItem, and index().
◆ getRootItem()
◆ headerData()
QVariant TreeModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
◆ index()
QModelIndex TreeModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
◆ parent()
QModelIndex TreeModel::parent |
( |
const QModelIndex & |
index | ) |
const |
◆ removeData()
bool TreeModel::removeData |
( |
DataObject * |
dataObject | ) |
|
◆ rowCount()
int TreeModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
◆ setData()
bool TreeModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
◆ setHeaderData()
bool TreeModel::setHeaderData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
◆ TreeItem
◆ TreeView
◆ _rootItem
The documentation for this class was generated from the following files: