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
QSortFilterProxyModelPrivate Class Reference
+ Inheritance diagram for QSortFilterProxyModelPrivate:
+ Collaboration diagram for QSortFilterProxyModelPrivate:

Classes

struct  Mapping
 

Public Types

enum class  Direction { Rows = 1 , Columns = 2 , All = Rows | Columns }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Public Member Functions

void setSortCaseSensitivityForwarder (Qt::CaseSensitivity cs)
 
void sortCaseSensitivityChangedForwarder (Qt::CaseSensitivity cs)
 
void setSortRoleForwarder (int role)
 
void sortRoleChangedForwarder (int role)
 
void setSortLocaleAwareForwarder (bool on)
 
void sortLocaleAwareChangedForwarder (bool on)
 
void setFilterKeyColumnForwarder (int column)
 
void setFilterRoleForwarder (int role)
 
void filterRoleChangedForwarder (int role)
 
void setRecursiveFilteringEnabledForwarder (bool recursive)
 
void recursiveFilteringEnabledChangedForwarder (bool recursive)
 
void setAutoAcceptChildRowsForwarder (bool accept)
 
void autoAcceptChildRowsChangedForwarder (bool accept)
 
void setDynamicSortFilterForwarder (bool enable)
 
void setFilterCaseSensitivityForwarder (Qt::CaseSensitivity cs)
 
void filterCaseSensitivityChangedForwarder (Qt::CaseSensitivity cs)
 
void setFilterRegularExpressionForwarder (const QRegularExpression &re)
 
 Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS (QSortFilterProxyModelPrivate, Qt::CaseSensitivity, sort_casesensitivity, &QSortFilterProxyModelPrivate::setSortCaseSensitivityForwarder, &QSortFilterProxyModelPrivate::sortCaseSensitivityChangedForwarder, Qt::CaseSensitive) Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QSortFilterProxyModelPrivate
 
Qt::DisplayRole Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS (QSortFilterProxyModelPrivate, int, filter_column, &QSortFilterProxyModelPrivate::setFilterKeyColumnForwarder, 0) Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QSortFilterProxyModelPrivate
 
Qt::DisplayRole Qt::DisplayRole Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS (QSortFilterProxyModelPrivate, bool, sort_localeaware, &QSortFilterProxyModelPrivate::setSortLocaleAwareForwarder, &QSortFilterProxyModelPrivate::sortLocaleAwareChangedForwarder, false) Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QSortFilterProxyModelPrivate
 
Qt::DisplayRole Qt::DisplayRole false Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS (QSortFilterProxyModelPrivate, bool, accept_children, &QSortFilterProxyModelPrivate::setAutoAcceptChildRowsForwarder, &QSortFilterProxyModelPrivate::autoAcceptChildRowsChangedForwarder, false) Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QSortFilterProxyModelPrivate
 
Qt::DisplayRole Qt::DisplayRole false true Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS (QSortFilterProxyModelPrivate, Qt::CaseSensitivity, filter_casesensitive, &QSortFilterProxyModelPrivate::setFilterCaseSensitivityForwarder, &QSortFilterProxyModelPrivate::filterCaseSensitivityChangedForwarder, Qt::CaseSensitive) Q_OBJECT_COMPAT_PROPERTY(QSortFilterProxyModelPrivate
 
QHash< QModelIndex, Mapping * >::const_iterator create_mapping (const QModelIndex &source_parent) const
 
QHash< QModelIndex, Mapping * >::const_iterator create_mapping_recursive (const QModelIndex &source_parent) const
 
QModelIndex proxy_to_source (const QModelIndex &proxyIndex) const
 
QModelIndex source_to_proxy (const QModelIndex &sourceIndex) const
 
bool can_create_mapping (const QModelIndex &source_parent) const
 
void remove_from_mapping (const QModelIndex &source_parent)
 
void set_filter_pattern (const QString &pattern)
 
QHash< QModelIndex, Mapping * >::const_iterator index_to_iterator (const QModelIndex &proxy_index) const
 
QModelIndex create_index (int row, int column, QHash< QModelIndex, Mapping * >::const_iterator it) const
 
void _q_sourceDataChanged (const QModelIndex &source_top_left, const QModelIndex &source_bottom_right, const QList< int > &roles)
 
void _q_sourceHeaderDataChanged (Qt::Orientation orientation, int start, int end)
 
void _q_sourceAboutToBeReset ()
 
void _q_sourceReset ()
 
void _q_sourceLayoutAboutToBeChanged (const QList< QPersistentModelIndex > &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
 
void _q_sourceLayoutChanged (const QList< QPersistentModelIndex > &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
 
void _q_sourceRowsAboutToBeInserted (const QModelIndex &source_parent, int start, int end)
 
void _q_sourceRowsInserted (const QModelIndex &source_parent, int start, int end)
 
void _q_sourceRowsAboutToBeRemoved (const QModelIndex &source_parent, int start, int end)
 
void _q_sourceRowsRemoved (const QModelIndex &source_parent, int start, int end)
 
void _q_sourceRowsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)
 
void _q_sourceRowsMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)
 
void _q_sourceColumnsAboutToBeInserted (const QModelIndex &source_parent, int start, int end)
 
void _q_sourceColumnsInserted (const QModelIndex &source_parent, int start, int end)
 
void _q_sourceColumnsAboutToBeRemoved (const QModelIndex &source_parent, int start, int end)
 
void _q_sourceColumnsRemoved (const QModelIndex &source_parent, int start, int end)
 
void _q_sourceColumnsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)
 
void _q_sourceColumnsMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest)
 
void _q_clearMapping ()
 
void sort ()
 
bool update_source_sort_column ()
 
int find_source_sort_column () const
 
void sort_source_rows (QList< int > &source_rows, const QModelIndex &source_parent) const
 
QList< std::pair< int, QList< int > > > proxy_intervals_for_source_items_to_add (const QList< int > &proxy_to_source, const QList< int > &source_items, const QModelIndex &source_parent, Qt::Orientation orient) const
 
QList< std::pair< int, int > > proxy_intervals_for_source_items (const QList< int > &source_to_proxy, const QList< int > &source_items) const
 
void insert_source_items (QList< int > &source_to_proxy, QList< int > &proxy_to_source, const QList< int > &source_items, const QModelIndex &source_parent, Qt::Orientation orient, bool emit_signal=true)
 
void remove_source_items (QList< int > &source_to_proxy, QList< int > &proxy_to_source, const QList< int > &source_items, const QModelIndex &source_parent, Qt::Orientation orient, bool emit_signal=true)
 
void remove_proxy_interval (QList< int > &source_to_proxy, QList< int > &proxy_to_source, int proxy_start, int proxy_end, const QModelIndex &proxy_parent, Qt::Orientation orient, bool emit_signal=true)
 
void source_items_inserted (const QModelIndex &source_parent, int start, int end, Qt::Orientation orient)
 
void source_items_about_to_be_removed (const QModelIndex &source_parent, int start, int end, Qt::Orientation orient)
 
void source_items_removed (const QModelIndex &source_parent, int start, int end, Qt::Orientation orient)
 
void proxy_item_range (const QList< int > &source_to_proxy, const QList< int > &source_items, int &proxy_low, int &proxy_high) const
 
QModelIndexPairList store_persistent_indexes () const
 
void update_persistent_indexes (const QModelIndexPairList &source_indexes)
 
void filter_about_to_be_changed (const QModelIndex &source_parent=QModelIndex())
 
void filter_changed (Direction dir, const QModelIndex &source_parent=QModelIndex())
 
QSet< inthandle_filter_changed (QList< int > &source_to_proxy, QList< int > &proxy_to_source, const QModelIndex &source_parent, Qt::Orientation orient)
 
void updateChildrenMapping (const QModelIndex &source_parent, Mapping *parent_mapping, Qt::Orientation orient, int start, int end, int delta_item_count, bool remove)
 
void _q_sourceModelDestroyed () override
 
bool needsReorder (const QList< int > &source_rows, const QModelIndex &source_parent) const
 
bool filterAcceptsRowInternal (int source_row, const QModelIndex &source_parent) const
 
bool recursiveChildAcceptsRow (int source_row, const QModelIndex &source_parent) const
 
bool recursiveParentAcceptsRow (const QModelIndex &source_parent) const
 
- Public Member Functions inherited from QAbstractProxyModelPrivate
 QAbstractProxyModelPrivate ()
 
void setModelForwarder (QAbstractItemModel *sourceModel)
 
void modelChangedForwarder ()
 
QAbstractItemModelgetModelForwarder () const
 
 Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS (QAbstractProxyModelPrivate, QAbstractItemModel *, model, &QAbstractProxyModelPrivate::setModelForwarder, &QAbstractProxyModelPrivate::modelChangedForwarder, &QAbstractProxyModelPrivate::getModelForwarder, nullptr) virtual void _q_sourceModelDestroyed()
 
void _q_sourceModelRowsAboutToBeInserted (const QModelIndex &parent, int first, int last)
 
void _q_sourceModelRowsInserted (const QModelIndex &parent, int first, int last)
 
void _q_sourceModelRowsRemoved (const QModelIndex &parent, int first, int last)
 
void _q_sourceModelColumnsAboutToBeInserted (const QModelIndex &parent, int first, int last)
 
void _q_sourceModelColumnsInserted (const QModelIndex &parent, int first, int last)
 
void _q_sourceModelColumnsRemoved (const QModelIndex &parent, int first, int last)
 
void mapDropCoordinatesToSource (int row, int column, const QModelIndex &parent, int *source_row, int *source_column, QModelIndex *source_parent) const
 
void scheduleHeaderUpdate (Qt::Orientation orientation)
 
void emitHeaderDataChanged ()
 
- Public Member Functions inherited from QAbstractItemModelPrivate
 QAbstractItemModelPrivate ()
 
 ~QAbstractItemModelPrivate ()
 
void removePersistentIndexData (QPersistentModelIndexData *data)
 
void movePersistentIndexes (const QList< QPersistentModelIndexData * > &indexes, int change, const QModelIndex &parent, Qt::Orientation orientation)
 
void rowsAboutToBeInserted (const QModelIndex &parent, int first, int last)
 
void rowsInserted (const QModelIndex &parent, int first, int last)
 
void rowsAboutToBeRemoved (const QModelIndex &parent, int first, int last)
 
void rowsRemoved (const QModelIndex &parent, int first, int last)
 
void columnsAboutToBeInserted (const QModelIndex &parent, int first, int last)
 
void columnsInserted (const QModelIndex &parent, int first, int last)
 
void columnsAboutToBeRemoved (const QModelIndex &parent, int first, int last)
 
void columnsRemoved (const QModelIndex &parent, int first, int last)
 
void itemsAboutToBeMoved (const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation)
 
void itemsMoved (const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation)
 
bool allowMove (const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation)
 Returns whether a move operation is valid.
 
virtual void executePendingOperations () const
 
QModelIndex createIndex (int row, int column, void *data=nullptr) const
 
QModelIndex createIndex (int row, int column, int id) const
 
bool indexValid (const QModelIndex &index) const
 
void invalidatePersistentIndexes ()
 
void invalidatePersistentIndex (const QModelIndex &index)
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Static Public Member Functions

static void build_source_to_proxy_mapping (const QList< int > &proxy_to_source, QList< int > &source_to_proxy, int start=0)
 
- Static Public Member Functions inherited from QAbstractItemModelPrivate
static QAbstractItemModelstaticEmptyModel ()
 
static bool variantLessThan (const QVariant &v1, const QVariant &v2)
 
static const QHash< int, QByteArray > & defaultRoleNames ()
 
static bool isVariantLessThan (const QVariant &left, const QVariant &right, Qt::CaseSensitivity cs=Qt::CaseSensitive, bool isLocaleAware=false)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Public Attributes

QHash< QModelIndex, Mapping * > source_index_mapping
 
int source_sort_column = -1
 
int proxy_sort_column = -1
 
Qt::SortOrder sort_order = Qt::AscendingOrder
 
bool complete_insert = false
 
 int
 
 sort_role
 
Qt::DisplayRole int
 
Qt::DisplayRole filter_role
 
Qt::DisplayRole Qt::DisplayRole bool
 
Qt::DisplayRole Qt::DisplayRole filter_recursive
 
Qt::DisplayRole Qt::DisplayRole false bool
 
Qt::DisplayRole Qt::DisplayRole false dynamic_sortfilter
 
Qt::DisplayRole Qt::DisplayRole false true QRegularExpression
 
Qt::DisplayRole Qt::DisplayRole false true filter_regularexpression
 
Qt::DisplayRole Qt::DisplayRole false true &QSortFilterProxyModelPrivate::setFilterRegularExpressionForwarder QModelIndex last_top_source
 
QRowsRemoval itemsBeingRemoved
 
QModelIndexPairList saved_persistent_indexes
 
QList< QPersistentModelIndexsaved_layoutChange_parents
 
std::array< QMetaObject::Connection, 18 > sourceConnections
 
- Public Attributes inherited from QAbstractProxyModelPrivate
unsigned int sourceHadZeroRows: 1
 
unsigned int sourceHadZeroColumns: 1
 
unsigned int updateVerticalHeader: 1
 
unsigned int updateHorizontalHeader: 1
 
- Public Attributes inherited from QAbstractItemModelPrivate
QStack< Changechanges
 
struct QAbstractItemModelPrivate::Persistent persistent
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Detailed Description

Definition at line 109 of file qsortfilterproxymodel.cpp.

Member Enumeration Documentation

◆ Direction

Enumerator
Rows 
Columns 
All 

Definition at line 114 of file qsortfilterproxymodel.cpp.

Member Function Documentation

◆ _q_clearMapping()

void QSortFilterProxyModelPrivate::_q_clearMapping ( )

Definition at line 460 of file qsortfilterproxymodel.cpp.

References dynamic_sortfilter, find_source_sort_column(), qDeleteAll(), source_index_mapping, source_sort_column, store_persistent_indexes(), and update_persistent_indexes().

Referenced by QSortFilterProxyModel::QSortFilterProxyModel(), and _q_sourceReset().

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

◆ _q_sourceAboutToBeReset()

void QSortFilterProxyModelPrivate::_q_sourceAboutToBeReset ( )

Definition at line 1579 of file qsortfilterproxymodel.cpp.

Referenced by QSortFilterProxyModel::setSourceModel().

+ Here is the caller graph for this function:

◆ _q_sourceColumnsAboutToBeInserted()

void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeInserted ( const QModelIndex & source_parent,
int start,
int end )

Definition at line 1771 of file qsortfilterproxymodel.cpp.

References can_create_mapping(), create_mapping(), and Q_UNUSED.

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceColumnsAboutToBeMoved()

void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeMoved ( const QModelIndex & sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex & destParent,
int dest )

Definition at line 1830 of file qsortfilterproxymodel.cpp.

References _q_sourceLayoutAboutToBeChanged(), and QAbstractItemModel::NoLayoutChangeHint.

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceColumnsAboutToBeRemoved()

void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeRemoved ( const QModelIndex & source_parent,
int start,
int end )

Definition at line 1802 of file qsortfilterproxymodel.cpp.

References Qt::Horizontal, and source_items_about_to_be_removed().

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceColumnsInserted()

void QSortFilterProxyModelPrivate::_q_sourceColumnsInserted ( const QModelIndex & source_parent,
int start,
int end )

Definition at line 1782 of file qsortfilterproxymodel.cpp.

References dynamic_sortfilter, Qt::Horizontal, QAbstractTableModel::index(), QModelIndex::isValid(), model, proxy_sort_column, sort(), source_items_inserted(), source_sort_column, and update_source_sort_column().

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceColumnsMoved()

void QSortFilterProxyModelPrivate::_q_sourceColumnsMoved ( const QModelIndex & sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex & destParent,
int dest )

Definition at line 1840 of file qsortfilterproxymodel.cpp.

References _q_sourceLayoutChanged(), and QAbstractItemModel::NoLayoutChangeHint.

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceColumnsRemoved()

void QSortFilterProxyModelPrivate::_q_sourceColumnsRemoved ( const QModelIndex & source_parent,
int start,
int end )

Definition at line 1809 of file qsortfilterproxymodel.cpp.

References Qt::Horizontal, QAbstractTableModel::index(), QModelIndex::isValid(), model, proxy_sort_column, source_items_removed(), and source_sort_column.

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceDataChanged()

void QSortFilterProxyModelPrivate::_q_sourceDataChanged ( const QModelIndex & source_top_left,
const QModelIndex & source_bottom_right,
const QList< int > & roles )

◆ _q_sourceHeaderDataChanged()

void QSortFilterProxyModelPrivate::_q_sourceHeaderDataChanged ( Qt::Orientation orientation,
int start,
int end )

Definition at line 1537 of file qsortfilterproxymodel.cpp.

References create_mapping(), emit, i, it, Q_ASSERT, source_to_proxy(), and Qt::Vertical.

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceLayoutAboutToBeChanged()

void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged ( const QList< QPersistentModelIndex > & sourceParents,
QAbstractItemModel::LayoutChangeHint hint )

Definition at line 1596 of file qsortfilterproxymodel.cpp.

References QList< T >::clear(), emit, hint(), QList< T >::isEmpty(), QObjectData::parent, QAbstractItemModelPrivate::persistent, Q_UNUSED, saved_layoutChange_parents, saved_persistent_indexes, and store_persistent_indexes().

Referenced by _q_sourceColumnsAboutToBeMoved(), _q_sourceRowsAboutToBeMoved(), and QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceLayoutChanged()

void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged ( const QList< QPersistentModelIndex > & sourceParents,
QAbstractItemModel::LayoutChangeHint hint )

Definition at line 1625 of file qsortfilterproxymodel.cpp.

References QList< T >::clear(), dynamic_sortfilter, emit, find_source_sort_column(), hint(), QList< T >::isEmpty(), Q_UNUSED, qDeleteAll(), saved_layoutChange_parents, saved_persistent_indexes, source_index_mapping, source_sort_column, and update_persistent_indexes().

Referenced by _q_sourceColumnsMoved(), _q_sourceRowsMoved(), and QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceModelDestroyed()

void QSortFilterProxyModelPrivate::_q_sourceModelDestroyed ( )
override

Definition at line 392 of file qsortfilterproxymodel.cpp.

References qDeleteAll(), and source_index_mapping.

+ Here is the call graph for this function:

◆ _q_sourceReset()

void QSortFilterProxyModelPrivate::_q_sourceReset ( )

Definition at line 1585 of file qsortfilterproxymodel.cpp.

References _q_clearMapping(), dynamic_sortfilter, QAbstractItemModelPrivate::invalidatePersistentIndexes(), sort(), and update_source_sort_column().

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceRowsAboutToBeInserted()

void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeInserted ( const QModelIndex & source_parent,
int start,
int end )

Definition at line 1648 of file qsortfilterproxymodel.cpp.

References can_create_mapping(), complete_insert, create_mapping(), filter_recursive, filterAcceptsRowInternal(), QModelIndex::isValid(), last_top_source, QModelIndex::parent(), QObjectData::parent, QObject::parent(), Q_UNUSED, and QModelIndex::row().

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceRowsAboutToBeMoved()

void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeMoved ( const QModelIndex & sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex & destParent,
int dest )

Definition at line 1745 of file qsortfilterproxymodel.cpp.

References _q_sourceLayoutAboutToBeChanged(), and QAbstractItemModel::NoLayoutChangeHint.

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceRowsAboutToBeRemoved()

void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeRemoved ( const QModelIndex & source_parent,
int start,
int end )

Definition at line 1709 of file qsortfilterproxymodel.cpp.

References itemsBeingRemoved, source_items_about_to_be_removed(), and Qt::Vertical.

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceRowsInserted()

void QSortFilterProxyModelPrivate::_q_sourceRowsInserted ( const QModelIndex & source_parent,
int start,
int end )

Definition at line 1679 of file qsortfilterproxymodel.cpp.

References _q_sourceDataChanged(), complete_insert, dynamic_sortfilter, filter_recursive, filterAcceptsRowInternal(), last_top_source, sort(), source_items_inserted(), update_source_sort_column(), and Qt::Vertical.

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceRowsMoved()

void QSortFilterProxyModelPrivate::_q_sourceRowsMoved ( const QModelIndex & sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex & destParent,
int dest )

Definition at line 1761 of file qsortfilterproxymodel.cpp.

References _q_sourceLayoutChanged(), and QAbstractItemModel::NoLayoutChangeHint.

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ _q_sourceRowsRemoved()

void QSortFilterProxyModelPrivate::_q_sourceRowsRemoved ( const QModelIndex & source_parent,
int start,
int end )

Definition at line 1717 of file qsortfilterproxymodel.cpp.

References _q_sourceDataChanged(), filter_recursive, filterAcceptsRowInternal(), itemsBeingRemoved, QModelIndex::parent(), source_items_removed(), and Qt::Vertical.

Referenced by QSortFilterProxyModel::setSourceModel().

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

◆ autoAcceptChildRowsChangedForwarder()

void QSortFilterProxyModelPrivate::autoAcceptChildRowsChangedForwarder ( bool accept)
inline

Definition at line 161 of file qsortfilterproxymodel.cpp.

References emit.

◆ build_source_to_proxy_mapping()

void QSortFilterProxyModelPrivate::build_source_to_proxy_mapping ( const QList< int > & proxy_to_source,
QList< int > & source_to_proxy,
int start = 0 )
inlinestatic

Definition at line 1208 of file qsortfilterproxymodel.cpp.

References i, proxy_to_source(), and source_to_proxy().

Referenced by create_mapping(), insert_source_items(), remove_proxy_interval(), sort(), source_items_inserted(), and source_items_removed().

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

◆ can_create_mapping()

bool QSortFilterProxyModelPrivate::can_create_mapping ( const QModelIndex & source_parent) const

Definition at line 582 of file qsortfilterproxymodel.cpp.

References QModelIndex::column(), QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, QModelIndex::isValid(), it, QModelIndex::parent(), QModelIndex::row(), and source_index_mapping.

Referenced by _q_sourceColumnsAboutToBeInserted(), _q_sourceRowsAboutToBeInserted(), and source_items_inserted().

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

◆ create_index()

QModelIndex QSortFilterProxyModelPrivate::create_index ( int row,
int column,
QHash< QModelIndex, Mapping * >::const_iterator it ) const
inline

Definition at line 282 of file qsortfilterproxymodel.cpp.

References it.

Referenced by _q_sourceDataChanged(), and source_to_proxy().

+ Here is the caller graph for this function:

◆ create_mapping()

IndexMap::const_iterator QSortFilterProxyModelPrivate::create_mapping ( const QModelIndex & source_parent) const

Definition at line 474 of file qsortfilterproxymodel.cpp.

References build_source_to_proxy_mapping(), QSqlQueryModel::columnCount(), QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, create_mapping(), filterAcceptsRowInternal(), i, QModelIndex::isValid(), it, model, QModelIndex::parent(), Q_ASSERT, QSqlQueryModel::rowCount(), sort_source_rows(), and source_index_mapping.

Referenced by _q_sourceColumnsAboutToBeInserted(), _q_sourceHeaderDataChanged(), _q_sourceRowsAboutToBeInserted(), create_mapping(), create_mapping_recursive(), filter_about_to_be_changed(), source_items_inserted(), source_to_proxy(), update_persistent_indexes(), and update_source_sort_column().

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

◆ create_mapping_recursive()

IndexMap::const_iterator QSortFilterProxyModelPrivate::create_mapping_recursive ( const QModelIndex & source_parent) const

Definition at line 521 of file qsortfilterproxymodel.cpp.

References QModelIndex::column(), QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, create_mapping(), create_mapping_recursive(), QModelIndex::isValid(), it, QModelIndex::parent(), QModelIndex::row(), and source_index_mapping.

Referenced by _q_sourceDataChanged(), and create_mapping_recursive().

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

◆ filter_about_to_be_changed()

void QSortFilterProxyModelPrivate::filter_about_to_be_changed ( const QModelIndex & source_parent = QModelIndex())

Updates the source_index mapping in case it's invalid and we need it because we have a valid filter

Definition at line 1268 of file qsortfilterproxymodel.cpp.

References create_mapping(), filter_regularexpression, and source_index_mapping.

+ Here is the call graph for this function:

◆ filter_changed()

void QSortFilterProxyModelPrivate::filter_changed ( Direction dir,
const QModelIndex & source_parent = QModelIndex() )

Updates the proxy model (adds/removes rows) based on the new filter.

Definition at line 1283 of file qsortfilterproxymodel.cpp.

References Columns, QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, dir, filter_changed(), handle_filter_changed(), Qt::Horizontal, i, it, remove_from_mapping(), Rows, source_index_mapping, and Qt::Vertical.

Referenced by filter_changed().

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

◆ filterAcceptsRowInternal()

bool QSortFilterProxyModelPrivate::filterAcceptsRowInternal ( int source_row,
const QModelIndex & source_parent ) const

Definition at line 399 of file qsortfilterproxymodel.cpp.

References filter_recursive, recursiveChildAcceptsRow(), and recursiveParentAcceptsRow().

Referenced by _q_sourceDataChanged(), _q_sourceRowsAboutToBeInserted(), _q_sourceRowsInserted(), _q_sourceRowsRemoved(), create_mapping(), handle_filter_changed(), and source_items_inserted().

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

◆ filterCaseSensitivityChangedForwarder()

void QSortFilterProxyModelPrivate::filterCaseSensitivityChangedForwarder ( Qt::CaseSensitivity cs)
inline

Definition at line 172 of file qsortfilterproxymodel.cpp.

References emit.

◆ filterRoleChangedForwarder()

Qt::DisplayRole & QSortFilterProxyModelPrivate::filterRoleChangedForwarder ( int role)
inline

Definition at line 149 of file qsortfilterproxymodel.cpp.

References emit.

◆ find_source_sort_column()

int QSortFilterProxyModelPrivate::find_source_sort_column ( ) const

Find the source_sort_column without creating a full mapping and without updating anything.

Definition at line 654 of file qsortfilterproxymodel.cpp.

References QSqlQueryModel::columnCount(), i, model, and proxy_sort_column.

Referenced by _q_clearMapping(), and _q_sourceLayoutChanged().

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

◆ handle_filter_changed()

QSet< int > QSortFilterProxyModelPrivate::handle_filter_changed ( QList< int > & source_to_proxy,
QList< int > & proxy_to_source,
const QModelIndex & source_parent,
Qt::Orientation orient )

returns the removed items indexes

Definition at line 1325 of file qsortfilterproxymodel.cpp.

References filterAcceptsRowInternal(), i, insert_source_items(), proxy_to_source(), qListToSet(), remove_source_items(), sort_source_rows(), source_to_proxy(), and Qt::Vertical.

Referenced by filter_changed().

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

◆ index_to_iterator()

QHash< QModelIndex, Mapping * >::const_iterator QSortFilterProxyModelPrivate::index_to_iterator ( const QModelIndex & proxy_index) const
inline

Definition at line 268 of file qsortfilterproxymodel.cpp.

References it, Q_ASSERT, and source_index_mapping.

Referenced by proxy_to_source().

+ Here is the caller graph for this function:

◆ insert_source_items()

void QSortFilterProxyModelPrivate::insert_source_items ( QList< int > & source_to_proxy,
QList< int > & proxy_to_source,
const QList< int > & source_items,
const QModelIndex & source_parent,
Qt::Orientation orient,
bool emit_signal = true )

Given source-to-proxy mapping source_to_proxy and proxy-to-source mapping proxy_to_source, inserts the given source_items into this proxy model. The source items are inserted in intervals (based on some sorted order), so that the proper rows/columnsInserted(start, end) signals will be generated.

Definition at line 897 of file qsortfilterproxymodel.cpp.

References build_source_to_proxy_mapping(), QModelIndex::isValid(), it, proxy_intervals_for_source_items_to_add(), proxy_to_source(), QSet< T >::size(), source_to_proxy(), and Qt::Vertical.

Referenced by _q_sourceDataChanged(), handle_filter_changed(), and source_items_inserted().

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

◆ needsReorder()

bool QSortFilterProxyModelPrivate::needsReorder ( const QList< int > & source_rows,
const QModelIndex & source_parent ) const

Definition at line 1366 of file qsortfilterproxymodel.cpp.

References if(), Q_ASSERT, source_sort_column, and source_to_proxy().

Referenced by _q_sourceDataChanged().

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

◆ proxy_intervals_for_source_items()

QList< std::pair< int, int > > QSortFilterProxyModelPrivate::proxy_intervals_for_source_items ( const QList< int > & source_to_proxy,
const QList< int > & source_items ) const

Given source-to-proxy mapping source_to_proxy and the set of source items source_items (which are part of that mapping), determines the corresponding proxy item intervals that should be removed from the proxy model.

The result is a vector of pairs, where each pair represents a (start, end) tuple, sorted in ascending order.

Definition at line 709 of file qsortfilterproxymodel.cpp.

References i, Q_ASSERT, and source_to_proxy().

Referenced by remove_source_items().

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

◆ proxy_intervals_for_source_items_to_add()

QList< std::pair< int, QList< int > > > QSortFilterProxyModelPrivate::proxy_intervals_for_source_items_to_add ( const QList< int > & proxy_to_source,
const QList< int > & source_items,
const QModelIndex & source_parent,
Qt::Orientation orient ) const

Given proxy-to-source mapping proxy_to_source and a set of unmapped source items source_items, determines the proxy item intervals at which the subsets of source items should be inserted (but does not actually add them to the mapping).

The result is a vector of pairs, each pair representing a tuple (start, items), where items is a vector containing the (sorted) source items that should be inserted at that proxy model location.

Definition at line 824 of file qsortfilterproxymodel.cpp.

References Qt::AscendingOrder, compare(), dynamic_sortfilter, QAbstractTableModel::index(), model, proxy_to_source(), sort_order, source_sort_column, and Qt::Vertical.

Referenced by insert_source_items().

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

◆ proxy_item_range()

void QSortFilterProxyModelPrivate::proxy_item_range ( const QList< int > & source_to_proxy,
const QList< int > & source_items,
int & proxy_low,
int & proxy_high ) const

Definition at line 1189 of file qsortfilterproxymodel.cpp.

References i, Q_ASSERT, and source_to_proxy().

Referenced by _q_sourceDataChanged().

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

◆ proxy_to_source()

QModelIndex QSortFilterProxyModelPrivate::proxy_to_source ( const QModelIndex & proxyIndex) const

Definition at line 543 of file qsortfilterproxymodel.cpp.

References QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, QAbstractTableModel::index(), index_to_iterator(), it, model, Q_ASSERT, and qWarning.

Referenced by build_source_to_proxy_mapping(), handle_filter_changed(), insert_source_items(), proxy_intervals_for_source_items_to_add(), remove_proxy_interval(), remove_source_items(), source_items_about_to_be_removed(), source_items_inserted(), and source_items_removed().

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

◆ Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS() [1/5]

◆ Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS() [2/5]

◆ Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS() [3/5]

Qt::DisplayRole QSortFilterProxyModelPrivate::Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS ( QSortFilterProxyModelPrivate ,
int ,
filter_column ,
&QSortFilterProxyModelPrivate::setFilterKeyColumnForwarder ,
0  )

◆ Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS() [4/5]

◆ Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS() [5/5]

◆ recursiveChildAcceptsRow()

bool QSortFilterProxyModelPrivate::recursiveChildAcceptsRow ( int source_row,
const QModelIndex & source_parent ) const

Definition at line 433 of file qsortfilterproxymodel.cpp.

References i, QAbstractTableModel::index(), model, recursiveChildAcceptsRow(), and QSqlQueryModel::rowCount().

Referenced by filterAcceptsRowInternal(), and recursiveChildAcceptsRow().

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

◆ recursiveFilteringEnabledChangedForwarder()

Qt::DisplayRole Qt::DisplayRole & QSortFilterProxyModelPrivate::recursiveFilteringEnabledChangedForwarder ( bool recursive)
inline

Definition at line 155 of file qsortfilterproxymodel.cpp.

References emit.

◆ recursiveParentAcceptsRow()

bool QSortFilterProxyModelPrivate::recursiveParentAcceptsRow ( const QModelIndex & source_parent) const

Definition at line 417 of file qsortfilterproxymodel.cpp.

References QModelIndex::isValid(), QModelIndex::parent(), recursiveParentAcceptsRow(), and QModelIndex::row().

Referenced by filterAcceptsRowInternal(), and recursiveParentAcceptsRow().

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

◆ remove_from_mapping()

void QSortFilterProxyModelPrivate::remove_from_mapping ( const QModelIndex & source_parent)

Definition at line 451 of file qsortfilterproxymodel.cpp.

References remove_from_mapping(), and source_index_mapping.

Referenced by _q_sourceDataChanged(), filter_changed(), remove_from_mapping(), source_items_inserted(), source_items_removed(), and updateChildrenMapping().

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

◆ remove_proxy_interval()

void QSortFilterProxyModelPrivate::remove_proxy_interval ( QList< int > & source_to_proxy,
QList< int > & proxy_to_source,
int proxy_start,
int proxy_end,
const QModelIndex & proxy_parent,
Qt::Orientation orient,
bool emit_signal = true )

Given source-to-proxy mapping source_to_proxy and proxy-to-source mapping proxy_to_source, removes items from proxy_start to proxy_end (inclusive) from this proxy model.

Definition at line 785 of file qsortfilterproxymodel.cpp.

References build_source_to_proxy_mapping(), i, proxy_to_source(), source_to_proxy(), and Qt::Vertical.

Referenced by remove_source_items().

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

◆ remove_source_items()

void QSortFilterProxyModelPrivate::remove_source_items ( QList< int > & source_to_proxy,
QList< int > & proxy_to_source,
const QList< int > & source_items,
const QModelIndex & source_parent,
Qt::Orientation orient,
bool emit_signal = true )

Given source-to-proxy mapping src_to_proxy and proxy-to-source mapping proxy_to_source, removes source_items from this proxy model. The corresponding proxy items are removed in intervals, so that the proper rows/columnsRemoved(start, end) signals will be generated.

Definition at line 753 of file qsortfilterproxymodel.cpp.

References QModelIndex::isValid(), it, proxy_intervals_for_source_items(), proxy_to_source(), remove_proxy_interval(), and source_to_proxy().

Referenced by _q_sourceDataChanged(), handle_filter_changed(), and source_items_about_to_be_removed().

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

◆ set_filter_pattern()

void QSortFilterProxyModelPrivate::set_filter_pattern ( const QString & pattern)
inline

◆ setAutoAcceptChildRowsForwarder()

void QSortFilterProxyModelPrivate::setAutoAcceptChildRowsForwarder ( bool accept)
inline

Definition at line 160 of file qsortfilterproxymodel.cpp.

◆ setDynamicSortFilterForwarder()

Qt::DisplayRole Qt::DisplayRole false & QSortFilterProxyModelPrivate::setDynamicSortFilterForwarder ( bool enable)
inline

Definition at line 166 of file qsortfilterproxymodel.cpp.

◆ setFilterCaseSensitivityForwarder()

void QSortFilterProxyModelPrivate::setFilterCaseSensitivityForwarder ( Qt::CaseSensitivity cs)
inline

Definition at line 168 of file qsortfilterproxymodel.cpp.

◆ setFilterKeyColumnForwarder()

void QSortFilterProxyModelPrivate::setFilterKeyColumnForwarder ( int column)
inline

Definition at line 146 of file qsortfilterproxymodel.cpp.

◆ setFilterRegularExpressionForwarder()

void QSortFilterProxyModelPrivate::setFilterRegularExpressionForwarder ( const QRegularExpression & re)
inline

Definition at line 177 of file qsortfilterproxymodel.cpp.

◆ setFilterRoleForwarder()

Qt::DisplayRole & QSortFilterProxyModelPrivate::setFilterRoleForwarder ( int role)
inline

Definition at line 148 of file qsortfilterproxymodel.cpp.

◆ setRecursiveFilteringEnabledForwarder()

Qt::DisplayRole Qt::DisplayRole & QSortFilterProxyModelPrivate::setRecursiveFilteringEnabledForwarder ( bool recursive)
inline

Definition at line 151 of file qsortfilterproxymodel.cpp.

◆ setSortCaseSensitivityForwarder()

void QSortFilterProxyModelPrivate::setSortCaseSensitivityForwarder ( Qt::CaseSensitivity cs)
inline

Definition at line 131 of file qsortfilterproxymodel.cpp.

◆ setSortLocaleAwareForwarder()

void QSortFilterProxyModelPrivate::setSortLocaleAwareForwarder ( bool on)
inline

Definition at line 143 of file qsortfilterproxymodel.cpp.

◆ setSortRoleForwarder()

& QSortFilterProxyModelPrivate::setSortRoleForwarder ( int role)
inline

Definition at line 140 of file qsortfilterproxymodel.cpp.

◆ sort()

void QSortFilterProxyModelPrivate::sort ( )

Sorts the existing mappings.

Definition at line 606 of file qsortfilterproxymodel.cpp.

References build_source_to_proxy_mapping(), emit, it, sort_source_rows(), source_index_mapping, store_persistent_indexes(), update_persistent_indexes(), and QAbstractItemModel::VerticalSortHint.

Referenced by _q_sourceColumnsInserted(), _q_sourceReset(), and _q_sourceRowsInserted().

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

◆ sort_source_rows()

void QSortFilterProxyModelPrivate::sort_source_rows ( QList< int > & source_rows,
const QModelIndex & source_parent ) const

Sorts the given source_rows according to current sort column and order.

Definition at line 679 of file qsortfilterproxymodel.cpp.

References Qt::AscendingOrder, model, sort_order, and source_sort_column.

Referenced by _q_sourceDataChanged(), create_mapping(), handle_filter_changed(), sort(), and source_items_inserted().

+ Here is the caller graph for this function:

◆ sortCaseSensitivityChangedForwarder()

void QSortFilterProxyModelPrivate::sortCaseSensitivityChangedForwarder ( Qt::CaseSensitivity cs)
inline

Definition at line 135 of file qsortfilterproxymodel.cpp.

References emit.

◆ sortLocaleAwareChangedForwarder()

void QSortFilterProxyModelPrivate::sortLocaleAwareChangedForwarder ( bool on)
inline

Definition at line 144 of file qsortfilterproxymodel.cpp.

References emit.

◆ sortRoleChangedForwarder()

& QSortFilterProxyModelPrivate::sortRoleChangedForwarder ( int role)
inline

Definition at line 141 of file qsortfilterproxymodel.cpp.

References emit.

◆ source_items_about_to_be_removed()

void QSortFilterProxyModelPrivate::source_items_about_to_be_removed ( const QModelIndex & source_parent,
int start,
int end,
Qt::Orientation orient )

Handles source model items removal (columnsAboutToBeRemoved(), rowsAboutToBeRemoved()).

Definition at line 1052 of file qsortfilterproxymodel.cpp.

References QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, it, proxy_to_source(), remove_source_items(), source_index_mapping, source_to_proxy(), and Qt::Vertical.

Referenced by _q_sourceColumnsAboutToBeRemoved(), and _q_sourceRowsAboutToBeRemoved().

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

◆ source_items_inserted()

void QSortFilterProxyModelPrivate::source_items_inserted ( const QModelIndex & source_parent,
int start,
int end,
Qt::Orientation orient )

Handles source model items insertion (columnsInserted(), rowsInserted()). Determines 1) which of the inserted items to also insert into proxy model (filtering), 2) where to insert the items into the proxy model (sorting), then inserts those items. The items are inserted into the proxy model in intervals (based on sorted order), so that the proper rows/columnsInserted(start, end) signals will be generated.

Definition at line 951 of file qsortfilterproxymodel.cpp.

References build_source_to_proxy_mapping(), can_create_mapping(), QSqlQueryModel::columnCount(), QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, create_mapping(), filterAcceptsRowInternal(), Qt::Horizontal, i, insert_source_items(), it, model, proxy_to_source(), qWarning, remove_from_mapping(), QSqlQueryModel::rowCount(), sort_source_rows(), source_index_mapping, source_to_proxy(), updateChildrenMapping(), and Qt::Vertical.

Referenced by _q_sourceColumnsInserted(), and _q_sourceRowsInserted().

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

◆ source_items_removed()

void QSortFilterProxyModelPrivate::source_items_removed ( const QModelIndex & source_parent,
int start,
int end,
Qt::Orientation orient )

Handles source model items removal (columnsRemoved(), rowsRemoved()).

Definition at line 1085 of file qsortfilterproxymodel.cpp.

References build_source_to_proxy_mapping(), QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, it, proxy_to_source(), Q_ASSERT, qWarning, remove_from_mapping(), source_index_mapping, source_to_proxy(), updateChildrenMapping(), and Qt::Vertical.

Referenced by _q_sourceColumnsRemoved(), and _q_sourceRowsRemoved().

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

◆ source_to_proxy()

QModelIndex QSortFilterProxyModelPrivate::source_to_proxy ( const QModelIndex & sourceIndex) const

Definition at line 561 of file qsortfilterproxymodel.cpp.

References QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, create_index(), create_mapping(), it, model, QModelIndex::parent(), Q_ASSERT, and qWarning.

Referenced by _q_sourceHeaderDataChanged(), build_source_to_proxy_mapping(), handle_filter_changed(), insert_source_items(), needsReorder(), proxy_intervals_for_source_items(), proxy_item_range(), remove_proxy_interval(), remove_source_items(), source_items_about_to_be_removed(), source_items_inserted(), and source_items_removed().

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

◆ store_persistent_indexes()

QModelIndexPairList QSortFilterProxyModelPrivate::store_persistent_indexes ( ) const

Maps the persistent proxy indexes to source indexes and returns the list of source indexes.

Definition at line 1224 of file qsortfilterproxymodel.cpp.

References QAbstractItemModelPrivate::persistent, and QList< T >::reserve().

Referenced by _q_clearMapping(), _q_sourceDataChanged(), _q_sourceLayoutAboutToBeChanged(), and sort().

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

◆ update_persistent_indexes()

void QSortFilterProxyModelPrivate::update_persistent_indexes ( const QModelIndexPairList & source_indexes)

Maps source_indexes to proxy indexes and stores those as persistent indexes.

Definition at line 1243 of file qsortfilterproxymodel.cpp.

References create_mapping(), QList< T >::reserve(), and QList< T >::size().

Referenced by _q_clearMapping(), _q_sourceDataChanged(), _q_sourceLayoutChanged(), and sort().

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

◆ update_source_sort_column()

bool QSortFilterProxyModelPrivate::update_source_sort_column ( )

update the source_sort_column according to the proxy_sort_column return true if the column was changed

Definition at line 628 of file qsortfilterproxymodel.cpp.

References create_mapping(), proxy_sort_column, and source_sort_column.

Referenced by _q_sourceColumnsInserted(), _q_sourceReset(), and _q_sourceRowsInserted().

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

◆ updateChildrenMapping()

void QSortFilterProxyModelPrivate::updateChildrenMapping ( const QModelIndex & source_parent,
Mapping * parent_mapping,
Qt::Orientation orient,
int start,
int end,
int delta_item_count,
bool remove )

updates the mapping of the children when inserting or removing items

Definition at line 1137 of file qsortfilterproxymodel.cpp.

References QAbstractTableModel::index(), model, pos, Q_ASSERT, remove(), remove_from_mapping(), QModelIndex::row(), source_index_mapping, and Qt::Vertical.

Referenced by source_items_inserted(), and source_items_removed().

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

Member Data Documentation

◆ bool [1/2]

Qt::DisplayRole Qt::DisplayRole QSortFilterProxyModelPrivate::bool

Definition at line 212 of file qsortfilterproxymodel.cpp.

◆ bool [2/2]

Qt::DisplayRole Qt::DisplayRole false QSortFilterProxyModelPrivate::bool

Definition at line 221 of file qsortfilterproxymodel.cpp.

◆ complete_insert

bool QSortFilterProxyModelPrivate::complete_insert = false

◆ dynamic_sortfilter

◆ filter_recursive

◆ filter_regularexpression

Qt::DisplayRole Qt::DisplayRole false true QSortFilterProxyModelPrivate::filter_regularexpression

Definition at line 231 of file qsortfilterproxymodel.cpp.

Referenced by filter_about_to_be_changed(), and set_filter_pattern().

◆ filter_role

Qt::DisplayRole QSortFilterProxyModelPrivate::filter_role

Definition at line 201 of file qsortfilterproxymodel.cpp.

Referenced by _q_sourceDataChanged().

◆ int [1/2]

QSortFilterProxyModelPrivate::int

Definition at line 192 of file qsortfilterproxymodel.cpp.

◆ int [2/2]

Qt::DisplayRole QSortFilterProxyModelPrivate::int

Definition at line 201 of file qsortfilterproxymodel.cpp.

◆ itemsBeingRemoved

QRowsRemoval QSortFilterProxyModelPrivate::itemsBeingRemoved

◆ last_top_source

◆ proxy_sort_column

int QSortFilterProxyModelPrivate::proxy_sort_column = -1

◆ QRegularExpression

Qt::DisplayRole Qt::DisplayRole false true QSortFilterProxyModelPrivate::QRegularExpression

Definition at line 230 of file qsortfilterproxymodel.cpp.

◆ saved_layoutChange_parents

QList<QPersistentModelIndex> QSortFilterProxyModelPrivate::saved_layoutChange_parents

◆ saved_persistent_indexes

QModelIndexPairList QSortFilterProxyModelPrivate::saved_persistent_indexes

◆ sort_order

Qt::SortOrder QSortFilterProxyModelPrivate::sort_order = Qt::AscendingOrder

◆ sort_role

QSortFilterProxyModelPrivate::sort_role

Definition at line 192 of file qsortfilterproxymodel.cpp.

◆ source_index_mapping

◆ source_sort_column

◆ sourceConnections

std::array<QMetaObject::Connection, 18> QSortFilterProxyModelPrivate::sourceConnections

Definition at line 240 of file qsortfilterproxymodel.cpp.


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