Model for the log view of moved mails. More...
#include <filterlogviewmovedmodel.h>
Public Member Functions | |
FilterLogViewMovedModel (QObject *parent=0, FilterLog *log=NULL) | |
Constructor. | |
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
Overloaded from QAbstractItemModel. | |
virtual int | columnCount (const QModelIndex &) const |
Overloaded from QAbstractItemModel. | |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
Overloaded from QAbstractItemModel. | |
virtual QModelIndex | parent (const QModelIndex &) const |
Overloaded from QAbstractItemModel. | |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
Returns the index of the data in this model specified by the given row, column. | |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
Returns the header text of the given section. | |
void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) |
void | sort () |
Sorts the model by the last sort properties. | |
void | refresh () |
Reloads the data from the log. | |
void | saveSetup () |
Private Attributes | |
FilterLog * | log |
Pointer to the log. | |
QList< FilterLogEntry > | list |
This list contains the items which represents the moved mails. | |
Qt::SortOrder | lastSortOrder |
int | lastSortColumn |
Model for the log view of moved mails.
Definition at line 35 of file filterlogviewmovedmodel.h.
FilterLogViewMovedModel::FilterLogViewMovedModel | ( | QObject * | parent = 0 , |
|
FilterLog * | log = NULL | |||
) | [explicit] |
Constructor.
Definition at line 20 of file filterlogviewmovedmodel.cpp.
int FilterLogViewMovedModel::columnCount | ( | const QModelIndex & | ) | const [virtual] |
Overloaded from QAbstractItemModel.
Doesn't give a parent item, because the model doesn't provide tree structured data. The column count is equal to the number of showed account data. Always returns 6.
Definition at line 67 of file filterlogviewmovedmodel.cpp.
QVariant FilterLogViewMovedModel::data | ( | const QModelIndex & | index, | |
int | role = Qt::DisplayRole | |||
) | const [virtual] |
Overloaded from QAbstractItemModel.
Returns the data of the given index.
index | the index
|
Definition at line 33 of file filterlogviewmovedmodel.cpp.
QVariant FilterLogViewMovedModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role | |||
) | const |
Returns the header text of the given section.
section | header section
|
Definition at line 96 of file filterlogviewmovedmodel.cpp.
QModelIndex FilterLogViewMovedModel::index | ( | int | row, | |
int | column, | |||
const QModelIndex & | parent = QModelIndex() | |||
) | const [virtual] |
Returns the index of the data in this model specified by the given row, column.
The parent index is not used. Overloaded from QAbstractItemModel
row | Row
|
Definition at line 86 of file filterlogviewmovedmodel.cpp.
QModelIndex FilterLogViewMovedModel::parent | ( | const QModelIndex & | ) | const [virtual] |
Overloaded from QAbstractItemModel.
Because this model doesn't provide tree structured data this function just returns an invalid index.
Definition at line 81 of file filterlogviewmovedmodel.cpp.
void FilterLogViewMovedModel::refresh | ( | ) |
Reloads the data from the log.
Definition at line 197 of file filterlogviewmovedmodel.cpp.
int FilterLogViewMovedModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Overloaded from QAbstractItemModel.
Doesn't give a parent item, because the model doesn't provide tree structured data The row count is equal to the number of accounts.
parent | parent index |
Definition at line 72 of file filterlogviewmovedmodel.cpp.
void FilterLogViewMovedModel::saveSetup | ( | ) |
Saves the setup
Definition at line 205 of file filterlogviewmovedmodel.cpp.
void FilterLogViewMovedModel::sort | ( | ) |
Sorts the model by the last sort properties.
Definition at line 192 of file filterlogviewmovedmodel.cpp.
void FilterLogViewMovedModel::sort | ( | int | column, | |
Qt::SortOrder | order = Qt::AscendingOrder | |||
) |
Sorts the model by column in the given order.
column | column to sort
|
Definition at line 113 of file filterlogviewmovedmodel.cpp.
int FilterLogViewMovedModel::lastSortColumn [private] |
last sort column
Definition at line 146 of file filterlogviewmovedmodel.h.
Qt::SortOrder FilterLogViewMovedModel::lastSortOrder [private] |
Last sort order
Definition at line 141 of file filterlogviewmovedmodel.h.
QList<FilterLogEntry> FilterLogViewMovedModel::list [private] |
This list contains the items which represents the moved mails.
Will be load from filter log by constructor.
Definition at line 136 of file filterlogviewmovedmodel.h.
FilterLog* FilterLogViewMovedModel::log [private] |
Pointer to the log.
Definition at line 129 of file filterlogviewmovedmodel.h.