QGIS API Documentation 3.99.0-Master (a8f284845db)
Loading...
Searching...
No Matches
qgspointcloudstatscalculationtask.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspointcloudstatscalculationtask.h
3 --------------------
4 begin : April 2022
5 copyright : (C) 2022 by Belgacem Nedjima
6 email : belgacem dot nedjima 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 QGSPOINTCLOUDSTATSCALCULATIONTASK_H
19#define QGSPOINTCLOUDSTATSCALCULATIONTASK_H
20
22
23//
24// W A R N I N G
25// -------------
26//
27// This file is not part of the QGIS API. It exists purely as an
28// implementation detail. This header file may change from version to
29// version without notice, or even be removed.
30//
31
32#include "qgspointcloudindex.h"
34#include "qgstaskmanager.h"
35
36#include <QObject>
37
38#define SIP_NO_FILE
39
40class QgsPointCloudStatsCalculationTask : public QgsTask
41{
42 Q_OBJECT
43
44 public:
45 QgsPointCloudStatsCalculationTask( QgsPointCloudIndex index, const QVector<QgsPointCloudAttribute> &attributes, qint64 pointLimit );
46
47 bool run() override;
48
49 void cancel() override;
50
51 QgsPointCloudStatistics calculationResults() const;
52 private:
53 QgsPointCloudStatsCalculator mCalculator;
54 QVector<QgsPointCloudAttribute> mAttributes;
55 qint64 mPointLimit;
56 QgsFeedback *mFeedback = nullptr;
57};
58
60
61#endif // QGSPOINTCLOUDSTATSCALCULATIONTASK_H
Abstract base class for long running background tasks.
virtual bool run()=0
Performs the task's operation.
virtual void cancel()
Notifies the task that it should terminate.