QSortFilterProxyModelPrivate Class Reference

Inheritance diagram for QSortFilterProxyModelPrivate:

Inheritance graph
[legend]
Collaboration diagram for QSortFilterProxyModelPrivate:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 83 of file qsortfilterproxymodel.cpp.

Public Member Functions

QMap< QModelIndex, Mapping
* >::const_iterator 
create_mapping (const QModelIndex &source_parent) const
QModelIndex proxy_to_source (const QModelIndex &proxyIndex) const
QModelIndex source_to_proxy (const QModelIndex &sourceIndex) const
void remove_from_mapping (const QModelIndex &source_parent)
QMap< QModelIndex, Mapping
* >::const_iterator 
index_to_iterator (const QModelIndex &proxy_index) const
QModelIndex create_index (int row, int column, QMap< QModelIndex, Mapping * >::const_iterator it) const
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_sourceReset ()
void _q_sourceLayoutAboutToBeChanged ()
void _q_sourceLayoutChanged ()
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_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 clear_mapping ()
void sort ()
void sort_source_rows (QVector< int > &source_rows, const QModelIndex &source_parent) const
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
QVector< QPair< int, int > > proxy_intervals_for_source_items (const QVector< int > &source_to_proxy, const QVector< int > &source_items) 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)
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)
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)
void build_source_to_proxy_mapping (const QVector< int > &proxy_to_source, QVector< int > &source_to_proxy) const
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 QVector< int > &source_to_proxy, const QVector< int > &source_items, int &proxy_low, int &proxy_high) const
QModelIndexList store_persistent_indexes ()
void update_persistent_indexes (const QModelIndexList &source_indexes)
void filter_changed ()
void handle_filter_changed (QVector< int > &source_to_proxy, QVector< int > &proxy_to_source, const QModelIndex &source_parent, Qt::Orientation orient)

Public Attributes

QMap< QModelIndex, Mapping * > source_index_mapping
int sort_column
Qt::SortOrder sort_order
Qt::CaseSensitivity sort_casesensitivity
int sort_role
int filter_column
QRegExp filter_regexp
int filter_role
bool dynamic_sortfilter
QList< QPersistentModelIndexsaved_persistent_indexes

Classes

struct  Mapping


Member Function Documentation

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

Definition at line 230 of file qsortfilterproxymodel.cpp.

References build_source_to_proxy_mapping(), QAbstractItemModel::columnCount(), QMap< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, i, QModelIndex::isValid(), m, QAbstractProxyModelPrivate::model, QModelIndex::parent(), QAbstractItemModel::rowCount(), sort_source_rows(), and source_index_mapping.

Referenced by _q_sourceHeaderDataChanged(), source_items_inserted(), source_to_proxy(), and update_persistent_indexes().

00232 {
00233     Q_Q(const QSortFilterProxyModel);
00234 
00235     IndexMap::const_iterator it = source_index_mapping.constFind(source_parent);
00236     if (it != source_index_mapping.constEnd()) // was mapped already
00237         return it;
00238 
00239     Mapping *m = new Mapping;
00240 
00241     int source_rows = model->rowCount(source_parent);
00242     for (int i = 0; i < source_rows; ++i) {
00243         if (q->filterAcceptsRow(i, source_parent))
00244             m->source_rows.append(i);
00245     }
00246     int source_cols = model->columnCount(source_parent);
00247     for (int i = 0; i < source_cols; ++i) {
00248         if (q->filterAcceptsColumn(i, source_parent))
00249             m->source_columns.append(i);
00250     }
00251 
00252     sort_source_rows(m->source_rows, source_parent);
00253     m->proxy_rows.resize(source_rows);
00254     build_source_to_proxy_mapping(m->source_rows, m->proxy_rows);
00255     m->proxy_columns.resize(source_cols);
00256     build_source_to_proxy_mapping(m->source_columns, m->proxy_columns);
00257 
00258     it = IndexMap::const_iterator(source_index_mapping.insert(source_parent, m));
00259 
00260     if (source_parent.isValid()) {
00261         QModelIndex source_grand_parent = source_parent.parent();
00262         IndexMap::const_iterator it2 = create_mapping(source_grand_parent);
00263         Q_ASSERT(it2 != source_index_mapping.constEnd());
00264         it2.value()->mapped_children.append(source_parent);
00265     }
00266 
00267     Q_ASSERT(it != source_index_mapping.constEnd());
00268     Q_ASSERT(it.value());
00269 
00270     return it;
00271 }

Here is the call graph for this function:

QModelIndex QSortFilterProxyModelPrivate::proxy_to_source ( const QModelIndex proxyIndex  )  const

Definition at line 273 of file qsortfilterproxymodel.cpp.

References QModelIndex::column(), QMap< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, QAbstractItemModel::index(), index_to_iterator(), QModelIndex::isValid(), m, QAbstractProxyModelPrivate::model, QModelIndex::row(), and source_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(), source_items_removed(), and store_persistent_indexes().

00274 {
00275     if (!proxy_index.isValid())
00276         return QModelIndex(); // for now; we may want to be able to set a root index later
00277     IndexMap::const_iterator it = index_to_iterator(proxy_index);
00278     Mapping *m = it.value();
00279     if ((proxy_index.row() >= m->source_rows.size()) || (proxy_index.column() >= m->source_columns.size()))
00280         return QModelIndex();
00281     int source_row = m->source_rows.at(proxy_index.row());
00282     int source_col = m->source_columns.at(proxy_index.column());
00283     return model->index(source_row, source_col, it.key());
00284 }

Here is the call graph for this function:

QModelIndex QSortFilterProxyModelPrivate::source_to_proxy ( const QModelIndex sourceIndex  )  const

Definition at line 286 of file qsortfilterproxymodel.cpp.

References QModelIndex::column(), QMap< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, create_index(), create_mapping(), QModelIndex::isValid(), m, QModelIndex::parent(), and QModelIndex::row().

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

00287 {
00288     if (!source_index.isValid())
00289         return QModelIndex(); // for now; we may want to be able to set a root index later
00290     QModelIndex source_parent = source_index.parent();
00291     IndexMap::const_iterator it = create_mapping(source_parent);
00292     Mapping *m = it.value();
00293     if ((source_index.row() >= m->proxy_rows.size()) || (source_index.column() >= m->proxy_columns.size()))
00294         return QModelIndex();
00295     int proxy_row = m->proxy_rows.at(source_index.row());
00296     int proxy_column = m->proxy_columns.at(source_index.column());
00297     if (proxy_row == -1 || proxy_column == -1)
00298         return QModelIndex();
00299     return create_index(proxy_row, proxy_column, it);
00300 }

Here is the call graph for this function:

void QSortFilterProxyModelPrivate::remove_from_mapping ( const QModelIndex source_parent  ) 

Definition at line 209 of file qsortfilterproxymodel.cpp.

References i, m, and source_index_mapping.

Referenced by source_items_removed().

00210 {
00211     if (Mapping *m = source_index_mapping.take(source_parent)) {
00212         for (int i = 0; i < m->mapped_children.size(); ++i)
00213             remove_from_mapping(m->mapped_children.at(i));
00214         delete m;
00215     }
00216 }

QMap<QModelIndex, Mapping *>::const_iterator QSortFilterProxyModelPrivate::index_to_iterator ( const QModelIndex proxy_index  )  const [inline]

Definition at line 118 of file qsortfilterproxymodel.cpp.

References QModelIndex::internalPointer(), QModelIndex::isValid(), p, source_index_mapping, and QMap< Key, T >::value().

Referenced by proxy_to_source().

00120     {
00121         Q_ASSERT(proxy_index.isValid());
00122         const void *p = proxy_index.internalPointer();
00123         Q_ASSERT(p);
00124         QMap<QModelIndex, Mapping *>::const_iterator it =
00125             reinterpret_cast<QMap<QModelIndex, Mapping *>::const_iterator & >(p);
00126         Q_ASSERT(it != source_index_mapping.constEnd());
00127         Q_ASSERT(it.value());
00128         return it;
00129     }

Here is the call graph for this function:

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

Definition at line 131 of file qsortfilterproxymodel.cpp.

References p.

Referenced by _q_sourceDataChanged(), and source_to_proxy().

00133     {
00134         const void *p = static_cast<const void *>(it);
00135         return q_func()->createIndex(row, column, const_cast<void *>(p));
00136     }

void QSortFilterProxyModelPrivate::_q_sourceDataChanged ( const QModelIndex source_top_left,
const QModelIndex source_bottom_right 
)

Definition at line 877 of file qsortfilterproxymodel.cpp.

References QVector< T >::append(), QModelIndex::column(), QMap< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, create_index(), dynamic_sortfilter, emit, insert_source_items(), QVector< T >::isEmpty(), QModelIndex::isValid(), m, QModelIndex::parent(), proxy_item_range(), qMin(), remove_source_items(), QModelIndex::row(), sort_column, sort_source_rows(), source_index_mapping, source_row, store_persistent_indexes(), update_persistent_indexes(), and Qt::Vertical.

00879 {
00880     Q_Q(QSortFilterProxyModel);
00881     if (!source_top_left.isValid() || !source_bottom_right.isValid())
00882         return;
00883     QModelIndex source_parent = source_top_left.parent();
00884     IndexMap::const_iterator it = source_index_mapping.constFind(source_parent);
00885     if (it == source_index_mapping.constEnd()) {
00886         // Don't care, since we don't have mapping for this index
00887         return;
00888     }
00889     Mapping *m = it.value();
00890 
00891     // Figure out how the source changes affect us
00892     QVector<int> source_rows_remove;
00893     QVector<int> source_rows_insert;
00894     QVector<int> source_rows_change;
00895     QVector<int> source_rows_resort;
00896     int end = qMin(source_bottom_right.row(), m->proxy_rows.count() - 1);
00897     for (int source_row = source_top_left.row(); source_row <= end; ++source_row) {
00898         if (dynamic_sortfilter) {
00899             if (m->proxy_rows.at(source_row) != -1) {
00900                 if (!q->filterAcceptsRow(source_row, source_parent)) {
00901                     // This source row no longer satisfies the filter, so it must be removed
00902                     source_rows_remove.append(source_row);
00903                 } else if (sort_column >= source_top_left.column() && sort_column <= source_bottom_right.column()) {
00904                     // This source row has changed in a way that may affect sorted order
00905                     source_rows_resort.append(source_row);
00906                 } else {
00907                     // This row has simply changed, without affecting filtering nor sorting
00908                     source_rows_change.append(source_row);
00909                 }
00910             } else {
00911                 if (q->filterAcceptsRow(source_row, source_parent)) {
00912                     // This source row now satisfies the filter, so it must be added
00913                     source_rows_insert.append(source_row);
00914                 }
00915             }
00916         } else {
00917             if (m->proxy_rows.at(source_row) != -1)
00918                 source_rows_change.append(source_row);
00919         }
00920     }
00921 
00922     if (!source_rows_remove.isEmpty())
00923         remove_source_items(m->proxy_rows, m->source_rows,
00924                             source_rows_remove, source_parent, Qt::Vertical);
00925 
00926     if (!source_rows_resort.isEmpty()) {
00927         // Re-sort the rows
00928         emit q->layoutAboutToBeChanged();
00929         QModelIndexList source_indexes = store_persistent_indexes();
00930         remove_source_items(m->proxy_rows, m->source_rows, source_rows_resort,
00931                             source_parent, Qt::Vertical, false);
00932         sort_source_rows(source_rows_resort, source_parent);
00933         insert_source_items(m->proxy_rows, m->source_rows, source_rows_resort,
00934                             source_parent, Qt::Vertical, false);
00935         update_persistent_indexes(source_indexes);
00936         emit q->layoutChanged();
00937     } else if (!source_rows_change.isEmpty()) {
00938         // Find the proxy row range
00939         int proxy_start_row;
00940         int proxy_end_row;
00941         proxy_item_range(m->proxy_rows, source_rows_change,
00942                          proxy_start_row, proxy_end_row);
00943         // ### Find the proxy column range also
00944         if (proxy_end_row >= 0) {
00945             QModelIndex proxy_top_left = create_index(
00946                 proxy_start_row, m->proxy_columns.at(source_top_left.column()), it);
00947             QModelIndex proxy_bottom_right = create_index(
00948                 proxy_end_row, m->proxy_columns.at(source_bottom_right.column()), it);
00949             emit q->dataChanged(proxy_top_left, proxy_bottom_right);
00950         }
00951     }
00952 
00953     if (!source_rows_insert.isEmpty()) {
00954         sort_source_rows(source_rows_insert, source_parent);
00955         insert_source_items(m->proxy_rows, m->source_rows,
00956                             source_rows_insert, source_parent, Qt::Vertical);
00957     }
00958 }

Here is the call graph for this function:

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

Definition at line 960 of file qsortfilterproxymodel.cpp.

References create_mapping(), emit, m, and Qt::Vertical.

00962 {
00963     Q_Q(QSortFilterProxyModel);
00964     Mapping *m = create_mapping(QModelIndex()).value();
00965     int proxy_start = (orientation == Qt::Vertical
00966                        ? m->proxy_rows.at(start)
00967                        : m->proxy_columns.at(start));
00968     int proxy_end = (orientation == Qt::Vertical
00969                      ? m->proxy_rows.at(end)
00970                      : m->proxy_columns.at(end));
00971     emit q->headerDataChanged(orientation, proxy_start, proxy_end);
00972 }

Here is the call graph for this function:

void QSortFilterProxyModelPrivate::_q_sourceReset (  ) 

Definition at line 974 of file qsortfilterproxymodel.cpp.

00975 {
00976     Q_Q(QSortFilterProxyModel);
00977     // All internal structures are deleted in clear()
00978     q->reset();
00979 }

void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged (  ) 

Definition at line 981 of file qsortfilterproxymodel.cpp.

References QList< T >::clear(), QList< T >::constBegin(), QList< T >::constEnd(), emit, QAbstractItemModelPrivate::Persistent::indexes, QList< T >::isEmpty(), QAbstractItemModelPrivate::persistent, saved_persistent_indexes, and store_persistent_indexes().

00982 {
00983     Q_Q(QSortFilterProxyModel);
00984     saved_persistent_indexes.clear();
00985     if (persistent.indexes.isEmpty())
00986         return;
00987     emit q->layoutAboutToBeChanged();
00988     QModelIndexList source_indexes = store_persistent_indexes();
00989     QModelIndexList::const_iterator it;
00990     for(it = source_indexes.constBegin(); it != source_indexes.constEnd(); ++it)
00991         saved_persistent_indexes << (*it);
00992 }

Here is the call graph for this function:

void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged (  ) 

Definition at line 994 of file qsortfilterproxymodel.cpp.

References QList< T >::clear(), QList< T >::constBegin(), QList< T >::constEnd(), emit, QList< T >::isEmpty(), qDeleteAll(), saved_persistent_indexes, source_index_mapping, and update_persistent_indexes().

00995 {
00996     Q_Q(QSortFilterProxyModel);
00997     if (saved_persistent_indexes.isEmpty()) {
00998         q->clear();
00999         return;
01000     }
01001 
01002     QModelIndexList source_indexes;
01003     QList<QPersistentModelIndex>::const_iterator it;
01004     it = saved_persistent_indexes.constBegin();
01005     for ( ; it != saved_persistent_indexes.constEnd(); ++it)
01006         source_indexes << (*it);
01007 
01008     qDeleteAll(source_index_mapping);
01009     source_index_mapping.clear();
01010 
01011     update_persistent_indexes(source_indexes);
01012     saved_persistent_indexes.clear();
01013 
01014     emit q->layoutChanged();
01015 }

Here is the call graph for this function:

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

Definition at line 1017 of file qsortfilterproxymodel.cpp.

01019 {
01020     Q_UNUSED(source_parent);
01021     Q_UNUSED(start);
01022     Q_UNUSED(end);
01023 }

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

Definition at line 1025 of file qsortfilterproxymodel.cpp.

References source_items_inserted(), and Qt::Vertical.

01027 {
01028     source_items_inserted(source_parent, start, end, Qt::Vertical);
01029 }

Here is the call graph for this function:

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

Definition at line 1031 of file qsortfilterproxymodel.cpp.

References source_items_about_to_be_removed(), and Qt::Vertical.

01033 {
01034     source_items_about_to_be_removed(source_parent, start, end,
01035                                      Qt::Vertical);
01036 }

Here is the call graph for this function:

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

Definition at line 1038 of file qsortfilterproxymodel.cpp.

References source_items_removed(), and Qt::Vertical.

01040 {
01041     source_items_removed(source_parent, start, end, Qt::Vertical);
01042 }

Here is the call graph for this function:

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

Definition at line 1044 of file qsortfilterproxymodel.cpp.

01046 {
01047     Q_UNUSED(source_parent);
01048     Q_UNUSED(start);
01049     Q_UNUSED(end);
01050 }

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

Definition at line 1052 of file qsortfilterproxymodel.cpp.

References Qt::Horizontal, and source_items_inserted().

01054 {
01055     source_items_inserted(source_parent, start, end, Qt::Horizontal);
01056 }

Here is the call graph for this function:

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

Definition at line 1058 of file qsortfilterproxymodel.cpp.

References Qt::Horizontal, and source_items_about_to_be_removed().

01060 {
01061     source_items_about_to_be_removed(source_parent, start, end,
01062                                      Qt::Horizontal);
01063 }

Here is the call graph for this function:

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

Definition at line 1065 of file qsortfilterproxymodel.cpp.

References Qt::Horizontal, and source_items_removed().

01067 {
01068     source_items_removed(source_parent, start, end, Qt::Horizontal);
01069 }

Here is the call graph for this function:

void QSortFilterProxyModelPrivate::clear_mapping (  ) 

Definition at line 218 of file qsortfilterproxymodel.cpp.

References qDeleteAll(), source_index_mapping, store_persistent_indexes(), and update_persistent_indexes().

00219 {
00220     // store the persistent indexes
00221     QModelIndexList source_indexes = store_persistent_indexes();
00222 
00223     qDeleteAll(source_index_mapping);
00224     source_index_mapping.clear();
00225 
00226     // update the persistent indexes
00227     update_persistent_indexes(source_indexes);
00228 }

Here is the call graph for this function:

void QSortFilterProxyModelPrivate::sort (  ) 

Definition at line 307 of file qsortfilterproxymodel.cpp.

References build_source_to_proxy_mapping(), QMap< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, emit, m, sort_source_rows(), source_index_mapping, store_persistent_indexes(), and update_persistent_indexes().

00308 {
00309     Q_Q(QSortFilterProxyModel);
00310     emit q->layoutAboutToBeChanged();
00311     QModelIndexList source_indexes = store_persistent_indexes();
00312     IndexMap::const_iterator it = source_index_mapping.constBegin();
00313     for (; it != source_index_mapping.constEnd(); ++it) {
00314         QModelIndex source_parent = it.key();
00315         Mapping *m = it.value();
00316         sort_source_rows(m->source_rows, source_parent);
00317         build_source_to_proxy_mapping(m->source_rows, m->proxy_rows);
00318     }
00319     update_persistent_indexes(source_indexes);
00320     emit q->layoutChanged();
00321 }

Here is the call graph for this function:

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

Definition at line 328 of file qsortfilterproxymodel.cpp.

References Qt::AscendingOrder, QVector< T >::begin(), QVector< T >::end(), QAbstractProxyModelPrivate::model, qStableSort(), sort_column, and sort_order.

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

00330 {
00331     Q_Q(const QSortFilterProxyModel);
00332     if (sort_column >= 0) {
00333         if (sort_order == Qt::AscendingOrder) {
00334             QSortFilterProxyModelLessThan lt(sort_column, source_parent, model, q);
00335             qStableSort(source_rows.begin(), source_rows.end(), lt);
00336         } else {
00337             QSortFilterProxyModelGreaterThan gt(sort_column, source_parent, model, q);
00338             qStableSort(source_rows.begin(), source_rows.end(), gt);
00339         }
00340     }
00341 }

Here is the call graph for this function:

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

Definition at line 453 of file qsortfilterproxymodel.cpp.

References QVector< T >::append(), Qt::AscendingOrder, QVector< T >::at(), QVector< T >::clear(), compare(), QAbstractItemModel::index(), QVector< T >::isEmpty(), QAbstractProxyModelPrivate::model, proxy_to_source(), QVector< T >::size(), sort_column, sort_order, and Qt::Vertical.

Referenced by insert_source_items().

00456 {
00457     Q_Q(const QSortFilterProxyModel);
00458     QVector<QPair<int, QVector<int> > > proxy_intervals;
00459     if (source_items.isEmpty())
00460         return proxy_intervals;
00461 
00462     int proxy_low = 0;
00463     int proxy_item = 0;
00464     int source_items_index = 0;
00465     QVector<int> source_items_in_interval;
00466     bool compare = (orient == Qt::Vertical && sort_column >= 0);
00467     while (source_items_index < source_items.size()) {
00468         source_items_in_interval.clear();
00469         int first_new_source_item = source_items.at(source_items_index);
00470         source_items_in_interval.append(first_new_source_item);
00471         ++source_items_index;
00472 
00473         // Find proxy item at which insertion should be started
00474         int proxy_high = proxy_to_source.size() - 1;
00475         QModelIndex i1 = compare ? model->index(first_new_source_item, sort_column, source_parent) : QModelIndex();
00476         while (proxy_low <= proxy_high) {
00477             proxy_item = (proxy_low + proxy_high) / 2;
00478             if (compare) {
00479                 QModelIndex i2 = model->index(proxy_to_source.at(proxy_item), sort_column, source_parent);
00480                 if ((sort_order == Qt::AscendingOrder) ? q->lessThan(i1, i2) : q->lessThan(i2, i1))
00481                     proxy_high = proxy_item - 1;
00482                 else
00483                     proxy_low = proxy_item + 1;
00484             } else {
00485                 if (first_new_source_item < proxy_to_source.at(proxy_item))
00486                     proxy_high = proxy_item - 1;
00487                 else
00488                     proxy_low = proxy_item + 1;
00489             }
00490         }
00491         proxy_item = proxy_low;
00492 
00493         // Find the sequence of new source items that should be inserted here
00494         if (proxy_item >= proxy_to_source.size()) {
00495             for ( ; source_items_index < source_items.size(); ++source_items_index)
00496                 source_items_in_interval.append(source_items.at(source_items_index));
00497         } else {
00498             i1 = compare ? model->index(proxy_to_source.at(proxy_item), sort_column, source_parent) : QModelIndex();
00499             for ( ; source_items_index < source_items.size(); ++source_items_index) {
00500                 int new_source_item = source_items.at(source_items_index);
00501                 if (compare) {
00502                     QModelIndex i2 = model->index(new_source_item, sort_column, source_parent);
00503                     if ((sort_order == Qt::AscendingOrder) ? q->lessThan(i1, i2) : q->lessThan(i2, i1))
00504                         break;
00505                 } else {
00506                     if (proxy_to_source.at(proxy_item) < new_source_item)
00507                         break;
00508                 }
00509                 source_items_in_interval.append(new_source_item);
00510             }
00511         }
00512 
00513         // Add interval to result
00514         proxy_intervals.append(QPair<int, QVector<int> >(proxy_item, source_items_in_interval));
00515     }
00516     return proxy_intervals;
00517 }

Here is the call graph for this function:

QVector< QPair< int, int > > QSortFilterProxyModelPrivate::proxy_intervals_for_source_items ( const QVector< int > &  source_to_proxy,
const QVector< int > &  source_items 
) const

Definition at line 354 of file qsortfilterproxymodel.cpp.

References QVector< T >::append(), QVector< T >::at(), QVector< T >::begin(), QVector< T >::end(), QVector< T >::isEmpty(), qStableSort(), QVector< T >::size(), and source_to_proxy().

Referenced by remove_source_items().

00356 {
00357     QVector<QPair<int, int> > proxy_intervals;
00358     if (source_items.isEmpty())
00359         return proxy_intervals;
00360 
00361     int source_items_index = 0;
00362     while (source_items_index < source_items.size()) {
00363         int first_proxy_item = source_to_proxy.at(source_items.at(source_items_index));
00364         Q_ASSERT(first_proxy_item != -1);
00365         int last_proxy_item = first_proxy_item;
00366         ++source_items_index;
00367         // Find end of interval
00368         while ((source_items_index < source_items.size())
00369                && (source_to_proxy.at(source_items.at(source_items_index)) == last_proxy_item + 1)) {
00370             ++last_proxy_item;
00371             ++source_items_index;
00372         }
00373         // Add interval to result
00374         proxy_intervals.append(QPair<int, int>(first_proxy_item, last_proxy_item));
00375     }
00376     qStableSort(proxy_intervals.begin(), proxy_intervals.end());
00377     return proxy_intervals;
00378 }

Here is the call graph for this function:

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 
)

Definition at line 527 of file qsortfilterproxymodel.cpp.

References QVector< T >::at(), build_source_to_proxy_mapping(), i, proxy_intervals_for_source_items_to_add(), proxy_to_source(), QVector< T >::size(), source_to_proxy(), and Qt::Vertical.

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

00531 {
00532     Q_Q(QSortFilterProxyModel);
00533     QVector<QPair<int, QVector<int> > > proxy_intervals;
00534     proxy_intervals = proxy_intervals_for_source_items_to_add(
00535         proxy_to_source, source_items, source_parent, orient);
00536 
00537     QModelIndex proxy_parent = QSortFilterProxyModelPrivate::source_to_proxy(source_parent);
00538 
00539     for (int i = proxy_intervals.size()-1; i >= 0; --i) {
00540         QPair<int, QVector<int> > interval = proxy_intervals.at(i);
00541         int proxy_start = interval.first;
00542         QVector<int> source_items = interval.second;
00543         int proxy_end = proxy_start + source_items.size() - 1;
00544 
00545         if (emit_signal) {
00546             if (orient == Qt::Vertical)
00547                 q->beginInsertRows(proxy_parent, proxy_start, proxy_end);
00548             else
00549                 q->beginInsertColumns(proxy_parent, proxy_start, proxy_end);
00550         }
00551 
00552         for (int i = 0; i < source_items.size(); ++i)
00553             proxy_to_source.insert(proxy_start + i, source_items.at(i));
00554 
00555         build_source_to_proxy_mapping(proxy_to_source, source_to_proxy);
00556 
00557         if (emit_signal) {
00558             if (orient == Qt::Vertical)
00559                 q->endInsertRows();
00560             else
00561                 q->endInsertColumns();
00562         }
00563     }
00564 }

Here is the call graph for this function:

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 
)

Definition at line 388 of file qsortfilterproxymodel.cpp.

References QVector< T >::at(), i, QModelIndex::isValid(), proxy_intervals_for_source_items(), proxy_to_source(), remove_proxy_interval(), QVector< T >::size(), and source_to_proxy().

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

00392 {
00393     QModelIndex proxy_parent = QSortFilterProxyModelPrivate::source_to_proxy(source_parent);
00394     if (!proxy_parent.isValid() && source_parent.isValid())
00395         return; // nothing to do (already removed)
00396 
00397     QVector<QPair<int, int> > proxy_intervals;
00398     proxy_intervals = proxy_intervals_for_source_items(source_to_proxy, source_items);
00399 
00400     for (int i = proxy_intervals.size()-1; i >= 0; --i) {
00401         QPair<int, int> interval = proxy_intervals.at(i);
00402         int proxy_start = interval.first;
00403         int proxy_end = interval.second;
00404         remove_proxy_interval(source_to_proxy, proxy_to_source, proxy_start, proxy_end,
00405                               proxy_parent, orient, emit_signal);
00406     }
00407 }

Here is the call graph for this function:

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 
)

Definition at line 416 of file qsortfilterproxymodel.cpp.

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

Referenced by remove_source_items().

00419 {
00420     Q_Q(QSortFilterProxyModel);
00421     if (emit_signal) {
00422         if (orient == Qt::Vertical)
00423             q->beginRemoveRows(proxy_parent, proxy_start, proxy_end);
00424         else
00425             q->beginRemoveColumns(proxy_parent, proxy_start, proxy_end);
00426     }
00427 
00428     // Remove items from proxy-to-source mapping
00429     proxy_to_source.remove(proxy_start, proxy_end - proxy_start + 1);
00430 
00431     build_source_to_proxy_mapping(proxy_to_source, source_to_proxy);
00432 
00433     if (emit_signal) {
00434         if (orient == Qt::Vertical)
00435             q->endRemoveRows();
00436         else
00437             q->endRemoveColumns();
00438     }
00439 }

Here is the call graph for this function:

void QSortFilterProxyModelPrivate::build_source_to_proxy_mapping ( const QVector< int > &  proxy_to_source,
QVector< int > &  source_to_proxy 
) const

Definition at line 774 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().

00776 {
00777     source_to_proxy.fill(-1);
00778     int proxy_count = proxy_to_source.size();
00779     for (int i = 0; i < proxy_count; ++i)
00780         source_to_proxy[proxy_to_source.at(i)] = i;
00781 }

Here is the call graph for this function:

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

Definition at line 578 of file qsortfilterproxymodel.cpp.

References QVector< T >::append(), build_source_to_proxy_mapping(), QMap< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, create_mapping(), i, insert_source_items(), QModelIndex::isValid(), m, QModelIndex::parent(), proxy_to_source(), sort_source_rows(), source_index_mapping, source_to_proxy(), and Qt::Vertical.

Referenced by _q_sourceColumnsInserted(), and _q_sourceRowsInserted().

00580 {
00581     Q_Q(QSortFilterProxyModel);
00582     if ((start < 0) || (end < 0))
00583         return;
00584     IndexMap::const_iterator it = source_index_mapping.constFind(source_parent);
00585     if (it == source_index_mapping.constEnd()) {
00586         if (source_parent.isValid()) {
00587             QModelIndex source_grand_parent = source_parent.parent();
00588             it = source_index_mapping.constFind(source_grand_parent);
00589             if (it == source_index_mapping.constEnd()) {
00590                 // Don't care, since we don't have mapping for the grand parent
00591                 return;
00592             }
00593         }
00594         it = create_mapping(source_parent);
00595         Mapping *m = it.value();
00596         QModelIndex proxy_parent = source_to_proxy(source_parent);
00597         if (m->source_rows.count() > 0) {
00598             q->beginInsertRows(proxy_parent, 0, m->source_rows.count() - 1);
00599             q->endInsertRows();
00600         }
00601         if (m->source_columns.count() > 0) {
00602             q->beginInsertColumns(proxy_parent, 0, m->source_columns.count() - 1);
00603             q->endInsertColumns();
00604         }
00605         return;
00606     }
00607 
00608     Mapping *m = it.value();
00609     QVector<int> &source_to_proxy = (orient == Qt::Vertical) ? m->proxy_rows : m->proxy_columns;
00610     QVector<int> &proxy_to_source = (orient == Qt::Vertical) ? m->source_rows : m->source_columns;
00611 
00612     int delta_item_count = end - start + 1;
00613     int old_item_count = source_to_proxy.size();
00614     // Expand source-to-proxy mapping to account for new items
00615     source_to_proxy.insert(start, delta_item_count, -1);
00616 
00617     if (start < old_item_count) {
00618         // Adjust existing "stale" indexes in proxy-to-source mapping
00619         int proxy_count = proxy_to_source.size();
00620         for (int proxy_item = 0; proxy_item < proxy_count; ++proxy_item) {
00621             int source_item = proxy_to_source.at(proxy_item);
00622             if (source_item >= start)
00623                 proxy_to_source.replace(proxy_item, source_item + delta_item_count);
00624         }
00625         build_source_to_proxy_mapping(proxy_to_source, source_to_proxy);
00626     }
00627 
00628     // Figure out which items to add to mapping based on filter
00629     QVector<int> source_items;
00630     for (int i = start; i <= end; ++i) {
00631         if ((orient == Qt::Vertical)
00632             ? q->filterAcceptsRow(i, source_parent)
00633             : q->filterAcceptsColumn(i, source_parent)) {
00634             source_items.append(i);
00635         }
00636     }
00637 
00638     // Sort and insert the items
00639     if (orient == Qt::Vertical) // Only sort rows
00640         sort_source_rows(source_items, source_parent);
00641     insert_source_items(source_to_proxy, proxy_to_source, source_items, source_parent, orient);
00642 }

Here is the call graph for this function:

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

Definition at line 650 of file qsortfilterproxymodel.cpp.

References QVector< T >::append(), QMap< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, m, proxy_to_source(), remove_source_items(), source_index_mapping, source_to_proxy(), and Qt::Vertical.

Referenced by _q_sourceColumnsAboutToBeRemoved(), and _q_sourceRowsAboutToBeRemoved().

00652 {
00653     if ((start < 0) || (end < 0))
00654         return;
00655     IndexMap::const_iterator it = source_index_mapping.constFind(source_parent);
00656     if (it == source_index_mapping.constEnd()) {
00657         // Don't care, since we don't have mapping for this index
00658         return;
00659     }
00660 
00661     Mapping *m = it.value();
00662     QVector<int> &source_to_proxy = (orient == Qt::Vertical) ? m->proxy_rows : m->proxy_columns;
00663     QVector<int> &proxy_to_source = (orient == Qt::Vertical) ? m->source_rows : m->source_columns;
00664 
00665     // figure out which items to remove
00666     QVector<int> source_items_to_remove;
00667     int proxy_count = proxy_to_source.size();
00668     for (int proxy_item = 0; proxy_item < proxy_count; ++proxy_item) {
00669         int source_item = proxy_to_source.at(proxy_item);
00670         if ((source_item >= start) && (source_item <= end))
00671             source_items_to_remove.append(source_item);
00672     }
00673 
00674     remove_source_items(source_to_proxy, proxy_to_source, source_items_to_remove,
00675                         source_parent, orient);
00676 }

Here is the call graph for this function:

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

Definition at line 683 of file qsortfilterproxymodel.cpp.

References build_source_to_proxy_mapping(), QMap< QModelIndex, QSortFilterProxyModelPrivate::Mapping * >::const_iterator, QAbstractItemModel::index(), m, QAbstractProxyModelPrivate::model, proxy_to_source(), remove_from_mapping(), source_index_mapping, source_to_proxy(), and Qt::Vertical.

Referenced by _q_sourceColumnsRemoved(), and _q_sourceRowsRemoved().

00685 {
00686     if ((start < 0) || (end < 0))
00687         return;
00688     IndexMap::const_iterator it = source_index_mapping.constFind(source_parent);
00689     if (it == source_index_mapping.constEnd()) {
00690         // Don't care, since we don't have mapping for this index
00691         return;
00692     }
00693 
00694     Mapping *m = it.value();
00695     QVector<int> &source_to_proxy = (orient == Qt::Vertical) ? m->proxy_rows : m->proxy_columns;
00696     QVector<int> &proxy_to_source = (orient == Qt::Vertical) ? m->source_rows : m->source_columns;
00697 
00698     if (end >= source_to_proxy.size())
00699         end = source_to_proxy.size() - 1;
00700 
00701     // Shrink the source-to-proxy mapping to reflect the new item count
00702     int delta_item_count = end - start + 1;
00703     source_to_proxy.remove(start, delta_item_count);
00704 
00705     // Adjust "stale" indexes in proxy-to-source mapping
00706     int proxy_count = proxy_to_source.size();
00707     for (int proxy_item = 0; proxy_item < proxy_count; ++proxy_item) {
00708         int source_item = proxy_to_source.at(proxy_item);
00709         if (source_item >= start)
00710             proxy_to_source.replace(proxy_item, source_item - delta_item_count);
00711     }
00712     build_source_to_proxy_mapping(proxy_to_source, source_to_proxy);
00713 
00714     // see if any mapped children should be (re)moved
00715     QVector<QModelIndex>::iterator it2 = m->mapped_children.begin();
00716     for ( ; it2 != m->mapped_children.end(); ) {
00717         const QModelIndex source_child_index = *it2;
00718         const int pos = (orient == Qt::Vertical)
00719                         ? source_child_index.row()
00720                         : source_child_index.column();
00721         if (pos < start) {
00722             // not affected by removal
00723             ++it2;
00724             continue;
00725         } else if (pos <= end) {
00726             // in the removed interval
00727             it2 = m->mapped_children.erase(it2);
00728             remove_from_mapping(source_child_index);
00729         } else {
00730             // below the removed items -- recompute the index
00731             QModelIndex new_index;
00732             if (orient == Qt::Vertical) {
00733                 new_index = model->index(pos - delta_item_count,
00734                                          source_child_index.column(),
00735                                          source_parent);
00736             } else {
00737                 new_index = model->index(source_child_index.row(),
00738                                          pos - delta_item_count,
00739                                          source_parent);
00740             }
00741             *it2 = new_index;
00742             ++it2;
00743 
00744             // update mapping
00745             Mapping *cm = source_index_mapping.take(source_child_index);
00746             Q_ASSERT(cm);
00747             source_index_mapping.insert(new_index, cm);
00748         }
00749     }
00750 }

Here is the call graph for this function:

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 755 of file qsortfilterproxymodel.cpp.

References source_to_proxy().

Referenced by _q_sourceDataChanged().

00758 {
00759     proxy_low = INT_MAX;
00760     proxy_high = INT_MIN;
00761     foreach (int source_item, source_items) {
00762         int proxy_item = source_to_proxy.at(source_item);
00763         Q_ASSERT(proxy_item != -1);
00764         if (proxy_item < proxy_low)
00765             proxy_low = proxy_item;
00766         if (proxy_item > proxy_high)
00767             proxy_high = proxy_item;
00768     }
00769 }

Here is the call graph for this function:

QModelIndexList QSortFilterProxyModelPrivate::store_persistent_indexes (  ) 

Definition at line 789 of file qsortfilterproxymodel.cpp.

References QList< T >::append(), QList< T >::at(), QList< T >::count(), i, QPersistentModelIndexData::index, QAbstractItemModelPrivate::Persistent::indexes, QAbstractItemModelPrivate::persistent, and proxy_to_source().

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

00790 {
00791     QModelIndexList source_indexes;
00792     int persistent_count = persistent.indexes.count();
00793     for (int i = 0; i < persistent_count; ++i) {
00794         QModelIndex proxy_index = persistent.indexes.at(i)->index;
00795         QModelIndex source_index = proxy_to_source(proxy_index);
00796         source_indexes.append(source_index);
00797     }
00798     return source_indexes;
00799 }

Here is the call graph for this function:

void QSortFilterProxyModelPrivate::update_persistent_indexes ( const QModelIndexList source_indexes  ) 

Definition at line 807 of file qsortfilterproxymodel.cpp.

References QList< T >::at(), QList< T >::count(), create_mapping(), i, QAbstractItemModelPrivate::Persistent::indexes, QAbstractItemModelPrivate::persistent, and source_to_proxy().

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

00809 {
00810     for (int i = 0; i < source_indexes.count(); ++i) {
00811         QModelIndex source_index = source_indexes.at(i);
00812         create_mapping(source_index.parent());
00813         QModelIndex proxy_index = source_to_proxy(source_index);
00814         persistent.indexes[i]->index = proxy_index;
00815     }
00816 }

Here is the call graph for this function:

void QSortFilterProxyModelPrivate::filter_changed (  ) 

Definition at line 824 of file qsortfilterproxymodel.cpp.

References handle_filter_changed(), Qt::Horizontal, QMap< Key, T >::key(), m, source_index_mapping, QMap< Key, T >::value(), and Qt::Vertical.

00825 {
00826     QMap<QModelIndex, Mapping *>::const_iterator it;
00827     for (it = source_index_mapping.constBegin(); it != source_index_mapping.constEnd(); ++it) {
00828         QModelIndex source_parent = it.key();
00829         Mapping *m = it.value();
00830         handle_filter_changed(m->proxy_rows, m->source_rows, source_parent, Qt::Vertical);
00831         handle_filter_changed(m->proxy_columns, m->source_columns, source_parent, Qt::Horizontal);
00832     }
00833 }

Here is the call graph for this function:

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

Definition at line 838 of file qsortfilterproxymodel.cpp.

References QVector< T >::append(), insert_source_items(), QVector< T >::isEmpty(), proxy_to_source(), remove_source_items(), sort_source_rows(), source_to_proxy(), and Qt::Vertical.

Referenced by filter_changed().

00841 {
00842     Q_Q(QSortFilterProxyModel);
00843     // Figure out which mapped items to remove
00844     QVector<int> source_items_remove;
00845     foreach (int source_item, proxy_to_source) {
00846         if ((orient == Qt::Vertical)
00847             ? !q->filterAcceptsRow(source_item, source_parent)
00848             : !q->filterAcceptsColumn(source_item, source_parent)) {
00849             // This source item does not satisfy the filter, so it must be removed
00850             source_items_remove.append(source_item);
00851         }
00852     }
00853     // Figure out which non-mapped items to insert
00854     QVector<int> source_items_insert;
00855     int source_count = source_to_proxy.size();
00856     for (int source_item = 0; source_item < source_count; ++source_item) {
00857         if (source_to_proxy.at(source_item) == -1) {
00858             if ((orient == Qt::Vertical)
00859                 ? q->filterAcceptsRow(source_item, source_parent)
00860                 : q->filterAcceptsColumn(source_item, source_parent)) {
00861                 // This source item satisfies the filter, so it must be added
00862                 source_items_insert.append(source_item);
00863             }
00864         }
00865     }
00866     if (!source_items_remove.isEmpty() || !source_items_insert.isEmpty()) {
00867         // Do item removal and insertion
00868         remove_source_items(source_to_proxy, proxy_to_source,
00869                             source_items_remove, source_parent, orient);
00870         if (orient == Qt::Vertical)
00871             sort_source_rows(source_items_insert, source_parent);
00872         insert_source_items(source_to_proxy, proxy_to_source,
00873                             source_items_insert, source_parent, orient);
00874     }
00875 }

Here is the call graph for this function:


Member Data Documentation

QMap<QModelIndex, Mapping*> QSortFilterProxyModelPrivate::source_index_mapping [mutable]

Definition at line 96 of file qsortfilterproxymodel.cpp.

Referenced by _q_sourceDataChanged(), _q_sourceLayoutChanged(), clear_mapping(), create_mapping(), filter_changed(), index_to_iterator(), remove_from_mapping(), sort(), source_items_about_to_be_removed(), source_items_inserted(), and source_items_removed().

int QSortFilterProxyModelPrivate::sort_column

Definition at line 98 of file qsortfilterproxymodel.cpp.

Referenced by _q_sourceDataChanged(), proxy_intervals_for_source_items_to_add(), and sort_source_rows().

Qt::SortOrder QSortFilterProxyModelPrivate::sort_order

Definition at line 99 of file qsortfilterproxymodel.cpp.

Referenced by proxy_intervals_for_source_items_to_add(), and sort_source_rows().

Qt::CaseSensitivity QSortFilterProxyModelPrivate::sort_casesensitivity

Definition at line 100 of file qsortfilterproxymodel.cpp.

int QSortFilterProxyModelPrivate::sort_role

Definition at line 101 of file qsortfilterproxymodel.cpp.

int QSortFilterProxyModelPrivate::filter_column

Definition at line 103 of file qsortfilterproxymodel.cpp.

QRegExp QSortFilterProxyModelPrivate::filter_regexp

Definition at line 104 of file qsortfilterproxymodel.cpp.

int QSortFilterProxyModelPrivate::filter_role

Definition at line 105 of file qsortfilterproxymodel.cpp.

bool QSortFilterProxyModelPrivate::dynamic_sortfilter

Definition at line 107 of file qsortfilterproxymodel.cpp.

Referenced by _q_sourceDataChanged().

QList<QPersistentModelIndex> QSortFilterProxyModelPrivate::saved_persistent_indexes

Definition at line 109 of file qsortfilterproxymodel.cpp.

Referenced by _q_sourceLayoutAboutToBeChanged(), and _q_sourceLayoutChanged().


The documentation for this class was generated from the following file:
Generated on Thu Mar 15 18:57:41 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1