mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			322 lines
		
	
	
		
			9.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			322 lines
		
	
	
		
			9.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/pointcloud/qgspointcloudlayer.h                             *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsPointCloudLayer : QgsMapLayer, QgsAbstractProfileSource
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
 | 
						|
Represents a map layer supporting display of point clouds
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   The API is considered EXPERIMENTAL and can be changed without a notice
 | 
						|
 | 
						|
.. versionadded:: 3.18
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgspointcloudlayer.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    struct LayerOptions
 | 
						|
    {
 | 
						|
 | 
						|
      explicit LayerOptions( const QgsCoordinateTransformContext &transformContext = QgsCoordinateTransformContext( ) );
 | 
						|
%Docstring
 | 
						|
Constructor for LayerOptions with optional ``transformContext``.
 | 
						|
%End
 | 
						|
 | 
						|
      QgsCoordinateTransformContext transformContext;
 | 
						|
 | 
						|
      bool loadDefaultStyle;
 | 
						|
 | 
						|
      bool skipCrsValidation;
 | 
						|
 | 
						|
      bool skipIndexGeneration;
 | 
						|
 | 
						|
      bool skipStatisticsCalculation;
 | 
						|
    };
 | 
						|
 | 
						|
 | 
						|
    enum class PointCloudStatisticsCalculationState
 | 
						|
    {
 | 
						|
      NotStarted,
 | 
						|
      Calculating,
 | 
						|
      Calculated
 | 
						|
    };
 | 
						|
 | 
						|
    explicit QgsPointCloudLayer( const QString &uri = QString(),
 | 
						|
                                 const QString &baseName = QString(),
 | 
						|
                                 const QString &providerLib = QStringLiteral( "pointcloud" ),
 | 
						|
                                 const QgsPointCloudLayer::LayerOptions &options = QgsPointCloudLayer::LayerOptions() );
 | 
						|
%Docstring
 | 
						|
Constructor - creates a point cloud layer
 | 
						|
%End
 | 
						|
 | 
						|
    ~QgsPointCloudLayer();
 | 
						|
 | 
						|
 | 
						|
    SIP_PYOBJECT __repr__();
 | 
						|
%MethodCode
 | 
						|
    QString str = QStringLiteral( "<QgsPointCloudLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral( "Invalid" ) );
 | 
						|
    sipRes = PyUnicode_FromString( str.toUtf8().constData() );
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QgsPointCloudLayer *clone() const /Factory/;
 | 
						|
 | 
						|
    virtual QgsRectangle extent() const;
 | 
						|
 | 
						|
    virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) /Factory/;
 | 
						|
 | 
						|
    virtual QgsAbstractProfileGenerator *createProfileGenerator( const QgsProfileRequest &request ) /Factory/;
 | 
						|
 | 
						|
 | 
						|
    virtual QgsPointCloudDataProvider *dataProvider();
 | 
						|
 | 
						|
 | 
						|
    virtual bool supportsEditing() const;
 | 
						|
 | 
						|
    virtual bool isEditable() const;
 | 
						|
 | 
						|
    virtual bool isModified() const;
 | 
						|
 | 
						|
 | 
						|
    virtual bool readXml( const QDomNode &layerNode, QgsReadWriteContext &context );
 | 
						|
 | 
						|
 | 
						|
    virtual bool writeXml( QDomNode &layerNode, QDomDocument &doc, const QgsReadWriteContext &context ) const;
 | 
						|
 | 
						|
 | 
						|
     virtual bool readSymbology( const QDomNode &node, QString &errorMessage,
 | 
						|
                        QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories );
 | 
						|
    virtual bool readStyle( const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) ${SIP_FINAL};
 | 
						|
 | 
						|
 | 
						|
     virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context,
 | 
						|
                         StyleCategories categories = AllStyleCategories ) const;
 | 
						|
    virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories = AllStyleCategories ) const ${SIP_FINAL};
 | 
						|
 | 
						|
 | 
						|
    virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext );
 | 
						|
 | 
						|
 | 
						|
    virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const;
 | 
						|
 | 
						|
    virtual QString decodedSource( const QString &source, const QString &dataProvider, const QgsReadWriteContext &context ) const;
 | 
						|
 | 
						|
    virtual QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL};
 | 
						|
 | 
						|
    virtual QString htmlMetadata() const;
 | 
						|
 | 
						|
    virtual QgsMapLayerElevationProperties *elevationProperties();
 | 
						|
 | 
						|
 | 
						|
    QgsPointCloudAttributeCollection attributes() const;
 | 
						|
%Docstring
 | 
						|
Returns the attributes available from the layer.
 | 
						|
%End
 | 
						|
 | 
						|
    qint64 pointCount() const;
 | 
						|
%Docstring
 | 
						|
Returns the total number of points available in the layer.
 | 
						|
%End
 | 
						|
 | 
						|
    QgsPointCloudRenderer *renderer();
 | 
						|
%Docstring
 | 
						|
Returns the 2D renderer for the point cloud.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setRenderer`
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
    void setRenderer( QgsPointCloudRenderer *renderer /Transfer/ );
 | 
						|
%Docstring
 | 
						|
Sets the 2D ``renderer`` for the point cloud.
 | 
						|
 | 
						|
Ownership of ``renderer`` is transferred to the layer.
 | 
						|
 | 
						|
.. seealso:: :py:func:`renderer`
 | 
						|
%End
 | 
						|
 | 
						|
    bool setSubsetString( const QString &subset );
 | 
						|
%Docstring
 | 
						|
Sets the string used to define a subset of the layer
 | 
						|
 | 
						|
:param subset: The subset string to be used in a ``:py:class:`QgsPointCloudExpression```
 | 
						|
 | 
						|
:return: ``True``, when setting the subset string was successful, ``False`` otherwise
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
    QString subsetString() const;
 | 
						|
%Docstring
 | 
						|
Returns the string used to define a subset of the layer.
 | 
						|
 | 
						|
:return: The subset string or null QString if not implemented by the provider
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
    void setSync3DRendererTo2DRenderer( bool sync );
 | 
						|
%Docstring
 | 
						|
Sets whether this layer's 3D renderer should be automatically updated
 | 
						|
with changes applied to the layer's 2D renderer
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
    bool sync3DRendererTo2DRenderer() const;
 | 
						|
%Docstring
 | 
						|
Returns whether this layer's 3D renderer should be automatically updated
 | 
						|
with changes applied to the layer's 2D renderer
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
    bool convertRenderer3DFromRenderer2D();
 | 
						|
%Docstring
 | 
						|
Updates the layer's 3D renderer's symbol to match that of the layer's 2D renderer
 | 
						|
 | 
						|
:return: ``True`` on success, ``False`` otherwise
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
    const QgsPointCloudStatistics statistics() const;
 | 
						|
%Docstring
 | 
						|
Returns the object containing statistics
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
    PointCloudStatisticsCalculationState statisticsCalculationState() const;
 | 
						|
%Docstring
 | 
						|
Returns the status of point cloud statistics calculation
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
    bool startEditing();
 | 
						|
%Docstring
 | 
						|
Makes the layer editable.
 | 
						|
 | 
						|
This starts an edit session on this layer. Changes made in this edit session will not
 | 
						|
be made persistent until :py:func:`~QgsPointCloudLayer.commitChanges` is called, and can be reverted by calling
 | 
						|
:py:func:`~QgsPointCloudLayer.rollBack`.
 | 
						|
 | 
						|
:return: ``True`` if the layer was successfully made editable, or ``False`` if the operation
 | 
						|
         failed (e.g. due to an underlying read-only data source, or lack of edit support
 | 
						|
         by the backend data provider).
 | 
						|
 | 
						|
.. seealso:: :py:func:`commitChanges`
 | 
						|
 | 
						|
.. seealso:: :py:func:`rollBack`
 | 
						|
 | 
						|
.. versionadded:: 3.42
 | 
						|
%End
 | 
						|
 | 
						|
    bool commitChanges( bool stopEditing = true );
 | 
						|
%Docstring
 | 
						|
Attempts to commit to the underlying data provider any buffered changes made since the
 | 
						|
last to call to :py:func:`~QgsPointCloudLayer.startEditing`.
 | 
						|
 | 
						|
Returns the result of the attempt. If a commit fails (i.e. ``False`` is returned), the
 | 
						|
in-memory changes are left untouched and are not discarded. This allows editing to
 | 
						|
continue if the commit failed on e.g. a disallowed value for an attribute - the user
 | 
						|
can re-edit and try again.
 | 
						|
 | 
						|
If the commit failed, an error message may returned by :py:func:`~QgsPointCloudLayer.commitError`.
 | 
						|
 | 
						|
By setting ``stopEditing`` to ``False``, the layer will stay in editing mode.
 | 
						|
Otherwise the layer editing mode will be disabled if the commit is successful.
 | 
						|
 | 
						|
.. seealso:: :py:func:`startEditing`
 | 
						|
 | 
						|
.. seealso:: :py:func:`commitError`
 | 
						|
 | 
						|
.. seealso:: :py:func:`rollBack`
 | 
						|
 | 
						|
.. versionadded:: 3.42
 | 
						|
%End
 | 
						|
 | 
						|
    QString commitError() const;
 | 
						|
%Docstring
 | 
						|
Returns the last error message generated when attempting
 | 
						|
to commit changes to the layer.
 | 
						|
 | 
						|
.. seealso:: :py:func:`commitChanges`
 | 
						|
 | 
						|
.. versionadded:: 3.42
 | 
						|
%End
 | 
						|
 | 
						|
    bool rollBack();
 | 
						|
%Docstring
 | 
						|
Stops a current editing operation and discards any uncommitted edits.
 | 
						|
 | 
						|
.. seealso:: :py:func:`startEditing`
 | 
						|
 | 
						|
.. seealso:: :py:func:`commitChanges`
 | 
						|
 | 
						|
.. versionadded:: 3.42
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
    QgsPointCloudIndex index() const;
 | 
						|
%Docstring
 | 
						|
Returns the point cloud index associated with the layer.
 | 
						|
If the layer is editable, its :py:class:`QgsPointCloudEditingIndex` is returned,
 | 
						|
otherwise the index is fetched from the data provider.
 | 
						|
 | 
						|
.. versionadded:: 3.42
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
  signals:
 | 
						|
 | 
						|
    void subsetStringChanged();
 | 
						|
%Docstring
 | 
						|
Emitted when the layer's subset string has changed.
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
    void raiseError( const QString &msg );
 | 
						|
%Docstring
 | 
						|
Signals an error related to this point cloud layer.
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
    void statisticsCalculationStateChanged( QgsPointCloudLayer::PointCloudStatisticsCalculationState state );
 | 
						|
%Docstring
 | 
						|
Emitted when statistics calculation state has changed
 | 
						|
 | 
						|
.. versionadded:: 3.26
 | 
						|
%End
 | 
						|
 | 
						|
  private:
 | 
						|
    QgsPointCloudLayer( const QgsPointCloudLayer &rhs );
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/pointcloud/qgspointcloudlayer.h                             *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | 
						|
 ************************************************************************/
 |