QGIS API Documentation
3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
src
core
elevation
qgselevationprofile.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgselevationprofile.h
3
------------------
4
Date : July 2025
5
Copyright : (C) 2025 Nyall Dawson
6
Email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSELEVATIONPROFILE_H
17
#define QGSELEVATIONPROFILE_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
#include "
qgscoordinatereferencesystem.h
"
22
#include "
qgsmaplayerref.h
"
23
24
#include <QObject>
25
#include <QPointer>
26
27
class
QgsProject
;
28
class
QgsReadWriteContext
;
29
class
QDomDocument;
30
class
QDomElement;
31
class
QgsMapLayer
;
32
class
QgsCurve
;
33
class
QgsLineSymbol
;
34
class
QgsLayerTree
;
35
44
class
CORE_EXPORT
QgsElevationProfile
:
public
QObject
45
{
46
Q_OBJECT
47
48
public
:
49
53
explicit
QgsElevationProfile
(
QgsProject
*project );
54
~QgsElevationProfile
()
override
;
55
62
QString
name
()
const
{
return
mName; }
63
68
QDomElement writeXml( QDomDocument &document,
const
QgsReadWriteContext
&context )
const
;
69
78
bool
readXml(
const
QDomElement &element,
const
QDomDocument &document,
const
QgsReadWriteContext
&context );
79
85
void
resolveReferences(
const
QgsProject
*project );
86
90
QIcon icon()
const
;
91
95
QgsLayerTree
*layerTree();
96
102
QgsCoordinateReferenceSystem
crs()
const
;
103
113
void
setProfileCurve(
QgsCurve
*curve
SIP_TRANSFER
);
114
122
QgsCurve
*profileCurve()
const
;
123
133
double
tolerance()
const
;
134
140
bool
lockAxisScales()
const
;
141
147
Qgis::DistanceUnit
distanceUnit()
const
;
148
154
QgsLineSymbol
*subsectionsSymbol();
155
164
void
setSubsectionsSymbol(
QgsLineSymbol
*symbol
SIP_TRANSFER
);
165
166
public
slots:
167
174
void
setName(
const
QString &name );
175
181
void
setCrs(
const
QgsCoordinateReferenceSystem
&crs );
182
192
void
setTolerance(
double
tolerance );
193
199
void
setLockAxisScales(
bool
lock );
200
206
void
setDistanceUnit(
Qgis::DistanceUnit
unit );
207
208
signals:
209
216
void
nameChanged
(
const
QString &newName );
217
218
private
slots:
219
220
void
dirtyProject();
221
222
private
:
223
224
void
setupLayerTreeConnections();
225
226
QPointer< QgsProject > mProject;
227
QString mName;
228
QgsCoordinateReferenceSystem
mCrs;
229
bool
mLockAxisScales =
false
;
230
Qgis::DistanceUnit
mDistanceUnit =
Qgis::DistanceUnit::Unknown
;
231
std::unique_ptr<QgsLayerTree> mLayerTree;
232
std::unique_ptr<QgsCurve> mProfileCurve;
233
double
mTolerance = 0;
234
std::unique_ptr<QgsLineSymbol> mSubsectionsSymbol;
235
236
};
237
238
#endif
// QGSELEVATIONPROFILE_H
Qgis::DistanceUnit
DistanceUnit
Units of distance.
Definition
qgis.h:5013
Qgis::DistanceUnit::Unknown
@ Unknown
Unknown distance unit.
Definition
qgis.h:5063
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:212
QgsCurve
Abstract base class for curved geometry type.
Definition
qgscurve.h:36
QgsElevationProfile::QgsElevationProfile
QgsElevationProfile(QgsProject *project)
Constructor for QgsElevationProfile.
Definition
qgselevationprofile.cpp:25
QgsElevationProfile::nameChanged
void nameChanged(const QString &newName)
Emitted when the profile is renamed.
QgsElevationProfile::name
QString name() const
Returns the profile's unique name.
Definition
qgselevationprofile.h:62
QgsElevationProfile::~QgsElevationProfile
~QgsElevationProfile() override
QgsLayerTree
Namespace with helper functions for layer tree operations.
Definition
qgslayertree.h:33
QgsLineSymbol
A line symbol type, for rendering LineString and MultiLineString geometries.
Definition
qgslinesymbol.h:30
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:80
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:109
QgsReadWriteContext
A container for the context for various read/write operations on objects.
Definition
qgsreadwritecontext.h:34
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:36
qgscoordinatereferencesystem.h
qgsmaplayerref.h
Generated on
for QGIS API Documentation by
1.15.0