Messagelib

markmessagereadhandler.h
1 /*
2  SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, [email protected]
3  SPDX-FileContributor: Tobias Koenig <[email protected]>
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 
17 namespace MessageViewer
18 {
19 /**
20  * @short A viewer handler to mark viewed messages as read.
21  */
22 class MESSAGEVIEWER_EXPORT MarkMessageReadHandler : public QObject, public AbstractMessageLoadedHandler
23 {
24  Q_OBJECT
25 
26 public:
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 
44 private:
45  //@cond PRIVATE
46  class MarkMessageReadHandlerPrivate;
47  friend class MarkMessageReadHandlerPrivate;
48  std::unique_ptr<MarkMessageReadHandlerPrivate> const d;
49  //@endcond
50 };
51 }
52 
A viewer handler to mark viewed messages as read.
An interface to plug in a handler that is called when an message item has been loaded into the view...
Definition: viewer.h:64
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:05:47 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.