QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
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 <QObject>
33
34#include "qgstaskmanager.h"
35#include "qgspointcloudindex.h"
38
39#define SIP_NO_FILE
40
41class QgsPointCloudStatsCalculationTask : public QgsTask
42{
43 Q_OBJECT
44
45 public:
46 QgsPointCloudStatsCalculationTask( QgsPointCloudIndex *index, const QVector<QgsPointCloudAttribute> &attributes, qint64 pointLimit );
47
48 bool run() override;
49
50 void cancel() override;
51
52 QgsPointCloudStatistics calculationResults() const;
53 private:
55 QVector<QgsPointCloudAttribute> mAttributes;
56 qint64 mPointLimit;
57 QgsFeedback *mFeedback = nullptr;
58};
59
61
62#endif // QGSPOINTCLOUDSTATSCALCULATIONTASK_H
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:45
Represents a indexed point clouds data in octree.
Class used to store statistics of a point cloud dataset.
Class used to calculate statistics of a point cloud dataset.
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.