Qt 4.8
|
Classes | |
struct | Mapping |
Public Functions | |
void | _q_clearMapping () |
void | _q_sourceAboutToBeReset () |
void | _q_sourceColumnsAboutToBeInserted (const QModelIndex &source_parent, int start, int end) |
void | _q_sourceColumnsAboutToBeRemoved (const QModelIndex &source_parent, int start, int end) |
void | _q_sourceColumnsInserted (const QModelIndex &source_parent, int start, int end) |
void | _q_sourceColumnsRemoved (const QModelIndex &source_parent, int start, int end) |
void | _q_sourceDataChanged (const QModelIndex &source_top_left, const QModelIndex &source_bottom_right) |
void | _q_sourceHeaderDataChanged (Qt::Orientation orientation, int start, int end) |
void | _q_sourceLayoutAboutToBeChanged () |
void | _q_sourceLayoutChanged () |
virtual void | _q_sourceModelDestroyed () |
void | _q_sourceReset () |
void | _q_sourceRowsAboutToBeInserted (const QModelIndex &source_parent, int start, int end) |
void | _q_sourceRowsAboutToBeRemoved (const QModelIndex &source_parent, int start, int end) |
void | _q_sourceRowsInserted (const QModelIndex &source_parent, int start, int end) |
void | _q_sourceRowsRemoved (const QModelIndex &source_parent, int start, int end) |
void | build_source_to_proxy_mapping (const QVector< int > &proxy_to_source, QVector< int > &source_to_proxy) const |
bool | can_create_mapping (const QModelIndex &source_parent) const |
QModelIndex | create_index (int row, int column, QHash< QModelIndex, Mapping *>::const_iterator it) const |
QHash< QModelIndex, Mapping * >::const_iterator | create_mapping (const QModelIndex &source_parent) const |
void | filter_changed (const QModelIndex &source_parent=QModelIndex()) |
Updates the proxy model (adds/removes rows) based on the new filter. More... | |
QSet< int > | handle_filter_changed (QVector< int > &source_to_proxy, QVector< int > &proxy_to_source, const QModelIndex &source_parent, Qt::Orientation orient) |
QHash< QModelIndex, Mapping * >::const_iterator | index_to_iterator (const QModelIndex &proxy_index) const |
void | insert_source_items (QVector< int > &source_to_proxy, QVector< int > &proxy_to_source, const QVector< 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. More... | |
QVector< QPair< int, int > > | proxy_intervals_for_source_items (const QVector< int > &source_to_proxy, const QVector< 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. More... | |
QVector< QPair< int, QVector< int > > > | proxy_intervals_for_source_items_to_add (const QVector< int > &proxy_to_source, const QVector< 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). More... | |
void | proxy_item_range (const QVector< int > &source_to_proxy, const QVector< int > &source_items, int &proxy_low, int &proxy_high) const |
QModelIndex | proxy_to_source (const QModelIndex &proxyIndex) const |
void | remove_from_mapping (const QModelIndex &source_parent) |
void | remove_proxy_interval (QVector< int > &source_to_proxy, QVector< 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. More... | |
void | remove_source_items (QVector< int > &source_to_proxy, QVector< int > &proxy_to_source, const QVector< 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. More... | |
void | sort () |
Sorts the existing mappings. More... | |
void | sort_source_rows (QVector< int > &source_rows, const QModelIndex &source_parent) const |
Sorts the given source_rows according to current sort column and order. More... | |
void | source_items_about_to_be_removed (const QModelIndex &source_parent, int start, int end, Qt::Orientation orient) |
Handles source model items removal (columnsAboutToBeRemoved(), rowsAboutToBeRemoved()). More... | |
void | source_items_inserted (const QModelIndex &source_parent, int start, int end, Qt::Orientation orient) |
Handles source model items insertion (columnsInserted(), rowsInserted()). More... | |
void | source_items_removed (const QModelIndex &source_parent, int start, int end, Qt::Orientation orient) |
Handles source model items removal (columnsRemoved(), rowsRemoved()). More... | |
QModelIndex | source_to_proxy (const QModelIndex &sourceIndex) const |
QModelIndexPairList | store_persistent_indexes () |
Maps the persistent proxy indexes to source indexes and returns the list of source indexes. More... | |
void | update_persistent_indexes (const QModelIndexPairList &source_indexes) |
Maps source_indexes to proxy indexes and stores those as persistent indexes. More... | |
bool | update_source_sort_column () |
void | updateChildrenMapping (const QModelIndex &source_parent, Mapping *parent_mapping, Qt::Orientation orient, int start, int end, int delta_item_count, bool remove) |
Public Functions inherited from QAbstractProxyModelPrivate | |
QAbstractProxyModelPrivate () | |
Public Functions inherited from QAbstractItemModelPrivate | |
bool | allowMove (const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation) |
Returns whether a move operation is valid. More... | |
void | columnsAboutToBeInserted (const QModelIndex &parent, int first, int last) |
void | columnsAboutToBeRemoved (const QModelIndex &parent, int first, int last) |
void | columnsInserted (const QModelIndex &parent, int first, int last) |
void | columnsRemoved (const QModelIndex &parent, int first, int last) |
QModelIndex | createIndex (int row, int column, void *data=0) const |
QModelIndex | createIndex (int row, int column, int id) const |
bool | indexValid (const QModelIndex &index) const |
void | invalidatePersistentIndex (const QModelIndex &index) |
void | invalidatePersistentIndexes () |
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) |
void | movePersistentIndexes (QVector< QPersistentModelIndexData *> indexes, int change, const QModelIndex &parent, Qt::Orientation orientation) |
Moves persistent indexes indexes by amount change. More... | |
QAbstractItemModelPrivate () | |
void | removePersistentIndexData (QPersistentModelIndexData *data) |
void | rowsAboutToBeInserted (const QModelIndex &parent, int first, int last) |
void | rowsAboutToBeRemoved (const QModelIndex &parent, int first, int last) |
void | rowsInserted (const QModelIndex &parent, int first, int last) |
void | rowsRemoved (const QModelIndex &parent, int first, int last) |
Public Functions inherited from QObjectPrivate | |
void | _q_reregisterTimers (void *pointer) |
void | addConnection (int signal, Connection *c) |
void | cleanConnectionLists () |
void | connectNotify (const char *signal) |
void | deleteChildren () |
void | disconnectNotify (const char *signal) |
bool | isSender (const QObject *receiver, const char *signal) const |
bool | isSignalConnected (uint signalIdx) const |
Returns true if the signal with index signal_index from object sender is connected. More... | |
void | moveToThread_helper () |
QObjectPrivate (int version=QObjectPrivateVersion) | |
QObjectList | receiverList (const char *signal) const |
QObjectList | senderList () const |
void | setParent_helper (QObject *) |
void | setThreadData_helper (QThreadData *currentData, QThreadData *targetData) |
int | signalIndex (const char *signalName) const |
Returns the signal index used in the internal connectionLists vector. More... | |
virtual | ~QObjectPrivate () |
Public Functions inherited from QObjectData | |
virtual | ~QObjectData ()=0 |
Additional Inherited Members | |
Public Types inherited from QObjectPrivate | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
Static Public Functions inherited from QAbstractItemModelPrivate | |
static const QHash< int, QByteArray > & | defaultRoleNames () |
static QAbstractItemModel * | staticEmptyModel () |
static bool | variantLessThan (const QVariant &v1, const QVariant &v2) |
This function is used by our Q{Tree,Widget,Table}WidgetModel classes to sort. More... | |
Static Public Functions inherited from QObjectPrivate | |
static void | clearGuards (QObject *) |
static QObjectPrivate * | get (QObject *o) |
static void | resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender) |
static Sender * | setCurrentSender (QObject *receiver, Sender *sender) |
static void | signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result) |
Definition at line 143 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_clearMapping | ( | ) |
Definition at line 296 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceAboutToBeReset | ( | ) |
Definition at line 1274 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeInserted | ( | const QModelIndex & | source_parent, |
int | start, | ||
int | end | ||
) |
Definition at line 1356 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeRemoved | ( | const QModelIndex & | source_parent, |
int | start, | ||
int | end | ||
) |
Definition at line 1387 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceColumnsInserted | ( | const QModelIndex & | source_parent, |
int | start, | ||
int | end | ||
) |
Definition at line 1367 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceColumnsRemoved | ( | const QModelIndex & | source_parent, |
int | start, | ||
int | end | ||
) |
Definition at line 1394 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceDataChanged | ( | const QModelIndex & | source_top_left, |
const QModelIndex & | source_bottom_right | ||
) |
Definition at line 1153 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceHeaderDataChanged | ( | Qt::Orientation | orientation, |
int | start, | ||
int | end | ||
) |
Definition at line 1260 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged | ( | ) |
Definition at line 1292 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged | ( | ) |
Definition at line 1303 of file qsortfilterproxymodel.cpp.
|
virtual |
Reimplemented from QAbstractProxyModelPrivate.
Definition at line 281 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceReset | ( | ) |
Definition at line 1280 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeInserted | ( | const QModelIndex & | source_parent, |
int | start, | ||
int | end | ||
) |
Definition at line 1322 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeRemoved | ( | const QModelIndex & | source_parent, |
int | start, | ||
int | end | ||
) |
Definition at line 1341 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceRowsInserted | ( | const QModelIndex & | source_parent, |
int | start, | ||
int | end | ||
) |
Definition at line 1333 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::_q_sourceRowsRemoved | ( | const QModelIndex & | source_parent, |
int | start, | ||
int | end | ||
) |
Definition at line 1349 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::build_source_to_proxy_mapping | ( | const QVector< int > & | proxy_to_source, |
QVector< int > & | source_to_proxy | ||
) | const |
Definition at line 1005 of file qsortfilterproxymodel.cpp.
bool QSortFilterProxyModelPrivate::can_create_mapping | ( | const QModelIndex & | source_parent | ) | const |
Definition at line 398 of file qsortfilterproxymodel.cpp.
|
inline |
Definition at line 197 of file qsortfilterproxymodel.cpp.
IndexMap::const_iterator QSortFilterProxyModelPrivate::create_mapping | ( | const QModelIndex & | source_parent | ) | const |
Definition at line 313 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::filter_changed | ( | const QModelIndex & | source_parent = QModelIndex() | ) |
Updates the proxy model (adds/removes rows) based on the new filter.
Definition at line 1070 of file qsortfilterproxymodel.cpp.
QSet< int > QSortFilterProxyModelPrivate::handle_filter_changed | ( | QVector< int > & | source_to_proxy, |
QVector< int > & | proxy_to_source, | ||
const QModelIndex & | source_parent, | ||
Qt::Orientation | orient | ||
) |
Definition at line 1112 of file qsortfilterproxymodel.cpp.
|
inline |
Definition at line 183 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::insert_source_items | ( | QVector< int > & | source_to_proxy, |
QVector< int > & | proxy_to_source, | ||
const QVector< 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 682 of file qsortfilterproxymodel.cpp.
QVector< QPair< int, int > > QSortFilterProxyModelPrivate::proxy_intervals_for_source_items | ( | const QVector< int > & | source_to_proxy, |
const QVector< 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 496 of file qsortfilterproxymodel.cpp.
QVector< QPair< int, QVector< int > > > QSortFilterProxyModelPrivate::proxy_intervals_for_source_items_to_add | ( | const QVector< int > & | proxy_to_source, |
const QVector< 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 605 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::proxy_item_range | ( | const QVector< int > & | source_to_proxy, |
const QVector< int > & | source_items, | ||
int & | proxy_low, | ||
int & | proxy_high | ||
) | const |
Definition at line 986 of file qsortfilterproxymodel.cpp.
QModelIndex QSortFilterProxyModelPrivate::proxy_to_source | ( | const QModelIndex & | proxyIndex | ) | const |
Definition at line 359 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::remove_from_mapping | ( | const QModelIndex & | source_parent | ) |
Definition at line 287 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::remove_proxy_interval | ( | QVector< int > & | source_to_proxy, |
QVector< 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 565 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::remove_source_items | ( | QVector< int > & | source_to_proxy, |
QVector< int > & | proxy_to_source, | ||
const QVector< 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 533 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::sort | ( | ) |
Sorts the existing mappings.
Definition at line 425 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::sort_source_rows | ( | QVector< int > & | source_rows, |
const QModelIndex & | source_parent | ||
) | const |
Sorts the given source_rows according to current sort column and order.
Definition at line 465 of file qsortfilterproxymodel.cpp.
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 842 of file qsortfilterproxymodel.cpp.
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 738 of file qsortfilterproxymodel.cpp.
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 878 of file qsortfilterproxymodel.cpp.
QModelIndex QSortFilterProxyModelPrivate::source_to_proxy | ( | const QModelIndex & | sourceIndex | ) | const |
Definition at line 377 of file qsortfilterproxymodel.cpp.
QModelIndexPairList QSortFilterProxyModelPrivate::store_persistent_indexes | ( | ) |
Maps the persistent proxy indexes to source indexes and returns the list of source indexes.
Definition at line 1023 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::update_persistent_indexes | ( | const QModelIndexPairList & | source_indexes | ) |
Maps source_indexes to proxy indexes and stores those as persistent indexes.
Definition at line 1044 of file qsortfilterproxymodel.cpp.
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 447 of file qsortfilterproxymodel.cpp.
void QSortFilterProxyModelPrivate::updateChildrenMapping | ( | const QModelIndex & | source_parent, |
Mapping * | parent_mapping, | ||
Qt::Orientation | orient, | ||
int | start, | ||
int | end, | ||
int | delta_item_count, | ||
bool | remove | ||
) |
Definition at line 929 of file qsortfilterproxymodel.cpp.
bool QSortFilterProxyModelPrivate::dynamic_sortfilter |
Definition at line 170 of file qsortfilterproxymodel.cpp.
int QSortFilterProxyModelPrivate::filter_column |
Definition at line 166 of file qsortfilterproxymodel.cpp.
QRegExp QSortFilterProxyModelPrivate::filter_regexp |
Definition at line 167 of file qsortfilterproxymodel.cpp.
int QSortFilterProxyModelPrivate::filter_role |
Definition at line 168 of file qsortfilterproxymodel.cpp.
QRowsRemoval QSortFilterProxyModelPrivate::itemsBeingRemoved |
Definition at line 171 of file qsortfilterproxymodel.cpp.
int QSortFilterProxyModelPrivate::proxy_sort_column |
Definition at line 160 of file qsortfilterproxymodel.cpp.
QModelIndexPairList QSortFilterProxyModelPrivate::saved_persistent_indexes |
Definition at line 173 of file qsortfilterproxymodel.cpp.
Qt::CaseSensitivity QSortFilterProxyModelPrivate::sort_casesensitivity |
Definition at line 162 of file qsortfilterproxymodel.cpp.
bool QSortFilterProxyModelPrivate::sort_localeaware |
Definition at line 164 of file qsortfilterproxymodel.cpp.
Qt::SortOrder QSortFilterProxyModelPrivate::sort_order |
Definition at line 161 of file qsortfilterproxymodel.cpp.
int QSortFilterProxyModelPrivate::sort_role |
Definition at line 163 of file qsortfilterproxymodel.cpp.
|
mutable |
Definition at line 157 of file qsortfilterproxymodel.cpp.
int QSortFilterProxyModelPrivate::source_sort_column |
Definition at line 159 of file qsortfilterproxymodel.cpp.