OGS
|
A TreeItem containing some additional information used in the StationModel.
Definition at line 27 of file ModelTreeItem.h.
#include <ModelTreeItem.h>
Public Member Functions | |
ModelTreeItem (const QList< QVariant > &data, TreeItem *parent, BaseItem *item=nullptr) | |
~ModelTreeItem () override | |
GeoLib::Station * | getStation () |
Returns the station object from which this item has been constructed. | |
BaseItem * | getItem () const |
Returns the BaseItem associated with this item. | |
void | setStation (GeoLib::Station *stn) |
Associates a station object with this item. | |
void | setItem (BaseItem *item) |
Associates a BaseItem with this item. | |
Public Member Functions inherited from TreeItem | |
TreeItem (QList< QVariant > data, TreeItem *parent) | |
virtual | ~TreeItem () |
void | appendChild (TreeItem *item) |
TreeItem * | child (int row) const |
virtual int | childCount () const |
virtual int | columnCount () const |
virtual QVariant | data (int column) const |
virtual bool | setData (int column, const QVariant &value) |
int | row () const |
TreeItem * | parentItem () const |
bool | removeChildren (int position, int count) |
Private Attributes | |
BaseItem * | _item |
GeoLib::Station * | _stn |
ModelTreeItem::ModelTreeItem | ( | const QList< QVariant > & | data, |
TreeItem * | parent, | ||
BaseItem * | item = nullptr ) |
Constructor
data | The data associated with each column |
parent | The parent item in the tree |
item | The ModelItem-object |
Definition at line 17 of file ModelTreeItem.cpp.
|
inlineoverride |
BaseItem * ModelTreeItem::getItem | ( | ) | const |
|
inline |
Returns the station object from which this item has been constructed.
Definition at line 40 of file ModelTreeItem.h.
References _stn.
|
inline |
Associates a BaseItem with this item.
Definition at line 49 of file ModelTreeItem.h.
References _item.
|
inline |
Associates a station object with this item.
Definition at line 46 of file ModelTreeItem.h.
References _stn.
|
private |
Definition at line 52 of file ModelTreeItem.h.
Referenced by ~ModelTreeItem(), getItem(), and setItem().
|
private |
Definition at line 53 of file ModelTreeItem.h.
Referenced by getStation(), and setStation().