Messagelib

modifymessagedisplayformatjob.h
1 /*
2  SPDX-FileCopyrightText: 2014-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "viewer/viewer_p.h"
10 #include <QObject>
11 namespace Akonadi
12 {
13 class Session;
14 }
15 namespace MessageViewer
16 {
17 class ModifyMessageDisplayFormatJob : public QObject
18 {
19  Q_OBJECT
20 public:
21  explicit ModifyMessageDisplayFormatJob(Akonadi::Session *session, QObject *parent = nullptr);
22  ~ModifyMessageDisplayFormatJob() override;
23 
24  void setRemoteContent(bool remote);
25  void setMessageFormat(Viewer::DisplayFormatMessage format);
26  void setResetFormat(bool resetFormat);
27 
28  void start();
29  void setMessageItem(const Akonadi::Item &messageItem);
30 
31 private:
32  void slotModifyItemDone(KJob *job);
33  void resetDisplayFormat();
34  void modifyDisplayFormat();
35  Akonadi::Session *const mSession;
36  Akonadi::Item mMessageItem;
37  Viewer::DisplayFormatMessage mMessageFormat = Viewer::UseGlobalSetting;
38  bool mRemoteContent = false;
39  bool mResetFormat = false;
40 };
41 }
42 
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 23:04:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.