QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
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 "
qgsmeshcalcnode.h
"
22
#include "
qgsmeshdataset.h
"
23
#include "
qgsmeshlayertemporalproperties.h
"
24
25
#define SIP_NO_FILE
26
37
class
CORE_EXPORT
QgsMeshVirtualDatasetGroup
:
public
QgsMeshDatasetGroup
38
{
39
public
:
48
QgsMeshVirtualDatasetGroup
(
const
QString &
name
,
const
QString &formulaString,
QgsMeshLayer
*layer, qint64 relativeStartTime, qint64 relativeEndTime );
49
50
void
initialize
()
override
;
51
int
datasetCount
()
const override
;
52
QgsMeshDataset
*
dataset
(
int
index )
const override
;
53
QgsMeshDatasetMetadata
datasetMetadata
(
int
datasetIndex )
const override
;
54
QStringList
datasetGroupNamesDependentOn
()
const override
;
55
QDomElement
writeXml
( QDomDocument &doc,
const
QgsReadWriteContext
&context )
const override
;
56
QString
description
()
const override
;
57
QgsMeshDatasetGroup::Type
type
()
const override
{
return
QgsMeshDatasetGroup::Virtual
; }
58
59
private
:
60
QString mFormula;
61
std::unique_ptr<QgsMeshCalcNode> mCalcNode;
62
QgsMeshLayer
*mLayer =
nullptr
;
63
qint64 mStartTime = 0;
64
qint64 mEndTime = 0;
65
QStringList mDatasetGroupNameUsed;
66
QStringList mDatasetGroupNameUsedForAggregate;
67
QList<qint64> mDatasetTimes;
68
69
mutable
std::shared_ptr<QgsMeshMemoryDataset> mCacheDataset;
70
mutable
QVector<QgsMeshDatasetMetadata> mDatasetMetaData;
71
mutable
int
mCurrentDatasetIndex = -1;
72
73
bool
calculateDataset()
const
;
74
};
75
76
#endif
// QGSMESHVIRTUALDATASETGROUP_H
QgsMeshDatasetGroup::datasetMetadata
virtual QgsMeshDatasetMetadata datasetMetadata(int datasetIndex) const =0
Returns the metadata of the dataset with index datasetIndex.
QgsMeshDatasetGroup::QgsMeshDatasetGroup
QgsMeshDatasetGroup()=default
QgsMeshDatasetGroup::name
QString name() const
Returns the name of the dataset group.
Definition
qgsmeshdataset.cpp:1103
QgsMeshDatasetGroup::datasetGroupNamesDependentOn
virtual QStringList datasetGroupNamesDependentOn() const
Returns the dataset group variable name which this dataset group depends on.
Definition
qgsmeshdataset.cpp:1030
QgsMeshDatasetGroup::description
virtual QString description() const
Returns some information about the dataset group.
Definition
qgsmeshdataset.cpp:1035
QgsMeshDatasetGroup::Type
Type
Type of the dataset group.
Definition
qgsmeshdataset.h:601
QgsMeshDatasetGroup::Virtual
@ Virtual
Virtual Dataset group defined by a formula.
Definition
qgsmeshdataset.h:605
QgsMeshDatasetGroup::initialize
virtual void initialize()=0
Initialize the dataset group.
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.
QgsMeshDatasetGroup::dataset
virtual QgsMeshDataset * dataset(int index) const =0
Returns the dataset with index.
QgsMeshDatasetMetadata
Represents mesh dataset metadata, such as whether the data is valid or the associated time.
Definition
qgsmeshdataset.h:500
QgsMeshDataset
Abstract class that represents a mesh dataset.
Definition
qgsmeshdataset.h:560
QgsMeshLayer
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Definition
qgsmeshlayer.h:105
QgsMeshVirtualDatasetGroup::QgsMeshVirtualDatasetGroup
QgsMeshVirtualDatasetGroup(const QString &name, const QString &formulaString, QgsMeshLayer *layer, qint64 relativeStartTime, qint64 relativeEndTime)
Constructor.
Definition
qgsmeshvirtualdatasetgroup.cpp:24
QgsMeshVirtualDatasetGroup::type
QgsMeshDatasetGroup::Type type() const override
Returns the type of dataset group.
Definition
qgsmeshvirtualdatasetgroup.h:57
QgsReadWriteContext
A container for the context for various read/write operations on objects.
Definition
qgsreadwritecontext.h:38
qgsmeshcalcnode.h
qgsmeshdataset.h
qgsmeshlayertemporalproperties.h
Generated on
for QGIS API Documentation by
1.17.0