Libksieve

sieveeditor.h
1 /* Copyright (c) 2011-2020 Laurent Montel <[email protected]>
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Library General Public
5  * License as published by the Free Software Foundation; either
6  * version 2 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Library General Public License for more details.
12  *
13  * You should have received a copy of the GNU Library General Public License
14  * along with this library; see the file COPYING.LIB. If not, write to
15  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  * Boston, MA 02110-1301, USA.
17  */
18 
19 #ifndef KSIEVE_KSIEVEUI_SIEVEEDITOR_H
20 #define KSIEVE_KSIEVEUI_SIEVEEDITOR_H
21 
22 #include "ksieveui_export.h"
23 
24 #include <QDialog>
25 namespace KSieveUi {
26 class SieveEditorPrivate;
27 class SieveImapAccountSettings;
32 class KSIEVEUI_EXPORT SieveEditor : public QDialog
33 {
34  Q_OBJECT
35 public:
36  explicit SieveEditor(QWidget *parent = nullptr);
37  ~SieveEditor() override;
38 
39  QString script() const;
40  QString originalScript() const;
41  void setScript(const QString &script, bool clearUndoRedo = false);
42  void setDebugScript(const QString &debug);
43  void addFailedMessage(const QString &err);
44  void addOkMessage(const QString &msg);
45  void addNormalMessage(const QString &msg);
46  void setScriptName(const QString &name);
47 
48  void resultDone();
49 
50  void setSieveCapabilities(const QStringList &capabilities);
51  void setSieveImapAccountSettings(const KSieveUi::SieveImapAccountSettings &account);
52 
53  void setListOfIncludeFile(const QStringList &listOfIncludeFile);
54  void setModified(bool b);
55 
56 Q_SIGNALS:
57  void checkSyntax();
58  void valueChanged(bool);
59  void okClicked();
60  void cancelClicked();
61 
62 protected:
63  bool event(QEvent *e) override;
64  void closeEvent(QCloseEvent *e) override;
65 private:
66  void slotEnableButtonOk(bool b);
67  void slotAccepted();
68  void slotCanceled();
69  void writeConfig();
70  void readConfig();
71  SieveEditorPrivate *const d;
72 };
73 }
74 
75 #endif
The SieveEditor class.
Definition: sieveeditor.h:32
The SieveImapAccountSettings class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 11 2020 23:08:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.