Libksieve

sieveeditor.h
1/* SPDX-FileCopyrightText: 2011-2024 Laurent Montel <montel@kde.org>
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>
11namespace KSieveCore
12{
13class SieveImapAccountSettings;
14}
15namespace KSieveUi
16{
17class SieveEditorPrivate;
18/**
19 * @brief The SieveEditor class
20 * @author Laurent Montel <montel@kde.org>
21 */
22class KSIEVEUI_EXPORT SieveEditor : public QDialog
23{
24 Q_OBJECT
25public:
26 explicit SieveEditor(QWidget *parent = nullptr);
27 ~SieveEditor() override;
28
29 [[nodiscard]] QString script() const;
30 [[nodiscard]] QString originalScript() const;
31 void setScript(const QString &script, bool clearUndoRedo = false);
32 void setDebugScript(const QString &debug);
33 void addFailedMessage(const QString &err);
34 void addOkMessage(const QString &msg);
35 void addNormalMessage(const QString &msg);
36 void setScriptName(const QString &name);
37
38 void resultDone();
39
40 void setSieveCapabilities(const QStringList &capabilities);
41 void setSieveImapAccountSettings(const KSieveCore::SieveImapAccountSettings &account);
42
43 void setListOfIncludeFile(const QStringList &listOfIncludeFile);
44 void setModified(bool b);
45
46Q_SIGNALS:
47 void checkSyntax();
48 void valueChanged(bool);
49 void okClicked();
50 void cancelClicked();
51
52protected:
53 bool event(QEvent *e) override;
54 void closeEvent(QCloseEvent *e) override;
55
56private:
57 KSIEVEUI_NO_EXPORT void slotEnableButtonOk(bool b);
58 KSIEVEUI_NO_EXPORT void slotAccepted();
59 KSIEVEUI_NO_EXPORT void slotCanceled();
60 KSIEVEUI_NO_EXPORT void writeConfig();
61 KSIEVEUI_NO_EXPORT void readConfig();
62 std::unique_ptr<SieveEditorPrivate> const d;
63};
64}
The SieveImapAccountSettings class.
The SieveEditor class.
Definition sieveeditor.h:23
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.