Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QStandardItemPrivate Class Reference

#include <qstandarditemmodel_p.h>

+ Collaboration diagram for QStandardItemPrivate:

Public Member Functions

 QStandardItemPrivate ()
 
int childIndex (int row, int column) const
 
int childIndex (const QStandardItem *child) const
 
QPair< int, int > position () const
 
void setChild (int row, int column, QStandardItem *item, bool emitChanged=false)
 
int rowCount () const
 
int columnCount () const
 
void childDeleted (QStandardItem *child)
 
void setModel (QStandardItemModel *mod)
 
void setParentAndModel (QStandardItem *par, QStandardItemModel *mod)
 
void changeFlags (bool enable, Qt::ItemFlags f)
 
void setItemData (const QMap< int, QVariant > &roles)
 
QMap< int, QVariantitemData () const
 
bool insertRows (int row, int count, const QList< QStandardItem * > &items)
 
bool insertRows (int row, const QList< QStandardItem * > &items)
 
bool insertColumns (int column, int count, const QList< QStandardItem * > &items)
 
void sortChildren (int column, Qt::SortOrder order)
 

Public Attributes

QStandardItemModelmodel
 
QStandardItemparent
 
QList< QStandardItemDatavalues
 
QList< QStandardItem * > children
 
int rows
 
int columns
 
QStandardItemq_ptr
 
int lastKnownIndex
 

Detailed Description

Definition at line 74 of file qstandarditemmodel_p.h.

Constructor & Destructor Documentation

◆ QStandardItemPrivate()

QStandardItemPrivate::QStandardItemPrivate ( )
inline

Definition at line 78 of file qstandarditemmodel_p.h.

Member Function Documentation

◆ changeFlags()

void QStandardItemPrivate::changeFlags ( bool enable,
Qt::ItemFlags f )

Definition at line 143 of file qstandarditemmodel.cpp.

◆ childDeleted()

void QStandardItemPrivate::childDeleted ( QStandardItem * child)

Definition at line 157 of file qstandarditemmodel.cpp.

References child, childIndex(), children, QAbstractItemModel::dataChanged(), emit, model, Q_ASSERT, and QList< T >::replace().

+ Here is the call graph for this function:

◆ childIndex() [1/2]

int QStandardItemPrivate::childIndex ( const QStandardItem * child) const
inline

Definition at line 94 of file qstandarditemmodel_p.h.

References QList< T >::at(), child, children, and QList< T >::size().

+ Here is the call graph for this function:

◆ childIndex() [2/2]

int QStandardItemPrivate::childIndex ( int row,
int column ) const
inline

Definition at line 87 of file qstandarditemmodel_p.h.

References columnCount(), and rowCount().

Referenced by childDeleted(), insertColumns(), insertRows(), insertRows(), setChild(), and sortChildren().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ columnCount()

int QStandardItemPrivate::columnCount ( ) const
inline

Definition at line 135 of file qstandarditemmodel_p.h.

References columns.

Referenced by childIndex(), insertColumns(), insertRows(), insertRows(), and sortChildren().

+ Here is the caller graph for this function:

◆ insertColumns()

bool QStandardItemPrivate::insertColumns ( int column,
int count,
const QList< QStandardItem * > & items )

Definition at line 510 of file qstandarditemmodel.cpp.

References QList< T >::at(), childIndex(), children, columnCount(), columns, QAbstractItemModel::columnsAboutToBeInserted(), QAbstractItemModel::columnsInserted(), i, QList< T >::insert(), QList< T >::isEmpty(), item, items, model, qMin(), qWarning, QList< T >::replace(), QList< T >::resize(), rowCount(), and QList< T >::size().

+ Here is the call graph for this function:

◆ insertRows() [1/2]

bool QStandardItemPrivate::insertRows ( int row,
const QList< QStandardItem * > & items )

Definition at line 433 of file qstandarditemmodel.cpp.

References QList< T >::at(), childIndex(), children, columnCount(), i, QList< T >::insert(), QList< T >::isEmpty(), item, items, model, QList< T >::replace(), QList< T >::resize(), rowCount(), rows, QAbstractItemModel::rowsAboutToBeInserted(), QAbstractItemModel::rowsInserted(), and QList< T >::size().

+ Here is the call graph for this function:

◆ insertRows() [2/2]

bool QStandardItemPrivate::insertRows ( int row,
int count,
const QList< QStandardItem * > & items )

Definition at line 466 of file qstandarditemmodel.cpp.

References QList< T >::at(), childIndex(), children, columnCount(), i, QList< T >::insert(), QList< T >::isEmpty(), item, items, model, qMin(), qWarning, QList< T >::replace(), QList< T >::resize(), rowCount(), rows, QAbstractItemModel::rowsAboutToBeInserted(), QAbstractItemModel::rowsInserted(), and QList< T >::size().

+ Here is the call graph for this function:

◆ itemData()

QMap< int, QVariant > QStandardItemPrivate::itemData ( ) const

Definition at line 283 of file qstandarditemmodel.cpp.

References values.

◆ position()

QPair< int, int > QStandardItemPrivate::position ( ) const

Definition at line 61 of file qstandarditemmodel.cpp.

References parent.

◆ rowCount()

int QStandardItemPrivate::rowCount ( ) const
inline

Definition at line 132 of file qstandarditemmodel_p.h.

References rows.

Referenced by childIndex(), insertColumns(), insertRows(), insertRows(), and sortChildren().

+ Here is the caller graph for this function:

◆ setChild()

void QStandardItemPrivate::setChild ( int row,
int column,
QStandardItem * item,
bool emitChanged = false )

Definition at line 76 of file qstandarditemmodel.cpp.

References QList< T >::at(), childIndex(), children, columns, QAbstractItemModel::dataChanged(), emit, QStandardItemModel::index(), item, QStandardItemModel::itemChanged(), QAbstractItemModel::layoutAboutToBeChanged(), QAbstractItemModel::layoutChanged(), model, Q_ASSERT, qWarning, QList< T >::replace(), and rows.

+ Here is the call graph for this function:

◆ setItemData()

void QStandardItemPrivate::setItemData ( const QMap< int, QVariant > & roles)

Definition at line 235 of file qstandarditemmodel.cpp.

References Qt::DisplayRole, Qt::EditRole, it, QStandardItemModel::itemChanged(), and model.

+ Here is the call graph for this function:

◆ setModel()

void QStandardItemPrivate::setModel ( QStandardItemModel * mod)

set the model of this item and all its children

Definition at line 361 of file qstandarditemmodel.cpp.

References children, i, QStandardItemModel::indexFromItem(), QList< T >::isEmpty(), QStandardItem::model(), model, and q_ptr.

Referenced by setParentAndModel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setParentAndModel()

void QStandardItemPrivate::setParentAndModel ( QStandardItem * par,
QStandardItemModel * mod )
inline

Definition at line 142 of file qstandarditemmodel_p.h.

References parent, and setModel().

+ Here is the call graph for this function:

◆ sortChildren()

void QStandardItemPrivate::sortChildren ( int column,
Qt::SortOrder order )

Definition at line 296 of file qstandarditemmodel.cpp.

References Qt::AscendingOrder, QList< T >::begin(), QAbstractItemModel::changePersistentIndexList(), QStandardItem::child(), childIndex(), children, columnCount(), QAbstractItemModel::createIndex(), QList< T >::end(), i, it, model, rowCount(), and QList< T >::size().

+ Here is the call graph for this function:

Member Data Documentation

◆ children

QList<QStandardItem *> QStandardItemPrivate::children

◆ columns

int QStandardItemPrivate::columns

Definition at line 164 of file qstandarditemmodel_p.h.

Referenced by columnCount(), insertColumns(), and setChild().

◆ lastKnownIndex

int QStandardItemPrivate::lastKnownIndex
mutable

Definition at line 168 of file qstandarditemmodel_p.h.

◆ model

◆ parent

QStandardItem* QStandardItemPrivate::parent

Definition at line 160 of file qstandarditemmodel_p.h.

Referenced by position(), and setParentAndModel().

◆ q_ptr

QStandardItem* QStandardItemPrivate::q_ptr

Definition at line 166 of file qstandarditemmodel_p.h.

Referenced by setModel().

◆ rows

int QStandardItemPrivate::rows

Definition at line 163 of file qstandarditemmodel_p.h.

Referenced by insertRows(), insertRows(), rowCount(), and setChild().

◆ values

QList<QStandardItemData> QStandardItemPrivate::values

Definition at line 161 of file qstandarditemmodel_p.h.

Referenced by itemData().


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