Libksieve

sievecommonactioncondition.h
1 /*
2  SPDX-FileCopyrightText: 2020-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QObject>
10 namespace KSieveUi
11 {
12 class SieveImapAccountSettings;
13 class SieveEditorGraphicalModeWidget;
14 class SieveCommonActionCondition : public QObject
15 {
16  Q_OBJECT
17 public:
18  explicit SieveCommonActionCondition(SieveEditorGraphicalModeWidget *sieveGraphicalModeWidget,
19  const QString &name,
20  const QString &label,
21  QObject *parent = nullptr);
22  ~SieveCommonActionCondition() override;
23 
24  Q_REQUIRED_RESULT QString name() const;
25  Q_REQUIRED_RESULT QString label() const;
26 
27  Q_REQUIRED_RESULT virtual QString code(QWidget *parent) const;
28 
29  Q_REQUIRED_RESULT virtual QStringList needRequires(QWidget *parent) const;
30 
31  Q_REQUIRED_RESULT virtual bool needCheckIfServerHasCapability() const;
32 
33  Q_REQUIRED_RESULT virtual QString serverNeedsCapability() const;
34 
35  Q_REQUIRED_RESULT virtual QString help() const;
36  Q_REQUIRED_RESULT virtual QUrl href() const;
37 
38  virtual void unknownTag(const QStringRef &tag, QString &error);
39  virtual void unknownTagValue(const QString &tagValue, QString &error);
40  virtual void tooManyArguments(const QStringRef &tagName, int index, int maxValue, QString &error);
41  virtual void serverDoesNotSupportFeatures(const QString &feature, QString &error);
42 
43  Q_REQUIRED_RESULT QString comment() const;
44 
45  void setComment(const QString &comment);
46 
47  virtual QWidget *createParamWidget(QWidget *parent) const;
48 
49 protected:
50  Q_REQUIRED_RESULT KSieveUi::SieveImapAccountSettings sieveImapAccountSettings() const;
51  Q_REQUIRED_RESULT QStringList sieveCapabilities() const;
52  SieveEditorGraphicalModeWidget *const mSieveGraphicalModeWidget;
53 
54 Q_SIGNALS:
55  void valueChanged();
56 
57 private:
58  Q_DISABLE_COPY(SieveCommonActionCondition)
59  const QString mName;
60  const QString mLabel;
61  QString mComment;
62 };
63 }
64 
QString name(const QVariant &location)
Q_SIGNALSQ_SIGNALS
const QList< QKeySequence > & help()
Q_OBJECTQ_OBJECT
QString label(StandardShortcut id)
Q_DISABLE_COPY(Class)
The SieveImapAccountSettings class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 23:09:34 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.