Libksieve

vacationpagewidget.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 <QUrl>
10 #include <QWidget>
11 class QStackedWidget;
12 namespace KManageSieve
13 {
14 }
15 
16 namespace KSieveUi
17 {
18 class VacationEditWidget;
19 class VacationWarningWidget;
20 class VacationCreateScriptJob;
21 class MultiImapVacationManager;
22 class SieveImapAccountSettings;
23 class VacationPageWidget : public QWidget
24 {
25  Q_OBJECT
26 public:
27  explicit VacationPageWidget(QWidget *parent = nullptr);
28  ~VacationPageWidget() override;
29 
30  void setServerUrl(const QUrl &url);
31  void setServerName(const QString &serverName);
32  Q_REQUIRED_RESULT KSieveUi::VacationCreateScriptJob *writeScript(bool &errorFound);
33  void setDefault();
34  void setVacationManager(MultiImapVacationManager *vacationManager);
35  void setSieveImapAccountSettings(const KSieveUi::SieveImapAccountSettings &account);
36 
37  bool wasChanged() const;
38 private Q_SLOTS:
39  void slotGetResult(const QString &serverName, const QStringList &sieveCapabilities, const QString &scriptName, const QString &script, bool active);
40 
41 private:
42  enum PageType { Script = 0, ScriptNotSupported = 1 };
43 
44  QString mServerName;
45  QUrl mUrl;
46  QStackedWidget *mStackWidget = nullptr;
47  VacationEditWidget *mVacationEditWidget = nullptr;
48  VacationWarningWidget *mVacationWarningWidget = nullptr;
49  MultiImapVacationManager *mVacationManager = nullptr;
50  PageType mPageScript = Script;
51  bool mWasActive = false;
52  bool mHasDateSupport = false;
53 };
54 }
55 
The SieveImapAccountSettings class.
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.