QGIS API Documentation
3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
src
core
project
qgsprojectelevationproperties.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsprojectelevationproperties.h
3
---------------
4
begin : February 2022
5
copyright : (C) 2022 by Nyall Dawson
6
email : nyall dot dawson 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
#ifndef QGSPROJECTELEVATIONPROPERTIES_H
18
#define QGSPROJECTELEVATIONPROPERTIES_H
19
20
#include "qgis_core.h"
21
#include "
qgsrange.h
"
22
#include "
qgsunittypes.h
"
23
#include <memory>
24
#include <QObject>
25
26
class
QDomElement;
27
class
QgsReadWriteContext
;
28
class
QDomDocument;
29
class
QgsAbstractTerrainProvider
;
30
class
QgsProject
;
31
38
class
CORE_EXPORT
QgsProjectElevationProperties
:
public
QObject
39
{
40
Q_OBJECT
41
42
public
:
43
47
QgsProjectElevationProperties
( QObject *parent
SIP_TRANSFERTHIS
=
nullptr
);
48
49
~QgsProjectElevationProperties
()
override
;
50
54
void
reset();
55
59
void
resolveReferences(
const
QgsProject
*project );
60
65
bool
readXml(
const
QDomElement &element,
const
QgsReadWriteContext
&context );
66
71
QDomElement writeXml( QDomDocument &document,
const
QgsReadWriteContext
&context )
const
;
72
78
QgsAbstractTerrainProvider
*terrainProvider();
79
87
void
setTerrainProvider(
QgsAbstractTerrainProvider
*provider
SIP_TRANSFER
);
88
101
QgsDoubleRange
elevationRange
()
const
{
return
mElevationRange; }
102
115
double
elevationFilterRangeSize
()
const
{
return
mElevationFilterRangeSize; }
116
124
bool
invertElevationFilter
()
const
{
return
mInvertElevationFilter; }
125
126
public
slots:
127
140
void
setElevationRange(
const
QgsDoubleRange
&range );
141
154
void
setElevationFilterRangeSize(
double
size );
155
163
void
setInvertElevationFilter(
bool
invert );
164
165
signals:
166
170
void
changed
();
171
183
void
elevationRangeChanged
(
const
QgsDoubleRange
&range );
184
185
private
:
186
187
std::unique_ptr< QgsAbstractTerrainProvider > mTerrainProvider;
188
QgsDoubleRange
mElevationRange;
189
double
mElevationFilterRangeSize = -1;
190
bool
mInvertElevationFilter =
false
;
191
192
};
193
194
195
#endif
// QGSPROJECTELEVATIONPROPERTIES_H
QgsAbstractTerrainProvider
Abstract base class for terrain providers.
Definition
qgsterrainprovider.h:41
QgsDoubleRange
QgsRange which stores a range of double values.
Definition
qgsrange.h:231
QgsProjectElevationProperties
Contains elevation properties for a QgsProject.
Definition
qgsprojectelevationproperties.h:39
QgsProjectElevationProperties::elevationRange
QgsDoubleRange elevationRange() const
Returns the project's elevation range, which indicates the upper and lower elevation limits associate...
Definition
qgsprojectelevationproperties.h:101
QgsProjectElevationProperties::~QgsProjectElevationProperties
~QgsProjectElevationProperties() override
QgsProjectElevationProperties::elevationRangeChanged
void elevationRangeChanged(const QgsDoubleRange &range)
Emitted when the project's elevation is changed.
QgsProjectElevationProperties::elevationFilterRangeSize
double elevationFilterRangeSize() const
Returns the fixed size for elevation range filtering in the project, used when interactively filterin...
Definition
qgsprojectelevationproperties.h:115
QgsProjectElevationProperties::changed
void changed()
Emitted when the elevation properties change.
QgsProjectElevationProperties::invertElevationFilter
bool invertElevationFilter() const
Returns true if the elevation range filter slider should be inverted for this project.
Definition
qgsprojectelevationproperties.h:124
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:107
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition
qgsreadwritecontext.h:34
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:36
qgsrange.h
qgsunittypes.h
Generated on Sat Nov 23 2024 09:26:05 for QGIS API Documentation by
1.9.8