KIO

restorejob.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2014 David Faure <faure@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KIO_RESTOREJOB_H
9#define KIO_RESTOREJOB_H
10
11#include <QObject>
12#include <QUrl>
13
14#include "job_base.h"
15#include "kiocore_export.h"
16
17namespace KIO
18{
19class RestoreJobPrivate;
20/**
21 * @class KIO::RestoreJob restorejob.h <KIO/RestoreJob>
22 *
23 * RestoreJob is used to restore files from the trash.
24 * Don't create the job directly, but use KIO::restoreFromTrash().
25 *
26 * @see KIO::trash()
27 * @see KIO::copy()
28 * @since 5.2
29 */
30class KIOCORE_EXPORT RestoreJob : public Job
31{
32 Q_OBJECT
33
34public:
35 ~RestoreJob() override;
36
37 /**
38 * Returns the list of trash URLs to restore.
39 */
41
42Q_SIGNALS:
43
44protected Q_SLOTS:
45 void slotResult(KJob *job) override;
46
47protected:
48 KIOCORE_NO_EXPORT explicit RestoreJob(RestoreJobPrivate &dd);
49
50private:
51 Q_DECLARE_PRIVATE(RestoreJob)
52};
53
54/**
55 * Restore a set of trashed files or directories.
56 * @since 5.2
57 *
58 * @param urls the trash:/ URLs to restore. The trash implementation
59 * will know where the files came from and will restore them to their
60 * original location.
61 *
62 * @param flags restoreFromTrash() supports HideProgressInfo.
63 *
64 * @return the job handling the operation
65 */
66KIOCORE_EXPORT RestoreJob *restoreFromTrash(const QList<QUrl> &urls, JobFlags flags = DefaultFlags);
67
68}
69
70#endif
The base class for all jobs.
Definition job_base.h:45
RestoreJob is used to restore files from the trash.
Definition restorejob.h:31
QList< QUrl > trashUrls() const
Returns the list of trash URLs to restore.
A namespace for KIO globals.
KIOCORE_EXPORT RestoreJob * restoreFromTrash(const QList< QUrl > &urls, JobFlags flags=DefaultFlags)
Restore a set of trashed files or directories.
@ DefaultFlags
Show the progress info GUI, no Resume and no Overwrite.
Definition job_base.h:246
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:51 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.