QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
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) | |
~QgsColorRampLegendNodeSettings () | |
QgsColorRampLegendNodeSettings::Direction | direction () const |
Returns the direction of the ramp. | |
QString | maximumLabel () const |
Returns the label for the maximum value on the ramp. | |
QString | minimumLabel () const |
Returns the label for the minimum value on the ramp. | |
const QgsNumericFormat * | numericFormat () const |
Returns the numeric format used for numbers in the scalebar. | |
QgsColorRampLegendNodeSettings & | operator= (const QgsColorRampLegendNodeSettings &other) |
Qt::Orientation | orientation () const |
Returns the ramp orientation (i.e. | |
QString | prefix () const |
Returns the prefix to show before legend text. | |
void | readXml (const QDomElement &element, const QgsReadWriteContext &context) |
Reads settings from an XML element. | |
void | setDirection (QgsColorRampLegendNodeSettings::Direction direction) |
Sets the direction of the ramp. | |
void | setMaximumLabel (const QString &label) |
Sets the label for the maximum value on the ramp. | |
void | setMinimumLabel (const QString &label) |
Sets the label for the minimum value on the ramp. | |
void | setNumericFormat (QgsNumericFormat *format) |
Sets the numeric format used for numbers in the scalebar. | |
void | setOrientation (Qt::Orientation orientation) |
Sets the ramp orientation (i.e. | |
void | setPrefix (const QString &prefix) |
Sets the prefix to show before legend text. | |
void | setSuffix (const QString &suffix) |
Sets the suffix to show after legend text. | |
void | setTextFormat (const QgsTextFormat &format) |
Sets the text format used to render text in the legend item. | |
void | setUseContinuousLegend (bool useContinuousLegend) |
Sets the flag to use a continuous gradient legend to useContinuousLegend. | |
QString | suffix () const |
Returns the suffix to show after legend text. | |
QgsTextFormat | textFormat () const |
Returns the text format used to render text in the legend item. | |
bool | useContinuousLegend () const |
Returns true if a continuous gradient legend will be used. | |
void | writeXml (QDomDocument &doc, QDomElement &element, const QgsReadWriteContext &context) const |
Writes settings to an XML element. | |
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 | ) |
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 continuous 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.