Qt 6.x
The Qt SDK
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 72 of file qstandarditemmodel_p.h.

Constructor & Destructor Documentation

◆ QStandardItemPrivate()

QStandardItemPrivate::QStandardItemPrivate ( )
inline

Definition at line 76 of file qstandarditemmodel_p.h.

Member Function Documentation

◆ changeFlags()

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

Definition at line 138 of file qstandarditemmodel.cpp.

◆ childDeleted()

void QStandardItemPrivate::childDeleted ( QStandardItem child)

Definition at line 152 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 92 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 85 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 133 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 506 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 429 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 462 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 278 of file qstandarditemmodel.cpp.

References Qt::UserRole, and values.

◆ position()

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

Definition at line 56 of file qstandarditemmodel.cpp.

References parent.

◆ rowCount()

int QStandardItemPrivate::rowCount ( ) const
inline

Definition at line 130 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 71 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 230 of file qstandarditemmodel.cpp.

References Qt::DisplayRole, Qt::EditRole, it, QStandardItemModel::itemChanged(), QMap< Key, T >::keyBegin(), QMap< Key, T >::keyEnd(), QMap< Key, T >::keyValueBegin(), QMap< Key, T >::keyValueEnd(), model, QList< T >::push_back(), QList< T >::reserve(), QStandardItemData::role, and QMap< Key, T >::size().

+ 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 357 of file qstandarditemmodel.cpp.

References QList< T >::at(), children, i, QStandardItemModel::indexFromItem(), QList< T >::isEmpty(), QStandardItem::model(), model, QStack< T >::pop(), QStack< T >::push(), q_ptr, and QList< T >::size().

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 140 of file qstandarditemmodel_p.h.

References parent, and setModel().

Referenced by QStandardItem::takeChild().

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

◆ sortChildren()

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

Definition at line 292 of file qstandarditemmodel.cpp.

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

+ Here is the call graph for this function:

Member Data Documentation

◆ children

◆ columns

int QStandardItemPrivate::columns

◆ lastKnownIndex

int QStandardItemPrivate::lastKnownIndex
mutable

Definition at line 166 of file qstandarditemmodel_p.h.

◆ model

◆ parent

QStandardItem* QStandardItemPrivate::parent

Definition at line 158 of file qstandarditemmodel_p.h.

Referenced by position(), and setParentAndModel().

◆ q_ptr

QStandardItem* QStandardItemPrivate::q_ptr

Definition at line 164 of file qstandarditemmodel_p.h.

Referenced by setModel().

◆ rows

int QStandardItemPrivate::rows

◆ values

QList<QStandardItemData> QStandardItemPrivate::values

Definition at line 159 of file qstandarditemmodel_p.h.

Referenced by itemData().


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