QGIS API Documentation
3.0.2-Girona (307d082)
src
core
processing
qgsprocessingalgrunnertask.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsprocessingalgrunnertask.h
3
------------------------
4
begin : May 2017
5
copyright : (C) 2017 by Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSPROCESSINGALGRUNNERTASK_H
19
#define QGSPROCESSINGALGRUNNERTASK_H
20
21
#include "qgis_core.h"
22
#include "
qgis.h
"
23
#include "
qgstaskmanager.h
"
24
#include "
qgsprocessingfeedback.h
"
25
#include "
qgsprocessingalgorithm.h
"
26
27
class
QgsProcessingContext
;
28
35
class
CORE_EXPORT
QgsProcessingAlgRunnerTask
:
public
QgsTask
36
{
37
Q_OBJECT
38
39
public
:
40
45
QgsProcessingAlgRunnerTask
(
const
QgsProcessingAlgorithm
*algorithm,
46
const
QVariantMap ¶meters,
47
QgsProcessingContext
&context,
48
QgsProcessingFeedback
*feedback =
nullptr
);
49
50
void
cancel
()
override
;
51
52
signals:
53
59
void
executed(
bool
successful,
const
QVariantMap &results );
60
61
protected
:
62
63
bool
run
()
override
;
64
void
finished
(
bool
result )
override
;
65
66
private
:
67
68
QVariantMap mParameters;
69
QVariantMap mResults;
70
QgsProcessingContext
&mContext;
71
QgsProcessingFeedback
*mFeedback =
nullptr
;
72
std::unique_ptr< QgsProcessingFeedback > mOwnedFeedback;
73
std::unique_ptr< QgsProcessingAlgorithm > mAlgorithm;
74
75
};
76
77
#endif // QGSPROCESSINGALGRUNNERTASK_H
78
79
QgsProcessingFeedback
Base class for providing feedback from a processing algorithm.
Definition:
qgsprocessingfeedback.h:35
QgsProcessingAlgorithm
Abstract base class for processing algorithms.
Definition:
qgsprocessingalgorithm.h:51
qgsprocessingfeedback.h
qgsprocessingalgorithm.h
QgsTask
Abstract base class for long running background tasks.
Definition:
qgstaskmanager.h:53
QgsTask::cancel
virtual void cancel()
Notifies the task that it should terminate.
Definition:
qgstaskmanager.cpp:71
QgsTask::finished
virtual void finished(bool result)
If the task is managed by a QgsTaskManager, this will be called after the task has finished (whether ...
Definition:
qgstaskmanager.h:263
QgsTask::run
virtual bool run()=0
Performs the task's operation.
qgis.h
QgsProcessingAlgRunnerTask
QgsTask task which runs a QgsProcessingAlgorithm in a background task.
Definition:
qgsprocessingalgrunnertask.h:35
qgstaskmanager.h
QgsProcessingContext
Contains information about the context in which a processing algorithm is executed.
Definition:
qgsprocessingcontext.h:40
Generated on Sat Apr 21 2018 11:45:00 for QGIS API Documentation by
1.8.13