Libksieve

sieveeditorgraphicalmodewidget.h
1 /*
2  SPDX-FileCopyrightText: 2013-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "ksieveui_private_export.h"
10 #include "sieveeditorgraphicalmodewidgetabstract.h"
11 #include "util/sieveimapaccountsettings.h"
12 class QSplitter;
13 class QStackedWidget;
14 
15 namespace KSieveUi
16 {
17 class SieveScriptPage;
18 class SieveScriptListBox;
19 class SieveEditorParsingMissingFeatureWarning;
20 class KSIEVEUI_TESTS_EXPORT SieveEditorGraphicalModeWidget : public SieveEditorGraphicalModeWidgetAbstract
21 {
22  Q_OBJECT
23 public:
24  explicit SieveEditorGraphicalModeWidget(QWidget *parent = nullptr);
25  ~SieveEditorGraphicalModeWidget() override;
26 
27  Q_REQUIRED_RESULT QString script(QStringList &required) const override;
28 
29  void setSieveCapabilities(const QStringList &capabilities) override;
30  Q_REQUIRED_RESULT QStringList sieveCapabilities() override;
31 
32  void loadScript(const QString &doc, QString &error) override;
33 
34  Q_REQUIRED_RESULT QString currentscript() override;
35  void setImportScript(const QString &) override;
36 
37  void setListOfIncludeFile(const QStringList &listOfIncludeFile) override;
38  Q_REQUIRED_RESULT QStringList listOfIncludeFile() const override;
39 
40 Q_SIGNALS:
41  void enableButtonOk(bool);
42  void switchTextMode(const QString &script);
43  void valueChanged();
44 
45 private:
46  void readConfig();
47  void writeConfig();
48 
49 private Q_SLOTS:
50  void slotSwitchToTextMode();
51  void slotAddScriptPage(KSieveUi::SieveScriptPage *page);
52  void slotRemoveScriptPage(QWidget *page);
53  void slotActivateScriptPage(QWidget *page);
54 
55 private:
56  QStringList mCapabilities;
57  QStringList mListOfIncludeFile;
58  SieveScriptListBox *mSieveScript = nullptr;
59  QStackedWidget *mStackWidget = nullptr;
60  QSplitter *mSplitter = nullptr;
61  SieveEditorParsingMissingFeatureWarning *mSieveParsingWarning = nullptr;
62 };
63 }
64 
void readConfig()
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.