KNewStuff

filecopyjob.h
1 /*
2  SPDX-FileCopyrightText: 2016 Dan Leinir Turthra Jensen <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6 
7 #ifndef FILECOPYJOB_H
8 #define FILECOPYJOB_H
9 
10 #include "jobbase.h"
11 
12 #include <QUrl>
13 
14 namespace KNSCore
15 {
16 
17 class FileCopyJob : public KJob
18 {
19  Q_OBJECT
20 public:
21 
22  explicit FileCopyJob(const QUrl& source, const QUrl& destination, int permissions=-1, JobFlags flags = DefaultFlags, QObject* parent = nullptr);
23  explicit FileCopyJob(QObject* parent = nullptr);
24  ~FileCopyJob() override;
25 
26  Q_SCRIPTABLE void start() override;
27 
28  QUrl destUrl() const;
29  QUrl srcUrl() const;
30 
31  // This will create either a FileCopyJob, or an instance of
32  // a subclass, depending on the nature of the URLs passed to
33  // it
34  static FileCopyJob* file_copy(const QUrl& source, const QUrl& destination, int permissions=-1, JobFlags flags = DefaultFlags, QObject* parent = nullptr);
35 
36 protected Q_SLOTS:
37  void handleProgressUpdate(qlonglong current, qlonglong total);
38  void handleCompleted();
39 private:
40  class Private;
41  Private* d;
42 };
43 
44 }
45 
46 #endif//FILECOPYJOB_H
47 
Contains the core functionality for handling interaction with NewStuff providers. ...
KIOCORE_EXPORT FileCopyJob * file_copy(const QUrl &src, const QUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 22:43:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.