messagelist
storagemodel.cpp
Go to the documentation of this file.
91 StorageModel::StorageModel( QAbstractItemModel *model, QItemSelectionModel *selectionModel, QObject *parent )
99 Akonadi::SelectionProxyModel *childrenFilter = new Akonadi::SelectionProxyModel( d->mSelectionModel, this );
240 static const QString noSubject = i18nc( "displayed as subject when the subject of a mail is empty", "No Subject" );
241 static const QString unknown( i18nc( "displayed when a mail has unknown sender, receiver or date", "Unknown" ) );
392 QMimeData* StorageModel::mimeData( const QList< MessageList::Core::MessageItem* >& items ) const
412 void StorageModel::Private::onSourceDataChanged( const QModelIndex &topLeft, const QModelIndex &bottomRight )
430 Core::MessageItem::setImportantMessageColor( MessageList::Util::importantDefaultMessageColor() );
468 QAbstractProxyModel *childrenProxy = static_cast<QAbstractProxyModel*>( d->mChildrenFilterModel );
475 const Collection col = etmIndex.parent().data( EntityTreeModel::CollectionRole ).value<Collection>();
KMime::Message::Ptr messageForRow(int row) const
Definition: storagemodel.cpp:456
virtual bool initializeMessageItem(MessageList::Core::MessageItem *mi, int row, bool bUseReceiver) const
This method should use the inner model implementation to fill in the base data for the specified Mess...
Definition: storagemodel.cpp:219
virtual bool containsOutboundMessages() const
Returns true if this StorageModel (folder) contains outbound messages and false otherwise.
Definition: storagemodel.cpp:189
void layoutChanged()
static void setUnreadMessageColor(const QColor &color)
Definition: messageitem.cpp:623
QByteArray trimmed() const
Definition: messageitem.h:46
Akonadi::Collection parentCollectionForRow(int row) const
Definition: storagemodel.cpp:461
MESSAGELIST_EXPORT QColor importantDefaultMessageColor()
Definition: messagelistutil.cpp:112
QObject * sender() const
virtual int initialUnreadRowCountGuess() const
Returns (a guess for) the number of unread messages: must be pessimistic (i.e.
Definition: storagemodel.cpp:203
static void setImportantMessageColor(const QColor &color)
Definition: messageitem.cpp:629
virtual void fillMessageItemThreadingData(MessageList::Core::MessageItem *mi, int row, ThreadingDataSubset subset) const
This method should use the inner model implementation to fill in the specified subset of threading da...
Definition: storagemodel.cpp:278
bool isEmpty() const
void setStrippedSubjectMD5(const QByteArray &md5)
Definition: messageitem.cpp:504
virtual const QMetaObject * metaObject() const
T value() const
void setMessageIdMD5(const QByteArray &md5)
Definition: messageitem.cpp:456
void setAkonadiItem(const Akonadi::Item &item)
Definition: messageitem.cpp:546
void modelAboutToBeReset()
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: storagemodel.cpp:385
void modelReset()
void setSubject(const QString &subject)
Sets the subject associated to this Item.
Definition: item.cpp:476
bool testAndSetAcquire(int expectedValue, int newValue)
QString join(const QString &separator) const
void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
static void setToDoMessageFont(const QFont &font)
Definition: messageitem.cpp:659
ThreadingDataSubset
Definition: storagemodelbase.h:95
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: storagemodel.cpp:364
virtual void updateMessageItemData(MessageList::Core::MessageItem *mi, int row) const
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.
Definition: storagemodel.cpp:310
void layoutAboutToBeChanged()
Akonadi::Collection::List displayedCollections() const
Definition: storagemodel.cpp:149
void setInReplyToIdMD5(const QByteArray &md5)
Definition: messageitem.cpp:468
void reset()
bool isValid() const
QString number(int n, int base)
void rowsAboutToBeInserted(const QModelIndex &parent, int start, int end)
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
void setEncryptionState(EncryptionState state)
Definition: messageitem.cpp:444
bool isEmpty() const
int row() const
void setReferencesIdMD5(const QByteArray &md5)
Definition: messageitem.cpp:480
void addData(const char *data, int length)
void resetModelStorage()
Definition: storagemodel.cpp:481
int currentModelIndexRow()
Returns the current model index row for this invariant index.
Definition: modelinvariantindex.cpp:47
QModelIndex parent() const
void rowsRemoved(const QModelIndex &parent, int start, int end)
virtual void prepareForScan()
Called by Model just before this StorageModel is attacched to it.
Definition: storagemodel.cpp:407
messageIdMD5, inReplyToMD5, referencesIdMD5
Definition: storagemodelbase.h:98
virtual bool isOutBoundFolder(const Akonadi::Collection &c) const
Definition: storagemodel.cpp:180
void setSignatureState(SignatureState state)
Definition: messageitem.cpp:432
QModelIndex createIndex(int row, int column, void *ptr) const
MESSAGELIST_EXPORT QColor todoDefaultMessageColor()
Definition: messagelistutil.cpp:117
void setParentCollectionId(qint64 id)
Definition: item.cpp:504
const char * className() const
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: storagemodel.cpp:371
void setSubjectIsPrefixed(bool subjectIsPrefixed)
Definition: messageitem.cpp:486
static void setUnreadMessageFont(const QFont &font)
Definition: messageitem.cpp:647
static void setImportantMessageFont(const QFont &font)
Definition: messageitem.cpp:653
static void setToDoMessageColor(const QColor &color)
Definition: messageitem.cpp:635
MESSAGELIST_EXPORT QColor unreadDefaultMessageColor()
Definition: messagelistutil.cpp:107
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: storagemodel.cpp:348
QVariant data(int role) const
virtual QMimeData * mimeData(const QList< MessageList::Core::MessageItem * > &) const
The implementation-specific mime data for this list of items.
Definition: storagemodel.cpp:392
virtual void setMessageItemStatus(MessageList::Core::MessageItem *mi, int row, const Akonadi::MessageStatus &status)
This method should use the inner model implementation to associate the new status to the specified me...
Definition: storagemodel.cpp:337
All of the above plus subject stuff.
Definition: storagemodelbase.h:99
The Akonadi specific implementation of the Core::StorageModel.
Definition: storagemodel.h:48
QByteArray result() const
void sort()
static void setGeneralFont(const QFont &font)
Definition: messageitem.cpp:641
void rowsInserted(const QModelIndex &parent, int start, int end)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const =0
QObject * parent() const
Akonadi::Item itemForRow(int row) const
Definition: storagemodel.cpp:451
void initialSetup(time_t date, size_t size, const QString &sender, const QString &receiver, bool useReceiver)
This is meant to be called right after the constructor.
Definition: item.cpp:481
virtual QString id() const
Returns an unique id for this Storage collection.
Definition: storagemodel.cpp:164
Only the data for messageIdMD5 and inReplyToMD5 is needed.
Definition: storagemodelbase.h:97
void invalidateAnnotationCache()
Same as invalidateTagCache(), only for the annotation.
Definition: messageitem.cpp:330
QByteArray toUtf8() const
void setStatus(const Akonadi::MessageStatus &status)
Sets the status associated to this Item.
Definition: item.cpp:406
This file is part of the KDE documentation.
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
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.