QPersistentModelIndex Class Reference |
QPersistentModelIndex ( const QModelIndex & index ) | |
QPersistentModelIndex ( const QPersistentModelIndex & other ) | |
QModelIndex | child ( int row, int column ) const |
int | column () const |
QVariant | data ( int role = Qt::DisplayRole ) const |
Qt::ItemFlags | flags () const |
bool | isValid () const |
const QAbstractItemModel * | model () const |
QModelIndex | parent () const |
int | row () const |
QModelIndex | sibling ( int row, int column ) const |
operator const QModelIndex & () const | |
bool | operator!= ( const QPersistentModelIndex & other ) const |
bool | operator!= ( const QModelIndex & other ) const |
bool | operator< ( const QPersistentModelIndex & other ) const |
QPersistentModelIndex & | operator= ( const QPersistentModelIndex & other ) |
QPersistentModelIndex & | operator= ( const QModelIndex & other ) |
bool | operator== ( const QPersistentModelIndex & other ) const |
bool | operator== ( const QModelIndex & other ) const |
The QPersistentModelIndex class is used to locate data in a data model.
A QPersistentModelIndex is a model index that can be stored by an application, and later used to access information in a model. Unlike the QModelIndex class, it is safe to store a QPersistentModelIndex since the model will ensure that references to items will continue to be valid as long as they can be accessed by the model.
It is good practice to check that persistent model indexes are valid before using them.
See also Model/View Programming, QModelIndex, and QAbstractItemModel.
Creates a new QPersistentModelIndex that is a copy of the model index.
Creates a new QPersistentModelIndex that is a copy of the other persistent model index.
Returns the child of the model index that is stored in the given row and column.
See also parent() and sibling().
Returns the column this persistent model index refers to.
Returns the data for the given role for the item referred to by the index.
See also Qt::ItemDataRole and QAbstractItemModel::setData().
Returns the flags for the item referred to by the index.
This function was introduced in Qt 4.2.
Returns true if this persistent model index is valid; otherwise returns false.
A valid index belongs to a model, and has non-negative row and column numbers.
See also model(), row(), and column().
Returns the model that the index belongs to.
Returns the parent QModelIndex for this persistent index, or an invalid QModelIndex if it has no parent.
See also child(), sibling(), and model().
Returns the row this persistent model index refers to.
Returns the sibling at row and column or an invalid QModelIndex if there is no sibling at this position.
See also parent() and child().
Cast operator that returns a const QModelIndex&.
Returns true if this persistent model index is not equal to the other persistent model index; otherwise returns false.
This function was introduced in Qt 4.2.
Returns true if this persistent model index does not refer to the same location as the other model index; otherwise returns false.
Returns true if this persistent model index is smaller than the other persistent model index; otherwise returns false.
All values in the persistent model index are used when comparing with another persistent model index.
This function was introduced in Qt 4.1.
Sets the persistent model index to refer to the same item in a model as the other persistent model index.
Sets the persistent model index to refer to the same item in a model as the other model index.
Returns true if this persistent model index is equal to the other persistent model index; otherwise returns false.
All values in the persistent model index are used when comparing with another persistent model index.
Returns true if this persistent model index refers to the same location as the other model index; otherwise returns false.
All values in the persistent model index are used when comparing with another model index.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com