Libksieve

checkscriptjob.h
1 /*
2  SPDX-FileCopyrightText: 2016-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 #pragma once
8 
9 #include "ksieveui_export.h"
10 #include <QObject>
11 #include <QUrl>
12 #include <memory>
13 namespace KManageSieve
14 {
15 class SieveJob;
16 }
17 namespace KSieveUi
18 {
19 class CheckScriptJobPrivate;
20 /**
21  * @brief The CheckScriptJob class
22  * @author Laurent Montel <[email protected]>
23  */
24 class KSIEVEUI_EXPORT CheckScriptJob : public QObject
25 {
26  Q_OBJECT
27 public:
28  explicit CheckScriptJob(QObject *parent = nullptr);
29  ~CheckScriptJob() override;
30 
31  void setOriginalScript(const QString &script);
32  void setCurrentScript(const QString &script);
33  void setUrl(const QUrl &url);
34  void setIsActive(bool active);
35 
36  Q_REQUIRED_RESULT bool canStart() const;
37  void start();
38 
39 Q_SIGNALS:
40  void finished(const QString &msg, bool success);
41 
42 private:
43  Q_DISABLE_COPY(CheckScriptJob)
44  void slotPutCheckSyntaxResult(KManageSieve::SieveJob *job, bool success);
45  void slotRestoreFile(KManageSieve::SieveJob *job, bool success);
46  std::unique_ptr<CheckScriptJobPrivate> const d;
47 };
48 }
The CheckScriptJob class.
A job to manage sieve scripts.
Definition: sievejob.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Apr 16 2021 23:09:33 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.