QGIS API Documentation
3.20.0-Odense (decaadbb31)
src
core
layertree
qgscolorramplegendnodesettings.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscolorramplegendnode.h
3
--------------------------------------
4
Date : December 2020
5
Copyright : (C) 2020 by 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 QGSCOLORRAMPLEGENDNODESETTINGS_H
17
#define QGSCOLORRAMPLEGENDNODESETTINGS_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
22
#include "
qgstextformat.h
"
23
#include <QString>
24
#include <memory>
25
26
class
QgsNumericFormat
;
27
class
QgsReadWriteContext
;
28
class
QDomDocument;
29
class
QDomElement;
30
37
class
CORE_EXPORT
QgsColorRampLegendNodeSettings
38
{
39
public
:
40
44
enum
Direction
45
{
46
MinimumToMaximum
,
47
MaximumToMinimum
,
48
};
49
50
QgsColorRampLegendNodeSettings
();
51
52
~QgsColorRampLegendNodeSettings
();
53
55
QgsColorRampLegendNodeSettings
(
const
QgsColorRampLegendNodeSettings
&other );
56
57
QgsColorRampLegendNodeSettings
&operator=(
const
QgsColorRampLegendNodeSettings
&other );
58
65
QgsColorRampLegendNodeSettings::Direction
direction()
const
;
66
73
void
setDirection(
QgsColorRampLegendNodeSettings::Direction
direction );
74
83
QString minimumLabel()
const
;
84
93
void
setMinimumLabel(
const
QString &label );
94
103
QString maximumLabel()
const
;
104
113
void
setMaximumLabel(
const
QString &label );
114
121
const
QgsNumericFormat
*numericFormat()
const
;
122
131
void
setNumericFormat(
QgsNumericFormat
*format
SIP_TRANSFER
);
132
136
void
writeXml( QDomDocument &doc, QDomElement &element,
const
QgsReadWriteContext
&context )
const
;
137
141
void
readXml(
const
QDomElement &element,
const
QgsReadWriteContext
&context );
142
149
QString prefix()
const
;
150
157
void
setPrefix(
const
QString &prefix );
158
165
QString suffix()
const
;
166
173
void
setSuffix(
const
QString &suffix );
174
180
QgsTextFormat
textFormat()
const
;
181
187
void
setTextFormat(
const
QgsTextFormat
&format );
188
195
Qt::Orientation orientation()
const
;
196
203
void
setOrientation( Qt::Orientation orientation );
204
210
bool
useContinuousLegend()
const
;
211
222
void
setUseContinuousLegend(
bool
useContinuousLegend );
223
224
private
:
225
bool
mUseContinuousLegend =
true
;
226
QString mMinimumLabel;
227
QString mMaximumLabel;
228
QString mPrefix;
229
QString mSuffix;
230
Direction
mDirection = MinimumToMaximum;
231
std::unique_ptr< QgsNumericFormat > mNumericFormat;
232
QgsTextFormat
mTextFormat;
233
Qt::Orientation mOrientation = Qt::Vertical;
234
};
235
236
#endif
// QGSCOLORRAMPLEGENDNODESETTINGS_H
QgsColorRampLegendNodeSettings
Settings for a color ramp legend node.
Definition:
qgscolorramplegendnodesettings.h:38
QgsColorRampLegendNodeSettings::Direction
Direction
Ramp directions.
Definition:
qgscolorramplegendnodesettings.h:45
QgsColorRampLegendNodeSettings::MaximumToMinimum
@ MaximumToMinimum
Maximum value on bottom, minimum value on top.
Definition:
qgscolorramplegendnodesettings.h:47
QgsColorRampLegendNodeSettings::MinimumToMaximum
@ MinimumToMaximum
Minimum value on bottom, maximum value on top.
Definition:
qgscolorramplegendnodesettings.h:46
QgsColorRampLegendNodeSettings::~QgsColorRampLegendNodeSettings
~QgsColorRampLegendNodeSettings()
QgsNumericFormat
A numeric formatter allows for formatting a numeric value for display, using a variety of different f...
Definition:
qgsnumericformat.h:218
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition:
qgsreadwritecontext.h:35
QgsTextFormat
Container for all settings relating to text rendering.
Definition:
qgstextformat.h:41
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition:
qgis_sip.h:36
qgstextformat.h
Generated on Sun Jun 20 2021 10:45:59 for QGIS API Documentation by
1.9.1