18#ifndef QGSMESHDATASETGROUPSTORE_H 
   19#define QGSMESHDATASETGROUPSTORE_H 
   71    bool addDataset( 
const QString &uri ) 
override;
 
   78                              const QString &outputDriver,
 
   81                              const QVector<QgsMeshDataBlock> &datasetActive,
 
   82                              const QVector<double> × ) 
override;
 
   86                              const QString &outputDriver,
 
   88                              int datasetGroupIndex ) 
override;
 
   97    std::vector<std::unique_ptr<QgsMeshDatasetGroup>> mGroups;
 
 
  126    typedef QPair<QgsMeshDatasetSourceInterface *, int> DatasetGroup;
 
  244    QString 
groupName( 
int groupIndex ) 
const;
 
  258    void onPersistentDatasetAdded( 
int count );
 
  264    QMap < int, DatasetGroup> mRegistry;
 
  265    QList<int> mPersistentExtraDatasetGroupIndexes;
 
  266    QMap<QString, int> mGroupNameToGlobalIndex;
 
  267    std::unique_ptr<QgsMeshDatasetGroupTreeItem> mDatasetGroupTreeRootItem;
 
  269    void removePersistentProvider();
 
  272    void reindexDatasetGroups();
 
  274    DatasetGroup datasetGroup( 
int index ) 
const;
 
  279    int registerDatasetGroup( 
const DatasetGroup &group );
 
  280    void createDatasetGroupTreeItems( 
const QList<int> &indexes );
 
  283    void eraseDatasetGroup( 
const DatasetGroup &group );
 
  286    void eraseExtraDataset( 
int indexInExtraStore );
 
  289    void removeUnregisteredItemFromTree();
 
  290    void unregisterGroupNotPresentInTree();
 
  292    void syncItemToDatasetGroup( 
int groupIndex );
 
 
A block of 3d stacked mesh data related N faces defined on base mesh frame.
A block of integers/doubles from a mesh dataset.
MatchingTemporalDatasetMethod
Method for selection of temporal mesh dataset from a range time.
Base class for providing data for QgsMeshLayer.
Registers and accesses all the dataset groups related to a mesh layer.
QgsMeshDatasetGroupTreeItem * datasetGroupTreeItem() const
Returns a pointer to the root of the dataset groups tree item.
QgsMeshDatasetMetadata datasetMetadata(const QgsMeshDatasetIndex &index) const
Returns the metadata of the dataset with global index.
void setDatasetGroupTreeItem(const QgsMeshDatasetGroupTreeItem *rootItem)
Sets the root of the dataset groups tree item.
QList< int > enabledDatasetGroupIndexes() const
Returns a list of all group indexes that are enabled.
bool addPersistentDatasets(const QString &path)
Adds persistent datasets from a file with path.
QgsMeshDatasetGroupMetadata datasetGroupMetadata(const QgsMeshDatasetIndex &index) const
Returns the metadata of the dataset group with global index.
bool isFaceActive(const QgsMeshDatasetIndex &index, int faceIndex) const
Returns whether face is active for particular dataset.
QList< int > datasetGroupIndexes() const
Returns a list of all group indexes.
bool hasTemporalCapabilities() const
Returns whether at lea&st one of stored dataset group is temporal.
void resetDatasetGroupTreeItem()
Resets to default state the dataset groups tree item.
QgsMeshDataBlock datasetValues(const QgsMeshDatasetIndex &index, int valueIndex, int count) const
Returns count values of the dataset with global index and from valueIndex.
QgsMeshDatasetIndex datasetIndexAtTime(qint64 time, int groupIndex, QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod method) const
Returns the global dataset index of the dataset int the dataset group with groupIndex,...
bool saveDatasetGroup(QString filePath, int groupIndex, QString driver)
Saves on a file with filePath the dataset groups index with groupIndex with the specified driver.
QList< QgsMeshDatasetIndex > datasetIndexInTimeInterval(qint64 time1, qint64 time2, int groupIndex) const
Returns the global dataset index of the dataset int the dataset group with groupIndex,...
bool addDatasetGroup(QgsMeshDatasetGroup *group)
Adds a extra dataset group, take ownership, returns True if the group is effectivly added.
QgsMeshDatasetValue datasetValue(const QgsMeshDatasetIndex &index, int valueIndex) const
Returns the value of the dataset with global index and valueIndex.
void removeDatasetGroup(int groupIndex)
Removes dataset group with global index groupIndex.
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context)
Writes the store's information in a DOM document.
int extraDatasetGroupCount() const
Returns the count of extra dataset groups.
int datasetGroupCount() const
Returns the count of dataset groups.
QgsMeshDataBlock areFacesActive(const QgsMeshDatasetIndex &index, int faceIndex, int count) const
Returns whether faces are active for particular dataset.
QString groupName(int groupIndex) const
Returns the name of the dataset group with global index groupIndex.
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 provide...
qint64 datasetRelativeTime(const QgsMeshDatasetIndex &index) const
Returns the relative time of the dataset from the persistent provider reference time.
int datasetCount(int groupIndex) const
Returns the total count of dataset group in the store.
void readXml(const QDomElement &storeElem, const QgsReadWriteContext &context)
Reads the store's information from a DOM document.
int globalDatasetGroupIndexInSource(QgsMeshDatasetSourceInterface *source, int nativeGroupIndex) const
Returns the global dataset group index of the dataset group with native index nativeGroupIndex in the...
int indexFromGroupName(const QString &groupName) const
Returns the global dataset group index of the dataset with name groupName.
void datasetGroupsAdded(QList< int > indexes)
Emitted after dataset groups are added.
QgsMesh3DDataBlock dataset3dValues(const QgsMeshDatasetIndex &index, int faceIndex, int count) const
Returns count 3D values of the dataset with global index and from valueIndex.
Tree item for display of the mesh dataset groups.
Abstract class that represents a dataset group.
An index that identifies the dataset group (e.g.
Interface for mesh datasets and dataset groups.
Represents a single mesh dataset value.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
A container for the context for various read/write operations on objects.