KSieveCore::RenameScriptJob Class

The RenameScriptJob class Author: Laurent Montel <montel@kde.org>. More...

Header: #include <KSieveCore/RenameScriptJob>
CMake: find_package(KPim6KSieveCore REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::KSieveCore)
Inherits: QObject

Public Functions

RenameScriptJob(QObject *parent = nullptr)
virtual ~RenameScriptJob() override
bool canStart() const
void setIsActive(bool active)
void setNewName(const QString &newName)
void setOldUrl(const QUrl &url)
void start()

Signals

void finished(const QUrl &oldUrl, const QUrl &newUrl, const QString &error, bool success)

Private Slots

void slotDeleteResult(KManageSieve::SieveJob *job, bool success)
void slotGetResult(KManageSieve::SieveJob *job, bool success, const QString &script, bool isActive)
void slotPutScript(KManageSieve::SieveJob *job, bool success)

Detailed Description

Member Function Documentation

[explicit] RenameScriptJob::RenameScriptJob(QObject *parent = nullptr)

Constructs a RenameScriptJob with the given parent object. parent The parent object.

[override virtual noexcept] RenameScriptJob::~RenameScriptJob()

Destroys the RenameScriptJob.

bool RenameScriptJob::canStart() const

Checks if the job has all required information to start. Returns true if the job can be started.

[signal] void RenameScriptJob::finished(const QUrl &oldUrl, const QUrl &newUrl, const QString &error, bool success)

Emitted when the rename operation completes. oldUrl The original script URL. newUrl The new script URL after renaming. error Error message if the operation failed. success true if the rename succeeded.

void RenameScriptJob::setIsActive(bool active)

Sets whether the script is currently active. active true if the script is active.

void RenameScriptJob::setNewName(const QString &newName)

Sets the new name for the script. newName The new script name.

void RenameScriptJob::setOldUrl(const QUrl &url)

Sets the original URL of the script to rename. url The old script URL.

[private slot] void RenameScriptJob::slotDeleteResult(KManageSieve::SieveJob *job, bool success)

[private slot] void RenameScriptJob::slotGetResult(KManageSieve::SieveJob *job, bool success, const QString &script, bool isActive)

[private slot] void RenameScriptJob::slotPutScript(KManageSieve::SieveJob *job, bool success)

void RenameScriptJob::start()

Starts the script rename job.