Libksieve

sievescriptdebuggerfrontendwidget.h
1 /*
2  SPDX-FileCopyrightText: 2015-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 <QWidget>
11 
12 namespace KPIMTextEdit
13 {
14 class PlainTextEditorWidget;
15 }
16 class KUrlRequester;
17 class QProcess;
18 class QLineEdit;
19 class QSplitter;
20 namespace KSieveUi
21 {
22 class SieveTextEditWidget;
23 class SieveScriptDebuggerWarning;
24 class KSIEVEUI_TESTS_EXPORT SieveScriptDebuggerFrontEndWidget : public QWidget
25 {
26  Q_OBJECT
27 public:
28  explicit SieveScriptDebuggerFrontEndWidget(QWidget *parent = nullptr);
29  ~SieveScriptDebuggerFrontEndWidget() override;
30 
31  Q_REQUIRED_RESULT QString script() const;
32  void setScript(const QString &script);
33  Q_REQUIRED_RESULT bool canAccept() const;
34 
35  Q_REQUIRED_RESULT QList<int> splitterSizes() const;
36  void setSplitterSizes(const QList<int> &sizes);
37 
38 Q_SIGNALS:
39  void scriptTextChanged();
40  void debugScriptButtonClicked();
41  void debugButtonEnabled(bool state);
42 
43 private Q_SLOTS:
44  void slotDebugScript();
45  void slotEmailChanged(const QString &text);
46  void slotReadStandardOutput();
47  void slotReadErrorOutput();
48  void slotDebugFinished();
49  void slotScriptTextChanged();
50 
51 private:
52  void updateDebugButton();
53  KSieveUi::SieveTextEditWidget *mSieveTextEditWidget = nullptr;
54  KSieveUi::SieveScriptDebuggerWarning *mSieveScriptDebuggerWarning = nullptr;
55  KPIMTextEdit::PlainTextEditorWidget *mSieveTestResult = nullptr;
56  KUrlRequester *mEmailPath = nullptr;
57  QProcess *mProcess = nullptr;
58  QLineEdit *mExtension = nullptr;
59  QSplitter *mSplitter = nullptr;
60 };
61 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Apr 11 2021 23:09:37 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.