QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
src
core
qgsmaplayertemporalproperties.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmaplayertemporalproperties.h
3
---------------
4
begin : February 2020
5
copyright : (C) 2020 by Samweli Mwakisambwe
6
email : samweli at kartoza 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
19
#ifndef QGSMAPLAYERTEMPORALPROPERTIES_H
20
#define QGSMAPLAYERTEMPORALPROPERTIES_H
21
22
#include "qgis_core.h"
23
#include "
qgis_sip.h
"
24
#include "
qgstemporalproperty.h
"
25
#include "
qgsreadwritecontext.h
"
26
#include "
qgsrange.h
"
27
28
#include <QDomElement>
29
30
class
QgsDataProviderTemporalCapabilities
;
31
42
class
CORE_EXPORT
QgsMapLayerTemporalProperties
:
public
QgsTemporalProperty
43
{
44
#ifdef SIP_RUN
45
#include "
qgsrasterlayertemporalproperties.h
"
46
#include "
qgsmeshlayertemporalproperties.h
"
47
#include "
qgsvectorlayertemporalproperties.h
"
48
#endif
49
50
Q_OBJECT
51
52
#ifdef SIP_RUN
53
SIP_CONVERT_TO_SUBCLASS_CODE
54
if
( qobject_cast<QgsRasterLayerTemporalProperties *>( sipCpp ) )
55
{
56
sipType = sipType_QgsRasterLayerTemporalProperties;
57
}
58
else
if
( qobject_cast<QgsMeshLayerTemporalProperties *>( sipCpp ) )
59
{
60
sipType = sipType_QgsMeshLayerTemporalProperties;
61
}
62
else
if
( qobject_cast<QgsVectorLayerTemporalProperties *>( sipCpp ) )
63
{
64
sipType = sipType_QgsVectorLayerTemporalProperties;
65
}
66
else
67
{
68
sipType = 0;
69
}
70
SIP_END
71
#endif
72
73
public
:
74
80
QgsMapLayerTemporalProperties
( QObject *parent
SIP_TRANSFERTHIS
,
bool
enabled =
false
);
81
87
virtual
QDomElement writeXml( QDomElement &element, QDomDocument &doc,
const
QgsReadWriteContext
&context ) = 0;
88
94
virtual
bool
readXml(
const
QDomElement &element,
const
QgsReadWriteContext
&context ) = 0;
95
99
virtual
bool
isVisibleInTemporalRange(
const
QgsDateTimeRange &range )
const
;
100
105
virtual
void
setDefaultsFromDataProviderTemporalCapabilities(
const
QgsDataProviderTemporalCapabilities
*capabilities ) = 0;
106
107
#ifndef SIP_RUN
108
// sip gets confused with this, refuses to compile
109
118
virtual
QgsDateTimeRange calculateTemporalExtent(
QgsMapLayer
*layer )
const
;
119
#endif
120
129
virtual
QList< QgsDateTimeRange > allTemporalRanges(
QgsMapLayer
*layer )
const
;
130
131
};
132
133
#endif // QGSMAPLAYERTEMPORALPROPERTIES_H
qgstemporalproperty.h
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition:
qgsreadwritecontext.h:34
qgsreadwritecontext.h
qgsrange.h
QgsDataProviderTemporalCapabilities
Base class for handling properties relating to a data provider's temporal capabilities.
Definition:
qgsdataprovidertemporalcapabilities.h:33
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition:
qgis_sip.h:186
qgsvectorlayertemporalproperties.h
qgis_sip.h
QgsMapLayerTemporalProperties
Base class for storage of map layer temporal properties.
Definition:
qgsmaplayertemporalproperties.h:42
QgsTemporalProperty
Base class for temporal property.
Definition:
qgstemporalproperty.h:35
QgsMapLayer
Base class for all map layer types. This is the base class for all map layer types (vector,...
Definition:
qgsmaplayer.h:72
qgsrasterlayertemporalproperties.h
SIP_END
#define SIP_END
Definition:
qgis_sip.h:203
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition:
qgis_sip.h:53
qgsmeshlayertemporalproperties.h
Generated on Sun Sep 11 2022 00:03:17 for QGIS API Documentation by
1.8.17