![]() |
Qt 6.x
The Qt SDK
|
Classes | |
struct | Mapping |
Public Types | |
enum class | Direction { Rows = 1 , Columns = 2 , All = Rows | Columns } |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData > |
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 QAbstractItemModel * | staticEmptyModel () |
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 bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (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) |
Definition at line 110 of file qsortfilterproxymodel.cpp.
|
strong |
Enumerator | |
---|---|
Rows | |
Columns | |
All |
Definition at line 115 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_clearMapping | ( | ) |
Definition at line 461 of file qsortfilterproxymodel.cpp.
References dynamic_sortfilter, find_source_sort_column(), qDeleteAll(), QModelIndexPairList, source_index_mapping, source_sort_column, store_persistent_indexes(), and update_persistent_indexes().
Referenced by QSortFilterProxyModel::QSortFilterProxyModel(), and _q_sourceReset().
void QSortFilterProxyModelPrivate::_q_sourceAboutToBeReset | ( | ) |
Definition at line 1579 of file qsortfilterproxymodel.cpp.
Referenced by QSortFilterProxyModel::setSourceModel().
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().
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().
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().
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().
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().
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().
void QSortFilterProxyModelPrivate::_q_sourceDataChanged | ( | const QModelIndex & | source_top_left, |
const QModelIndex & | source_bottom_right, | ||
const QList< int > & | roles | ||
) |
Definition at line 1393 of file qsortfilterproxymodel.cpp.
References QList< T >::append(), QModelIndex::column(), QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, QListSpecialMethodsBase< T >::contains(), QSet< T >::contains(), QRowsRemoval::contains(), create_index(), create_mapping_recursive(), dynamic_sortfilter, emit, filter_recursive, filter_role, filterAcceptsRowInternal(), insert_source_items(), QList< T >::isEmpty(), QModelIndex::isValid(), it, itemsBeingRemoved, needsReorder(), QModelIndex::parent(), proxy_item_range(), qListToSet(), qMin(), QModelIndexPairList, remove_from_mapping(), remove_source_items(), QModelIndex::row(), sort_source_rows(), source_index_mapping, source_sort_column, store_persistent_indexes(), update_persistent_indexes(), Qt::Vertical, and QAbstractItemModel::VerticalSortHint.
Referenced by _q_sourceRowsInserted(), _q_sourceRowsRemoved(), and QSortFilterProxyModel::setSourceModel().
void QSortFilterProxyModelPrivate::_q_sourceHeaderDataChanged | ( | Qt::Orientation | orientation, |
int | start, | ||
int | end | ||
) |
Definition at line 1537 of file qsortfilterproxymodel.cpp.
References QList< T >::at(), QList< T >::begin(), create_mapping(), emit, QList< T >::end(), i, it, QList< T >::push_back(), Q_ASSERT, QList< T >::reserve(), QList< T >::size(), source_to_proxy(), and Qt::Vertical.
Referenced by QSortFilterProxyModel::setSourceModel().
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(), QAbstractItemModelPrivate::Persistent::indexes, QMultiHash< Key, T >::isEmpty(), QList< T >::isEmpty(), QModelIndex::isValid(), 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().
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().
|
override |
Definition at line 393 of file qsortfilterproxymodel.cpp.
References qDeleteAll(), and source_index_mapping.
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().
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().
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().
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().
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().
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().
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(), QModelIndex::isValid(), itemsBeingRemoved, QModelIndex::parent(), QModelIndex::row(), source_items_removed(), and Qt::Vertical.
Referenced by QSortFilterProxyModel::setSourceModel().
Definition at line 162 of file qsortfilterproxymodel.cpp.
References emit.
|
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().
bool QSortFilterProxyModelPrivate::can_create_mapping | ( | const QModelIndex & | source_parent | ) | const |
Definition at line 583 of file qsortfilterproxymodel.cpp.
References QList< T >::at(), QModelIndex::column(), QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, QModelIndex::isValid(), it, QModelIndex::parent(), QSortFilterProxyModelPrivate::Mapping::proxy_columns, QSortFilterProxyModelPrivate::Mapping::proxy_rows, QModelIndex::row(), and source_index_mapping.
Referenced by _q_sourceColumnsAboutToBeInserted(), _q_sourceRowsAboutToBeInserted(), and source_items_inserted().
|
inline |
Definition at line 283 of file qsortfilterproxymodel.cpp.
References it.
Referenced by _q_sourceDataChanged(), and source_to_proxy().
IndexMap::const_iterator QSortFilterProxyModelPrivate::create_mapping | ( | const QModelIndex & | source_parent | ) | const |
Definition at line 475 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().
IndexMap::const_iterator QSortFilterProxyModelPrivate::create_mapping_recursive | ( | const QModelIndex & | source_parent | ) | const |
Definition at line 522 of file qsortfilterproxymodel.cpp.
References QList< T >::at(), QModelIndex::column(), QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, create_mapping(), create_mapping_recursive(), QModelIndex::isValid(), it, QModelIndex::parent(), QSortFilterProxyModelPrivate::Mapping::proxy_columns, QSortFilterProxyModelPrivate::Mapping::proxy_rows, QModelIndex::row(), and source_index_mapping.
Referenced by _q_sourceDataChanged(), and create_mapping_recursive().
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.
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 QList< T >::at(), QModelIndex::column(), Columns, QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, QList< T >::constBegin(), QList< T >::constEnd(), QSet< T >::contains(), dir, filter_changed(), handle_filter_changed(), Qt::Horizontal, i, it, QList< T >::push_back(), remove_from_mapping(), QModelIndex::row(), Rows, QList< T >::size(), source_index_mapping, and Qt::Vertical.
Referenced by filter_changed().
bool QSortFilterProxyModelPrivate::filterAcceptsRowInternal | ( | int | source_row, |
const QModelIndex & | source_parent | ||
) | const |
Definition at line 400 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().
|
inline |
Definition at line 173 of file qsortfilterproxymodel.cpp.
References emit.
|
inline |
Definition at line 150 of file qsortfilterproxymodel.cpp.
References emit.
int QSortFilterProxyModelPrivate::find_source_sort_column | ( | ) | const |
Find the source_sort_column without creating a full mapping and without updating anything.
Definition at line 655 of file qsortfilterproxymodel.cpp.
References QSqlQueryModel::columnCount(), i, model, and proxy_sort_column.
Referenced by _q_clearMapping(), and _q_sourceLayoutChanged().
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 QList< T >::append(), filterAcceptsRowInternal(), i, insert_source_items(), QList< T >::isEmpty(), proxy_to_source(), qListToSet(), remove_source_items(), sort_source_rows(), source_to_proxy(), and Qt::Vertical.
Referenced by filter_changed().
|
inline |
Definition at line 269 of file qsortfilterproxymodel.cpp.
References QModelIndex::internalPointer(), QModelIndex::isValid(), it, QModelIndex::model(), Q_ASSERT, and source_index_mapping.
Referenced by proxy_to_source().
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(), QList< T >::cbegin(), QList< T >::cend(), QModelIndex::isValid(), it, proxy_intervals_for_source_items_to_add(), proxy_to_source(), QList< T >::size(), source_to_proxy(), and Qt::Vertical.
Referenced by _q_sourceDataChanged(), handle_filter_changed(), and source_items_inserted().
bool QSortFilterProxyModelPrivate::needsReorder | ( | const QList< int > & | source_rows, |
const QModelIndex & | source_parent | ||
) | const |
Definition at line 1366 of file qsortfilterproxymodel.cpp.
References QList< T >::begin(), QList< T >::end(), if(), Q_ASSERT, source_sort_column, and source_to_proxy().
Referenced by _q_sourceDataChanged().
QList< QPair< 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 708 of file qsortfilterproxymodel.cpp.
References QList< T >::append(), QList< T >::at(), QList< T >::begin(), QList< T >::end(), QList< T >::first(), i, QList< T >::isEmpty(), Q_ASSERT, QList< T >::removeIf(), QList< T >::size(), and source_to_proxy().
Referenced by remove_source_items().
QList< QPair< 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 823 of file qsortfilterproxymodel.cpp.
References QList< T >::append(), Qt::AscendingOrder, QList< T >::at(), QList< T >::clear(), compare(), dynamic_sortfilter, QAbstractTableModel::index(), QList< T >::isEmpty(), model, proxy_to_source(), QList< T >::size(), sort_order, source_sort_column, and Qt::Vertical.
Referenced by insert_source_items().
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 QList< T >::at(), i, Q_ASSERT, QList< T >::size(), and source_to_proxy().
Referenced by _q_sourceDataChanged().
QModelIndex QSortFilterProxyModelPrivate::proxy_to_source | ( | const QModelIndex & | proxyIndex | ) | const |
Definition at line 544 of file qsortfilterproxymodel.cpp.
References QModelIndex::column(), QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, QAbstractTableModel::index(), index_to_iterator(), QModelIndex::isValid(), it, QModelIndex::model(), model, Q_ASSERT, qWarning, and QModelIndex::row().
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().
Qt::DisplayRole Qt::DisplayRole false QSortFilterProxyModelPrivate::Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS | ( | QSortFilterProxyModelPrivate | , |
bool | , | ||
accept_children | , | ||
&QSortFilterProxyModelPrivate::setAutoAcceptChildRowsForwarder | , | ||
&QSortFilterProxyModelPrivate::autoAcceptChildRowsChangedForwarder | , | ||
false | |||
) |
Qt::DisplayRole Qt::DisplayRole QSortFilterProxyModelPrivate::Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS | ( | QSortFilterProxyModelPrivate | , |
bool | , | ||
sort_localeaware | , | ||
&QSortFilterProxyModelPrivate::setSortLocaleAwareForwarder | , | ||
&QSortFilterProxyModelPrivate::sortLocaleAwareChangedForwarder | , | ||
false | |||
) |
Qt::DisplayRole QSortFilterProxyModelPrivate::Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS | ( | QSortFilterProxyModelPrivate | , |
int | , | ||
filter_column | , | ||
&QSortFilterProxyModelPrivate::setFilterKeyColumnForwarder | , | ||
0 | |||
) |
Qt::DisplayRole Qt::DisplayRole false true QSortFilterProxyModelPrivate::Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS | ( | QSortFilterProxyModelPrivate | , |
Qt::CaseSensitivity | , | ||
filter_casesensitive | , | ||
&QSortFilterProxyModelPrivate::setFilterCaseSensitivityForwarder | , | ||
&QSortFilterProxyModelPrivate::filterCaseSensitivityChangedForwarder | , | ||
Qt::CaseSensitive | |||
) |
QSortFilterProxyModelPrivate::Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS | ( | QSortFilterProxyModelPrivate | , |
Qt::CaseSensitivity | , | ||
sort_casesensitivity | , | ||
&QSortFilterProxyModelPrivate::setSortCaseSensitivityForwarder | , | ||
&QSortFilterProxyModelPrivate::sortCaseSensitivityChangedForwarder | , | ||
Qt::CaseSensitive | |||
) |
bool QSortFilterProxyModelPrivate::recursiveChildAcceptsRow | ( | int | source_row, |
const QModelIndex & | source_parent | ||
) | const |
Definition at line 434 of file qsortfilterproxymodel.cpp.
References i, QAbstractTableModel::index(), model, recursiveChildAcceptsRow(), and QSqlQueryModel::rowCount().
Referenced by filterAcceptsRowInternal(), and recursiveChildAcceptsRow().
|
inline |
Definition at line 156 of file qsortfilterproxymodel.cpp.
References emit.
bool QSortFilterProxyModelPrivate::recursiveParentAcceptsRow | ( | const QModelIndex & | source_parent | ) | const |
Definition at line 418 of file qsortfilterproxymodel.cpp.
References QModelIndex::isValid(), QModelIndex::parent(), recursiveParentAcceptsRow(), and QModelIndex::row().
Referenced by filterAcceptsRowInternal(), and recursiveParentAcceptsRow().
void QSortFilterProxyModelPrivate::remove_from_mapping | ( | const QModelIndex & | source_parent | ) |
Definition at line 452 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().
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 784 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().
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 752 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().
Definition at line 257 of file qsortfilterproxymodel.cpp.
References QRegularExpression::CaseInsensitiveOption, filter_regularexpression, QRegularExpression::patternOptions(), QRegularExpression::setPattern(), and QRegularExpression::setPatternOptions().
Definition at line 161 of file qsortfilterproxymodel.cpp.
|
inline |
Definition at line 167 of file qsortfilterproxymodel.cpp.
|
inline |
Definition at line 169 of file qsortfilterproxymodel.cpp.
Definition at line 147 of file qsortfilterproxymodel.cpp.
|
inline |
Definition at line 178 of file qsortfilterproxymodel.cpp.
|
inline |
Definition at line 149 of file qsortfilterproxymodel.cpp.
|
inline |
Definition at line 152 of file qsortfilterproxymodel.cpp.
|
inline |
Definition at line 132 of file qsortfilterproxymodel.cpp.
Definition at line 144 of file qsortfilterproxymodel.cpp.
|
inline |
Definition at line 141 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::sort | ( | ) |
Sorts the existing mappings.
Definition at line 607 of file qsortfilterproxymodel.cpp.
References build_source_to_proxy_mapping(), emit, it, QModelIndexPairList, sort_source_rows(), source_index_mapping, store_persistent_indexes(), update_persistent_indexes(), and QAbstractItemModel::VerticalSortHint.
Referenced by _q_sourceColumnsInserted(), _q_sourceReset(), and _q_sourceRowsInserted().
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 680 of file qsortfilterproxymodel.cpp.
References Qt::AscendingOrder, QList< T >::begin(), QList< T >::end(), model, sort_order, and source_sort_column.
Referenced by _q_sourceDataChanged(), create_mapping(), handle_filter_changed(), sort(), and source_items_inserted().
|
inline |
Definition at line 136 of file qsortfilterproxymodel.cpp.
References emit.
Definition at line 145 of file qsortfilterproxymodel.cpp.
References emit.
|
inline |
Definition at line 142 of file qsortfilterproxymodel.cpp.
References emit.
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 QList< T >::append(), 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().
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 QList< T >::append(), 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(), QList< T >::isEmpty(), it, model, proxy_to_source(), qWarning, remove_from_mapping(), QList< T >::resize(), QSqlQueryModel::rowCount(), sort_source_rows(), source_index_mapping, source_to_proxy(), updateChildrenMapping(), and Qt::Vertical.
Referenced by _q_sourceColumnsInserted(), and _q_sourceRowsInserted().
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().
QModelIndex QSortFilterProxyModelPrivate::source_to_proxy | ( | const QModelIndex & | sourceIndex | ) | const |
Definition at line 562 of file qsortfilterproxymodel.cpp.
References QModelIndex::column(), QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, create_index(), create_mapping(), QModelIndex::isValid(), it, QModelIndex::model(), model, QModelIndex::parent(), Q_ASSERT, qWarning, and QModelIndex::row().
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().
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::indexes, QAbstractItemModelPrivate::persistent, qMakePair(), QModelIndexPairList, and QMultiHash< Key, T >::size().
Referenced by _q_clearMapping(), _q_sourceDataChanged(), _q_sourceLayoutAboutToBeChanged(), and sort().
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(), QPersistentModelIndex::parent(), QList< T >::reserve(), and QList< T >::size().
Referenced by _q_clearMapping(), _q_sourceDataChanged(), _q_sourceLayoutChanged(), and sort().
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 629 of file qsortfilterproxymodel.cpp.
References create_mapping(), proxy_sort_column, and source_sort_column.
Referenced by _q_sourceColumnsInserted(), _q_sourceReset(), and _q_sourceRowsInserted().
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 QList< T >::append(), QList< T >::begin(), QModelIndex::column(), QList< T >::end(), QList< T >::erase(), QAbstractTableModel::index(), QSortFilterProxyModelPrivate::Mapping::mapped_children, 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().
Qt::DisplayRole Qt::DisplayRole QSortFilterProxyModelPrivate::bool |
Definition at line 213 of file qsortfilterproxymodel.cpp.
Qt::DisplayRole Qt::DisplayRole false QSortFilterProxyModelPrivate::bool |
Definition at line 222 of file qsortfilterproxymodel.cpp.
Definition at line 186 of file qsortfilterproxymodel.cpp.
Referenced by _q_sourceRowsAboutToBeInserted(), and _q_sourceRowsInserted().
Qt::DisplayRole Qt::DisplayRole false QSortFilterProxyModelPrivate::dynamic_sortfilter |
Definition at line 222 of file qsortfilterproxymodel.cpp.
Referenced by _q_clearMapping(), _q_sourceColumnsInserted(), _q_sourceDataChanged(), _q_sourceLayoutChanged(), _q_sourceReset(), _q_sourceRowsInserted(), and proxy_intervals_for_source_items_to_add().
Qt::DisplayRole Qt::DisplayRole QSortFilterProxyModelPrivate::filter_recursive |
Definition at line 213 of file qsortfilterproxymodel.cpp.
Referenced by _q_sourceDataChanged(), _q_sourceRowsAboutToBeInserted(), _q_sourceRowsInserted(), _q_sourceRowsRemoved(), and filterAcceptsRowInternal().
Qt::DisplayRole Qt::DisplayRole false true QSortFilterProxyModelPrivate::filter_regularexpression |
Definition at line 232 of file qsortfilterproxymodel.cpp.
Referenced by filter_about_to_be_changed(), and set_filter_pattern().
Qt::DisplayRole QSortFilterProxyModelPrivate::filter_role |
Definition at line 202 of file qsortfilterproxymodel.cpp.
Referenced by _q_sourceDataChanged().
QSortFilterProxyModelPrivate::int |
Definition at line 193 of file qsortfilterproxymodel.cpp.
Qt::DisplayRole QSortFilterProxyModelPrivate::int |
Definition at line 202 of file qsortfilterproxymodel.cpp.
QRowsRemoval QSortFilterProxyModelPrivate::itemsBeingRemoved |
Definition at line 236 of file qsortfilterproxymodel.cpp.
Referenced by _q_sourceDataChanged(), _q_sourceRowsAboutToBeRemoved(), and _q_sourceRowsRemoved().
Qt::DisplayRole Qt::DisplayRole false true & QSortFilterProxyModelPrivate::setFilterRegularExpressionForwarder QModelIndex QSortFilterProxyModelPrivate::last_top_source |
Definition at line 235 of file qsortfilterproxymodel.cpp.
Referenced by _q_sourceRowsAboutToBeInserted(), and _q_sourceRowsInserted().
int QSortFilterProxyModelPrivate::proxy_sort_column = -1 |
Definition at line 184 of file qsortfilterproxymodel.cpp.
Referenced by _q_sourceColumnsInserted(), _q_sourceColumnsRemoved(), find_source_sort_column(), and update_source_sort_column().
Qt::DisplayRole Qt::DisplayRole false true QSortFilterProxyModelPrivate::QRegularExpression |
Definition at line 231 of file qsortfilterproxymodel.cpp.
QList<QPersistentModelIndex> QSortFilterProxyModelPrivate::saved_layoutChange_parents |
Definition at line 239 of file qsortfilterproxymodel.cpp.
Referenced by _q_sourceLayoutAboutToBeChanged(), and _q_sourceLayoutChanged().
QModelIndexPairList QSortFilterProxyModelPrivate::saved_persistent_indexes |
Definition at line 238 of file qsortfilterproxymodel.cpp.
Referenced by _q_sourceLayoutAboutToBeChanged(), and _q_sourceLayoutChanged().
Qt::SortOrder QSortFilterProxyModelPrivate::sort_order = Qt::AscendingOrder |
Definition at line 185 of file qsortfilterproxymodel.cpp.
Referenced by proxy_intervals_for_source_items_to_add(), and sort_source_rows().
QSortFilterProxyModelPrivate::sort_role |
Definition at line 193 of file qsortfilterproxymodel.cpp.
|
mutable |
Definition at line 130 of file qsortfilterproxymodel.cpp.
Referenced by _q_clearMapping(), _q_sourceDataChanged(), _q_sourceLayoutChanged(), _q_sourceModelDestroyed(), can_create_mapping(), create_mapping(), create_mapping_recursive(), filter_about_to_be_changed(), filter_changed(), index_to_iterator(), remove_from_mapping(), sort(), source_items_about_to_be_removed(), source_items_inserted(), source_items_removed(), and updateChildrenMapping().
int QSortFilterProxyModelPrivate::source_sort_column = -1 |
Definition at line 183 of file qsortfilterproxymodel.cpp.
Referenced by _q_clearMapping(), _q_sourceColumnsInserted(), _q_sourceColumnsRemoved(), _q_sourceDataChanged(), _q_sourceLayoutChanged(), needsReorder(), proxy_intervals_for_source_items_to_add(), sort_source_rows(), and update_source_sort_column().
std::array<QMetaObject::Connection, 18> QSortFilterProxyModelPrivate::sourceConnections |
Definition at line 241 of file qsortfilterproxymodel.cpp.