messagelist
#include <storagemodelbase.h>
Public Types | |
enum | ThreadingDataSubset { PerfectThreadingOnly, PerfectThreadingPlusReferences, PerfectThreadingReferencesAndSubject } |
Public Member Functions | |
StorageModel (QObject *parent=0) | |
~StorageModel () | |
virtual bool | containsOutboundMessages () const =0 |
virtual void | fillMessageItemThreadingData (MessageItem *mi, int row, ThreadingDataSubset subset) const =0 |
virtual QString | id () const =0 |
virtual bool | initializeMessageItem (MessageItem *it, int row, bool bUseReceiver) const =0 |
virtual int | initialUnreadRowCountGuess () const |
virtual QMimeData * | mimeData (const QList< MessageItem * > &) const =0 |
virtual void | prepareForScan ()=0 |
unsigned long | preSelectedMessage () const |
void | savePreSelectedMessage (unsigned long uniqueIdOfMessage) |
virtual void | setMessageItemStatus (MessageItem *mi, int row, const Akonadi::MessageStatus &status)=0 |
virtual void | updateMessageItemData (MessageItem *mi, int row) const =0 |
Detailed Description
The QAbstractItemModel based interface that you need to provide for your storage to work with MessageList.
Definition at line 45 of file storagemodelbase.h.
Member Enumeration Documentation
Definition at line 95 of file storagemodelbase.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 27 of file storagemodelbase.cpp.
StorageModel::~StorageModel | ( | ) |
Definition at line 32 of file storagemodelbase.cpp.
Member Function Documentation
|
pure virtual |
Returns true if this StorageModel (folder) contains outbound messages and false otherwise.
Implemented in MessageList::StorageModel.
|
pure virtual |
This method should use the inner model implementation to fill in the specified subset of threading data for the specified MessageItem from the underlying storage slot at the specified row index.
Implemented in MessageList::StorageModel.
|
pure virtual |
Returns an unique id for this Storage collection.
FIXME: This could be embedded in "name()" ?
Implemented in MessageList::StorageModel.
|
pure virtual |
This method should use the inner model implementation to fill in the base data for the specified MessageItem from the underlying storage slot at the specified row index.
Must return true if the data fetch was succesfull and false otherwise. For base data we intend: subject, sender, receiver, senderOrReceiver, size, date, encryption state, signature state and status. If bUseReceiver is true then the "senderOrReceiver" field must be set to the receiver, otherwise it must be set to the sender.
Implemented in MessageList::StorageModel.
|
virtual |
Returns (a guess for) the number of unread messages: must be pessimistic (i.e.
if you have no idea just return rowCount(), which is also what the default implementation does). This must be (and is) queried ONLY when the folder is first opened. It doesn't actually need to keep the number of messages in sync as they later arrive to the storage.
Reimplemented in MessageList::StorageModel.
Definition at line 36 of file storagemodelbase.cpp.
|
pure virtual |
The implementation-specific mime data for this list of items.
Called when the user initiates a drag from the messagelist.
Implemented in MessageList::StorageModel.
|
pure virtual |
Called by Model just before this StorageModel is attacched to it.
Implemented in MessageList::StorageModel.
unsigned long StorageModel::preSelectedMessage | ( | ) | const |
Returns the unique id of the last selected message for this StorageModel.
Returns 0 if this value isn't stored in the configuration.
Definition at line 41 of file storagemodelbase.cpp.
void StorageModel::savePreSelectedMessage | ( | unsigned long | uniqueIdOfMessage | ) |
Stores in the unique id of the last selected message for the specified StorageModel.
The uniqueIdOfMessage may be 0 (which means that no selection shall be stored in the configuration).
Definition at line 55 of file storagemodelbase.cpp.
|
pure virtual |
This method should use the inner model implementation to associate the new status to the specified message item.
The new status should be stored (but doesn't need to be set as mi->status() itself as the caller is responsable for this).
Implemented in MessageList::StorageModel.
|
pure virtual |
This method should use the inner model implementation to re-fill the date, the status, the encryption state, the signature state and eventually update the min/max dates for the specified MessageItem from the underlying storage slot at the specified row index.
Implemented in MessageList::StorageModel.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.