messagelist
#include <storagemodel.h>
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 |
Akonadi::Collection | parentCollectionForRow (int row) 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) |
Public Member Functions inherited from QAbstractItemModel | |
QAbstractItemModel (QObject *parent) | |
virtual | ~QAbstractItemModel () |
virtual QModelIndex | buddy (const QModelIndex &index) const |
virtual bool | canFetchMore (const QModelIndex &parent) const |
virtual int | columnCount (const QModelIndex &parent) const =0 |
void | columnsAboutToBeInserted (const QModelIndex &parent, int start, int end) |
void | columnsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn) |
void | columnsAboutToBeRemoved (const QModelIndex &parent, int start, int end) |
void | columnsInserted (const QModelIndex &parent, int start, int end) |
void | columnsMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn) |
void | columnsRemoved (const QModelIndex &parent, int start, int end) |
virtual QVariant | data (const QModelIndex &index, int role) const =0 |
void | dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight) |
virtual bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
virtual void | fetchMore (const QModelIndex &parent) |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
virtual bool | hasChildren (const QModelIndex &parent) const |
bool | hasIndex (int row, int column, const QModelIndex &parent) const |
virtual QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
void | headerDataChanged (Qt::Orientation orientation, int first, int last) |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent) const =0 |
bool | insertColumn (int column, const QModelIndex &parent) |
virtual bool | insertColumns (int column, int count, const QModelIndex &parent) |
bool | insertRow (int row, const QModelIndex &parent) |
virtual bool | insertRows (int row, int count, const QModelIndex &parent) |
virtual QMap< int, QVariant > | itemData (const QModelIndex &index) const |
void | layoutAboutToBeChanged () |
void | layoutChanged () |
virtual QModelIndexList | match (const QModelIndex &start, int role, const QVariant &value, int hits, QFlags< Qt::MatchFlag > flags) const |
virtual QMimeData * | mimeData (const QModelIndexList &indexes) const |
virtual QStringList | mimeTypes () const |
void | modelAboutToBeReset () |
void | modelReset () |
virtual QModelIndex | parent (const QModelIndex &index) const =0 |
bool | removeColumn (int column, const QModelIndex &parent) |
virtual bool | removeColumns (int column, int count, const QModelIndex &parent) |
bool | removeRow (int row, const QModelIndex &parent) |
virtual bool | removeRows (int row, int count, const QModelIndex &parent) |
virtual void | revert () |
const QHash< int, QByteArray > & | roleNames () const |
virtual int | rowCount (const QModelIndex &parent) const =0 |
void | rowsAboutToBeInserted (const QModelIndex &parent, int start, int end) |
void | rowsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow) |
void | rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end) |
void | rowsInserted (const QModelIndex &parent, int start, int end) |
void | rowsMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow) |
void | rowsRemoved (const QModelIndex &parent, int start, int end) |
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role) |
virtual bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role) |
virtual bool | setItemData (const QModelIndex &index, const QMap< int, QVariant > &roles) |
void | setSupportedDragActions (QFlags< Qt::DropAction > actions) |
QModelIndex | sibling (int row, int column, const QModelIndex &index) const |
virtual void | sort (int column, Qt::SortOrder order) |
virtual QSize | span (const QModelIndex &index) const |
virtual bool | submit () |
Qt::DropActions | supportedDragActions () const |
virtual Qt::DropActions | supportedDropActions () const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Additional Inherited Members | |
Public Types inherited from MessageList::Core::StorageModel | |
enum | ThreadingDataSubset { PerfectThreadingOnly, PerfectThreadingPlusReferences, PerfectThreadingReferencesAndSubject } |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QAbstractItemModel | |
void | beginInsertColumns (const QModelIndex &parent, int first, int last) |
void | beginInsertRows (const QModelIndex &parent, int first, int last) |
bool | beginMoveColumns (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild) |
bool | beginMoveRows (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild) |
void | beginRemoveColumns (const QModelIndex &parent, int first, int last) |
void | beginRemoveRows (const QModelIndex &parent, int first, int last) |
void | beginResetModel () |
void | changePersistentIndex (const QModelIndex &from, const QModelIndex &to) |
void | changePersistentIndexList (const QModelIndexList &from, const QModelIndexList &to) |
QModelIndex | createIndex (int row, int column, void *ptr) const |
QModelIndex | createIndex (int row, int column, int id) const |
QModelIndex | createIndex (int row, int column, quint32 id) const |
void | endInsertColumns () |
void | endInsertRows () |
void | endMoveColumns () |
void | endMoveRows () |
void | endRemoveColumns () |
void | endRemoveRows () |
void | endResetModel () |
QModelIndexList | persistentIndexList () const |
void | reset () |
void | resetInternalData () |
void | setRoleNames (const QHash< int, QByteArray > &roleNames) |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
The Akonadi specific implementation of the Core::StorageModel.
Definition at line 48 of file storagemodel.h.
Constructor & Destructor Documentation
|
explicit |
Create a StorageModel wrapping the specified folder.
Definition at line 91 of file storagemodel.cpp.
StorageModel::~StorageModel | ( | ) |
Definition at line 144 of file storagemodel.cpp.
Member Function Documentation
|
virtual |
Definition at line 364 of file storagemodel.cpp.
|
virtual |
Returns true if this StorageModel (folder) contains outbound messages and false otherwise.
Implements MessageList::Core::StorageModel.
Definition at line 189 of file storagemodel.cpp.
|
virtual |
Definition at line 348 of file storagemodel.cpp.
Collection::List StorageModel::displayedCollections | ( | ) | const |
Definition at line 149 of file storagemodel.cpp.
|
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 278 of file storagemodel.cpp.
|
virtual |
Returns an unique id for this Storage collection.
FIXME: This could be embedded in "name()" ?
Implements MessageList::Core::StorageModel.
Definition at line 164 of file storagemodel.cpp.
|
virtual |
Definition at line 371 of file storagemodel.cpp.
|
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 219 of file storagemodel.cpp.
|
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 203 of file storagemodel.cpp.
|
virtual |
Definition at line 180 of file storagemodel.cpp.
Item StorageModel::itemForRow | ( | int | row | ) | const |
Definition at line 451 of file storagemodel.cpp.
KMime::Message::Ptr StorageModel::messageForRow | ( | int | row | ) | const |
Definition at line 456 of file storagemodel.cpp.
|
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 392 of file storagemodel.cpp.
|
virtual |
Definition at line 379 of file storagemodel.cpp.
Collection StorageModel::parentCollectionForRow | ( | int | row | ) | const |
Definition at line 461 of file storagemodel.cpp.
|
virtual |
Called by Model just before this StorageModel is attacched to it.
Implements MessageList::Core::StorageModel.
Definition at line 407 of file storagemodel.cpp.
void StorageModel::resetModelStorage | ( | ) |
Definition at line 481 of file storagemodel.cpp.
|
virtual |
Definition at line 385 of file storagemodel.cpp.
|
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 337 of file storagemodel.cpp.
|
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 310 of file storagemodel.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.