Libksieve

sievecommonactioncondition.h
1/*
2 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QObject>
10namespace KSieveCore
11{
12class SieveImapAccountSettings;
13}
14namespace KSieveUi
15{
16class SieveEditorGraphicalModeWidget;
17class SieveCommonActionCondition : public QObject
18{
20public:
21 explicit SieveCommonActionCondition(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget,
22 const QString &name,
23 const QString &label,
24 QObject *parent = nullptr);
25 ~SieveCommonActionCondition() override;
26
27 [[nodiscard]] QString name() const;
28 [[nodiscard]] QString label() const;
29
30 [[nodiscard]] virtual QString code(QWidget *parent) const;
31
32 [[nodiscard]] virtual QStringList needRequires(QWidget *parent) const;
33
34 [[nodiscard]] virtual bool needCheckIfServerHasCapability() const;
35
36 [[nodiscard]] virtual QString serverNeedsCapability() const;
37
38 [[nodiscard]] virtual QString help() const;
39 [[nodiscard]] virtual QUrl href() const;
40
41 virtual void unknownTagValue(const QString &tagValue, QString &error);
42 virtual void unknownTag(const QStringView &tag, QString &error);
43 virtual void tooManyArguments(const QStringView &tagName, int index, int maxValue, QString &error);
44 virtual void serverDoesNotSupportFeatures(const QString &feature, QString &error);
45
46 [[nodiscard]] QString comment() const;
47
48 void setComment(const QString &comment);
49
50 virtual QWidget *createParamWidget(QWidget *parent) const;
51
52protected:
53 [[nodiscard]] KSieveCore::SieveImapAccountSettings sieveImapAccountSettings() const;
54 [[nodiscard]] QStringList sieveCapabilities() const;
55 SieveEditorGraphicalModeWidget *const mSieveGraphicalModeWidget;
56
58 void valueChanged();
59
60private:
61 Q_DISABLE_COPY(SieveCommonActionCondition)
62 const QString mName;
63 const QString mLabel;
64 QString mComment;
65};
66}
The SieveImapAccountSettings class.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
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.