QGIS API Documentation  3.23.0-Master (eb871beae0)
Public Member Functions | Public Attributes | List of all members
QgsMeshMemoryDatasetGroup Class Reference

Class that represents a dataset group stored in memory. More...

#include <qgsmeshdataset.h>

Inheritance diagram for QgsMeshMemoryDatasetGroup:
Inheritance graph
[legend]

Public Member Functions

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

Public Attributes

QVector< std::shared_ptr< QgsMeshMemoryDataset > > memoryDatasets
 Contains all the memory datasets. More...
 

Additional Inherited Members

- Public Types inherited from QgsMeshDatasetGroup
enum  Type { None , 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

Class that represents a dataset group stored in memory.

The QgsMeshMemoryDataset objects stores in a QVector container that are exposed for efficiency

Since
QGIS 3.16

Definition at line 737 of file qgsmeshdataset.h.

Constructor & Destructor Documentation

◆ QgsMeshMemoryDatasetGroup() [1/3]

QgsMeshMemoryDatasetGroup::QgsMeshMemoryDatasetGroup ( )
default

Constructor.

◆ QgsMeshMemoryDatasetGroup() [2/3]

QgsMeshMemoryDatasetGroup::QgsMeshMemoryDatasetGroup ( const QString &  name)

Constructor with the name of the group.

Definition at line 909 of file qgsmeshdataset.cpp.

◆ QgsMeshMemoryDatasetGroup() [3/3]

QgsMeshMemoryDatasetGroup::QgsMeshMemoryDatasetGroup ( const QString &  name,
QgsMeshDatasetGroupMetadata::DataType  dataType 
)

Constructor with the name of the group and the type of data dataType.

Definition at line 904 of file qgsmeshdataset.cpp.

Member Function Documentation

◆ addDataset()

void QgsMeshMemoryDatasetGroup::addDataset ( std::shared_ptr< QgsMeshMemoryDataset dataset)

Adds a memory dataset to the group.

Definition at line 948 of file qgsmeshdataset.cpp.

◆ clearDatasets()

void QgsMeshMemoryDatasetGroup::clearDatasets ( )

Removes all the datasets from the group.

Definition at line 954 of file qgsmeshdataset.cpp.

◆ constDataset()

std::shared_ptr< const QgsMeshMemoryDataset > QgsMeshMemoryDatasetGroup::constDataset ( int  index) const

Returns the dataset with index.

Definition at line 964 of file qgsmeshdataset.cpp.

◆ dataset()

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

Returns the dataset with index.

Implements QgsMeshDatasetGroup.

Definition at line 943 of file qgsmeshdataset.cpp.

◆ datasetCount()

int QgsMeshMemoryDatasetGroup::datasetCount ( ) const
overridevirtual

Returns the count of datasets in the group.

Implements QgsMeshDatasetGroup.

Definition at line 930 of file qgsmeshdataset.cpp.

◆ datasetMetadata()

QgsMeshDatasetMetadata QgsMeshMemoryDatasetGroup::datasetMetadata ( int  datasetIndex) const
overridevirtual

Returns the metadata of the dataset with index datasetIndex.

Implements QgsMeshDatasetGroup.

Definition at line 935 of file qgsmeshdataset.cpp.

◆ initialize()

void QgsMeshMemoryDatasetGroup::initialize ( )
overridevirtual

Initialize the dataset group.

Implements QgsMeshDatasetGroup.

Definition at line 959 of file qgsmeshdataset.cpp.

◆ type()

virtual QgsMeshDatasetGroup::Type QgsMeshMemoryDatasetGroup::type ( ) const
inlineoverridevirtual

Returns the type of dataset group.

Implements QgsMeshDatasetGroup.

Definition at line 751 of file qgsmeshdataset.h.

◆ writeXml()

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

Returns a invalid DOM element.

Implements QgsMeshDatasetGroup.

Definition at line 969 of file qgsmeshdataset.cpp.

Member Data Documentation

◆ memoryDatasets

QVector<std::shared_ptr<QgsMeshMemoryDataset> > QgsMeshMemoryDatasetGroup::memoryDatasets

Contains all the memory datasets.

Definition at line 766 of file qgsmeshdataset.h.


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