QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
QgsMeshDatasetGroupStore Class Reference

Class used to register and access all the dataset groups related to a mesh layer. More...

#include <qgsmeshdatasetgroupstore.h>

Inheritance diagram for QgsMeshDatasetGroupStore:
Inheritance graph
[legend]

Signals

void datasetGroupsAdded (QList< int > indexes)
 Emitted after dataset groups are added.
 

Public Member Functions

 QgsMeshDatasetGroupStore (QgsMeshLayer *layer)
 Constructor.
 
bool addDatasetGroup (QgsMeshDatasetGroup *group)
 Adds a extra dataset group, take ownership, returns True if the group is effectivly added.
 
bool addPersistentDatasets (const QString &path)
 Adds persistent datasets from a file with path.
 
QgsMeshDataBlock areFacesActive (const QgsMeshDatasetIndex &index, int faceIndex, int count) const
 Returns whether faces are active for particular dataset.
 
QgsMesh3DDataBlock dataset3dValues (const QgsMeshDatasetIndex &index, int faceIndex, int count) const
 Returns count 3D values of the dataset with global index and from valueIndex.
 
int datasetCount (int groupIndex) const
 Returns the total count of dataset group in the store.
 
int datasetGroupCount () const
 Returns the count of dataset groups.
 
QList< int > datasetGroupIndexes () const
 Returns a list of all group indexes.
 
QgsMeshDatasetGroupMetadata datasetGroupMetadata (const QgsMeshDatasetIndex &index) const
 Returns the metadata of the dataset group with global index.
 
QgsMeshDatasetGroupTreeItemdatasetGroupTreeItem () const
 Returns a pointer to the root of the dataset groups tree item.
 
QgsMeshDatasetIndex datasetIndexAtTime (qint64 time, int groupIndex, QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod method) const
 Returns the global dataset index of the dataset int the dataset group with groupIndex, corresponding to the relative time and the check method.
 
QList< QgsMeshDatasetIndexdatasetIndexInTimeInterval (qint64 time1, qint64 time2, int groupIndex) const
 Returns the global dataset index of the dataset int the dataset group with groupIndex, that is between relative times time1 and time2.
 
QgsMeshDatasetMetadata datasetMetadata (const QgsMeshDatasetIndex &index) const
 Returns the metadata of the dataset with global index.
 
qint64 datasetRelativeTime (const QgsMeshDatasetIndex &index) const
 Returns the relative time of the dataset from the persistent provider reference time.
 
QgsMeshDatasetValue datasetValue (const QgsMeshDatasetIndex &index, int valueIndex) const
 Returns the value of the dataset with global index and valueIndex.
 
QgsMeshDataBlock datasetValues (const QgsMeshDatasetIndex &index, int valueIndex, int count) const
 Returns count values of the dataset with global index and from valueIndex.
 
QList< int > enabledDatasetGroupIndexes () const
 Returns a list of all group indexes that are enabled.
 
int extraDatasetGroupCount () const
 Returns the count of extra dataset groups.
 
int globalDatasetGroupIndexInSource (QgsMeshDatasetSourceInterface *source, int nativeGroupIndex) const
 Returns the global dataset group index of the dataset group with native index nativeGroupIndex in the source Returns -1 if the group or the source is not registered.
 
QString groupName (int groupIndex) const
 Returns the name of the dataset group with global index groupIndex.
 
bool hasTemporalCapabilities () const
 Returns whether at lea&st one of stored dataset group is temporal.
 
int indexFromGroupName (const QString &groupName) const
 Returns the global dataset group index of the dataset with name groupName.
 
bool isFaceActive (const QgsMeshDatasetIndex &index, int faceIndex) const
 Returns whether face is active for particular dataset.
 
void readXml (const QDomElement &storeElem, const QgsReadWriteContext &context)
 Reads the store's information from a DOM document.
 
void resetDatasetGroupTreeItem ()
 Resets to default state the dataset groups tree item.
 
bool saveDatasetGroup (QString filePath, int groupIndex, QString driver)
 Saves on a file with filePath the dataset groups index with groupIndex with the specified driver.
 
void setDatasetGroupTreeItem (const QgsMeshDatasetGroupTreeItem *rootItem)
 Sets the root of the dataset groups tree item.
 
void setPersistentProvider (QgsMeshDataProvider *provider, const QStringList &extraDatasetUri)
 Sets the persistent mesh data provider with the path of its extra dataset to be loaded by the provider.
 
QDomElement writeXml (QDomDocument &doc, const QgsReadWriteContext &context)
 Writes the store's information in a DOM document.
 

Detailed Description

Class used to register and access all the dataset groups related to a mesh layer.

The registered dataset group are :

Every dataset group has a unique global index group that can be different from the native index group of the dataset group. This storing class has the repsonsability to assign this unique grlobal dataset group index and to link this dataset group index with the dataset group

All dataset values or information needed can be retrieved from a QgsMeshDatasetIndex with the group index corresponding to the global group index. The native group index is not exposed and global index can be obtained with datasetGroupIndexes() that returns the list of global index available. The dataset index is the same than in the native source (data provider or other dataset source)

This class also has the responsibility to handle the dataset group tree item that contain information to display the available dataset (

See also
QgsMeshDatasetGroupTreeItem)
Since
QGIS 3.16

Definition at line 119 of file qgsmeshdatasetgroupstore.h.

Constructor & Destructor Documentation

◆ QgsMeshDatasetGroupStore()

QgsMeshDatasetGroupStore::QgsMeshDatasetGroupStore ( QgsMeshLayer layer)
explicit

Constructor.

Definition at line 46 of file qgsmeshdatasetgroupstore.cpp.

Member Function Documentation

◆ addDatasetGroup()

bool QgsMeshDatasetGroupStore::addDatasetGroup ( QgsMeshDatasetGroup group)

Adds a extra dataset group, take ownership, returns True if the group is effectivly added.

If returns False, the ownership is not taken

Definition at line 88 of file qgsmeshdatasetgroupstore.cpp.

◆ addPersistentDatasets()

bool QgsMeshDatasetGroupStore::addPersistentDatasets ( const QString &  path)

Adds persistent datasets from a file with path.

Definition at line 81 of file qgsmeshdatasetgroupstore.cpp.

◆ areFacesActive()

QgsMeshDataBlock QgsMeshDatasetGroupStore::areFacesActive ( const QgsMeshDatasetIndex index,
int  faceIndex,
int  count 
) const

Returns whether faces are active for particular dataset.

Definition at line 206 of file qgsmeshdatasetgroupstore.cpp.

◆ dataset3dValues()

QgsMesh3DDataBlock QgsMeshDatasetGroupStore::dataset3dValues ( const QgsMeshDatasetIndex index,
int  faceIndex,
int  count 
) const

Returns count 3D values of the dataset with global index and from valueIndex.

Definition at line 197 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetCount()

int QgsMeshDatasetGroupStore::datasetCount ( int  groupIndex) const

Returns the total count of dataset group in the store.

Definition at line 161 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetGroupCount()

int QgsMeshDatasetGroupStore::datasetGroupCount ( ) const

Returns the count of dataset groups.

Definition at line 36 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetGroupIndexes()

QList< int > QgsMeshDatasetGroupStore::datasetGroupIndexes ( ) const

Returns a list of all group indexes.

Definition at line 26 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetGroupMetadata()

QgsMeshDatasetGroupMetadata QgsMeshDatasetGroupStore::datasetGroupMetadata ( const QgsMeshDatasetIndex index) const

Returns the metadata of the dataset group with global index.

Definition at line 152 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetGroupsAdded

void QgsMeshDatasetGroupStore::datasetGroupsAdded ( QList< int >  indexes)
signal

Emitted after dataset groups are added.

◆ datasetGroupTreeItem()

QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupStore::datasetGroupTreeItem ( ) const

Returns a pointer to the root of the dataset groups tree item.

Definition at line 137 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetIndexAtTime()

QgsMeshDatasetIndex QgsMeshDatasetGroupStore::datasetIndexAtTime ( qint64  time,
int  groupIndex,
QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod  method 
) const

Returns the global dataset index of the dataset int the dataset group with groupIndex, corresponding to the relative time and the check method.

Definition at line 224 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetIndexInTimeInterval()

QList< QgsMeshDatasetIndex > QgsMeshDatasetGroupStore::datasetIndexInTimeInterval ( qint64  time1,
qint64  time2,
int  groupIndex 
) const

Returns the global dataset index of the dataset int the dataset group with groupIndex, that is between relative times time1 and time2.

Since
QGIS 3.22

Definition at line 238 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetMetadata()

QgsMeshDatasetMetadata QgsMeshDatasetGroupStore::datasetMetadata ( const QgsMeshDatasetIndex index) const

Returns the metadata of the dataset with global index.

Definition at line 170 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetRelativeTime()

qint64 QgsMeshDatasetGroupStore::datasetRelativeTime ( const QgsMeshDatasetIndex index) const

Returns the relative time of the dataset from the persistent provider reference time.

Definition at line 260 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetValue()

QgsMeshDatasetValue QgsMeshDatasetGroupStore::datasetValue ( const QgsMeshDatasetIndex index,
int  valueIndex 
) const

Returns the value of the dataset with global index and valueIndex.

Definition at line 179 of file qgsmeshdatasetgroupstore.cpp.

◆ datasetValues()

QgsMeshDataBlock QgsMeshDatasetGroupStore::datasetValues ( const QgsMeshDatasetIndex index,
int  valueIndex,
int  count 
) const

Returns count values of the dataset with global index and from valueIndex.

Definition at line 188 of file qgsmeshdatasetgroupstore.cpp.

◆ enabledDatasetGroupIndexes()

QList< int > QgsMeshDatasetGroupStore::enabledDatasetGroupIndexes ( ) const

Returns a list of all group indexes that are enabled.

Since
QGIS 3.16.3

Definition at line 31 of file qgsmeshdatasetgroupstore.cpp.

◆ extraDatasetGroupCount()

int QgsMeshDatasetGroupStore::extraDatasetGroupCount ( ) const

Returns the count of extra dataset groups.

Definition at line 41 of file qgsmeshdatasetgroupstore.cpp.

◆ globalDatasetGroupIndexInSource()

int QgsMeshDatasetGroupStore::globalDatasetGroupIndexInSource ( QgsMeshDatasetSourceInterface source,
int  nativeGroupIndex 
) const

Returns the global dataset group index of the dataset group with native index nativeGroupIndex in the source Returns -1 if the group or the source is not registered.

Since
QGIS 3.22

Definition at line 385 of file qgsmeshdatasetgroupstore.cpp.

◆ groupName()

QString QgsMeshDatasetGroupStore::groupName ( int  groupIndex) const

Returns the name of the dataset group with global index groupIndex.

Since
QGIS 3.30.2

Definition at line 401 of file qgsmeshdatasetgroupstore.cpp.

◆ hasTemporalCapabilities()

bool QgsMeshDatasetGroupStore::hasTemporalCapabilities ( ) const

Returns whether at lea&st one of stored dataset group is temporal.

Definition at line 277 of file qgsmeshdatasetgroupstore.cpp.

◆ indexFromGroupName()

int QgsMeshDatasetGroupStore::indexFromGroupName ( const QString &  groupName) const

Returns the global dataset group index of the dataset with name groupName.

Since
QGIS 3.30.2

Definition at line 396 of file qgsmeshdatasetgroupstore.cpp.

◆ isFaceActive()

bool QgsMeshDatasetGroupStore::isFaceActive ( const QgsMeshDatasetIndex index,
int  faceIndex 
) const

Returns whether face is active for particular dataset.

Definition at line 215 of file qgsmeshdatasetgroupstore.cpp.

◆ readXml()

void QgsMeshDatasetGroupStore::readXml ( const QDomElement &  storeElem,
const QgsReadWriteContext context 
)

Reads the store's information from a DOM document.

Definition at line 328 of file qgsmeshdatasetgroupstore.cpp.

◆ resetDatasetGroupTreeItem()

void QgsMeshDatasetGroupStore::resetDatasetGroupTreeItem ( )

Resets to default state the dataset groups tree item.

Definition at line 128 of file qgsmeshdatasetgroupstore.cpp.

◆ saveDatasetGroup()

bool QgsMeshDatasetGroupStore::saveDatasetGroup ( QString  filePath,
int  groupIndex,
QString  driver 
)

Saves on a file with filePath the dataset groups index with groupIndex with the specified driver.

Definition at line 406 of file qgsmeshdatasetgroupstore.cpp.

◆ setDatasetGroupTreeItem()

void QgsMeshDatasetGroupStore::setDatasetGroupTreeItem ( const QgsMeshDatasetGroupTreeItem rootItem)

Sets the root of the dataset groups tree item.

The rootItem is cloned (ownership is not transferred).

Definition at line 142 of file qgsmeshdatasetgroupstore.cpp.

◆ setPersistentProvider()

void QgsMeshDatasetGroupStore::setPersistentProvider ( QgsMeshDataProvider provider,
const QStringList &  extraDatasetUri 
)

Sets the persistent mesh data provider with the path of its extra dataset to be loaded by the provider.

Definition at line 51 of file qgsmeshdatasetgroupstore.cpp.

◆ writeXml()

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

Writes the store's information in a DOM document.

Definition at line 283 of file qgsmeshdatasetgroupstore.cpp.


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