• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messagelist

  • MessageList
  • Core
  • StorageModel
Public Types | Public Member Functions | List of all members
MessageList::Core::StorageModel Class Referenceabstract

#include <storagemodelbase.h>

Inheritance diagram for MessageList::Core::StorageModel:
Inheritance graph
[legend]

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

enum MessageList::Core::StorageModel::ThreadingDataSubset
Enumerator
PerfectThreadingOnly 

Only the data for messageIdMD5 and inReplyToMD5 is needed.

PerfectThreadingPlusReferences 

messageIdMD5, inReplyToMD5, referencesIdMD5

PerfectThreadingReferencesAndSubject 

All of the above plus subject stuff.

Definition at line 95 of file storagemodelbase.h.

Constructor & Destructor Documentation

StorageModel::StorageModel ( QObject *  parent = 0)
explicit

Definition at line 27 of file storagemodelbase.cpp.

StorageModel::~StorageModel ( )

Definition at line 32 of file storagemodelbase.cpp.

Member Function Documentation

virtual bool MessageList::Core::StorageModel::containsOutboundMessages ( ) const
pure virtual

Returns true if this StorageModel (folder) contains outbound messages and false otherwise.

Implemented in MessageList::StorageModel.

virtual void MessageList::Core::StorageModel::fillMessageItemThreadingData ( MessageItem *  mi,
int  row,
ThreadingDataSubset  subset 
) const
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.

virtual QString MessageList::Core::StorageModel::id ( ) const
pure virtual

Returns an unique id for this Storage collection.

FIXME: This could be embedded in "name()" ?

Implemented in MessageList::StorageModel.

virtual bool MessageList::Core::StorageModel::initializeMessageItem ( MessageItem *  it,
int  row,
bool  bUseReceiver 
) const
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.

int StorageModel::initialUnreadRowCountGuess ( ) const
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.

virtual QMimeData* MessageList::Core::StorageModel::mimeData ( const QList< MessageItem * > &  ) const
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.

virtual void MessageList::Core::StorageModel::prepareForScan ( )
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.

virtual void MessageList::Core::StorageModel::setMessageItemStatus ( MessageItem *  mi,
int  row,
const Akonadi::MessageStatus &  status 
)
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.

virtual void MessageList::Core::StorageModel::updateMessageItemData ( MessageItem *  mi,
int  row 
) const
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:
  • storagemodelbase.h
  • storagemodelbase.cpp
This file is part of the KDE documentation.
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.

messagelist

Skip menu "messagelist"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal