Definition at line 58 of file qabstractitemmodel.h.
#include <qabstractitemmodel.h>
Public Member Functions |
|
| QModelIndex () | |
| QModelIndex (const QModelIndex &other) | |
| ~QModelIndex () | |
| int | row () const |
| int | column () const |
| void * | internalPointer () const |
| qint64 | internalId () const |
| QModelIndex | parent () const |
| QModelIndex | sibling (int row, int column) const |
| QModelIndex | child (int row, int column) const |
| QVariant | data (int role=Qt::DisplayRole) const |
| Qt::ItemFlags | flags () const |
| const QAbstractItemModel * | model () const |
| bool | isValid () const |
| bool | operator== (const QModelIndex &other) const |
| bool | operator!= (const QModelIndex &other) const |
| bool | operator< (const QModelIndex &other) const |
Friends |
|
| class | QAbstractItemModel |
| class | QProxyModel |
| QModelIndex | ( | ) | [inline] |
Definition at line 63 of file qabstractitemmodel.h.
: r(-1), c(-1), p(0), m(0) {}
| QModelIndex | ( | const QModelIndex & | other | ) | [inline] |
Definition at line 64 of file qabstractitemmodel.h.
: r(other.r), c(other.c), p(other.p), m(other.m) {}
| ~QModelIndex | ( | ) | [inline] |
Definition at line 66 of file qabstractitemmodel.h.
{ p = 0; m = 0; }
| int row | ( | ) | const [inline] |
| int column | ( | ) | const [inline] |
| void* internalPointer | ( | ) | const [inline] |
| qint64 internalId | ( | ) | const [inline] |
Definition at line 70 of file qabstractitemmodel.h.
{ return reinterpret_cast<qint64>(p); }
| QModelIndex parent | ( | ) | const [inline] |
Definition at line 388 of file qabstractitemmodel.h.
{ return m ? m->parent(*this) : QModelIndex(); }
| QModelIndex sibling | ( | int | row, |
| int | column | ||
| ) | const [inline] |
Definition at line 391 of file qabstractitemmodel.h.
{ return m ? (r == arow && c == acolumn) ? *this : m->index(arow, acolumn, m->parent(*this)) : QModelIndex(); }
| QModelIndex child | ( | int | row, |
| int | column | ||
| ) | const [inline] |
Definition at line 394 of file qabstractitemmodel.h.
{ return m ? m->index(arow, acolumn, *this) : QModelIndex(); }
| QVariant data | ( | int | role =
Qt::DisplayRole |
) | const [inline] |
Definition at line 397 of file qabstractitemmodel.h.
| Qt::ItemFlags flags | ( | ) | const [inline] |
Definition at line 400 of file qabstractitemmodel.h.
{ return m ? m->flags(*this) : Qt::ItemFlags(0); }
| const QAbstractItemModel* model | ( | ) | const [inline] |
| bool isValid | ( | ) | const [inline] |
Definition at line 77 of file qabstractitemmodel.h.
{ return (r >= 0) && (c >= 0) && (m != 0); }
| bool operator== | ( | const QModelIndex & | other | ) | const [inline] |
Definition at line 78 of file qabstractitemmodel.h.
{ return (other.r == r) && (other.p == p) && (other.c == c) && (other.m == m); }
| bool operator!= | ( | const QModelIndex & | other | ) | const [inline] |
Definition at line 80 of file qabstractitemmodel.h.
{ return !(*this == other); }
| bool operator< | ( | const QModelIndex & | other | ) | const [inline] |
Definition at line 82 of file qabstractitemmodel.h.
{
if (r < other.r) return true;
if (r == other.r) {
if (c < other.c) return true;
if (c == other.c) {
if (p < other.p) return true;
if (p == other.p) return m < other.m;
}
}
return false; }
friend class QAbstractItemModel
[friend] |
Definition at line 60 of file qabstractitemmodel.h.
friend class QProxyModel
[friend] |
Definition at line 61 of file qabstractitemmodel.h.