QGIS/python/core/auto_generated/mesh/qgsmeshdataprovider.sip.in

206 lines
5.0 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/mesh/qgsmeshdataprovider.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
typedef QgsPoint QgsMeshVertex;
typedef QVector<int> QgsMeshFace;
typedef QMap<QString, QString> QgsMeshDatasetMetadata;
class QgsMeshDatasetValue
{
%Docstring
QgsMeshDatasetValue is a vector or a scalar value on vertex or face of the mesh with
support of nodata values
.. note::
The API is considered EXPERIMENTAL and can be changed without a notice
.. versionadded:: 3.2
%End
%TypeHeaderCode
#include "qgsmeshdataprovider.h"
%End
public:
QgsMeshDatasetValue( double x,
double y );
QgsMeshDatasetValue( double scalar );
QgsMeshDatasetValue( );
~QgsMeshDatasetValue();
void setNodata( bool nodata = true );
bool isNodata() const;
bool isScalar() const;
double scalar() const; //length for vectors, value for scalars
void set( double scalar );
void setX( double x );
void setY( double y );
double x() const;
double y() const;
bool operator==( const QgsMeshDatasetValue &other ) const;
};
class QgsMeshSource /Abstract/
{
%Docstring
Mesh is a collection of vertices and faces in 2D or 3D space
- vertex - XY(Z) point (in the mesh's coordinate reference system)
- faces - sets of vertices forming a closed shape - typically triangles or quadrilaterals
Base on the underlying data provider/format, whole mesh is either stored in memory or
read on demand
.. note::
The API is considered EXPERIMENTAL and can be changed without a notice
.. versionadded:: 3.2
%End
%TypeHeaderCode
#include "qgsmeshdataprovider.h"
%End
public:
virtual ~QgsMeshSource();
virtual int vertexCount() const = 0;
%Docstring
Return number of vertices in the native mesh
:return: Number of vertices in the mesh
%End
virtual int faceCount() const = 0;
%Docstring
Return number of faces in the native mesh
:return: Number of faces in the mesh
%End
virtual QgsMeshVertex vertex( int index ) const = 0;
%Docstring
Factory for mesh vertex with index
:return: new mesh vertex on index
%End
virtual QgsMeshFace face( int index ) const = 0;
%Docstring
Factory for mesh face with index
:return: new mesh face on index
%End
};
class QgsMeshDatasetSource /Abstract/
{
%Docstring
Dataset is a collection of vector or scalar values on vertices or faces of the mesh
Base on the underlying data provider/format, whole dataset is either stored in memory or
read on demand
.. note::
The API is considered EXPERIMENTAL and can be changed without a notice
.. versionadded:: 3.2
%End
%TypeHeaderCode
#include "qgsmeshdataprovider.h"
%End
public:
virtual ~QgsMeshDatasetSource();
virtual bool addDataset( const QString &uri ) = 0;
%Docstring
Associate dataset with the mesh
%End
virtual int datasetCount() const = 0;
%Docstring
Return number of datasets loaded
%End
virtual bool datasetHasScalarData( int index ) const = 0;
%Docstring
Whether dataset has scalar data associated
%End
virtual bool datasetIsOnVertices( int index ) const = 0;
%Docstring
Whether dataset is on vertices
%End
virtual QgsMeshDatasetMetadata datasetMetadata( int index ) const = 0;
%Docstring
Return dataset metadata
%End
virtual QgsMeshDatasetValue datasetValue( int datasetIndex, int valueIndex ) const = 0;
%Docstring
Return value associated with the index from the dataset
%End
virtual bool datasetIsValid( int index ) const = 0;
%Docstring
Return whether dataset is valid
%End
};
class QgsMeshDataProvider: QgsDataProvider, QgsMeshSource, QgsMeshDatasetSource
{
%Docstring
Base class for providing data for :py:class:`QgsMeshLayer`
Responsible for reading native mesh data
.. note::
The API is considered EXPERIMENTAL and can be changed without a notice
.. seealso:: :py:class:`QgsMeshSource`
2018-04-20 09:38:39 +02:00
.. versionadded:: 3.2
%End
%TypeHeaderCode
#include "qgsmeshdataprovider.h"
%End
public:
QgsMeshDataProvider( const QString &uri = QString() );
%Docstring
Ctor
%End
virtual QgsRectangle extent() const;
%Docstring
Returns the extent of the layer
:return: QgsRectangle containing the extent of the layer
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/mesh/qgsmeshdataprovider.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/