Model for the log view of deleted mails. More...
#include <filterlogviewdeletedmodel.h>
Public Member Functions | |
FilterLogViewDeletedModel (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 deleted mails. | |
Qt::SortOrder | lastSortOrder |
int | lastSortColumn |
KIcon | picManualDeleted |
KIcon | picFilterDeleted |
Model for the log view of deleted mails.
Definition at line 37 of file filterlogviewdeletedmodel.h.
FilterLogViewDeletedModel::FilterLogViewDeletedModel | ( | QObject * | parent = 0 , |
|
FilterLog * | log = NULL | |||
) | [explicit] |
Constructor.
Definition at line 20 of file filterlogviewdeletedmodel.cpp.
int FilterLogViewDeletedModel::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 117 of file filterlogviewdeletedmodel.cpp.
QVariant FilterLogViewDeletedModel::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 38 of file filterlogviewdeletedmodel.cpp.
QVariant FilterLogViewDeletedModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role | |||
) | const |
Returns the header text of the given section.
section | header section
|
Definition at line 146 of file filterlogviewdeletedmodel.cpp.
QModelIndex FilterLogViewDeletedModel::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 136 of file filterlogviewdeletedmodel.cpp.
QModelIndex FilterLogViewDeletedModel::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 131 of file filterlogviewdeletedmodel.cpp.
void FilterLogViewDeletedModel::refresh | ( | ) |
Reloads the data from the log.
Definition at line 248 of file filterlogviewdeletedmodel.cpp.
int FilterLogViewDeletedModel::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 122 of file filterlogviewdeletedmodel.cpp.
void FilterLogViewDeletedModel::saveSetup | ( | ) |
Saves the setup
Definition at line 256 of file filterlogviewdeletedmodel.cpp.
void FilterLogViewDeletedModel::sort | ( | ) |
Sorts the model by the last sort properties.
Definition at line 243 of file filterlogviewdeletedmodel.cpp.
void FilterLogViewDeletedModel::sort | ( | int | column, | |
Qt::SortOrder | order = Qt::AscendingOrder | |||
) |
Sorts the model by column in the given order.
column | column to sort
|
Definition at line 163 of file filterlogviewdeletedmodel.cpp.
int FilterLogViewDeletedModel::lastSortColumn [private] |
last sort column
Definition at line 148 of file filterlogviewdeletedmodel.h.
Qt::SortOrder FilterLogViewDeletedModel::lastSortOrder [private] |
Last sort order
Definition at line 143 of file filterlogviewdeletedmodel.h.
QList<FilterLogEntry> FilterLogViewDeletedModel::list [private] |
This list contains the items which represents the deleted mails.
Will be load from filter log by constructor.
Definition at line 138 of file filterlogviewdeletedmodel.h.
FilterLog* FilterLogViewDeletedModel::log [private] |
Pointer to the log.
Definition at line 131 of file filterlogviewdeletedmodel.h.
KIcon FilterLogViewDeletedModel::picFilterDeleted [private] |
Icon for a mail deleted by filter
Definition at line 158 of file filterlogviewdeletedmodel.h.
KIcon FilterLogViewDeletedModel::picManualDeleted [private] |
Icon for a manual deleted mail
Definition at line 153 of file filterlogviewdeletedmodel.h.