QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Settings for a color ramp legend node. More...
#include <qgscolorramplegendnodesettings.h>
Public Types | |
enum | Direction { MinimumToMaximum , MaximumToMinimum } |
Ramp directions. More... | |
Public Member Functions | |
QgsColorRampLegendNodeSettings () | |
QgsColorRampLegendNodeSettings (const QgsColorRampLegendNodeSettings &other) | |
Copy constructor. More... | |
~QgsColorRampLegendNodeSettings () | |
QgsColorRampLegendNodeSettings::Direction | direction () const |
Returns the direction of the ramp. More... | |
QString | maximumLabel () const |
Returns the label for the maximum value on the ramp. More... | |
QString | minimumLabel () const |
Returns the label for the minimum value on the ramp. More... | |
const QgsNumericFormat * | numericFormat () const |
Returns the numeric format used for numbers in the scalebar. More... | |
QgsColorRampLegendNodeSettings & | operator= (const QgsColorRampLegendNodeSettings &other) |
Qt::Orientation | orientation () const |
Returns the ramp orientation (i.e. More... | |
QString | prefix () const |
Returns the prefix to show before legend text. More... | |
void | readXml (const QDomElement &element, const QgsReadWriteContext &context) |
Reads settings from an XML element. More... | |
void | setDirection (QgsColorRampLegendNodeSettings::Direction direction) |
Sets the direction of the ramp. More... | |
void | setMaximumLabel (const QString &label) |
Sets the label for the maximum value on the ramp. More... | |
void | setMinimumLabel (const QString &label) |
Sets the label for the minimum value on the ramp. More... | |
void | setNumericFormat (QgsNumericFormat *format) |
Sets the numeric format used for numbers in the scalebar. More... | |
void | setOrientation (Qt::Orientation orientation) |
Sets the ramp orientation (i.e. More... | |
void | setPrefix (const QString &prefix) |
Sets the prefix to show before legend text. More... | |
void | setSuffix (const QString &suffix) |
Sets the suffix to show after legend text. More... | |
void | setTextFormat (const QgsTextFormat &format) |
Sets the text format used to render text in the legend item. More... | |
void | setUseContinuousLegend (bool useContinuousLegend) |
Sets the flag to use a continuos gradient legend to useContinuousLegend. More... | |
QString | suffix () const |
Returns the suffix to show after legend text. More... | |
QgsTextFormat | textFormat () const |
Returns the text format used to render text in the legend item. More... | |
bool | useContinuousLegend () const |
Returns true if a continuous gradient legend will be used. More... | |
void | writeXml (QDomDocument &doc, QDomElement &element, const QgsReadWriteContext &context) const |
Writes settings to an XML element. More... | |
Settings for a color ramp legend node.
Definition at line 37 of file qgscolorramplegendnodesettings.h.
Ramp directions.
Enumerator | |
---|---|
MinimumToMaximum | Minimum value on bottom, maximum value on top. |
MaximumToMinimum | Maximum value on bottom, minimum value on top. |
Definition at line 44 of file qgscolorramplegendnodesettings.h.
QgsColorRampLegendNodeSettings::QgsColorRampLegendNodeSettings | ( | ) |
Definition at line 23 of file qgscolorramplegendnodesettings.cpp.
|
default |
QgsColorRampLegendNodeSettings::QgsColorRampLegendNodeSettings | ( | const QgsColorRampLegendNodeSettings & | other | ) |
Copy constructor.
Definition at line 28 of file qgscolorramplegendnodesettings.cpp.
QgsColorRampLegendNodeSettings::Direction QgsColorRampLegendNodeSettings::direction | ( | ) | const |
Returns the direction of the ramp.
Definition at line 58 of file qgscolorramplegendnodesettings.cpp.
QString QgsColorRampLegendNodeSettings::maximumLabel | ( | ) | const |
Returns the label for the maximum value on the ramp.
If the returned string is empty than a default value will be generated based on the associated maximum value.
Definition at line 78 of file qgscolorramplegendnodesettings.cpp.
QString QgsColorRampLegendNodeSettings::minimumLabel | ( | ) | const |
Returns the label for the minimum value on the ramp.
If the returned string is empty than a default value will be generated based on the associated minimum value.
Definition at line 68 of file qgscolorramplegendnodesettings.cpp.
const QgsNumericFormat * QgsColorRampLegendNodeSettings::numericFormat | ( | ) | const |
Returns the numeric format used for numbers in the scalebar.
Definition at line 88 of file qgscolorramplegendnodesettings.cpp.
QgsColorRampLegendNodeSettings & QgsColorRampLegendNodeSettings::operator= | ( | const QgsColorRampLegendNodeSettings & | other | ) |
Definition at line 42 of file qgscolorramplegendnodesettings.cpp.
Qt::Orientation QgsColorRampLegendNodeSettings::orientation | ( | ) | const |
Returns the ramp orientation (i.e.
horizontal or vertical).
Definition at line 183 of file qgscolorramplegendnodesettings.cpp.
QString QgsColorRampLegendNodeSettings::prefix | ( | ) | const |
Returns the prefix to show before legend text.
Definition at line 153 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::readXml | ( | const QDomElement & | element, |
const QgsReadWriteContext & | context | ||
) |
Reads settings from an XML element.
Definition at line 122 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::setDirection | ( | QgsColorRampLegendNodeSettings::Direction | direction | ) |
Sets the direction of the ramp.
Definition at line 63 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::setMaximumLabel | ( | const QString & | label | ) |
Sets the label for the maximum value on the ramp.
If the label is empty than a default value will be generated based on the associated maximum value.
Definition at line 83 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::setMinimumLabel | ( | const QString & | label | ) |
Sets the label for the minimum value on the ramp.
If the label is empty than a default value will be generated based on the associated minimum value.
Definition at line 73 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::setNumericFormat | ( | QgsNumericFormat * | format | ) |
Sets the numeric format used for numbers in the scalebar.
Ownership of format is transferred to the scalebar.
Definition at line 93 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::setOrientation | ( | Qt::Orientation | orientation | ) |
Sets the ramp orientation (i.e.
horizontal or vertical).
Definition at line 188 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::setPrefix | ( | const QString & | prefix | ) |
Sets the prefix to show before legend text.
Definition at line 158 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::setSuffix | ( | const QString & | suffix | ) |
Sets the suffix to show after legend text.
Definition at line 168 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::setTextFormat | ( | const QgsTextFormat & | format | ) |
Sets the text format used to render text in the legend item.
Definition at line 178 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::setUseContinuousLegend | ( | bool | useContinuousLegend | ) |
Sets the flag to use a continuos gradient legend to useContinuousLegend.
When this flag is set the legend will be rendered using a continuous color ramp with min and max values, when it is not set the legend will be rendered using separate items for each entry.
Definition at line 198 of file qgscolorramplegendnodesettings.cpp.
QString QgsColorRampLegendNodeSettings::suffix | ( | ) | const |
Returns the suffix to show after legend text.
Definition at line 163 of file qgscolorramplegendnodesettings.cpp.
QgsTextFormat QgsColorRampLegendNodeSettings::textFormat | ( | ) | const |
Returns the text format used to render text in the legend item.
Definition at line 173 of file qgscolorramplegendnodesettings.cpp.
bool QgsColorRampLegendNodeSettings::useContinuousLegend | ( | ) | const |
Returns true
if a continuous gradient legend will be used.
Definition at line 193 of file qgscolorramplegendnodesettings.cpp.
void QgsColorRampLegendNodeSettings::writeXml | ( | QDomDocument & | doc, |
QDomElement & | element, | ||
const QgsReadWriteContext & | context | ||
) | const |
Writes settings to an XML element.
Definition at line 98 of file qgscolorramplegendnodesettings.cpp.