QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
Loading...
Searching...
No Matches
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:
35 QgsCopyFileTask( const QString &source, const QString &destination );
36
37 bool run() override;
38
42 const QString &errorString() const;
43
48 const QString &destination() const;
49
50 private:
51 QString mSource;
52 QString mDestination;
53 QString mErrorString;
54};
55
56#endif // QGSSIMPLECOPYEXTERNALSTORAGE_H
const QString & destination() const
It could be different from the original one.
const QString & errorString() const
Returns errorString if an error occurred, else returns an empty QString.
QgsCopyFileTask(const QString &source, const QString &destination)
Creates a task that copy source file to destination.
virtual bool run()=0
Performs the task's operation.
QgsTask(const QString &description=QString(), QgsTask::Flags flags=AllFlags)
Constructor for QgsTask.