9#include "sievewidgetpageabstract.h"
10#include <Libkdepim/KWidgetLister>
20class IncludeFileLineEdit;
21class SieveIncludeLocation :
public QComboBox
26 ~SieveIncludeLocation()
override;
28 [[nodiscard]] QString code()
const;
29 void setCode(
const QString &code, QString &error);
38class SieveIncludeActionWidget :
public QWidget
43 ~SieveIncludeActionWidget()
override;
45 void generatedScript(QString &script);
46 void updateAddRemoveButton(
bool addButtonEnabled,
bool removeButtonEnabled);
47 void loadScript(QXmlStreamReader &element, QString &error);
48 [[nodiscard]]
bool isInitialized()
const;
50 void setListOfIncludeFile(
const QStringList &listOfIncludeFile);
54 void slotRemoveWidget();
63 QPushButton *mAdd =
nullptr;
64 QPushButton *mRemove =
nullptr;
65 QGridLayout *mLayout =
nullptr;
66 QCheckBox *mOptional =
nullptr;
67 QCheckBox *mOnce =
nullptr;
68 SieveIncludeLocation *mLocation =
nullptr;
69 IncludeFileLineEdit *mIncludeFileName =
nullptr;
72class SieveIncludeWidgetLister :
public KPIM::KWidgetLister
77 ~SieveIncludeWidgetLister()
override;
79 void generatedScript(QString &script, QStringList &requireModules);
80 void loadScript(QXmlStreamReader &element, QString &error);
82 void setListOfIncludeFile(
const QStringList &listOfIncludeFile);
89 void slotRemoveWidget(
QWidget *w);
92 void clearWidget(
QWidget *aWidget)
override;
96 void reconnectWidget(SieveIncludeActionWidget *w);
97 void updateAddRemoveButton();
98 QStringList mListOfIncludeFile;
101class SieveIncludeWidget :
public SieveWidgetPageAbstract
106 ~SieveIncludeWidget()
override;
108 void generatedScript(QString &script, QStringList &requireModules,
bool inForEveryPartLoop)
override;
110 void loadScript(QXmlStreamReader &element, QString &error);
112 void setListOfIncludeFile(
const QStringList &lst);
117 SieveIncludeWidgetLister *mIncludeLister =
nullptr;
118 SieveHelpButton *mHelpButton =
nullptr;
QObject * parent() const const