Documents > BPS V2 C++ API
bpssortfilterproxymodel.h
Go to the documentation of this file.
00001 
00004 #ifndef BPSSORTFILTERPROXYMODEL_H
00005 #define BPSSORTFILTERPROXYMODEL_H
00006 
00007 #include "bpsgui_global.h"
00008 #include <QSortFilterProxyModel>
00009 
00010 class BpsTable;
00011 
00019 class BPSGUI_EXPORT BpsSortFilterProxyModel : public QSortFilterProxyModel
00020 {
00021     Q_OBJECT
00022     BPS_PRIVATE(BpsSortFilterProxyModel)
00023 
00024 public:
00028     BpsSortFilterProxyModel(QObject* aParent = 0);
00029 
00035     QModelIndexList mapListFromSource(const QModelIndexList& aSourceIndexList) const;
00036 
00042     QModelIndexList mapListToSource(const QModelIndexList& aProxyIndexList) const;
00043 
00049     QModelIndex firstIndex(const QModelIndex& aParent = QModelIndex());
00050 
00058     void setColumnSortRole(int aColumn, int aRole);
00059 
00065     int columnSortRole(int aColumn) const;
00066 
00071     void setColumnSortRoles(BpsTable* aTable);
00072 
00073 protected:
00083     virtual bool lessThan(const QModelIndex& aLeft, const QModelIndex& aRight ) const;
00084 
00085 }; // BpsSortFilterProxyModel
00086 
00087 #endif // BPSSORTFILTERPROXYMODEL_H