Libksieve

vacationpagewidget.h
1/*
2 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-only
5*/
6
7#pragma once
8
9#include <QUrl>
10#include <QWidget>
11class QStackedWidget;
12namespace KManageSieve
13{
14}
15
16namespace KSieveCore
17{
18class SieveImapAccountSettings;
19class VacationCreateScriptJob;
20class MultiImapVacationManager;
21}
22namespace KSieveUi
23{
24class VacationEditWidget;
25class VacationWarningWidget;
26class VacationPageWidget : public QWidget
27{
29public:
30 explicit VacationPageWidget(QWidget *parent = nullptr);
31 ~VacationPageWidget() override;
32
33 void setServerUrl(const QUrl &url);
34 void setServerName(const QString &serverName);
35 [[nodiscard]] KSieveCore::VacationCreateScriptJob *writeScript(bool &errorFound);
36 void setDefault();
37 void setVacationManager(KSieveCore::MultiImapVacationManager *vacationManager);
38 void setSieveImapAccountSettings(const KSieveCore::SieveImapAccountSettings &account);
39
40 bool wasChanged() const;
41private Q_SLOTS:
42 void slotGetResult(const QString &serverName, const QStringList &sieveCapabilities, const QString &scriptName, const QString &script, bool active);
43
44private:
45 enum PageType : uint8_t {
46 Script = 0,
47 ScriptNotSupported = 1
48 };
49
50 QString mServerName;
51 QUrl mUrl;
52 QStackedWidget *mStackWidget = nullptr;
53 VacationEditWidget *mVacationEditWidget = nullptr;
54 VacationWarningWidget *mVacationWarningWidget = nullptr;
55 KSieveCore::MultiImapVacationManager *mVacationManager = nullptr;
56 PageType mPageScript = PageType::Script;
57 bool mWasActive = false;
58 bool mHasDateSupport = false;
59};
60}
The MultiImapVacationManager class.
The SieveImapAccountSettings class.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.