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

messagelist

  • MessageList
  • StorageModel
Public Member Functions | List of all members
MessageList::StorageModel Class Reference

#include <storagemodel.h>

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

Public Member Functions

 StorageModel (QAbstractItemModel *model, QItemSelectionModel *selectionModel, QObject *parent=0)
 
 ~StorageModel ()
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual bool containsOutboundMessages () const
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
Akonadi::Collection::List displayedCollections () const
 
virtual void fillMessageItemThreadingData (MessageList::Core::MessageItem *mi, int row, ThreadingDataSubset subset) const
 
virtual QString id () const
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
virtual bool initializeMessageItem (MessageList::Core::MessageItem *mi, int row, bool bUseReceiver) const
 
virtual int initialUnreadRowCountGuess () const
 
virtual bool isOutBoundFolder (const Akonadi::Collection &c) const
 
Akonadi::Item itemForRow (int row) const
 
KMime::Message::Ptr messageForRow (int row) const
 
virtual QMimeData * mimeData (const QList< MessageList::Core::MessageItem * > &) const
 
virtual QModelIndex parent (const QModelIndex &index) const
 
virtual void prepareForScan ()
 
void resetModelStorage ()
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 
virtual void setMessageItemStatus (MessageList::Core::MessageItem *mi, int row, const Akonadi::MessageStatus &status)
 
virtual void updateMessageItemData (MessageList::Core::MessageItem *mi, int row) const
 
- Public Member Functions inherited from MessageList::Core::StorageModel
 StorageModel (QObject *parent=0)
 
 ~StorageModel ()
 
unsigned long preSelectedMessage () const
 
void savePreSelectedMessage (unsigned long uniqueIdOfMessage)
 

Additional Inherited Members

- Public Types inherited from MessageList::Core::StorageModel
enum  ThreadingDataSubset { PerfectThreadingOnly, PerfectThreadingPlusReferences, PerfectThreadingReferencesAndSubject }
 

Detailed Description

The Akonadi specific implementation of the Core::StorageModel.

Definition at line 48 of file storagemodel.h.

Constructor & Destructor Documentation

StorageModel::StorageModel ( QAbstractItemModel *  model,
QItemSelectionModel *  selectionModel,
QObject *  parent = 0 
)
explicit

Create a StorageModel wrapping the specified folder.

Definition at line 102 of file storagemodel.cpp.

StorageModel::~StorageModel ( )

Definition at line 166 of file storagemodel.cpp.

Member Function Documentation

int StorageModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Definition at line 383 of file storagemodel.cpp.

bool StorageModel::containsOutboundMessages ( ) const
virtual

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

Implements MessageList::Core::StorageModel.

Definition at line 211 of file storagemodel.cpp.

QVariant StorageModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

Definition at line 367 of file storagemodel.cpp.

Collection::List StorageModel::displayedCollections ( ) const

Definition at line 171 of file storagemodel.cpp.

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

Implements MessageList::Core::StorageModel.

Definition at line 297 of file storagemodel.cpp.

QString StorageModel::id ( ) const
virtual

Returns an unique id for this Storage collection.

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

Implements MessageList::Core::StorageModel.

Definition at line 186 of file storagemodel.cpp.

QModelIndex StorageModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
virtual

Definition at line 390 of file storagemodel.cpp.

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

Implements MessageList::Core::StorageModel.

Definition at line 241 of file storagemodel.cpp.

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 from MessageList::Core::StorageModel.

Definition at line 225 of file storagemodel.cpp.

bool StorageModel::isOutBoundFolder ( const Akonadi::Collection &  c) const
virtual

Definition at line 202 of file storagemodel.cpp.

Item StorageModel::itemForRow ( int  row) const

Definition at line 484 of file storagemodel.cpp.

KMime::Message::Ptr StorageModel::messageForRow ( int  row) const

Definition at line 489 of file storagemodel.cpp.

QMimeData * StorageModel::mimeData ( const QList< MessageList::Core::MessageItem * > &  ) const
virtual

The implementation-specific mime data for this list of items.

Called when the user initiates a drag from the messagelist.

Implements MessageList::Core::StorageModel.

Definition at line 411 of file storagemodel.cpp.

QModelIndex StorageModel::parent ( const QModelIndex &  index) const
virtual

Definition at line 398 of file storagemodel.cpp.

void StorageModel::prepareForScan ( )
virtual

Called by Model just before this StorageModel is attacched to it.

Implements MessageList::Core::StorageModel.

Definition at line 426 of file storagemodel.cpp.

void StorageModel::resetModelStorage ( )

Definition at line 494 of file storagemodel.cpp.

int StorageModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Definition at line 404 of file storagemodel.cpp.

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

Implements MessageList::Core::StorageModel.

Definition at line 356 of file storagemodel.cpp.

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

Implements MessageList::Core::StorageModel.

Definition at line 329 of file storagemodel.cpp.


The documentation for this class was generated from the following files:
  • storagemodel.h
  • storagemodel.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