QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsAbstractProfileGenerator Class Referenceabstract

Abstract base class for objects which generate elevation profiles. More...

#include <qgsabstractprofilegenerator.h>

Inheritance diagram for QgsAbstractProfileGenerator:
Inheritance graph
[legend]

Public Member Functions

virtual ~QgsAbstractProfileGenerator ()
 
virtual QgsFeedbackfeedback () const =0
 Access to feedback object of the generator (may be nullptr)
 
virtual Qgis::ProfileGeneratorFlags flags () const
 Returns flags which reflect how the profile generator operates.
 
virtual bool generateProfile (const QgsProfileGenerationContext &context=QgsProfileGenerationContext())=0
 Generate the profile (based on data stored in the class).
 
virtual QString sourceId () const =0
 Returns a unique identifier representing the source of the profile.
 
virtual QgsAbstractProfileResultstakeResults ()=0
 Takes results from the generator.
 

Detailed Description

Abstract base class for objects which generate elevation profiles.

The generation is typically done in a background thread, so it is necessary to keep all structures required for generating the profile away from the original profile source because it may change at any time.

Because the data needs to be copied (to avoid the need for locking), it is highly desirable to use copy-on-write where possible. This way, the overhead of copying (both memory and CPU) will be kept low. Qt containers and various Qt classes use implicit sharing.

The scenario will be:

Since
QGIS 3.26

Definition at line 415 of file qgsabstractprofilegenerator.h.

Constructor & Destructor Documentation

◆ ~QgsAbstractProfileGenerator()

QgsAbstractProfileGenerator::~QgsAbstractProfileGenerator ( )
virtualdefault

Member Function Documentation

◆ feedback()

virtual QgsFeedback * QgsAbstractProfileGenerator::feedback ( ) const
pure virtual

Access to feedback object of the generator (may be nullptr)

Implemented in QgsMeshLayerProfileGenerator, QgsPointCloudLayerProfileGenerator, QgsRasterLayerProfileGenerator, and QgsVectorLayerProfileGenerator.

◆ flags()

Qgis::ProfileGeneratorFlags QgsAbstractProfileGenerator::flags ( ) const
virtual

Returns flags which reflect how the profile generator operates.

Reimplemented in QgsPointCloudLayerProfileGenerator, and QgsRasterLayerProfileGenerator.

Definition at line 146 of file qgsabstractprofilegenerator.cpp.

◆ generateProfile()

virtual bool QgsAbstractProfileGenerator::generateProfile ( const QgsProfileGenerationContext context = QgsProfileGenerationContext())
pure virtual

Generate the profile (based on data stored in the class).

Returns true if the profile was generated successfully (i.e. the generation was not canceled early).

Implemented in QgsMeshLayerProfileGenerator, QgsPointCloudLayerProfileGenerator, QgsRasterLayerProfileGenerator, and QgsVectorLayerProfileGenerator.

◆ sourceId()

virtual QString QgsAbstractProfileGenerator::sourceId ( ) const
pure virtual

Returns a unique identifier representing the source of the profile.

For generators associated with a map layer the source ID will match the layer's QgsMapLayer::id(). Other (non-map-layer) sources will have a different unique ID with its own custom interpretation.gen

Implemented in QgsMeshLayerProfileGenerator, QgsPointCloudLayerProfileGenerator, QgsRasterLayerProfileGenerator, and QgsVectorLayerProfileGenerator.

◆ takeResults()

virtual QgsAbstractProfileResults * QgsAbstractProfileGenerator::takeResults ( )
pure virtual

Takes results from the generator.

Ownership is transferred to the caller.

Implemented in QgsMeshLayerProfileGenerator, QgsPointCloudLayerProfileGenerator, QgsRasterLayerProfileGenerator, and QgsVectorLayerProfileGenerator.


The documentation for this class was generated from the following files: