Messagelib

storagemodelbase.h
1 /******************************************************************************
2  *
3  * SPDX-FileCopyrightText: 2008 Szymon Tomasz Stefanek <[email protected]>
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  *
7  *******************************************************************************/
8 
9 #ifndef MESSAGELIST_CORE_STORAGEMODELBASE_H
10 #define MESSAGELIST_CORE_STORAGEMODELBASE_H
11 
12 #include <QAbstractItemModel>
13 #include <QVector>
14 namespace Akonadi {
15 class MessageStatus;
16 }
17 
18 namespace MessageList {
19 namespace Core {
20 class MessageItem;
21 
27 {
28  Q_OBJECT
29 
30 public:
31  explicit StorageModel(QObject *parent = nullptr);
32  ~StorageModel();
33 
38  virtual QString id() const = 0;
39 
44  unsigned long preSelectedMessage() const;
45 
50  void savePreSelectedMessage(unsigned long uniqueIdOfMessage);
51 
55  virtual bool containsOutboundMessages() const = 0;
56 
63  virtual int initialUnreadRowCountGuess() const;
64 
74  virtual bool initializeMessageItem(MessageItem *it, int row, bool bUseReceiver) const = 0;
75 
79  PerfectThreadingReferencesAndSubject
80  };
81 
87  virtual void fillMessageItemThreadingData(MessageItem *mi, int row, ThreadingDataSubset subset) const = 0;
88 
94  virtual void updateMessageItemData(MessageItem *mi, int row) const = 0;
95 
101  virtual void setMessageItemStatus(MessageItem *mi, int row, Akonadi::MessageStatus status) = 0;
102 
107  virtual QMimeData *mimeData(const QVector< MessageItem * > &) const = 0;
109 };
110 } // namespace Core
111 } // namespace MessageList
112 
113 #endif
The MessageItem class.
Definition: messageitem.h:32
virtual QMimeData * mimeData(const QModelIndexList &indexes) const const
messageIdMD5, inReplyToMD5, referencesIdMD5
The QAbstractItemModel based interface that you need to provide for your storage to work with Message...
Only the data for messageIdMD5 and inReplyToMD5 is needed.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 23:14:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.