QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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"
36 #include "qgspointcloudrequest.h"
38 
39 #define SIP_NO_FILE
40 
41 class 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:
54  QgsPointCloudStatsCalculator mCalculator;
55  QVector<QgsPointCloudAttribute> mAttributes;
56  qint64 mPointLimit;
57  QgsFeedback *mFeedback = nullptr;
58 };
59 
61 
62 #endif // QGSPOINTCLOUDSTATSCALCULATIONTASK_H
qgstaskmanager.h
QgsPointCloudStatistics
Class used to store statistics of a point cloud dataset.
Definition: qgspointcloudstatistics.h:61
QgsTask::cancel
virtual void cancel()
Notifies the task that it should terminate.
Definition: qgstaskmanager.cpp:91
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:44
QgsPointCloudStatsCalculator
Class used to calculate statistics of a point cloud dataset.
Definition: qgspointcloudstatscalculator.h:49
qgspointcloudstatscalculator.h
qgspointcloudindex.h
QgsPointCloudIndex
Represents a indexed point clouds data in octree.
Definition: qgspointcloudindex.h:163
qgspointcloudrequest.h
QgsTask::run
virtual bool run()=0
Performs the task's operation.
QgsTask
Abstract base class for long running background tasks. Tasks can be controlled directly,...
Definition: qgstaskmanager.h:54