Libksieve

renamescriptjob.h
1/*
2 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-only
5*/
6
7#pragma once
8
9#include "ksievecore_export.h"
10#include <QObject>
11#include <QUrl>
12#include <memory>
13namespace KManageSieve
14{
15class SieveJob;
16}
17
18namespace KSieveCore
19{
20class RenameScriptJobPrivate;
21/**
22 * @brief The RenameScriptJob class
23 * @author Laurent Montel <montel@kde.org>
24 */
25class KSIEVECORE_EXPORT RenameScriptJob : public QObject
26{
27 Q_OBJECT
28public:
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 [[nodiscard]] bool canStart() const;
37
38 void start();
39
40Q_SIGNALS:
41 void finished(const QUrl &oldUrl, const QUrl &newUrl, const QString &error, bool success);
42
43private Q_SLOTS:
44 KSIEVECORE_NO_EXPORT void slotDeleteResult(KManageSieve::SieveJob *job, bool success);
45 KSIEVECORE_NO_EXPORT void slotPutScript(KManageSieve::SieveJob *job, bool success);
46 KSIEVECORE_NO_EXPORT void slotGetResult(KManageSieve::SieveJob *job, bool success, const QString &script, bool isActive);
47
48private:
49 Q_DISABLE_COPY(RenameScriptJob)
50 std::unique_ptr<RenameScriptJobPrivate> const d;
51};
52}
A job to manage sieve scripts.
Definition sievejob.h:31
The RenameScriptJob class.
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 10 2024 11:44:49 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.