Libksieve

renamescriptjob.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 
18 namespace KSieveUi
19 {
20 class RenameScriptJobPrivate;
21 /**
22  * @brief The RenameScriptJob class
23  * @author Laurent Montel <[email protected]>
24  */
25 class KSIEVEUI_EXPORT RenameScriptJob : public QObject
26 {
27  Q_OBJECT
28 public:
29  explicit RenameScriptJob(QObject *parent = nullptr);
30  ~RenameScriptJob() override;
31 
32  void setOldUrl(const QUrl &url);
33  void setIsActive(bool active);
34  void setNewName(const QString &newName);
35 
36  Q_REQUIRED_RESULT bool canStart() const;
37 
38  void start();
39 
40 Q_SIGNALS:
41  void finished(const QUrl &oldUrl, const QUrl &newUrl, const QString &error, bool success);
42 
43 private Q_SLOTS:
44  void slotDeleteResult(KManageSieve::SieveJob *job, bool success);
45  void slotPutScript(KManageSieve::SieveJob *job, bool success);
46  void slotGetResult(KManageSieve::SieveJob *job, bool success, const QString &script, bool isActive);
47 
48 private:
49  Q_DISABLE_COPY(RenameScriptJob)
50  std::unique_ptr<RenameScriptJobPrivate> const d;
51 };
52 }
The RenameScriptJob 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 Thu Apr 15 2021 23:09:37 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.