Libksieve

sieveeditorgraphicalmodewidget.h
1/*
2 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
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"
12class QSplitter;
13class QStackedWidget;
14
15namespace KSieveUi
16{
17class SieveScriptPage;
18class SieveScriptListBox;
19class SieveEditorParsingMissingFeatureWarning;
20class KSIEVEUI_TESTS_EXPORT SieveEditorGraphicalModeWidget : public SieveEditorGraphicalModeWidgetAbstract
21{
22 Q_OBJECT
23public:
24 explicit SieveEditorGraphicalModeWidget(QWidget *parent = nullptr);
25 ~SieveEditorGraphicalModeWidget() override;
26
27 [[nodiscard]] QString script(QStringList &required) const override;
28
29 void setSieveCapabilities(const QStringList &capabilities) override;
30 [[nodiscard]] QStringList sieveCapabilities() override;
31
32 void loadScript(const QString &doc, QString &error) override;
33
34 [[nodiscard]] QString currentscript() override;
35 void setImportScript(const QString &) override;
36
37 void setListOfIncludeFile(const QStringList &listOfIncludeFile) override;
38 [[nodiscard]] QStringList listOfIncludeFile() const override;
39
40Q_SIGNALS:
41 void enableButtonOk(bool);
42 void switchTextMode(const QString &script);
43 void valueChanged();
44
45private:
46 void readConfig();
47 void writeConfig();
48
49private Q_SLOTS:
50 void slotSwitchToTextMode();
51 void slotAddScriptPage(KSieveUi::SieveScriptPage *page);
52 void slotRemoveScriptPage(QWidget *page);
53 void slotActivateScriptPage(QWidget *page);
54
55private:
56 QStringList mCapabilities;
57 QStringList mListOfIncludeFile;
58 SieveScriptListBox *const mSieveScript;
59 QStackedWidget *mStackWidget = nullptr;
60 QSplitter *const mSplitter;
61 SieveEditorParsingMissingFeatureWarning *mSieveParsingWarning = nullptr;
62};
63}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.