Messagelib

markmessagereadhandler.h
1/*
2 SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 SPDX-FileContributor: Tobias Koenig <tokoe@kdab.com>
4
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#pragma once
10
11#include "messageviewer_export.h"
12
13#include "messageviewer/viewer.h"
14
15#include <QObject>
16
17namespace MessageViewer
18{
19/**
20 * @short A viewer handler to mark viewed messages as read.
21 */
22class MESSAGEVIEWER_EXPORT MarkMessageReadHandler : public QObject, public AbstractMessageLoadedHandler
23{
24 Q_OBJECT
25
26public:
27 /**
28 * Creates a new mark message read handler.
29 *
30 * @param parent The parent object.
31 */
32 explicit MarkMessageReadHandler(QObject *parent = nullptr);
33
34 /**
35 * Destroys the mark message read handler.
36 */
37 ~MarkMessageReadHandler() override;
38
39 /**
40 * @copydoc AbstractMessageLoadedHandler::setItem()
41 */
42 void setItem(const Akonadi::Item &item) override;
43
44private:
45 //@cond PRIVATE
46 class MarkMessageReadHandlerPrivate;
47 friend class MarkMessageReadHandlerPrivate;
48 std::unique_ptr<MarkMessageReadHandlerPrivate> const d;
49 //@endcond
50};
51}
An interface to plug in a handler that is called when an message item has been loaded into the view.
Definition viewer.h:67
A viewer handler to mark viewed messages as read.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.