QModelIndex Class Reference

QModelIndex Class Reference

#include <qabstractitemmodel.h>

Class Description

Definition at line 58 of file qabstractitemmodel.h.

Public Member Functions

 QModelIndex ()
 
 QModelIndex (const QModelIndex &other)
 
 ~QModelIndex ()
 
int row () const
 
int column () const
 
voidinternalPointer () 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 QAbstractItemModelmodel () 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
 

Constructor & Destructor Documentation

QModelIndex ( )
inline

Definition at line 63 of file qabstractitemmodel.h.

63 : r(-1), c(-1), p(0), m(0) {}
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
GLfloat GLfloat p
Definition: GLee.h:5416
const GLubyte * c
Definition: GLee.h:5419
QModelIndex ( const QModelIndex other)
inline

Definition at line 64 of file qabstractitemmodel.h.

65  : r(other.r), c(other.c), p(other.p), m(other.m) {}
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
GLfloat GLfloat p
Definition: GLee.h:5416
const GLubyte * c
Definition: GLee.h:5419
~QModelIndex ( )
inline

Definition at line 66 of file qabstractitemmodel.h.

66 { p = 0; m = 0; }
GLfloat GLfloat p
Definition: GLee.h:5416

Member Function Documentation

int row ( ) const
inline

Definition at line 67 of file qabstractitemmodel.h.

67 { return r; }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
int column ( ) const
inline

Definition at line 68 of file qabstractitemmodel.h.

68 { return c; }
const GLubyte * c
Definition: GLee.h:5419
void* internalPointer ( ) const
inline

Definition at line 69 of file qabstractitemmodel.h.

69 { return p; }
GLfloat GLfloat p
Definition: GLee.h:5416
qint64 internalId ( ) const
inline

Definition at line 70 of file qabstractitemmodel.h.

70 { return reinterpret_cast<qint64>(p); }
long long qint64
Definition: qglobal.h:947
GLfloat GLfloat p
Definition: GLee.h:5416
QModelIndex parent ( ) const
inline

Definition at line 392 of file qabstractitemmodel.h.

393 { return m ? m->parent(*this) : QModelIndex(); }
virtual QModelIndex parent(const QModelIndex &child) const =0
QModelIndex sibling ( int  row,
int  column 
) const
inline

Definition at line 395 of file qabstractitemmodel.h.

396 { return m ? (r == arow && c == acolumn) ? *this : m->index(arow, acolumn, m->parent(*this)) : QModelIndex(); }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
virtual QModelIndex parent(const QModelIndex &child) const =0
const GLubyte * c
Definition: GLee.h:5419
QModelIndex child ( int  row,
int  column 
) const
inline

Definition at line 398 of file qabstractitemmodel.h.

399 { return m ? m->index(arow, acolumn, *this) : QModelIndex(); }
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
QVariant data ( int  role = Qt::DisplayRole) const
inline

Definition at line 401 of file qabstractitemmodel.h.

402 { return m ? m->data(*this, arole) : QVariant(); }
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const =0
Qt::ItemFlags flags ( ) const
inline

Definition at line 404 of file qabstractitemmodel.h.

405 { return m ? m->flags(*this) : Qt::ItemFlags(0); }
virtual Qt::ItemFlags flags(const QModelIndex &index) const
const QAbstractItemModel* model ( ) const
inline

Definition at line 76 of file qabstractitemmodel.h.

76 { return m; }
bool isValid ( ) const
inline

Definition at line 77 of file qabstractitemmodel.h.

77 { return (r >= 0) && (c >= 0) && (m != 0); }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
const GLubyte * c
Definition: GLee.h:5419
bool operator== ( const QModelIndex other) const
inline

Definition at line 78 of file qabstractitemmodel.h.

79  { return (other.r == r) && (other.p == p) && (other.c == c) && (other.m == m); }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
GLfloat GLfloat p
Definition: GLee.h:5416
const GLubyte * c
Definition: GLee.h:5419
bool operator!= ( const QModelIndex other) const
inline

Definition at line 80 of file qabstractitemmodel.h.

81  { return !(*this == other); }
bool operator< ( const QModelIndex other) const
inline

Definition at line 82 of file qabstractitemmodel.h.

83  {
84  if (r < other.r) return true;
85  if (r == other.r) {
86  if (c < other.c) return true;
87  if (c == other.c) {
88  if (p < other.p) return true;
89  if (p == other.p) return m < other.m;
90  }
91  }
92  return false; }
GLdouble GLdouble GLdouble r
Definition: GLee.h:1189
GLfloat GLfloat p
Definition: GLee.h:5416
const GLubyte * c
Definition: GLee.h:5419

Friends And Related Function Documentation

friend class QAbstractItemModel
friend

Definition at line 60 of file qabstractitemmodel.h.

friend class QProxyModel
friend

Definition at line 61 of file qabstractitemmodel.h.


The documentation for this class was generated from the following file: