![]() |
HAL
|
#include <base_tree_item.h>
Public Member Functions | |
RootTreeItem (const QStringList &labels) | |
QVariant | getData (int column) const override |
void | setData (QList< QVariant > data) override |
void | setDataAtIndex (int index, QVariant &data) override |
void | appendData (QVariant data) override |
int | getColumnCount () const override |
![]() | |
BaseTreeItem () | |
BaseTreeItem (QList< QVariant > columnData) | |
virtual | ~BaseTreeItem () |
virtual BaseTreeItem * | getParent () const |
virtual void | setParent (BaseTreeItem *parent) |
virtual BaseTreeItem * | getChild (int row) const |
virtual QList< BaseTreeItem * > | getChildren () const |
virtual void | appendChild (BaseTreeItem *child) |
virtual void | insertChild (int index, BaseTreeItem *child) |
virtual BaseTreeItem * | removeChildAtPos (int row) |
virtual bool | removeChild (BaseTreeItem *child) |
virtual int | getChildCount () const |
virtual int | getRowForChild (const BaseTreeItem *child) const |
virtual int | getOwnRow () |
Additional Inherited Members | |
![]() | |
BaseTreeItem * | mParent |
QList< BaseTreeItem * > | mChildren |
Since the BaseTreeItem class is pure virtual it cannot be instanciated for root tree item.
RootTreeItem class also provides the header labels.
Definition at line 203 of file base_tree_item.h.
|
inline |
Definition at line 207 of file base_tree_item.h.
|
overridevirtual |
Appends a new column to the item.
data | - The data of the new column. |
Implements hal::BaseTreeItem.
Definition at line 124 of file base_tree_item.cpp.
|
inlineoverridevirtual |
Get number of sections for which header label exist.
Implements hal::BaseTreeItem.
Definition at line 243 of file base_tree_item.h.
References QList::size().
Referenced by hal::BaseTreeModel::columnCount().
|
overridevirtual |
Get header label for section.
column | The section of the header. |
Implements hal::BaseTreeItem.
Definition at line 102 of file base_tree_item.cpp.
References QList::at(), and QList::size().
Referenced by hal::BaseTreeModel::headerData().
Set header label to new value. If element in list does not exist it gets created.
column | The section of the header. |
data | The string value. |
Implements hal::BaseTreeItem.
Definition at line 109 of file base_tree_item.cpp.
References QList::clear(), and hal::data.
|
overridevirtual |
Sets the data for a specified column. The index must be within already existing boundaries (for example, add dummy data beforehand).
index | - The column to set the new data. |
data | - The new column data. |
Implements hal::BaseTreeItem.
Definition at line 117 of file base_tree_item.cpp.
References hal::data, and QList::size().
Referenced by hal::BaseTreeModel::setHeaderLabels().