Libksieve

managesievescriptsdialog.h
1 /*
2  SPDX-FileCopyrightText: 2013-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 #pragma once
8 
9 #include "ksieveui/managesievewidget.h"
10 #include "ksieveui_export.h"
11 #include <QDialog>
12 #include <memory>
13 
14 class QTreeWidgetItem;
15 
16 namespace KManageSieve
17 {
18 class SieveJob;
19 }
20 
21 namespace KSieveUi
22 {
23 class SieveEditor;
24 class ManageSieveScriptsDialogPrivate;
25 class SieveImapPasswordProvider;
26 /**
27  * @brief The ManageSieveScriptsDialog class
28  * @author Laurent Montel <[email protected]>
29  */
30 class KSIEVEUI_EXPORT ManageSieveScriptsDialog : public QDialog
31 {
32  Q_OBJECT
33 
34 public:
35  explicit ManageSieveScriptsDialog(SieveImapPasswordProvider *passwordProvider, QWidget *parent = nullptr);
36  ~ManageSieveScriptsDialog() override;
37 
38 Q_SIGNALS:
39  void finished();
40 
41 protected:
42  void hideEvent(QHideEvent *) override;
43 
44 private:
45  void slotGetResult(KManageSieve::SieveJob *, bool, const QString &, bool);
46  void slotPutResult(KManageSieve::SieveJob *job, bool);
47 
48  void slotSieveEditorOkClicked();
49  void slotSieveEditorCancelClicked();
50  void slotSieveEditorCheckSyntaxClicked();
51  void slotUpdateButtons(QTreeWidgetItem *item);
52  void slotEditScript(const ManageSieveWidget::ScriptInfo &info);
53  void slotNewScript(const ManageSieveWidget::ScriptInfo &info);
54  void slotCheckScriptFinished(const QString &errorMsg, bool success);
55 
56  void updateButtons(QTreeWidgetItem *item);
57  void disableManagerScriptsDialog(bool disable);
58 
59 private:
60  std::unique_ptr<ManageSieveScriptsDialogPrivate> const d;
61 };
62 }
63 
The ManageSieveScriptsDialog class.
The SieveImapPasswordProvider class.
A job to manage sieve scripts.
Definition: sievejob.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Apr 11 2021 23:09:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.