1 /*
2   SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
3 
4   SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "messagepart.h"
10 
11 #include <QByteArray>
12 #include <memory>
13 
14 namespace MessageComposer
15 {
16 /**
17  * @brief The GlobalPart class
18  */
19 class MESSAGECOMPOSER_EXPORT GlobalPart : public MessageComposer::MessagePart
20 {
21     Q_OBJECT
22 
23 public:
24     explicit GlobalPart(QObject *parent = nullptr);
25     ~GlobalPart() override;
26 
27     // default true
28     Q_REQUIRED_RESULT bool isGuiEnabled() const;
29     void setGuiEnabled(bool enabled);
30     Q_REQUIRED_RESULT QWidget *parentWidgetForGui() const;
31     void setParentWidgetForGui(QWidget *widget);
32 
33     Q_REQUIRED_RESULT bool isFallbackCharsetEnabled() const;
34     void setFallbackCharsetEnabled(bool enabled);
35     Q_REQUIRED_RESULT QVector<QByteArray> charsets(bool forceFallback = false) const;
36     void setCharsets(const QVector<QByteArray> &charsets);
37 
38     Q_REQUIRED_RESULT bool is8BitAllowed() const;
39     void set8BitAllowed(bool allowed);
40 
41     // default is false
42     Q_REQUIRED_RESULT bool MDNRequested() const;
43     void setMDNRequested(bool requestMDN);
44 
45     Q_REQUIRED_RESULT bool requestDeleveryConfirmation() const;
46     void setRequestDeleveryConfirmation(bool value);
47 
48 private:
49     class GlobalPartPrivate;
50     std::unique_ptr<GlobalPartPrivate> const d;
51 };
52 } // namespace MessageComposer
53 
54