FilterLogViewMovedModel Class Reference

Model for the log view of moved mails. More...

#include <filterlogviewmovedmodel.h>

List of all members.

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

FilterLoglog
 Pointer to the log.
QList< FilterLogEntrylist
 This list contains the items which represents the moved mails.
Qt::SortOrder lastSortOrder
int lastSortColumn

Detailed Description

Model for the log view of moved mails.

Definition at line 35 of file filterlogviewmovedmodel.h.


Constructor & Destructor Documentation

FilterLogViewMovedModel::FilterLogViewMovedModel ( QObject *  parent = 0,
FilterLog log = NULL 
) [explicit]

Constructor.

Definition at line 20 of file filterlogviewmovedmodel.cpp.


Member Function Documentation

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.

Parameters:
index the index
Parameters:
role the role

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.

Parameters:
section header section
Parameters:
orientation orientation of the header; just returns the horizontal orientation
Parameters:
role display role

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

Parameters:
row Row
Parameters:
column Column
Parameters:
parent parent index; not used

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.

Parameters:
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.

Parameters:
column column to sort
Parameters:
order sort order

Definition at line 113 of file filterlogviewmovedmodel.cpp.


Member Data Documentation

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.

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.

Pointer to the log.

Definition at line 129 of file filterlogviewmovedmodel.h.


The documentation for this class was generated from the following files:
Generated on Sun Mar 13 15:27:10 2011 for KShowmail by  doxygen 1.6.3