#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 |
( |
const QStringList & |
headers, |
|
|
QObject * |
parent = 0 |
|
) |
| |
TreeModel::~TreeModel |
( |
| ) |
|
bool TreeModel::addData |
( |
DataObject * |
dataObject | ) |
|
bool TreeModel::addData |
( |
DataObject * |
dataObject, |
|
|
const QStringList & |
path |
|
) |
| |
int TreeModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
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(), and getItem().
Qt::ItemFlags TreeModel::flags |
( |
const QModelIndex & |
index | ) |
const |
TreeItem * TreeModel::getItem |
( |
const QModelIndex & |
index = QModelIndex() | ) |
const |
|
private |
This retrieves the item asociated to the specified index.
References _rootItem.
QVariant TreeModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
QModelIndex TreeModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
This retrieves the index of the item located at (row,column) place relative to the parent specified by its index.
References TreeItem::child(), and getItem().
QModelIndex TreeModel::parent |
( |
const QModelIndex & |
index | ) |
const |
bool TreeModel::removeData |
( |
DataObject * |
dataObject | ) |
|
int TreeModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
bool TreeModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
bool TreeModel::setHeaderData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
The documentation for this class was generated from the following files: