QGIS API Documentation
3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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
54
QgsColorRampLegendNodeSettings
(
const
QgsColorRampLegendNodeSettings
&other );
55
56
QgsColorRampLegendNodeSettings
&operator=(
const
QgsColorRampLegendNodeSettings
&other );
57
64
QgsColorRampLegendNodeSettings::Direction
direction()
const
;
65
72
void
setDirection(
QgsColorRampLegendNodeSettings::Direction
direction );
73
82
QString minimumLabel()
const
;
83
92
void
setMinimumLabel(
const
QString &label );
93
102
QString maximumLabel()
const
;
103
112
void
setMaximumLabel(
const
QString &label );
113
120
const
QgsNumericFormat
*numericFormat()
const
;
121
130
void
setNumericFormat(
QgsNumericFormat
*format
SIP_TRANSFER
);
131
135
void
writeXml( QDomDocument &doc, QDomElement &element,
const
QgsReadWriteContext
&context )
const
;
136
140
void
readXml(
const
QDomElement &element,
const
QgsReadWriteContext
&context );
141
148
QString prefix()
const
;
149
156
void
setPrefix(
const
QString &prefix );
157
164
QString suffix()
const
;
165
172
void
setSuffix(
const
QString &suffix );
173
179
QgsTextFormat
textFormat()
const
;
180
186
void
setTextFormat(
const
QgsTextFormat
&format );
187
194
Qt::Orientation orientation()
const
;
195
202
void
setOrientation( Qt::Orientation orientation );
203
209
bool
useContinuousLegend()
const
;
210
221
void
setUseContinuousLegend(
bool
useContinuousLegend );
222
223
private
:
224
bool
mUseContinuousLegend =
true
;
225
QString mMinimumLabel;
226
QString mMaximumLabel;
227
QString mPrefix;
228
QString mSuffix;
229
Direction
mDirection = MinimumToMaximum;
230
std::unique_ptr< QgsNumericFormat > mNumericFormat;
231
QgsTextFormat
mTextFormat;
232
Qt::Orientation mOrientation = Qt::Vertical;
233
};
234
235
#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:279
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition
qgsreadwritecontext.h:34
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 Tue Nov 19 2024 18:20:01 for QGIS API Documentation by
1.9.8