Akonadi Mime

messagemodel.h
1/*
2 SPDX-FileCopyrightText: 2006 Volker Krause <vkrause@kde.org>
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
13namespace Akonadi
14{
15/**
16 * A flat self-updating message model.
17 */
18class AKONADI_MIME_EXPORT MessageModel : public Akonadi::EntityTreeModel
19{
20 Q_OBJECT
21
22public:
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
46protected:
47 [[nodiscard]] int entityColumnCount(HeaderGroup headerGroup) const override;
48 [[nodiscard]] QVariant entityHeaderData(int section, Qt::Orientation orientation, int role, HeaderGroup headerGroup) const override;
49 [[nodiscard]] QVariant entityData(const Item &item, int column, int role = Qt::DisplayRole) const override;
50};
51}
A flat self-updating message model.
~MessageModel() override=default
Deletes the message model.
@ Receiver
Receiver column.
@ Sender
Sender column.
@ Subject
Subject column.
DisplayRole
Orientation
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.