QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
Class used to register and access all the dataset groups related to a mesh layer. More...
#include <qgsmeshdatasetgroupstore.h>
Signals | |
void | datasetGroupsAdded (QList< int > indexes) |
Emitted after dataset groups are added. More... | |
Public Member Functions | |
QgsMeshDatasetGroupStore (QgsMeshLayer *layer) | |
Constructor. More... | |
bool | addDatasetGroup (QgsMeshDatasetGroup *group) |
Adds a extra dataset group, take ownership. More... | |
bool | addPersistentDatasets (const QString &path) |
Adds persistent datasets from a file with path. More... | |
QgsMeshDataBlock | areFacesActive (const QgsMeshDatasetIndex &index, int faceIndex, int count) const |
Returns whether faces are active for particular dataset. More... | |
QgsMesh3dDataBlock | dataset3dValues (const QgsMeshDatasetIndex &index, int faceIndex, int count) const |
Returns count 3D values of the dataset with global index and from valueIndex. More... | |
int | datasetCount (int groupIndex) const |
Returns the total count of dataset group in the store. More... | |
int | datasetGroupCount () const |
Returns the count of dataset groups. More... | |
QList< int > | datasetGroupIndexes () const |
Returns a list of all group indexes. More... | |
QgsMeshDatasetGroupMetadata | datasetGroupMetadata (const QgsMeshDatasetIndex &index) const |
Returns the metadata of the dataset group with global index. More... | |
QgsMeshDatasetGroupTreeItem * | datasetGroupTreeItem () const |
Returns a pointer to the root of the dataset groups tree item. More... | |
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. More... | |
QList< QgsMeshDatasetIndex > | 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. More... | |
QgsMeshDatasetMetadata | datasetMetadata (const QgsMeshDatasetIndex &index) const |
Returns the metadata of the dataset with global index. More... | |
qint64 | datasetRelativeTime (const QgsMeshDatasetIndex &index) const |
Returns the relative time of the dataset from the persistent provider reference time. More... | |
QgsMeshDatasetValue | datasetValue (const QgsMeshDatasetIndex &index, int valueIndex) const |
Returns the value of the dataset with global index and valueIndex. More... | |
QgsMeshDataBlock | datasetValues (const QgsMeshDatasetIndex &index, int valueIndex, int count) const |
Returns count values of the dataset with global index and from valueIndex. More... | |
QList< int > | enabledDatasetGroupIndexes () const |
Returns a list of all group indexes that are enabled. More... | |
int | extraDatasetGroupCount () const |
Returns the count of extra dataset groups. More... | |
int | globalDatasetGroupIndexInSource (QgsMeshDatasetSourceInterface *source, int nativeGroupIndex) const |
Returns the global dataset group index of the dataset group with native index globalGroupIndex in the source Returns -1 if the group or the source is not registered. More... | |
bool | hasTemporalCapabilities () const |
Returns whether at lea&st one of stored dataset group is temporal. More... | |
bool | isFaceActive (const QgsMeshDatasetIndex &index, int faceIndex) const |
Returns whether face is active for particular dataset. More... | |
void | readXml (const QDomElement &storeElem, const QgsReadWriteContext &context) |
Reads the store's information from a DOM document. More... | |
void | resetDatasetGroupTreeItem () |
Resets to default state the dataset groups tree item. More... | |
bool | saveDatasetGroup (QString filePath, int groupIndex, QString driver) |
Saves on a file with filePath the dataset groups index with groupIndex with the specified driver. More... | |
void | setDatasetGroupTreeItem (QgsMeshDatasetGroupTreeItem *rootItem) |
Sets the root of the dataset groups tree item, doesn't take onwnershib but clone the root item. More... | |
void | setPersistentProvider (QgsMeshDataProvider *provider, const QStringList &extraDatasetUri) |
Sets the persistent mesh data provider with the path of its extra dataset. More... | |
QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context) |
Writes the store's information in a DOM document. More... | |
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 (
Definition at line 119 of file qgsmeshdatasetgroupstore.h.
QgsMeshDatasetGroupStore::QgsMeshDatasetGroupStore | ( | QgsMeshLayer * | layer | ) |
Constructor.
Definition at line 45 of file qgsmeshdatasetgroupstore.cpp.
bool QgsMeshDatasetGroupStore::addDatasetGroup | ( | QgsMeshDatasetGroup * | group | ) |
Adds a extra dataset group, take ownership.
Definition at line 94 of file qgsmeshdatasetgroupstore.cpp.
bool QgsMeshDatasetGroupStore::addPersistentDatasets | ( | const QString & | path | ) |
Adds persistent datasets from a file with path.
Definition at line 87 of file qgsmeshdatasetgroupstore.cpp.
QgsMeshDataBlock QgsMeshDatasetGroupStore::areFacesActive | ( | const QgsMeshDatasetIndex & | index, |
int | faceIndex, | ||
int | count | ||
) | const |
Returns whether faces are active for particular dataset.
Definition at line 208 of file qgsmeshdatasetgroupstore.cpp.
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 199 of file qgsmeshdatasetgroupstore.cpp.
int QgsMeshDatasetGroupStore::datasetCount | ( | int | groupIndex | ) | const |
Returns the total count of dataset group in the store.
Definition at line 163 of file qgsmeshdatasetgroupstore.cpp.
int QgsMeshDatasetGroupStore::datasetGroupCount | ( | ) | const |
Returns the count of dataset groups.
Definition at line 35 of file qgsmeshdatasetgroupstore.cpp.
QList< int > QgsMeshDatasetGroupStore::datasetGroupIndexes | ( | ) | const |
Returns a list of all group indexes.
Definition at line 25 of file qgsmeshdatasetgroupstore.cpp.
QgsMeshDatasetGroupMetadata QgsMeshDatasetGroupStore::datasetGroupMetadata | ( | const QgsMeshDatasetIndex & | index | ) | const |
Returns the metadata of the dataset group with global index.
Definition at line 154 of file qgsmeshdatasetgroupstore.cpp.
|
signal |
Emitted after dataset groups are added.
QgsMeshDatasetGroupTreeItem * QgsMeshDatasetGroupStore::datasetGroupTreeItem | ( | ) | const |
Returns a pointer to the root of the dataset groups tree item.
Definition at line 139 of file qgsmeshdatasetgroupstore.cpp.
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 226 of file qgsmeshdatasetgroupstore.cpp.
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 240 of file qgsmeshdatasetgroupstore.cpp.
QgsMeshDatasetMetadata QgsMeshDatasetGroupStore::datasetMetadata | ( | const QgsMeshDatasetIndex & | index | ) | const |
Returns the metadata of the dataset with global index.
Definition at line 172 of file qgsmeshdatasetgroupstore.cpp.
qint64 QgsMeshDatasetGroupStore::datasetRelativeTime | ( | const QgsMeshDatasetIndex & | index | ) | const |
Returns the relative time of the dataset from the persistent provider reference time.
Definition at line 262 of file qgsmeshdatasetgroupstore.cpp.
QgsMeshDatasetValue QgsMeshDatasetGroupStore::datasetValue | ( | const QgsMeshDatasetIndex & | index, |
int | valueIndex | ||
) | const |
Returns the value of the dataset with global index and valueIndex.
Definition at line 181 of file qgsmeshdatasetgroupstore.cpp.
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 190 of file qgsmeshdatasetgroupstore.cpp.
QList< int > QgsMeshDatasetGroupStore::enabledDatasetGroupIndexes | ( | ) | const |
Returns a list of all group indexes that are enabled.
Definition at line 30 of file qgsmeshdatasetgroupstore.cpp.
int QgsMeshDatasetGroupStore::extraDatasetGroupCount | ( | ) | const |
Returns the count of extra dataset groups.
Definition at line 40 of file qgsmeshdatasetgroupstore.cpp.
int QgsMeshDatasetGroupStore::globalDatasetGroupIndexInSource | ( | QgsMeshDatasetSourceInterface * | source, |
int | nativeGroupIndex | ||
) | const |
Returns the global dataset group index of the dataset group with native index globalGroupIndex in the source Returns -1 if the group or the source is not registered.
Since QGIS 3.22
Definition at line 368 of file qgsmeshdatasetgroupstore.cpp.
bool QgsMeshDatasetGroupStore::hasTemporalCapabilities | ( | ) | const |
Returns whether at lea&st one of stored dataset group is temporal.
Definition at line 279 of file qgsmeshdatasetgroupstore.cpp.
bool QgsMeshDatasetGroupStore::isFaceActive | ( | const QgsMeshDatasetIndex & | index, |
int | faceIndex | ||
) | const |
Returns whether face is active for particular dataset.
Definition at line 217 of file qgsmeshdatasetgroupstore.cpp.
void QgsMeshDatasetGroupStore::readXml | ( | const QDomElement & | storeElem, |
const QgsReadWriteContext & | context | ||
) |
Reads the store's information from a DOM document.
Definition at line 321 of file qgsmeshdatasetgroupstore.cpp.
void QgsMeshDatasetGroupStore::resetDatasetGroupTreeItem | ( | ) |
Resets to default state the dataset groups tree item.
Definition at line 130 of file qgsmeshdatasetgroupstore.cpp.
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 379 of file qgsmeshdatasetgroupstore.cpp.
void QgsMeshDatasetGroupStore::setDatasetGroupTreeItem | ( | QgsMeshDatasetGroupTreeItem * | rootItem | ) |
Sets the root of the dataset groups tree item, doesn't take onwnershib but clone the root item.
Definition at line 144 of file qgsmeshdatasetgroupstore.cpp.
void QgsMeshDatasetGroupStore::setPersistentProvider | ( | QgsMeshDataProvider * | provider, |
const QStringList & | extraDatasetUri | ||
) |
Sets the persistent mesh data provider with the path of its extra dataset.
Definition at line 51 of file qgsmeshdatasetgroupstore.cpp.
QDomElement QgsMeshDatasetGroupStore::writeXml | ( | QDomDocument & | doc, |
const QgsReadWriteContext & | context | ||
) |
Writes the store's information in a DOM document.
Definition at line 285 of file qgsmeshdatasetgroupstore.cpp.