Libksieve

sievetemplateeditdialog.h
1 /*
2  SPDX-FileCopyrightText: 2013-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QDialog>
10 
11 class QLineEdit;
12 class QPushButton;
13 
14 namespace KSieveUi
15 {
16 class SieveTextEditWidget;
17 class SieveTemplateEditDialog : public QDialog
18 {
19  Q_OBJECT
20 public:
21  explicit SieveTemplateEditDialog(QWidget *parent = nullptr, bool defaultTemplate = false);
22  ~SieveTemplateEditDialog() override;
23 
24  void setTemplateName(const QString &name);
25  Q_REQUIRED_RESULT QString templateName() const;
26 
27  void setScript(const QString &);
28  Q_REQUIRED_RESULT QString script() const;
29  void setSieveCapabilities(const QStringList &capabilities);
30 
31 private:
32  void slotTemplateChanged();
33  void readConfig();
34  void writeConfig();
35  SieveTextEditWidget *mTextEditWidget = nullptr;
36  QLineEdit *mTemplateNameEdit = nullptr;
37  QPushButton *mOkButton = nullptr;
38 };
39 }
40 
Q_OBJECTQ_OBJECT
void readConfig()
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.