QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
Encapsulates the properties of a plot axis. More...
#include <qgsplot.h>
Public Member Functions | |
QgsPlotAxis () | |
QgsPlotAxis (const QgsPlotAxis &other)=delete | |
~QgsPlotAxis () | |
double | gridIntervalMajor () const |
Returns the interval of major grid lines for the axis. | |
double | gridIntervalMinor () const |
Returns the interval of minor grid lines for the axis. | |
QgsLineSymbol * | gridMajorSymbol () |
Returns the line symbol used to render the major lines in the axis grid. | |
QgsLineSymbol * | gridMinorSymbol () |
Returns the line symbol used to render the minor lines in the axis grid. | |
double | labelInterval () const |
Returns the interval of labels for the axis. | |
QString | labelSuffix () const |
Returns the axis label suffix, or an empty string if no label suffix is to be used. | |
Qgis::PlotAxisSuffixPlacement | labelSuffixPlacement () const |
Returns the placement for the axis label suffixes. | |
QgsNumericFormat * | numericFormat () const |
Returns the numeric format used for the axis labels. | |
QgsPlotAxis & | operator= (const QgsPlotAxis &other)=delete |
bool | readXml (const QDomElement &element, const QgsReadWriteContext &context) |
Reads the axis' properties from an XML element. | |
void | setGridIntervalMajor (double interval) |
Sets the interval of major grid lines for the axis. | |
void | setGridIntervalMinor (double interval) |
Sets the interval of minor grid lines for the axis. | |
void | setGridMajorSymbol (QgsLineSymbol *symbol) |
Sets the symbol used to render the major lines in the axis grid. | |
void | setGridMinorSymbol (QgsLineSymbol *symbol) |
Sets the symbol used to render the minor lines in the axis grid. | |
void | setLabelInterval (double interval) |
Sets the interval of labels for the axis. | |
void | setLabelSuffix (const QString &suffix) |
Sets the axis label suffix. | |
void | setLabelSuffixPlacement (Qgis::PlotAxisSuffixPlacement placement) |
Sets the placement for the axis label suffixes. | |
void | setNumericFormat (QgsNumericFormat *format) |
Sets the numeric format used for the axis labels. | |
void | setTextFormat (const QgsTextFormat &format) |
Sets the text format used for the axis labels. | |
QgsTextFormat | textFormat () const |
Returns the text format used for the axis labels. | |
bool | writeXml (QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context) const |
Writes the axis' properties into an XML element. | |
Encapsulates the properties of a plot axis.
QgsPlotAxis::QgsPlotAxis | ( | ) |
Definition at line 45 of file qgsplot.cpp.
|
default |
|
delete |
|
inline |
Returns the interval of major grid lines for the axis.
|
inline |
Returns the interval of minor grid lines for the axis.
QgsLineSymbol * QgsPlotAxis::gridMajorSymbol | ( | ) |
Returns the line symbol used to render the major lines in the axis grid.
Definition at line 134 of file qgsplot.cpp.
QgsLineSymbol * QgsPlotAxis::gridMinorSymbol | ( | ) |
Returns the line symbol used to render the minor lines in the axis grid.
Definition at line 144 of file qgsplot.cpp.
|
inline |
Returns the interval of labels for the axis.
QString QgsPlotAxis::labelSuffix | ( | ) | const |
Returns the axis label suffix, or an empty string if no label suffix is to be used.
Definition at line 114 of file qgsplot.cpp.
Qgis::PlotAxisSuffixPlacement QgsPlotAxis::labelSuffixPlacement | ( | ) | const |
Returns the placement for the axis label suffixes.
Definition at line 124 of file qgsplot.cpp.
QgsNumericFormat * QgsPlotAxis::numericFormat | ( | ) | const |
Returns the numeric format used for the axis labels.
Definition at line 104 of file qgsplot.cpp.
|
delete |
bool QgsPlotAxis::readXml | ( | const QDomElement & | element, |
const QgsReadWriteContext & | context | ||
) |
Reads the axis' properties from an XML element.
Definition at line 81 of file qgsplot.cpp.
|
inline |
Sets the interval of major grid lines for the axis.
|
inline |
Sets the interval of minor grid lines for the axis.
void QgsPlotAxis::setGridMajorSymbol | ( | QgsLineSymbol * | symbol | ) |
Sets the symbol used to render the major lines in the axis grid.
Ownership of symbol is transferred to the plot.
Definition at line 139 of file qgsplot.cpp.
void QgsPlotAxis::setGridMinorSymbol | ( | QgsLineSymbol * | symbol | ) |
Sets the symbol used to render the minor lines in the axis grid.
Ownership of symbol is transferred to the plot.
Definition at line 149 of file qgsplot.cpp.
|
inline |
Sets the interval of labels for the axis.
void QgsPlotAxis::setLabelSuffix | ( | const QString & | suffix | ) |
Sets the axis label suffix.
Set to an empty string if no label suffix is to be used.
Definition at line 119 of file qgsplot.cpp.
void QgsPlotAxis::setLabelSuffixPlacement | ( | Qgis::PlotAxisSuffixPlacement | placement | ) |
Sets the placement for the axis label suffixes.
Definition at line 129 of file qgsplot.cpp.
void QgsPlotAxis::setNumericFormat | ( | QgsNumericFormat * | format | ) |
Sets the numeric format used for the axis labels.
Ownership of format is transferred to the plot.
Definition at line 109 of file qgsplot.cpp.
void QgsPlotAxis::setTextFormat | ( | const QgsTextFormat & | format | ) |
Sets the text format used for the axis labels.
Definition at line 159 of file qgsplot.cpp.
QgsTextFormat QgsPlotAxis::textFormat | ( | ) | const |
Returns the text format used for the axis labels.
Definition at line 154 of file qgsplot.cpp.
bool QgsPlotAxis::writeXml | ( | QDomElement & | element, |
QDomDocument & | document, | ||
const QgsReadWriteContext & | context | ||
) | const |
Writes the axis' properties into an XML element.
Definition at line 55 of file qgsplot.cpp.