#include <TreeItem.hxx>
◆ TreeItem()
| TreeItem::TreeItem |
( |
const QString & |
nameId, |
|
|
const QVector< QVariant > & |
columnValues, |
|
|
TreeItem * |
parent = 0 |
|
) |
| |
◆ ~TreeItem()
◆ appendChild() [1/3]
| void TreeItem::appendChild |
( |
const QString & |
nameId, |
|
|
const QVector< QVariant > & |
columnValues, |
|
|
const QStringList & |
relativePath = QStringList() |
|
) |
| |
◆ appendChild() [2/3]
| void TreeItem::appendChild |
( |
DataObject * |
dataObject, |
|
|
const QStringList & |
relativePath = QStringList() |
|
) |
| |
This creates an item from the specified dataObject and put it in the decendency of this item at the specified relativePath. The created item could not be a direct child of this item in the case where the relative path is not null. Note that no reference on the dataObject is kept in this instance. Only the identifier is used to set the item identifier, and the properties may be used to set the values of the item (stored in columns).
References appendChild(), DataObject::getLabel(), DataObject::getNameId(), and nameId().
◆ appendChild() [3/3]
| void TreeItem::appendChild |
( |
TreeItem * |
item | ) |
|
◆ associatedModel()
◆ associateToModel()
| void TreeItem::associateToModel |
( |
TreeModel * |
model | ) |
|
This must be used to specified which model this item belongs to. It is required because the item sometimes requests its model for global informations about the data tree. In standard usage, this function is automatically set when the item is instantiated by requested the parent item. Then only the root item needs a manual setting.
References _associatedModel.
◆ child()
The child() function returns the child that corresponds to the specified row number in the item's list of child items.
References _childItems.
◆ childById()
| TreeItem * TreeItem::childById |
( |
const QString & |
nameId | ) |
|
◆ childByLabel()
| TreeItem * TreeItem::childByLabel |
( |
const QString & |
label | ) |
|
◆ childCount()
| int TreeItem::childCount |
( |
| ) |
const |
◆ columnCount()
| int TreeItem::columnCount |
( |
| ) |
const |
◆ data()
| QVariant TreeItem::data |
( |
int |
column | ) |
const |
◆ initialize()
| void TreeItem::initialize |
( |
const QString & |
nameId, |
|
|
const QVector< QVariant > & |
columnValues, |
|
|
TreeItem * |
parent |
|
) |
| |
|
private |
◆ modelIndex()
| QModelIndex TreeItem::modelIndex |
( |
int |
column = 0 | ) |
|
◆ nameId()
| QString TreeItem::nameId |
( |
| ) |
|
This provide an identifier for this item
References _itemNameId.
◆ parent()
◆ removeChild() [1/2]
| void TreeItem::removeChild |
( |
DataObject * |
dataObject, |
|
|
const QStringList & |
relativePath = QStringList() |
|
) |
| |
◆ removeChild() [2/2]
| void TreeItem::removeChild |
( |
TreeItem * |
item | ) |
|
◆ rowIndex()
| int TreeItem::rowIndex |
( |
| ) |
const |
◆ setData()
| bool TreeItem::setData |
( |
int |
column, |
|
|
const QVariant & |
value |
|
) |
| |
◆ _associatedModel
◆ _childItems
◆ _childItemsMapById
| QMap<QString, TreeItem *> TreeItem::_childItemsMapById |
|
private |
◆ _childItemsMapByLabel
| QMap<QString, TreeItem *> TreeItem::_childItemsMapByLabel |
|
private |
◆ _itemData
| QVector<QVariant> TreeItem::_itemData |
|
private |
◆ _itemNameId
| QString TreeItem::_itemNameId |
|
private |
◆ _parentItem
The documentation for this class was generated from the following files: