QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
src
core
mesh
qgsmeshvirtualdatasetgroup.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmeshvirtualdatasetgroup.h
3
---------------------
4
begin : June 2020
5
copyright : (C) 2020 by Vincent Cloarec
6
email : vcloarec at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSMESHVIRTUALDATASETGROUP_H
19
#define QGSMESHVIRTUALDATASETGROUP_H
20
21
#include "
qgsmeshdataset.h
"
22
#include "
qgsmeshcalcnode.h
"
23
24
#include "
qgsmeshlayertemporalproperties.h
"
25
26
#define SIP_NO_FILE
27
37
class
CORE_EXPORT
QgsMeshVirtualDatasetGroup
:
public
QgsMeshDatasetGroup
38
{
39
public
:
40
49
QgsMeshVirtualDatasetGroup
(
const
QString &name,
50
const
QString &formulaString,
51
QgsMeshLayer
*layer,
52
qint64 relativeStartTime,
53
qint64 relativeEndTime );
54
55
void
initialize
()
override
;
56
int
datasetCount
()
const override
;
57
QgsMeshDataset
*
dataset
(
int
index )
const override
;
58
QgsMeshDatasetMetadata
datasetMetadata
(
int
datasetIndex )
const override
;
59
QStringList
datasetGroupNamesDependentOn
()
const override
;
60
QDomElement
writeXml
( QDomDocument &doc,
const
QgsReadWriteContext
&context )
const override
;
61
QString
description
()
const override
;
62
QgsMeshDatasetGroup::Type
type
()
const override
{
return
QgsMeshDatasetGroup::Virtual
;}
63
64
private
:
65
QString mFormula;
66
std::unique_ptr<QgsMeshCalcNode> mCalcNode;
67
QgsMeshLayer
*mLayer =
nullptr
;
68
qint64 mStartTime = 0.0;
69
qint64 mEndTime = 0.0;
70
QStringList mDatasetGroupNameUsed;
71
QList<qint64> mDatasetTimes;
72
73
mutable
std::shared_ptr<QgsMeshMemoryDataset> mCacheDataset;
74
mutable
QVector<QgsMeshDatasetMetadata> mDatasetMetaData;
75
mutable
int
mCurrentDatasetIndex = -1;
76
77
bool
calculateDataset()
const
;
78
};
79
80
#endif // QGSMESHVIRTUALDATASETGROUP_H
qgsmeshcalcnode.h
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition:
qgsreadwritecontext.h:35
QgsMeshDatasetGroup::writeXml
virtual QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const =0
Write dataset group information in a DOM element.
QgsMeshDatasetGroup::datasetCount
virtual int datasetCount() const =0
Returns the count of datasets in the group.
QgsMeshDataset
Abstract class that represents a dataset.
Definition:
qgsmeshdataset.h:541
QgsMeshDatasetMetadata
QgsMeshDatasetMetadata is a collection of mesh dataset metadata such as whether the data is valid or ...
Definition:
qgsmeshdataset.h:476
QgsMeshVirtualDatasetGroup
Represents a dataset group calculated from a formula string.
Definition:
qgsmeshvirtualdatasetgroup.h:38
QgsMeshLayer
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition:
qgsmeshlayer.h:95
QgsMeshDatasetGroup::initialize
virtual void initialize()=0
Initialize the dataset group.
QgsMeshDatasetGroup::dataset
virtual QgsMeshDataset * dataset(int index) const =0
Returns the dataset with index.
QgsMeshDatasetGroup
Abstract class that represents a dataset group.
Definition:
qgsmeshdataset.h:576
QgsMeshDatasetGroup::datasetMetadata
virtual QgsMeshDatasetMetadata datasetMetadata(int datasetIndex) const =0
Returns the metadata of the dataset with index datasetIndex.
QgsMeshDatasetGroup::description
virtual QString description() const
Returns some information about the dataset group.
Definition:
qgsmeshdataset.cpp:979
QgsMeshDatasetGroup::Type
Type
Type of the dataset group.
Definition:
qgsmeshdataset.h:585
qgsmeshdataset.h
QgsMeshVirtualDatasetGroup::type
QgsMeshDatasetGroup::Type type() const override
Returns the type of dataset group.
Definition:
qgsmeshvirtualdatasetgroup.h:62
QgsMeshDatasetGroup::datasetGroupNamesDependentOn
virtual QStringList datasetGroupNamesDependentOn() const
Returns the dataset group variable name which this dataset group depends on.
Definition:
qgsmeshdataset.cpp:974
qgsmeshlayertemporalproperties.h
QgsMeshDatasetGroup::Virtual
@ Virtual
Temporary dataset group in memory.
Definition:
qgsmeshdataset.h:589
Generated on Sat Oct 24 2020 17:43:09 for QGIS API Documentation by
1.8.20