Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QGenericTreeItemModelImpl< Range, Protocol > Class Template Reference

#include <qrangemodel_impl.h>

Inheritance diagram for QGenericTreeItemModelImpl< Range, Protocol >:
Collaboration diagram for QGenericTreeItemModelImpl< Range, Protocol >:

Public Member Functions

 QGenericTreeItemModelImpl (Range &&model, Protocol &&p, QRangeModel *itemModel)
void setParentRow (range_type &children, row_ptr parent)
void deleteRemovedRows (range_type &range)
bool autoConnectProperties (const QModelIndex &parent) const
Public Member Functions inherited from QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >
 QRangeModelImpl (Range &&model, Protocol &&protocol, QRangeModel *itemModel)
void interfaceVersion (int &versionNumber) const
void invalidateCaches ()
bool setHeaderData (int, Qt::Orientation, const QVariant &, int)
QModelIndex index (int row, int column, const QModelIndex &parent) const
QModelIndex sibling (int row, int column, const QModelIndex &index) const
Qt::ItemFlags flags (const QModelIndex &index) const
QVariant headerData (int section, Qt::Orientation orientation, int role) const
QVariant data (const QModelIndex &index, int role) const
QMap< int, QVariantitemData (const QModelIndex &index) const
void multiData (const QModelIndex &index, QModelRoleDataSpan roleDataSpan) const
bool setData (const QModelIndex &index, const QVariant &data, int role)
void updateTarget (LHS &org, RHS &&copy) noexcept
void updateTarget (LHS *org, RHS &&copy) noexcept
bool setItemData (const QModelIndex &index, const QMap< int, QVariant > &data)
bool clearItemData (const QModelIndex &index)
QHash< int, QByteArrayroleNames () const
bool autoConnectPropertiesInRow (const row_type &row, int rowIndex, const QModelIndex &parent) const
void clearConnectionInRow (const row_type &row, int rowIndex, const QModelIndex &parent) const
void setAutoConnectPolicy ()
void sort (int column, Qt::SortOrder order)
void sortSubRange (range_type &range, row_ptr expectedParent, const LessThan &lessThan)
QModelIndexList match (const QModelIndex &start, int role, const QVariant &value, int hits, Qt::MatchFlags flags) const
bool matchRow (const_row_reference row, const QModelIndex &index, int role, const QVariant &value, Qt::MatchFlags flags) const
bool doInsertColumns (int column, int count, const QModelIndex &parent, InsertFn insertFn)
bool insertColumns (int column, int count, const QModelIndex &parent)
bool removeColumns (int column, int count, const QModelIndex &parent)
bool moveColumns (const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destParent, int destColumn)
bool doInsertRows (int row, int count, const QModelIndex &parent, InsertFn &&insertFn)
bool insertRows (int row, int count, const QModelIndex &parent)
bool removeRows (int row, int count, const QModelIndex &parent={})
bool moveRows (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destParent, int destRow)
const protocol_typeprotocol () const
protocol_typeprotocol ()
QModelIndex parent (const QModelIndex &child) const
int rowCount (const QModelIndex &parent) const
int columnCount (const QModelIndex &parent) const
void destroy ()
Public Member Functions inherited from Interface
 Interface ()=default
 Interface (const QCborValue &cbor)

Protected Member Functions

QModelIndex indexImpl (int row, int column, const QModelIndex &parent) const
QModelIndex parentImpl (const QModelIndex &child) const
int rowCountImpl (const QModelIndex &parent) const
int columnCountImpl (const QModelIndex &) const
bool moveRowsAcross (const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destParent, int destRow)
auto makeEmptyRow (row_ptr parentRow)
template<typename It, typename Sentinel>
void deleteRemovedRows (It &&begin, Sentinel &&end)
void resetParentInChildren (range_type *children)
void resetParentInChildrenRecursive (range_type *children, int pmiFromColumn, int pmiToColumn)
bool autoConnectPropertiesRange (const range_type &range, const QModelIndex &parent) const
bool autoConnectPropertiesImpl () const
decltype(auto) rowDataImpl (const QModelIndex &index) const
decltype(auto) rowDataImpl (const QModelIndex &index)
const range_type * childRangeImpl (const QModelIndex &index) const
range_type * childRangeImpl (const QModelIndex &index)
const range_type & childrenOf (const_row_ptr row) const
template<typename LessThan>
void sortImplRecursive (range_type &range, row_ptr parentRow, const LessThan &lessThan)
template<typename LessThan>
void sortImpl (const LessThan &lessThan)
void prunePersistentIndexList (QModelIndexList &list, row_ptr expectedParent)
void matchImplRecursive (const range_type &range, const_row_ptr parentPtr, int from, int to, int role, const QVariant &value, int hits, Qt::MatchFlags flags, int column, QModelIndexList &result) const
QModelIndexList matchImpl (const QModelIndex &start, int role, const QVariant &value, int hits, Qt::MatchFlags flags) const
Protected Member Functions inherited from QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >
QGenericTreeItemModelImpl< Range, Protocol > & that ()
const QGenericTreeItemModelImpl< Range, Protocol > & that () const
auto maybeBlockDataChangedDispatch ()
 ~QRangeModelImpl ()
void deleteOwnedRows ()
bool writeAt (const QModelIndex &index, F &&writer)
bool readAt (const QModelIndex &index, F &&reader) const
QMetaProperty roleProperty (int role) const
void connectPropertyOnRead (const QModelIndex &index, int role, const QObject *gadget, const QMetaProperty &prop) const
QVariant readRole (const QModelIndex &index, int role, ItemType *gadget) const
QVariant readRole (const QModelIndex &index, int role, const ItemType &gadget) const
QVariant readProperty (const QModelIndex &index, ItemType *gadget) const
QVariant readProperty (const QModelIndex &index, const ItemType &gadget) const
bool writeRole (int role, ItemType *gadget, const QVariant &data)
bool writeRole (int role, ItemType &&gadget, const QVariant &data)
const_row_reference rowData (const QModelIndex &index) const
row_reference rowData (const QModelIndex &index)
const range_typechildRange (const QModelIndex &index) const
range_typechildRange (const QModelIndex &index)
Protected Member Functions inherited from QtPrivate::QQuasiVirtualSubclass< Subclass, Interface >
template<typename... Args>
 QQuasiVirtualSubclass (Args &&... args)

Static Protected Member Functions

static constexpr Qt::ItemFlags defaultFlags ()
static constexpr bool canInsertRowsImpl ()
static constexpr bool canRemoveRowsImpl ()
static constexpr bool canMoveColumns (const QModelIndex &, const QModelIndex &)
static constexpr bool canMoveRows (const QModelIndex &, const QModelIndex &)
Static Protected Member Functions inherited from QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >
static constexpr int size (const C &c)
static constexpr bool canInsertRows ()
static constexpr bool canRemoveRows ()
static QVariant read (const Value &value)
static QVariant read (Value *value)
static bool write (Target &target, const QVariant &value)
static bool write (Target *target, const QVariant &value)
static QVariant readProperty (const QMetaProperty &prop, ItemType *gadget)
static bool writeProperty (const QMetaProperty &prop, ItemType *gadget, const QVariant &data)
static bool writeProperty (int property, ItemType *gadget, const QVariant &data)
static bool writeProperty (int property, ItemType &&gadget, const QVariant &data)
static bool resetProperty (int property, ItemType *object)
static bool resetProperty (int property, ItemType &&object)

Friends

class QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >

Additional Inherited Members

Public Types inherited from QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >
using range_type
using range_features
using row_reference
using row_type
using wrapped_row_type
using row_features
using row_traits
using protocol_type
using protocol_traits
using ModelData
using ProtocolStorage
using const_row_reference
using Override
using Destroy
using Index
using Parent
using Sibling
using RowCount
using ColumnCount
using Flags
using HeaderData
using Data
using ItemData
using RoleNames
using InvalidateCaches
using SetHeaderData
using SetData
using SetItemData
using ClearItemData
using InsertColumns
using RemoveColumns
using MoveColumns
using InsertRows
using RemoveRows
using MoveRows
using MultiData
using SetAutoConnectPolicy
using InterfaceVersion
using Sort
using Match
Public Types inherited from Interface
using Container = QVarLengthArray<Interface, 1>
Static Public Member Functions inherited from QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >
static constexpr bool isMutable ()
static constexpr bool dynamicRows ()
static constexpr bool dynamicColumns ()
static constexpr bool isRangeModelRole (int role)
static constexpr bool isPrimaryRole (int role)
static constexpr int fixedColumnCount ()
Public Attributes inherited from Interface
QAnyStringView className
Static Public Attributes inherited from QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >
static constexpr bool itemsAreQObjects
static constexpr bool rowsAreQObjects
Protected Types inherited from QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >
using Self
using Ancestor
using row_ptr
using const_row_ptr
using AutoConnectPolicy
Protected Attributes inherited from QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >
ModelData m_data
Static Protected Attributes inherited from QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >
static constexpr int static_row_count
static constexpr bool rows_are_raw_pointers
static constexpr bool rows_are_owning_or_raw_pointers
static constexpr int static_column_count
static constexpr bool one_dimensional_range
static constexpr bool has_metaobject

Detailed Description

template<typename Range, typename Protocol>
class QGenericTreeItemModelImpl< Range, Protocol >

Definition at line 2883 of file qrangemodel_impl.h.

Constructor & Destructor Documentation

◆ QGenericTreeItemModelImpl()

template<typename Range, typename Protocol>
QGenericTreeItemModelImpl< Range, Protocol >::QGenericTreeItemModelImpl ( Range && model,
Protocol && p,
QRangeModel * itemModel )
inline

Definition at line 2904 of file qrangemodel_impl.h.

Member Function Documentation

◆ autoConnectProperties()

template<typename Range, typename Protocol>
bool QGenericTreeItemModelImpl< Range, Protocol >::autoConnectProperties ( const QModelIndex & parent) const
inline

Definition at line 2920 of file qrangemodel_impl.h.

◆ autoConnectPropertiesImpl()

template<typename Range, typename Protocol>
bool QGenericTreeItemModelImpl< Range, Protocol >::autoConnectPropertiesImpl ( ) const
inlineprotected

Definition at line 3187 of file qrangemodel_impl.h.

◆ autoConnectPropertiesRange()

template<typename Range, typename Protocol>
bool QGenericTreeItemModelImpl< Range, Protocol >::autoConnectPropertiesRange ( const range_type & range,
const QModelIndex & parent ) const
inlineprotected

Definition at line 3168 of file qrangemodel_impl.h.

◆ canInsertRowsImpl()

template<typename Range, typename Protocol>
constexpr bool QGenericTreeItemModelImpl< Range, Protocol >::canInsertRowsImpl ( )
inlinestaticconstexprprotected

Definition at line 2985 of file qrangemodel_impl.h.

◆ canMoveColumns()

template<typename Range, typename Protocol>
constexpr bool QGenericTreeItemModelImpl< Range, Protocol >::canMoveColumns ( const QModelIndex & ,
const QModelIndex &  )
inlinestaticconstexprprotected

Definition at line 3003 of file qrangemodel_impl.h.

◆ canMoveRows()

template<typename Range, typename Protocol>
constexpr bool QGenericTreeItemModelImpl< Range, Protocol >::canMoveRows ( const QModelIndex & ,
const QModelIndex &  )
inlinestaticconstexprprotected

Definition at line 3008 of file qrangemodel_impl.h.

◆ canRemoveRowsImpl()

template<typename Range, typename Protocol>
constexpr bool QGenericTreeItemModelImpl< Range, Protocol >::canRemoveRowsImpl ( )
inlinestaticconstexprprotected

Definition at line 2994 of file qrangemodel_impl.h.

◆ childRangeImpl() [1/2]

template<typename Range, typename Protocol>
range_type * QGenericTreeItemModelImpl< Range, Protocol >::childRangeImpl ( const QModelIndex & index)
inlineprotected

Definition at line 3218 of file qrangemodel_impl.h.

◆ childRangeImpl() [2/2]

template<typename Range, typename Protocol>
const range_type * QGenericTreeItemModelImpl< Range, Protocol >::childRangeImpl ( const QModelIndex & index) const
inlineprotected

Definition at line 3208 of file qrangemodel_impl.h.

◆ childrenOf()

template<typename Range, typename Protocol>
const range_type & QGenericTreeItemModelImpl< Range, Protocol >::childrenOf ( const_row_ptr row) const
inlineprotected

Definition at line 3236 of file qrangemodel_impl.h.

◆ columnCountImpl()

template<typename Range, typename Protocol>
int QGenericTreeItemModelImpl< Range, Protocol >::columnCountImpl ( const QModelIndex & ) const
inlineprotected

Definition at line 2973 of file qrangemodel_impl.h.

◆ defaultFlags()

template<typename Range, typename Protocol>
constexpr Qt::ItemFlags QGenericTreeItemModelImpl< Range, Protocol >::defaultFlags ( )
inlinestaticconstexprprotected

Definition at line 2980 of file qrangemodel_impl.h.

◆ deleteRemovedRows() [1/2]

template<typename Range, typename Protocol>
template<typename It, typename Sentinel>
void QGenericTreeItemModelImpl< Range, Protocol >::deleteRemovedRows ( It && begin,
Sentinel && end )
inlineprotected

Definition at line 3102 of file qrangemodel_impl.h.

◆ deleteRemovedRows() [2/2]

template<typename Range, typename Protocol>
void QGenericTreeItemModelImpl< Range, Protocol >::deleteRemovedRows ( range_type & range)
inline

Definition at line 2915 of file qrangemodel_impl.h.

◆ indexImpl()

template<typename Range, typename Protocol>
QModelIndex QGenericTreeItemModelImpl< Range, Protocol >::indexImpl ( int row,
int column,
const QModelIndex & parent ) const
inlineprotected

Definition at line 2929 of file qrangemodel_impl.h.

◆ makeEmptyRow()

template<typename Range, typename Protocol>
auto QGenericTreeItemModelImpl< Range, Protocol >::makeEmptyRow ( row_ptr parentRow)
inlineprotected

Definition at line 3090 of file qrangemodel_impl.h.

◆ matchImpl()

template<typename Range, typename Protocol>
QModelIndexList QGenericTreeItemModelImpl< Range, Protocol >::matchImpl ( const QModelIndex & start,
int role,
const QVariant & value,
int hits,
Qt::MatchFlags flags ) const
inlineprotected

Definition at line 3297 of file qrangemodel_impl.h.

◆ matchImplRecursive()

template<typename Range, typename Protocol>
void QGenericTreeItemModelImpl< Range, Protocol >::matchImplRecursive ( const range_type & range,
const_row_ptr parentPtr,
int from,
int to,
int role,
const QVariant & value,
int hits,
Qt::MatchFlags flags,
int column,
QModelIndexList & result ) const
inlineprotected

Definition at line 3269 of file qrangemodel_impl.h.

◆ moveRowsAcross()

template<typename Range, typename Protocol>
bool QGenericTreeItemModelImpl< Range, Protocol >::moveRowsAcross ( const QModelIndex & sourceParent,
int sourceRow,
int count,
const QModelIndex & destParent,
int destRow )
inlineprotected

Definition at line 3013 of file qrangemodel_impl.h.

References resetParentInChildren().

Here is the call graph for this function:

◆ parentImpl()

template<typename Range, typename Protocol>
QModelIndex QGenericTreeItemModelImpl< Range, Protocol >::parentImpl ( const QModelIndex & child) const
inlineprotected

Definition at line 2943 of file qrangemodel_impl.h.

◆ prunePersistentIndexList()

template<typename Range, typename Protocol>
void QGenericTreeItemModelImpl< Range, Protocol >::prunePersistentIndexList ( QModelIndexList & list,
row_ptr expectedParent )
inlineprotected

Definition at line 3262 of file qrangemodel_impl.h.

◆ resetParentInChildren()

template<typename Range, typename Protocol>
void QGenericTreeItemModelImpl< Range, Protocol >::resetParentInChildren ( range_type * children)
inlineprotected

Definition at line 3120 of file qrangemodel_impl.h.

References resetParentInChildrenRecursive().

Referenced by moveRowsAcross(), setParentRow(), and sortImpl().

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

◆ resetParentInChildrenRecursive()

template<typename Range, typename Protocol>
void QGenericTreeItemModelImpl< Range, Protocol >::resetParentInChildrenRecursive ( range_type * children,
int pmiFromColumn,
int pmiToColumn )
inlineprotected

Definition at line 3136 of file qrangemodel_impl.h.

References resetParentInChildrenRecursive().

Referenced by resetParentInChildren(), and resetParentInChildrenRecursive().

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

◆ rowCountImpl()

template<typename Range, typename Protocol>
int QGenericTreeItemModelImpl< Range, Protocol >::rowCountImpl ( const QModelIndex & parent) const
inlineprotected

Definition at line 2968 of file qrangemodel_impl.h.

◆ rowDataImpl() [1/2]

template<typename Range, typename Protocol>
decltype(auto) QGenericTreeItemModelImpl< Range, Protocol >::rowDataImpl ( const QModelIndex & index)
inlineprotected

Definition at line 3200 of file qrangemodel_impl.h.

◆ rowDataImpl() [2/2]

template<typename Range, typename Protocol>
decltype(auto) QGenericTreeItemModelImpl< Range, Protocol >::rowDataImpl ( const QModelIndex & index) const
inlineprotected

Definition at line 3192 of file qrangemodel_impl.h.

◆ setParentRow()

template<typename Range, typename Protocol>
void QGenericTreeItemModelImpl< Range, Protocol >::setParentRow ( range_type & children,
row_ptr parent )
inline

Definition at line 2908 of file qrangemodel_impl.h.

References resetParentInChildren().

Here is the call graph for this function:

◆ sortImpl()

template<typename Range, typename Protocol>
template<typename LessThan>
void QGenericTreeItemModelImpl< Range, Protocol >::sortImpl ( const LessThan & lessThan)
inlineprotected

Definition at line 3256 of file qrangemodel_impl.h.

References resetParentInChildren().

Here is the call graph for this function:

◆ sortImplRecursive()

template<typename Range, typename Protocol>
template<typename LessThan>
void QGenericTreeItemModelImpl< Range, Protocol >::sortImplRecursive ( range_type & range,
row_ptr parentRow,
const LessThan & lessThan )
inlineprotected

Definition at line 3243 of file qrangemodel_impl.h.

◆ QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >

template<typename Range, typename Protocol>
friend class QRangeModelImpl< QGenericTreeItemModelImpl< Range, Protocol >, Range, Protocol >
friend

Definition at line 2075 of file qrangemodel_impl.h.


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