00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef FILTERLOGVIEWMOVEDMODEL_H
00019 #define FILTERLOGVIEWMOVEDMODEL_H
00020
00021
00022 #include <QModelIndex>
00023 #include <QList>
00024
00025
00026 #include "filterlog.h"
00027 #include "types.h"
00028
00029 #define NUMBER_VIEWMOVED_COLUMNS 5
00030
00031
00035 class FilterLogViewMovedModel : public QAbstractItemModel
00036 {
00037
00038 Q_OBJECT
00039
00040 public:
00041
00045 FilterLogViewMovedModel( QObject* parent = 0, FilterLog* log = NULL );
00046
00054 virtual QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
00055
00063 virtual int columnCount( const QModelIndex& ) const;
00064
00072 virtual int rowCount( const QModelIndex& parent = QModelIndex() ) const;
00073
00080 virtual QModelIndex parent( const QModelIndex& ) const;
00081
00091 virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
00092
00099 QVariant headerData( int section, Qt::Orientation orientation, int role ) const;
00100
00106 void sort( int column, Qt::SortOrder order = Qt::AscendingOrder );
00107
00111 void sort();
00112
00116 void refresh();
00117
00121 void saveSetup();
00122
00123
00124 private:
00125
00129 FilterLog* log;
00130
00136 QList<FilterLogEntry> list;
00137
00141 Qt::SortOrder lastSortOrder;
00142
00146 int lastSortColumn;
00147 };
00148
00149 #endif // FILTERLOGVIEWMOVEDMODEL_H