Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef QXTSORTFILTERPROXYMODEL_H_INCLUDED
00026 #define QXTSORTFILTERPROXYMODEL_H_INCLUDED
00027
00028 #include <QSortFilterProxyModel>
00029 #include <QRegExp>
00030 #include <QMap>
00031 #include <QVariant>
00032
00033 #include "qxtglobal.h"
00034 #include "qxtpimpl.h"
00035
00036 class QxtSortFilterProxyModelPrivate;
00037
00038 class QXT_GUI_EXPORT QxtSortFilterProxyModel : public QSortFilterProxyModel
00039 {
00040 Q_OBJECT
00041 QXT_DECLARE_PRIVATE(QxtSortFilterProxyModel);
00042
00043 public:
00044 QxtSortFilterProxyModel ( QObject *parent = 0 );
00045 virtual bool filterAcceptsRow ( int source_row, const QModelIndex &source_parent ) const;
00046 void beginDeclareFilter ( );
00047 void endDeclareFilter ( );
00048 void setFilter ( const int column , const QVariant &value, const int role = Qt::DisplayRole, Qt::MatchFlags flags = Qt::MatchContains);
00049 void setFilterValue ( const int column , const QVariant &value );
00050 void setFilterRole ( const int column , const int role = Qt::DisplayRole );
00051 void setFilterFlags ( const int column , const Qt::MatchFlags flags = Qt::MatchContains );
00052 void removeFilter ( const int column );
00053
00054 QVariant filterValue ( const int column ) const;
00055 int filterRole ( const int column ) const;
00056 Qt::MatchFlags filterFlags ( const int column ) const;
00057
00058 bool isFiltered ( const int column );
00059 };
00060 #endif