MeVisLabToolboxReference
|
This class serves as an index into an AbstractItemModel. More...
#include <mlAbstractItemModel.h>
Public Member Functions | |
ModelIndex () | |
The only public constructor creates an invalid model index. | |
AbstractItemModel * | model () const |
get the model of this index (this will be NULL for invalid indices) | |
bool | isValid () const |
return if this index is valid i.e. it points at an item in the model | |
void * | userPtr () const |
access the internal user pointer (same as user value) | |
size_t | userID () const |
access the internal user value (same as user pointer) | |
Variant | getData (int attributeIndex) const |
convenience method, this calls model()->getData(this, attributeIndex); | |
bool | operator== (const ModelIndex &index) const |
bool | operator!= (const ModelIndex &index) const |
Friends | |
class | AbstractItemModel |
This class serves as an index into an AbstractItemModel.
It can only be generated from the model and internally either contains a void pointer or a integer which must be used to point at the item referenced.
Definition at line 34 of file mlAbstractItemModel.h.
ml::ModelIndex::ModelIndex | ( | ) | [inline] |
The only public constructor creates an invalid model index.
Definition at line 40 of file mlAbstractItemModel.h.
Variant ml::ModelIndex::getData | ( | int | attributeIndex | ) | const |
convenience method, this calls model()->getData(this, attributeIndex);
bool ml::ModelIndex::isValid | ( | void | ) | const [inline] |
return if this index is valid i.e. it points at an item in the model
Definition at line 46 of file mlAbstractItemModel.h.
AbstractItemModel* ml::ModelIndex::model | ( | ) | const [inline] |
get the model of this index (this will be NULL for invalid indices)
Definition at line 43 of file mlAbstractItemModel.h.
bool ml::ModelIndex::operator!= | ( | const ModelIndex & | index | ) | const |
bool ml::ModelIndex::operator== | ( | const ModelIndex & | index | ) | const |
size_t ml::ModelIndex::userID | ( | ) | const [inline] |
access the internal user value (same as user pointer)
Definition at line 52 of file mlAbstractItemModel.h.
void* ml::ModelIndex::userPtr | ( | ) | const [inline] |
access the internal user pointer (same as user value)
Definition at line 49 of file mlAbstractItemModel.h.
friend class AbstractItemModel [friend] |
Definition at line 61 of file mlAbstractItemModel.h.
size_t ml::ModelIndex::_userID |
Definition at line 68 of file mlAbstractItemModel.h.
void* ml::ModelIndex::_userPtr |
Definition at line 67 of file mlAbstractItemModel.h.