This class serves as an index into an AbstractItemModel.
More...
#include <mlAbstractItemModel.h>
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 40 of file mlAbstractItemModel.h.
◆ ModelIndex() [1/2]
ml::ModelIndex::ModelIndex |
( |
| ) |
|
|
inline |
The only public constructor creates an "invalid" model index, which represents the virtual/invisible root item in every model.
Definition at line 47 of file mlAbstractItemModel.h.
◆ ModelIndex() [2/2]
ml::ModelIndex::ModelIndex |
( |
const ModelIndex & |
other | ) |
|
◆ ~ModelIndex()
ml::ModelIndex::~ModelIndex |
( |
| ) |
|
◆ getData()
Variant ml::ModelIndex::getData |
( |
int |
attributeIndex | ) |
const |
convenience method, this calls model()->getData(this, attributeIndex);
◆ isValid()
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 55 of file mlAbstractItemModel.h.
◆ model()
get the model of this index (this will be NULL for invalid indices)
Definition at line 52 of file mlAbstractItemModel.h.
◆ operator!=()
bool ml::ModelIndex::operator!= |
( |
const ModelIndex & |
index | ) |
const |
◆ operator=()
explicit assignment operator (handles reference counting if necessary)
◆ operator==()
bool ml::ModelIndex::operator== |
( |
const ModelIndex & |
index | ) |
const |
◆ userID()
size_t ml::ModelIndex::userID |
( |
| ) |
const |
|
inline |
◆ userPtr()
void* ml::ModelIndex::userPtr |
( |
| ) |
const |
|
inline |
◆ AbstractItemModel
◆ _userID
size_t ml::ModelIndex::_userID |
◆ _userPtr
void* ml::ModelIndex::_userPtr |
The documentation for this class was generated from the following file: