Libksieve

sievedebugdialog.h
1 /*
2  sievedebugdialog.h
3 
4  SPDX-FileCopyrightText: 2005 Martijn Klingens <[email protected]>
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
8 
9 #pragma once
10 
11 #include "ksieveui_export.h"
12 #include "util_p.h"
13 
14 #include <KSyntaxHighlighting/Repository>
15 #include <QDialog>
16 #include <QUrl>
17 
18 #include <QStringList>
19 
20 namespace KManageSieve
21 {
22 class SieveJob;
23 }
24 namespace KPIMTextEdit
25 {
26 class PlainTextEditorWidget;
27 }
28 namespace KSieveUi
29 {
30 class SieveImapPasswordProvider;
31 
32 /**
33  * Diagnostic info for Sieve. Only compiled when debug is enabled, it is
34  * not useful enough for non-developers to have this in releases.
35  */
36 class KSIEVEUI_EXPORT SieveDebugDialog : public QDialog
37 {
38  Q_OBJECT
39 public:
40  explicit SieveDebugDialog(SieveImapPasswordProvider *passwordProvider, QWidget *parent = nullptr);
41  ~SieveDebugDialog() override;
42 
43 Q_SIGNALS:
44  void result(bool success);
45 
46 private Q_SLOTS:
47  void slotGetScript(KManageSieve::SieveJob *job, bool success, const QString &script, bool active);
48  void slotGetScriptList(KManageSieve::SieveJob *job, bool success, const QStringList &scriptList, const QString &activeScript);
49 
50  void slotDiagNextAccount();
51  void slotDiagNextScript();
52 
53  void slotShutDownJob();
54 
55 private:
56  void slotFindAccountInfoFinished(const KSieveUi::Util::AccountInfo &info);
57  void slotFindAccountInfoForScriptFinished(const KSieveUi::Util::AccountInfo &info);
58  void writeConfig();
59  void readConfig();
60  KManageSieve::SieveJob *mSieveJob = nullptr;
61  QUrl mUrl;
63 
64  SieveImapPasswordProvider *const mPasswordProvider;
65  KPIMTextEdit::PlainTextEditorWidget *mEdit = nullptr;
66  QStringList mResourceIdentifier;
67  QStringList mScriptList;
68  QTimer *mShutDownJob = nullptr;
69 };
70 }
71 
Diagnostic info for Sieve.
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.