QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsMeshVirtualDatasetGroup Class Reference

Represents a dataset group calculated from a formula string. More...

#include <qgsmeshvirtualdatasetgroup.h>

Inheritance diagram for QgsMeshVirtualDatasetGroup:
Inheritance graph
[legend]

Public Member Functions

 QgsMeshVirtualDatasetGroup (const QString &name, const QString &formulaString, QgsMeshLayer *layer, qint64 relativeStartTime, qint64 relativeEndTime)
 Constructor.
 
QgsMeshDatasetdataset (int index) const override
 Returns the dataset with index.
 
int datasetCount () const override
 Returns the count of datasets in the group.
 
QStringList datasetGroupNamesDependentOn () const override
 Returns the dataset group variable name which this dataset group depends on.
 
QgsMeshDatasetMetadata datasetMetadata (int datasetIndex) const override
 Returns the metadata of the dataset with index datasetIndex.
 
QString description () const override
 Returns some information about the dataset group.
 
void initialize () override
 Initialize the dataset group.
 
QgsMeshDatasetGroup::Type type () const override
 Returns the type of dataset group.
 
QDomElement writeXml (QDomDocument &doc, const QgsReadWriteContext &context) const override
 Write dataset group information in a DOM element.
 
- Public Member Functions inherited from QgsMeshDatasetGroup
 QgsMeshDatasetGroup ()=default
 
 QgsMeshDatasetGroup (const QString &name)
 Constructor with the name of the dataset group.
 
 QgsMeshDatasetGroup (const QString &name, QgsMeshDatasetGroupMetadata::DataType dataType)
 Constructor with the name of the dataset group and the dataTYpe.
 
virtual ~QgsMeshDatasetGroup ()
 
void addExtraMetadata (QString key, QString value)
 Adds extra metadata to the group.
 
void calculateStatistic () const
 Calculates the statistics (minimum and maximum)
 
bool checkValueCountPerDataset (int count) const
 Returns whether all the datasets contain count values.
 
QgsMeshDatasetGroupMetadata::DataType dataType () const
 Returns the data type of the dataset group.
 
QMap< QString, QString > extraMetadata () const
 Returns all the extra metadata of the group.
 
QgsMeshDatasetGroupMetadata groupMetadata () const
 Returns the metadata of the dataset group.
 
bool isScalar () const
 Returns whether the group contain scalar values.
 
double maximum () const
 Returns the maximum value of the whole dataset group.
 
double minimum () const
 Returns the minimum value of the whole dataset group.
 
QString name () const
 Returns the name of the dataset group.
 
void setDataType (const QgsMeshDatasetGroupMetadata::DataType &dataType)
 Sets the data type of the dataset group.
 
void setIsScalar (bool isScalar)
 Sets whether the group contain scalar values.
 
void setMinimumMaximum (double min, double max) const
 Overrides the minimum and the maximum value of the whole dataset group.
 
void setName (const QString &name)
 Sets the name of the dataset group.
 
void setReferenceTime (const QDateTime &referenceTime)
 Sets the reference time of the dataset group.
 
void setStatisticObsolete () const
 Sets statistic obsolete, that means statistic will be recalculated when requested.
 

Additional Inherited Members

- Public Types inherited from QgsMeshDatasetGroup
enum  Type { Unknown , Persistent , Memory , Virtual }
 Type of the dataset group. More...
 
- Protected Attributes inherited from QgsMeshDatasetGroup
QgsMeshDatasetGroupMetadata::DataType mDataType = QgsMeshDatasetGroupMetadata::DataOnVertices
 
bool mIsScalar = true
 
QMap< QString, QString > mMetadata
 
QString mName
 

Detailed Description

Represents a dataset group calculated from a formula string.

The calculation is done by the QgsMeshCalcUtils class from a QgsMeshCalcNode created from the formula Each dataset is calculted when needed, so there is only one dataset store in this class all the time.

Since
QGIS 3.16

Definition at line 38 of file qgsmeshvirtualdatasetgroup.h.

Constructor & Destructor Documentation

◆ QgsMeshVirtualDatasetGroup()

QgsMeshVirtualDatasetGroup::QgsMeshVirtualDatasetGroup ( const QString &  name,
const QString &  formulaString,
QgsMeshLayer layer,
qint64  relativeStartTime,
qint64  relativeEndTime 
)

Constructor.

Parameters
namename of the dataset group
formulaStringformula use to define the dataset group
layermesh layer that contains dataset group
relativeStartTimerelative time start, in mimliseconds, from the mesh layer provider reference time
relativeEndTimerelative time end, in mimliseconds, from the mesh layer provider reference time

Definition at line 20 of file qgsmeshvirtualdatasetgroup.cpp.

Member Function Documentation

◆ dataset()

QgsMeshDataset * QgsMeshVirtualDatasetGroup::dataset ( int  index) const
overridevirtual

Returns the dataset with index.

Implements QgsMeshDatasetGroup.

Definition at line 106 of file qgsmeshvirtualdatasetgroup.cpp.

◆ datasetCount()

int QgsMeshVirtualDatasetGroup::datasetCount ( ) const
overridevirtual

Returns the count of datasets in the group.

Implements QgsMeshDatasetGroup.

Definition at line 101 of file qgsmeshvirtualdatasetgroup.cpp.

◆ datasetGroupNamesDependentOn()

QStringList QgsMeshVirtualDatasetGroup::datasetGroupNamesDependentOn ( ) const
overridevirtual

Returns the dataset group variable name which this dataset group depends on.

Reimplemented from QgsMeshDatasetGroup.

Definition at line 128 of file qgsmeshvirtualdatasetgroup.cpp.

◆ datasetMetadata()

QgsMeshDatasetMetadata QgsMeshVirtualDatasetGroup::datasetMetadata ( int  datasetIndex) const
overridevirtual

Returns the metadata of the dataset with index datasetIndex.

Implements QgsMeshDatasetGroup.

Definition at line 120 of file qgsmeshvirtualdatasetgroup.cpp.

◆ description()

QString QgsMeshVirtualDatasetGroup::description ( ) const
overridevirtual

Returns some information about the dataset group.

Reimplemented from QgsMeshDatasetGroup.

Definition at line 146 of file qgsmeshvirtualdatasetgroup.cpp.

◆ initialize()

void QgsMeshVirtualDatasetGroup::initialize ( )
overridevirtual

Initialize the dataset group.

Implements QgsMeshDatasetGroup.

Definition at line 34 of file qgsmeshvirtualdatasetgroup.cpp.

◆ type()

QgsMeshDatasetGroup::Type QgsMeshVirtualDatasetGroup::type ( ) const
inlineoverridevirtual

Returns the type of dataset group.

Implements QgsMeshDatasetGroup.

Definition at line 63 of file qgsmeshvirtualdatasetgroup.h.

◆ writeXml()

QDomElement QgsMeshVirtualDatasetGroup::writeXml ( QDomDocument &  doc,
const QgsReadWriteContext context 
) const
overridevirtual

Write dataset group information in a DOM element.

Implements QgsMeshDatasetGroup.

Definition at line 133 of file qgsmeshvirtualdatasetgroup.cpp.


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