mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
1030 lines
23 KiB
Plaintext
1030 lines
23 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/mesh/qgsmeshdataset.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsMeshDatasetIndex
|
|
{
|
|
%Docstring(signature="appended")
|
|
|
|
:py:class:`QgsMeshDatasetIndex` is index that identifies the dataset group (e.g. wind speed)
|
|
and a dataset in this group (e.g. magnitude of wind speed in particular time)
|
|
|
|
.. note::
|
|
|
|
The API is considered EXPERIMENTAL and can be changed without a notice
|
|
|
|
.. versionadded:: 3.4
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmeshdataset.h"
|
|
%End
|
|
public:
|
|
QgsMeshDatasetIndex( int group = -1, int dataset = -1 );
|
|
%Docstring
|
|
Creates an index. -1 represents invalid group/dataset
|
|
%End
|
|
int group() const;
|
|
%Docstring
|
|
Returns a group index
|
|
%End
|
|
int dataset() const;
|
|
%Docstring
|
|
Returns a dataset index within :py:func:`~QgsMeshDatasetIndex.group`
|
|
%End
|
|
bool isValid() const;
|
|
%Docstring
|
|
Returns whether index is valid, ie at least groups is set
|
|
%End
|
|
bool operator == ( QgsMeshDatasetIndex other ) const;
|
|
bool operator != ( QgsMeshDatasetIndex other ) const;
|
|
};
|
|
|
|
class QgsMeshDatasetValue
|
|
{
|
|
%Docstring(signature="appended")
|
|
|
|
:py:class:`QgsMeshDatasetValue` represents single dataset value.
|
|
|
|
Values may be scalar or vector. Nodata values are represented by NaNs.
|
|
|
|
.. note::
|
|
|
|
The API is considered EXPERIMENTAL and can be changed without a notice
|
|
|
|
.. versionadded:: 3.2
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmeshdataset.h"
|
|
%End
|
|
public:
|
|
QgsMeshDatasetValue( double x,
|
|
double y );
|
|
%Docstring
|
|
Constructor for vector value
|
|
%End
|
|
|
|
QgsMeshDatasetValue( double scalar );
|
|
%Docstring
|
|
Constructor for scalar value
|
|
%End
|
|
|
|
QgsMeshDatasetValue();
|
|
%Docstring
|
|
Default Ctor, initialize to NaN
|
|
%End
|
|
|
|
~QgsMeshDatasetValue();
|
|
|
|
void set( double scalar );
|
|
%Docstring
|
|
Sets scalar value
|
|
%End
|
|
|
|
void setX( double x );
|
|
%Docstring
|
|
Sets X value
|
|
%End
|
|
|
|
void setY( double y );
|
|
%Docstring
|
|
Sets Y value
|
|
%End
|
|
|
|
double scalar() const;
|
|
%Docstring
|
|
Returns magnitude of vector for vector data or scalar value for scalar data
|
|
%End
|
|
|
|
double x() const;
|
|
%Docstring
|
|
Returns x value
|
|
%End
|
|
|
|
double y() const;
|
|
%Docstring
|
|
Returns y value
|
|
%End
|
|
|
|
bool operator==( QgsMeshDatasetValue other ) const;
|
|
|
|
};
|
|
|
|
class QgsMeshDataBlock
|
|
{
|
|
%Docstring(signature="appended")
|
|
|
|
:py:class:`QgsMeshDataBlock` is a block of integers/doubles that can be used
|
|
to retrieve:
|
|
active flags (e.g. face's active integer flag)
|
|
scalars (e.g. scalar dataset double values)
|
|
vectors (e.g. vector dataset doubles x,y values)
|
|
|
|
data are implicitly shared, so the class can be quickly copied
|
|
std.numeric_limits<double>.quiet_NaN() represents NODATA value
|
|
|
|
Data can be accessed all at once with :py:func:`~QgsMeshDatasetValue.values` (faster) or
|
|
value by value (slower) with :py:func:`~QgsMeshDatasetValue.active` or :py:func:`~QgsMeshDatasetValue.value`
|
|
|
|
.. versionadded:: 3.6
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmeshdataset.h"
|
|
%End
|
|
public:
|
|
enum DataType
|
|
{
|
|
ActiveFlagInteger,
|
|
ScalarDouble,
|
|
Vector2DDouble,
|
|
};
|
|
|
|
QgsMeshDataBlock();
|
|
%Docstring
|
|
Constructs an invalid block
|
|
%End
|
|
|
|
QgsMeshDataBlock( DataType type, int count );
|
|
%Docstring
|
|
Constructs a new block
|
|
%End
|
|
|
|
DataType type() const;
|
|
%Docstring
|
|
Type of data stored in the block
|
|
%End
|
|
|
|
int count() const;
|
|
%Docstring
|
|
Number of items stored in the block
|
|
%End
|
|
|
|
bool isValid() const;
|
|
%Docstring
|
|
Whether the block is valid
|
|
%End
|
|
|
|
QgsMeshDatasetValue value( int index ) const;
|
|
%Docstring
|
|
Returns a value represented by the index
|
|
For active flag the behavior is undefined
|
|
%End
|
|
|
|
bool active( int index ) const;
|
|
%Docstring
|
|
Returns a value for active flag by the index
|
|
For scalar and vector 2d the behavior is undefined
|
|
%End
|
|
|
|
void setActive( const QVector<int> &vals );
|
|
%Docstring
|
|
Sets active flag values.
|
|
|
|
If the data provider/datasets does not have active
|
|
flag capability (== all values are valid), just
|
|
set block validity by setValid( ``True`` )
|
|
|
|
:param vals: value vector with size :py:func:`~QgsMeshDataBlock.count`
|
|
|
|
For scalar and vector 2d the behavior is undefined
|
|
|
|
.. versionadded:: 3.12
|
|
%End
|
|
|
|
QVector<int> active() const;
|
|
%Docstring
|
|
Returns active flag array
|
|
|
|
Even for active flag valid dataset, the returned array could be empty.
|
|
This means that the data provider/dataset does not support active flag
|
|
capability, so all faces are active by default.
|
|
|
|
For scalar and vector 2d the behavior is undefined
|
|
|
|
.. versionadded:: 3.12
|
|
%End
|
|
|
|
QVector<double> values() const;
|
|
%Docstring
|
|
Returns buffer to the array with values
|
|
For vector it is pairs (x1, y1, x2, y2, ... )
|
|
|
|
.. versionadded:: 3.12
|
|
%End
|
|
|
|
void setValues( const QVector<double> &vals );
|
|
%Docstring
|
|
Sets values
|
|
|
|
For scalar datasets, it must have size :py:func:`~QgsMeshDataBlock.count`
|
|
For vector datasets, it must have size 2 * :py:func:`~QgsMeshDataBlock.count`
|
|
For active flag the behavior is undefined
|
|
|
|
.. versionadded:: 3.12
|
|
%End
|
|
|
|
void setValid( bool valid );
|
|
%Docstring
|
|
Sets block validity
|
|
%End
|
|
|
|
};
|
|
|
|
class QgsMesh3dDataBlock
|
|
{
|
|
%Docstring(signature="appended")
|
|
|
|
:py:class:`QgsMesh3dDataBlock` is a block of 3d stacked mesh data related N
|
|
faces defined on base mesh frame.
|
|
|
|
Data are implicitly shared, so the class can be quickly copied
|
|
std.numeric_limits<double>.quiet_NaN() represents NODATA value
|
|
|
|
.. note::
|
|
|
|
The API is considered EXPERIMENTAL and can be changed without a notice
|
|
|
|
.. versionadded:: 3.12
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmeshdataset.h"
|
|
%End
|
|
public:
|
|
QgsMesh3dDataBlock();
|
|
%Docstring
|
|
Constructs an invalid block
|
|
%End
|
|
|
|
~QgsMesh3dDataBlock();
|
|
|
|
QgsMesh3dDataBlock( int count, bool isVector );
|
|
%Docstring
|
|
Constructs a new block for count faces
|
|
%End
|
|
|
|
void setValid( bool valid );
|
|
%Docstring
|
|
Sets block validity
|
|
%End
|
|
|
|
bool isValid() const;
|
|
%Docstring
|
|
Whether the block is valid
|
|
%End
|
|
|
|
bool isVector() const;
|
|
%Docstring
|
|
Whether we store vector values
|
|
%End
|
|
|
|
int count() const;
|
|
%Docstring
|
|
Number of 2d faces for which the volume data is stored in the block
|
|
%End
|
|
|
|
int firstVolumeIndex() const;
|
|
%Docstring
|
|
Index of the first volume stored in the buffer (absolute)
|
|
%End
|
|
|
|
int lastVolumeIndex() const;
|
|
%Docstring
|
|
Index of the last volume stored in the buffer (absolute)
|
|
%End
|
|
|
|
int volumesCount() const;
|
|
%Docstring
|
|
Returns number of volumes stored in the buffer
|
|
%End
|
|
|
|
QVector<int> verticalLevelsCount() const;
|
|
%Docstring
|
|
Returns number of vertical level above 2d faces
|
|
%End
|
|
|
|
void setVerticalLevelsCount( const QVector<int> &verticalLevelsCount );
|
|
%Docstring
|
|
Sets the vertical level counts
|
|
%End
|
|
|
|
QVector<double> verticalLevels() const;
|
|
%Docstring
|
|
Returns the vertical levels height
|
|
%End
|
|
|
|
void setVerticalLevels( const QVector<double> &verticalLevels );
|
|
%Docstring
|
|
Sets the vertical levels height
|
|
%End
|
|
|
|
QVector<int> faceToVolumeIndex() const;
|
|
%Docstring
|
|
Returns the indexing between faces and volumes
|
|
%End
|
|
|
|
void setFaceToVolumeIndex( const QVector<int> &faceToVolumeIndex );
|
|
%Docstring
|
|
Sets the indexing between faces and volumes
|
|
%End
|
|
|
|
QVector<double> values() const;
|
|
%Docstring
|
|
Returns the values at volume centers
|
|
|
|
For vector datasets the number of values is doubled (x1, y1, x2, y2, ... )
|
|
%End
|
|
|
|
QgsMeshDatasetValue value( int volumeIndex ) const;
|
|
%Docstring
|
|
Returns the value at volume centers
|
|
|
|
:param volumeIndex: volume index relative to :py:func:`~QgsMesh3dDataBlock.firstVolumeIndex`
|
|
|
|
:return: value (scalar or vector)
|
|
%End
|
|
|
|
void setValues( const QVector<double> &doubleBuffer );
|
|
%Docstring
|
|
Sets the values at volume centers
|
|
|
|
For vector datasets the number of values is doubled (x1, y1, x2, y2, ... )
|
|
%End
|
|
|
|
};
|
|
|
|
class QgsMeshDatasetGroupMetadata
|
|
{
|
|
%Docstring(signature="appended")
|
|
|
|
:py:class:`QgsMeshDatasetGroupMetadata` is a collection of dataset group metadata
|
|
such as whether the data is vector or scalar, name
|
|
|
|
.. note::
|
|
|
|
The API is considered EXPERIMENTAL and can be changed without a notice
|
|
|
|
.. versionadded:: 3.4
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmeshdataset.h"
|
|
%End
|
|
public:
|
|
|
|
enum DataType
|
|
{
|
|
DataOnFaces,
|
|
DataOnVertices,
|
|
DataOnVolumes,
|
|
DataOnEdges
|
|
};
|
|
|
|
QgsMeshDatasetGroupMetadata();
|
|
%Docstring
|
|
Constructs an empty metadata object
|
|
%End
|
|
|
|
QgsMeshDatasetGroupMetadata( const QString &name,
|
|
const QString uri,
|
|
bool isScalar,
|
|
DataType dataType,
|
|
double minimum,
|
|
double maximum,
|
|
int maximumVerticalLevels,
|
|
const QDateTime &referenceTime,
|
|
bool isTemporal,
|
|
const QMap<QString, QString> &extraOptions );
|
|
%Docstring
|
|
Constructs a valid metadata object
|
|
|
|
:param name: name of the dataset group
|
|
:param isScalar: dataset contains scalar data, specifically the y-value of :py:class:`QgsMeshDatasetValue` is NaN
|
|
:param dataType: where the data are defined on (vertices, faces or volumes)
|
|
:param minimum: minimum value (magnitude for vectors) present among all group's dataset values
|
|
:param maximum: maximum value (magnitude for vectors) present among all group's dataset values
|
|
:param maximumVerticalLevels: maximum number of vertical levels for 3d stacked meshes, 0 for 2d meshes
|
|
:param referenceTime: reference time of the dataset group
|
|
:param isTemporal: weither the dataset group is temporal (contains time-related dataset)
|
|
:param extraOptions: dataset's extra options stored by the provider. Usually contains the name, time value, time units, data file vendor, ...
|
|
:param uri: The uri of the dataset
|
|
%End
|
|
|
|
QString name() const;
|
|
%Docstring
|
|
Returns name of the dataset group
|
|
%End
|
|
|
|
QString uri() const;
|
|
%Docstring
|
|
Returns the uri of the source
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
QMap<QString, QString> extraOptions() const;
|
|
%Docstring
|
|
Returns extra metadata options, for example description
|
|
%End
|
|
|
|
bool isVector() const;
|
|
%Docstring
|
|
Returns whether dataset group has vector data
|
|
%End
|
|
|
|
bool isScalar() const;
|
|
%Docstring
|
|
Returns whether dataset group has scalar data
|
|
%End
|
|
|
|
bool isTemporal() const;
|
|
%Docstring
|
|
Returns whether the dataset group is temporal (contains time-related dataset)
|
|
%End
|
|
|
|
DataType dataType() const;
|
|
%Docstring
|
|
Returns whether dataset group data is defined on vertices or faces or volumes
|
|
|
|
.. versionadded:: 3.12
|
|
%End
|
|
|
|
double minimum() const;
|
|
%Docstring
|
|
Returns minimum scalar value/vector magnitude present for whole dataset group
|
|
%End
|
|
|
|
double maximum() const;
|
|
%Docstring
|
|
Returns maximum scalar value/vector magnitude present for whole dataset group
|
|
%End
|
|
|
|
int maximumVerticalLevelsCount() const;
|
|
%Docstring
|
|
Returns maximum number of vertical levels for 3d stacked meshes
|
|
|
|
.. versionadded:: 3.12
|
|
%End
|
|
|
|
QDateTime referenceTime() const;
|
|
%Docstring
|
|
Returns the reference time
|
|
|
|
.. versionadded:: 3.12
|
|
%End
|
|
|
|
};
|
|
|
|
class QgsMeshDatasetMetadata
|
|
{
|
|
%Docstring(signature="appended")
|
|
|
|
:py:class:`QgsMeshDatasetMetadata` is a collection of mesh dataset metadata such
|
|
as whether the data is valid or associated time for the dataset
|
|
|
|
.. note::
|
|
|
|
The API is considered EXPERIMENTAL and can be changed without a notice
|
|
|
|
.. versionadded:: 3.2
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmeshdataset.h"
|
|
%End
|
|
public:
|
|
QgsMeshDatasetMetadata();
|
|
%Docstring
|
|
Constructs an empty metadata object
|
|
%End
|
|
|
|
QgsMeshDatasetMetadata( double time,
|
|
bool isValid,
|
|
double minimum,
|
|
double maximum,
|
|
int maximumVerticalLevels
|
|
);
|
|
%Docstring
|
|
Constructs a valid metadata object
|
|
|
|
:param time: a time which this dataset represents in the dataset group
|
|
:param isValid: dataset is loadad and valid for fetching the data
|
|
:param minimum: minimum value (magnitude for vectors) present among dataset values
|
|
:param maximum: maximum value (magnitude for vectors) present among dataset values
|
|
:param maximumVerticalLevels: maximum number of vertical levels for 3d stacked meshes, 0 for 2d meshes
|
|
%End
|
|
|
|
double time() const;
|
|
%Docstring
|
|
Returns the time value for this dataset
|
|
%End
|
|
|
|
bool isValid() const;
|
|
%Docstring
|
|
Returns whether dataset is valid
|
|
%End
|
|
|
|
double minimum() const;
|
|
%Docstring
|
|
Returns minimum scalar value/vector magnitude present for the dataset
|
|
%End
|
|
|
|
double maximum() const;
|
|
%Docstring
|
|
Returns maximum scalar value/vector magnitude present for the dataset
|
|
%End
|
|
|
|
int maximumVerticalLevelsCount() const;
|
|
%Docstring
|
|
Returns maximum number of vertical levels for 3d stacked meshes
|
|
|
|
.. versionadded:: 3.12
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
class QgsMeshDataset
|
|
{
|
|
%Docstring(signature="appended")
|
|
|
|
Abstract class that represents a dataset
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmeshdataset.h"
|
|
%End
|
|
public:
|
|
QgsMeshDataset();
|
|
%Docstring
|
|
Constructor
|
|
%End
|
|
|
|
virtual ~QgsMeshDataset();
|
|
|
|
virtual QgsMeshDatasetValue datasetValue( int valueIndex ) const = 0;
|
|
%Docstring
|
|
Returns the value with index ``valueIndex``
|
|
%End
|
|
|
|
virtual QgsMeshDataBlock datasetValues( bool isScalar, int valueIndex, int count ) const = 0;
|
|
%Docstring
|
|
Returns ``count`` values from ``valueIndex``
|
|
%End
|
|
|
|
virtual QgsMeshDataBlock areFacesActive( int faceIndex, int count ) const = 0;
|
|
%Docstring
|
|
Returns whether faces are active
|
|
%End
|
|
|
|
virtual bool isActive( int faceIndex ) const = 0;
|
|
%Docstring
|
|
Returns whether the face is active
|
|
%End
|
|
|
|
virtual QgsMeshDatasetMetadata metadata() const = 0;
|
|
%Docstring
|
|
Returns the metadata of the dataset
|
|
%End
|
|
|
|
virtual int valuesCount() const = 0;
|
|
%Docstring
|
|
Returns the values count
|
|
%End
|
|
};
|
|
|
|
class QgsMeshDatasetGroup
|
|
{
|
|
%Docstring(signature="appended")
|
|
|
|
Abstract class that represents a dataset group
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmeshdataset.h"
|
|
%End
|
|
public:
|
|
|
|
enum Type
|
|
{
|
|
None,
|
|
Persistent,
|
|
Memory,
|
|
Virtual,
|
|
};
|
|
|
|
QgsMeshDatasetGroup();
|
|
%Docstring
|
|
Default constructor
|
|
%End
|
|
virtual ~QgsMeshDatasetGroup();
|
|
|
|
QgsMeshDatasetGroup( const QString &name );
|
|
%Docstring
|
|
Constructor with the ``name`` of the dataset group
|
|
%End
|
|
|
|
QgsMeshDatasetGroup( const QString &name, QgsMeshDatasetGroupMetadata::DataType dataType );
|
|
%Docstring
|
|
Constructor with the ``name`` of the dataset group and the ``dataTYpe``
|
|
%End
|
|
|
|
virtual void initialize() = 0;
|
|
%Docstring
|
|
Initialize the dataset group
|
|
%End
|
|
|
|
QgsMeshDatasetGroupMetadata groupMetadata() const;
|
|
%Docstring
|
|
Returns the metadata of the dataset group
|
|
%End
|
|
|
|
virtual QgsMeshDatasetMetadata datasetMetadata( int datasetIndex ) const = 0;
|
|
%Docstring
|
|
Returns the metadata of the dataset with index ``datasetIndex``
|
|
%End
|
|
|
|
virtual int datasetCount() const = 0;
|
|
%Docstring
|
|
Returns the count of datasets in the group
|
|
%End
|
|
|
|
virtual QgsMeshDataset *dataset( int index ) const = 0;
|
|
%Docstring
|
|
Returns the dataset with ``index``
|
|
%End
|
|
|
|
virtual QgsMeshDatasetGroup::Type type() const = 0;
|
|
%Docstring
|
|
Returns the type of dataset group
|
|
%End
|
|
|
|
double minimum() const;
|
|
%Docstring
|
|
Returns the minimum value of the whole dataset group
|
|
%End
|
|
|
|
double maximum() const;
|
|
%Docstring
|
|
Returns the maximum value of the whole dataset group
|
|
%End
|
|
|
|
void setMinimumMaximum( double min, double max );
|
|
%Docstring
|
|
Overrides the minimum and the maximum value of the whole dataset group
|
|
%End
|
|
|
|
QString name() const;
|
|
%Docstring
|
|
Returns the name of the dataset group
|
|
%End
|
|
|
|
void setName( const QString &name );
|
|
%Docstring
|
|
Sets the name of the dataset group
|
|
%End
|
|
|
|
QgsMeshDatasetGroupMetadata::DataType dataType() const;
|
|
%Docstring
|
|
Returns the data type of the dataset group
|
|
%End
|
|
|
|
void setDataType( const QgsMeshDatasetGroupMetadata::DataType &dataType );
|
|
%Docstring
|
|
Sets the data type of the dataset group
|
|
%End
|
|
|
|
void addExtraMetadata( QString key, QString value );
|
|
%Docstring
|
|
Adds extra metadata to the group
|
|
%End
|
|
QMap<QString, QString> extraMetadata() const;
|
|
%Docstring
|
|
Returns all the extra metadata of the group
|
|
%End
|
|
|
|
bool isScalar() const;
|
|
%Docstring
|
|
Returns whether the group contain scalar values
|
|
%End
|
|
|
|
void setIsScalar( bool isScalar );
|
|
%Docstring
|
|
Sets whether the group contain scalar values
|
|
%End
|
|
|
|
bool checkValueCountPerDataset( int count ) const;
|
|
%Docstring
|
|
Returns whether all the datasets contain ``count`` values
|
|
%End
|
|
|
|
void calculateStatistic();
|
|
%Docstring
|
|
Calculates the statistics (minimum and maximum)
|
|
%End
|
|
|
|
virtual QStringList datasetGroupNamesDependentOn() const;
|
|
%Docstring
|
|
Returns the dataset group variable name which this dataset group depends on
|
|
%End
|
|
|
|
virtual QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const = 0;
|
|
%Docstring
|
|
Write dataset group information in a DOM element
|
|
%End
|
|
|
|
virtual QString description() const;
|
|
%Docstring
|
|
Returns some information about the dataset group
|
|
%End
|
|
|
|
void setReferenceTime( const QDateTime &referenceTime );
|
|
%Docstring
|
|
Sets the reference time of the dataset group
|
|
%End
|
|
|
|
protected:
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
class QgsMeshDatasetGroupTreeItem
|
|
{
|
|
%Docstring(signature="appended")
|
|
|
|
Tree item for display of the mesh dataset groups.
|
|
Dataset group is set of datasets with the same name,
|
|
but different control variable (e.g. time)
|
|
|
|
Support for multiple levels, because groups can have
|
|
subgroups, for example
|
|
|
|
Groups:
|
|
Depth
|
|
Minimum
|
|
Maximum
|
|
Velocity
|
|
Wind speed
|
|
Minimum
|
|
Maximum
|
|
|
|
Tree items handle also the dependencies between dataset groups represented by these items
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsmeshdataset.h"
|
|
%End
|
|
public:
|
|
|
|
QgsMeshDatasetGroupTreeItem();
|
|
%Docstring
|
|
Constructor for an empty dataset group tree item
|
|
%End
|
|
|
|
QgsMeshDatasetGroupTreeItem( const QString &defaultName,
|
|
const QString &sourceName,
|
|
bool isVector,
|
|
int index );
|
|
%Docstring
|
|
Constructor
|
|
|
|
:param defaultName: the name that will be used to display the item if iot not overrides (:py:func:`setName`)
|
|
:param sourceName: the name used by the source (provider, dataset group store,...)
|
|
:param isVector: whether the dataset group is a vector dataset group
|
|
:param index: index of the dataset group
|
|
%End
|
|
|
|
QgsMeshDatasetGroupTreeItem( const QDomElement &itemElement, const QgsReadWriteContext &context );
|
|
%Docstring
|
|
Constructor from a DOM element, constructs also the children
|
|
|
|
:param itemElement: the DOM element
|
|
:param context: writing context (e.g. for conversion between relative and absolute paths)
|
|
%End
|
|
|
|
~QgsMeshDatasetGroupTreeItem();
|
|
|
|
QgsMeshDatasetGroupTreeItem *clone() const /Factory/;
|
|
%Docstring
|
|
Clones the item
|
|
|
|
:return: the cloned item
|
|
%End
|
|
|
|
void appendChild( QgsMeshDatasetGroupTreeItem *item /Transfer/ );
|
|
%Docstring
|
|
Appends a item child
|
|
|
|
:param item: the item to append
|
|
|
|
.. note::
|
|
|
|
takes ownership of item
|
|
%End
|
|
|
|
void removeChild( QgsMeshDatasetGroupTreeItem *item /Transfer/ );
|
|
%Docstring
|
|
Removes a item child if exists
|
|
|
|
:param item: the item to append
|
|
|
|
.. note::
|
|
|
|
takes ownership of item
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
QgsMeshDatasetGroupTreeItem *child( int row ) const;
|
|
%Docstring
|
|
Returns a child
|
|
|
|
:param row: the position of the child
|
|
|
|
:return: the item at the position ``row``
|
|
%End
|
|
|
|
QgsMeshDatasetGroupTreeItem *childFromDatasetGroupIndex( int index );
|
|
%Docstring
|
|
Returns the child with dataset group ``index``
|
|
Searches as depper as needed on the child hierarchy
|
|
|
|
:param index: the index of the dataset group index
|
|
|
|
:return: the item with index as dataset group index, None if no item is found
|
|
%End
|
|
|
|
int childCount() const;
|
|
%Docstring
|
|
Returns the count of children
|
|
|
|
:return: the children's count
|
|
%End
|
|
|
|
int totalChildCount() const;
|
|
%Docstring
|
|
Returns the total count of children, that is included deeper children and disabled items
|
|
|
|
:return: the total children's count
|
|
%End
|
|
|
|
QList<int> enabledDatasetGroupIndexes() const;
|
|
%Docstring
|
|
Returns a list of enabled dataset group indexes, included deeper children
|
|
|
|
:return: the list of dataset group indexes
|
|
|
|
.. versionadded:: 3.16.3
|
|
%End
|
|
|
|
QgsMeshDatasetGroupTreeItem *parentItem() const;
|
|
%Docstring
|
|
Returns the parent item, None if it is root item
|
|
|
|
:return: the parent item
|
|
%End
|
|
|
|
int row() const;
|
|
%Docstring
|
|
Returns the position of the item in the parent
|
|
|
|
:return: tow position of the item
|
|
%End
|
|
|
|
QString name() const;
|
|
%Docstring
|
|
Returns the name of the item
|
|
This name is the default name if the name has not been overridden (:py:func:`setName`)
|
|
|
|
:return: the name to display
|
|
%End
|
|
|
|
void setName( const QString &name );
|
|
%Docstring
|
|
Overrides the default name with the name to display.
|
|
The default name is still stored in the item
|
|
but will not be displayed anymore except if the empty string is set.
|
|
|
|
:param name: to display
|
|
%End
|
|
|
|
QString providerName() const;
|
|
%Docstring
|
|
Returns the name used by the provider to identify the dataset
|
|
|
|
:return: the provider name
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
bool isVector() const;
|
|
%Docstring
|
|
|
|
:return: whether the dataset group is vector
|
|
%End
|
|
|
|
int datasetGroupIndex() const;
|
|
%Docstring
|
|
|
|
:return: the dataset group index
|
|
%End
|
|
|
|
bool isEnabled() const;
|
|
%Docstring
|
|
|
|
:return: whether the item is enabled, that is if it is displayed in view
|
|
%End
|
|
|
|
void setIsEnabled( bool isEnabled );
|
|
%Docstring
|
|
Sets whether the item is enabled, that is if it is displayed in view
|
|
|
|
:param isEnabled: whether the item is enabled
|
|
%End
|
|
|
|
QString defaultName() const;
|
|
%Docstring
|
|
|
|
:return: the default name
|
|
%End
|
|
|
|
QgsMeshDatasetGroup::Type datasetGroupType() const;
|
|
%Docstring
|
|
|
|
:return: the dataset group type
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
QList<int> groupIndexDependencies() const;
|
|
%Docstring
|
|
Returns a list of group index corresponding to dataset group that depends on the dataset group represented by this item
|
|
|
|
:return: list of group index
|
|
%End
|
|
|
|
QString description() const;
|
|
%Docstring
|
|
Returns description about the dataset group (URI, formula,...)
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
void setDatasetGroup( QgsMeshDatasetGroup *datasetGroup );
|
|
%Docstring
|
|
Set parameters of the item in accordance with the dataset group
|
|
|
|
:param datasetGroup: pointer to the dataset group to accord with
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
void setPersistentDatasetGroup( const QString &uri );
|
|
%Docstring
|
|
Set parameters of the item in accordance with the persistent dataset group with ``uri``
|
|
|
|
:param uri: uri of the persistent dataset group
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context );
|
|
%Docstring
|
|
Writes the item and its children in a DOM document
|
|
|
|
:param doc: the DOM document
|
|
:param context: writing context (e.g. for conversion between relative and absolute paths)
|
|
|
|
:return: the dom element where the item is written
|
|
%End
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/mesh/qgsmeshdataset.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|