Akonadi Mime

messagemodel.h
1 /*
2  SPDX-FileCopyrightText: 2006 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "akonadi-mime_export.h"
10 
11 #include <Akonadi/EntityTreeModel>
12 
13 namespace Akonadi
14 {
15 /**
16  * A flat self-updating message model.
17  */
18 class AKONADI_MIME_EXPORT MessageModel : public Akonadi::EntityTreeModel
19 {
20  Q_OBJECT
21 
22 public:
23  /**
24  Column types.
25  */
26  enum Column {
27  Subject, /**< Subject column. */
28  Sender, /**< Sender column. */
29  Receiver, /**< Receiver column. */
30  Date, /**< Date column. */
31  Size /**< Size column. */
32  };
33 
34  /**
35  Creates a new message model.
36 
37  @param parent The parent object.
38  */
39  explicit MessageModel(Monitor *monitor, QObject *parent = nullptr);
40 
41  /**
42  Deletes the message model.
43  */
44  ~MessageModel() override = default;
45 
46 protected:
47  Q_REQUIRED_RESULT int entityColumnCount(HeaderGroup headerGroup) const override;
48  Q_REQUIRED_RESULT QVariant entityHeaderData(int section, Qt::Orientation orientation, int role, HeaderGroup headerGroup) const override;
49  Q_REQUIRED_RESULT QVariant entityData(const Item &item, int column, int role = Qt::DisplayRole) const override;
50 };
51 }
52 
DisplayRole
A flat self-updating message model.
Definition: messagemodel.h:18
Orientation
Column
Column types.
Definition: messagemodel.h:26
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Nov 28 2021 23:01:38 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.