Libksieve

sieveeditor.h
1 /* SPDX-FileCopyrightText: 2011-2021 Laurent Montel <[email protected]>
2  *
3  * SPDX-License-Identifier: LGPL-2.0-or-later
4  */
5 
6 #pragma once
7 
8 #include "ksieveui_export.h"
9 #include <QDialog>
10 #include <memory>
11 namespace KSieveUi
12 {
13 class SieveEditorPrivate;
14 class SieveImapAccountSettings;
15 /**
16  * @brief The SieveEditor class
17  * @author Laurent Montel <[email protected]>
18  */
19 class KSIEVEUI_EXPORT SieveEditor : public QDialog
20 {
21  Q_OBJECT
22 public:
23  explicit SieveEditor(QWidget *parent = nullptr);
24  ~SieveEditor() override;
25 
26  Q_REQUIRED_RESULT QString script() const;
27  Q_REQUIRED_RESULT QString originalScript() const;
28  void setScript(const QString &script, bool clearUndoRedo = false);
29  void setDebugScript(const QString &debug);
30  void addFailedMessage(const QString &err);
31  void addOkMessage(const QString &msg);
32  void addNormalMessage(const QString &msg);
33  void setScriptName(const QString &name);
34 
35  void resultDone();
36 
37  void setSieveCapabilities(const QStringList &capabilities);
38  void setSieveImapAccountSettings(const KSieveUi::SieveImapAccountSettings &account);
39 
40  void setListOfIncludeFile(const QStringList &listOfIncludeFile);
41  void setModified(bool b);
42 
43 Q_SIGNALS:
44  void checkSyntax();
45  void valueChanged(bool);
46  void okClicked();
47  void cancelClicked();
48 
49 protected:
50  bool event(QEvent *e) override;
51  void closeEvent(QCloseEvent *e) override;
52 
53 private:
54  void slotEnableButtonOk(bool b);
55  void slotAccepted();
56  void slotCanceled();
57  void writeConfig();
58  void readConfig();
59  std::unique_ptr<SieveEditorPrivate> const d;
60 };
61 }
62 
The SieveEditor class.
Definition: sieveeditor.h:19
The SieveImapAccountSettings class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 23:09:34 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.