MailCommon::BackupJob Class
class MailCommon::BackupJob| Header: | #include <MailCommon/BackupJob> |
| CMake: | find_package(KPim6MailCommon REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::MailCommon) |
| Inherits: | QObject |
Public Functions
| BackupJob(QWidget *parent = nullptr) | |
| virtual | ~BackupJob() override |
| void | setArchiveType(MailCommon::BackupJob::ArchiveType type) |
| void | setDeleteFoldersAfterCompletion(bool deleteThem) |
| void | setDisplayMessageBox(bool display) |
| void | setRealPath(const QString &path) |
| void | setRecursive(bool recursive) |
| void | setRootFolder(const Akonadi::Collection &rootFolder) |
| void | setSaveLocation(const QUrl &savePath) |
| void | start() |
Signals
| void | backupDone(const QString &message) |
| void | error(const QString &message) |
Detailed Description
Writes an entire folder structure to an archive file. The archive is structured like a hierarchy of maildir folders. However, every type of folder works as the source, i.e. also online IMAP folders.
The job deletes itself after it finished.
Member Function Documentation
[explicit] BackupJob::BackupJob(QWidget *parent = nullptr)
Constructs a backup job.
parent The parent widget
[override virtual noexcept] BackupJob::~BackupJob()
Destroys the backup job.
[signal] void BackupJob::backupDone(const QString &message)
Emitted when the backup has completed successfully.
message A message describing the backup completion
[signal] void BackupJob::error(const QString &message)
Emitted when an error occurs during the backup.
message A message describing the error
void BackupJob::setArchiveType(MailCommon::BackupJob::ArchiveType type)
Sets the type of archive to create.
type The archive type (Zip, Tar, TarBz2, or TarGz)
void BackupJob::setDeleteFoldersAfterCompletion(bool deleteThem)
Sets whether to delete folders after the backup is complete.
deleteThem Whether to delete folders after backup
void BackupJob::setDisplayMessageBox(bool display)
Sets whether to display a message box when the backup is complete.
display Whether to display completion message
void BackupJob::setRealPath(const QString &path)
Sets the real path of the folder to backup.
path The real path to backup
void BackupJob::setRecursive(bool recursive)
Sets whether to backup recursively (all subfolders).
recursive Whether to backup recursively
void BackupJob::setRootFolder(const Akonadi::Collection &rootFolder)
Sets the root folder to backup.
rootFolder The root collection to backup
void BackupJob::setSaveLocation(const QUrl &savePath)
Sets the location to save the backup archive.
savePath The path where the archive should be saved
void BackupJob::start()
Starts the backup job.