00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef FILTERLOGVIEWDELETEDMODEL_H
00019 #define FILTERLOGVIEWDELETEDMODEL_H
00020
00021
00022 #include <QModelIndex>
00023 #include <QList>
00024
00025
00026 #include "filterlog.h"
00027 #include "types.h"
00028
00029 #define NUMBER_VIEWDELETED_COLUMNS 4
00030
00034 class FilterLogViewDeletedModel : public QAbstractItemModel
00035 {
00036
00037 Q_OBJECT
00038
00039 public:
00040
00044 FilterLogViewDeletedModel( QObject* parent = 0, FilterLog* log = NULL );
00045
00053 virtual QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
00054
00062 virtual int columnCount( const QModelIndex& ) const;
00063
00071 virtual int rowCount( const QModelIndex& parent = QModelIndex() ) const;
00072
00079 virtual QModelIndex parent( const QModelIndex& ) const;
00080
00090 virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
00091
00098 QVariant headerData( int section, Qt::Orientation orientation, int role ) const;
00099
00105 void sort( int column, Qt::SortOrder order = Qt::AscendingOrder );
00106
00110 void sort();
00111
00115 void refresh();
00116
00120 void saveSetup();
00121
00122
00123 private:
00124
00128 FilterLog* log;
00129
00135 QList<FilterLogEntry> list;
00136
00140 Qt::SortOrder lastSortOrder;
00141
00145 int lastSortColumn;
00146
00147 };
00148
00149 #endif // FILTERLOGVIEWDELETEDMODEL_H