Qt 4.8
Classes | Typedefs | Functions
qsortfilterproxymodel.cpp File Reference
#include "qsortfilterproxymodel.h"
#include "qitemselectionmodel.h"
#include <qsize.h>
#include <qdebug.h>
#include <qdatetime.h>
#include <qpair.h>
#include <qstringlist.h>
#include <private/qabstractitemmodel_p.h>
#include <private/qabstractproxymodel_p.h>
#include "moc_qsortfilterproxymodel.cpp"

Go to the source code of this file.

Classes

struct  QRowsRemoval
 
class  QSortFilterProxyModelGreaterThan
 
class  QSortFilterProxyModelLessThan
 
class  QSortFilterProxyModelPrivate
 
struct  QSortFilterProxyModelPrivate::Mapping
 

Typedefs

typedef QHash< QModelIndex, QSortFilterProxyModelPrivate::Mapping * > IndexMap
 
typedef QList< QPair< QModelIndex, QPersistentModelIndex > > QModelIndexPairList
 

Functions

static QSet< int > qVectorToSet (const QVector< int > &vector)
 

Typedef Documentation

◆ IndexMap

Definition at line 279 of file qsortfilterproxymodel.cpp.

◆ QModelIndexPairList

Definition at line 57 of file qsortfilterproxymodel.cpp.

Function Documentation

◆ qVectorToSet()

static QSet<int> qVectorToSet ( const QVector< int > &  vector)
inlinestatic

Definition at line 59 of file qsortfilterproxymodel.cpp.

Referenced by QSortFilterProxyModelPrivate::_q_sourceDataChanged(), and QSortFilterProxyModelPrivate::handle_filter_changed().

60 {
61  QSet<int> set;
62  set.reserve(vector.size());
63  for(int i=0; i < vector.size(); ++i)
64  set << vector.at(i);
65  return set;
66 }
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137
void reserve(int size)
Definition: qset.h:241