QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
qgscopyfiletask.h
Go to the documentation of this file.
1/***************************************************************************
2 qgscopyfiletask.h
3 --------------------------------------
4 Date : March 2021
5 Copyright : (C) 2021 by Julien Cabieces
6 Email : julien dot cabieces at oslandia dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSCOPYFILETASK_H
17#define QGSCOPYFILETASK_H
18
19#include "qgstaskmanager.h"
20
27class CORE_EXPORT QgsCopyFileTask : public QgsTask
28{
29 Q_OBJECT
30
31 public:
32
36 QgsCopyFileTask( const QString &source, const QString &destination );
37
38 bool run() override;
39
43 const QString &errorString() const;
44
49 const QString &destination() const;
50
51 private:
52
53 QString mSource;
54 QString mDestination;
55 QString mErrorString;
56};
57
58#endif // QGSSIMPLECOPYEXTERNALSTORAGE_H
Task to copy a file on disk.
Abstract base class for long running background tasks.
virtual bool run()=0
Performs the task's operation.