QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsPlotAxis Class Reference

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.
 
QgsLineSymbolgridMajorSymbol ()
 Returns the line symbol used to render the major lines in the axis grid.
 
QgsLineSymbolgridMinorSymbol ()
 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.
 
QgsNumericFormatnumericFormat () const
 Returns the numeric format used for the axis labels.
 
QgsPlotAxisoperator= (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.
 

Detailed Description

Encapsulates the properties of a plot axis.

Warning
This class is not considered stable API, and may change in future!
Since
QGIS 3.26

Definition at line 74 of file qgsplot.h.

Constructor & Destructor Documentation

◆ QgsPlotAxis() [1/2]

QgsPlotAxis::QgsPlotAxis ( )

Definition at line 45 of file qgsplot.cpp.

◆ ~QgsPlotAxis()

QgsPlotAxis::~QgsPlotAxis ( )
default

◆ QgsPlotAxis() [2/2]

QgsPlotAxis::QgsPlotAxis ( const QgsPlotAxis other)
delete

Member Function Documentation

◆ gridIntervalMajor()

double QgsPlotAxis::gridIntervalMajor ( ) const
inline

Returns the interval of major grid lines for the axis.

See also
setGridIntervalMajor()

Definition at line 113 of file qgsplot.h.

◆ gridIntervalMinor()

double QgsPlotAxis::gridIntervalMinor ( ) const
inline

Returns the interval of minor grid lines for the axis.

See also
setGridIntervalMinor()

Definition at line 99 of file qgsplot.h.

◆ gridMajorSymbol()

QgsLineSymbol * QgsPlotAxis::gridMajorSymbol ( )

Returns the line symbol used to render the major lines in the axis grid.

See also
setGridMajorSymbol()

Definition at line 134 of file qgsplot.cpp.

◆ gridMinorSymbol()

QgsLineSymbol * QgsPlotAxis::gridMinorSymbol ( )

Returns the line symbol used to render the minor lines in the axis grid.

See also
setGridMinorSymbol()

Definition at line 144 of file qgsplot.cpp.

◆ labelInterval()

double QgsPlotAxis::labelInterval ( ) const
inline

Returns the interval of labels for the axis.

See also
setLabelInterval()

Definition at line 127 of file qgsplot.h.

◆ labelSuffix()

QString QgsPlotAxis::labelSuffix ( ) const

Returns the axis label suffix, or an empty string if no label suffix is to be used.

See also
setLabelSuffix()
labelSuffixPlacement()
Since
QGIS 3.32

Definition at line 114 of file qgsplot.cpp.

◆ labelSuffixPlacement()

Qgis::PlotAxisSuffixPlacement QgsPlotAxis::labelSuffixPlacement ( ) const

Returns the placement for the axis label suffixes.

See also
setLabelSuffixPlacement()
labelSuffix()
Since
QGIS 3.32

Definition at line 124 of file qgsplot.cpp.

◆ numericFormat()

QgsNumericFormat * QgsPlotAxis::numericFormat ( ) const

Returns the numeric format used for the axis labels.

See also
setNumericFormat()

Definition at line 104 of file qgsplot.cpp.

◆ operator=()

QgsPlotAxis & QgsPlotAxis::operator= ( const QgsPlotAxis other)
delete

◆ readXml()

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.

◆ setGridIntervalMajor()

void QgsPlotAxis::setGridIntervalMajor ( double  interval)
inline

Sets the interval of major grid lines for the axis.

See also
gridIntervalMajor()

Definition at line 120 of file qgsplot.h.

◆ setGridIntervalMinor()

void QgsPlotAxis::setGridIntervalMinor ( double  interval)
inline

Sets the interval of minor grid lines for the axis.

See also
gridIntervalMinor()

Definition at line 106 of file qgsplot.h.

◆ setGridMajorSymbol()

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.

See also
gridMajorSymbol()

Definition at line 139 of file qgsplot.cpp.

◆ setGridMinorSymbol()

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.

See also
gridMinorSymbol()

Definition at line 149 of file qgsplot.cpp.

◆ setLabelInterval()

void QgsPlotAxis::setLabelInterval ( double  interval)
inline

Sets the interval of labels for the axis.

See also
labelInterval()

Definition at line 134 of file qgsplot.h.

◆ setLabelSuffix()

void QgsPlotAxis::setLabelSuffix ( const QString &  suffix)

Sets the axis label suffix.

Set to an empty string if no label suffix is to be used.

See also
labelSuffix()
setLabelSuffixPlacement()
Since
QGIS 3.32

Definition at line 119 of file qgsplot.cpp.

◆ setLabelSuffixPlacement()

void QgsPlotAxis::setLabelSuffixPlacement ( Qgis::PlotAxisSuffixPlacement  placement)

Sets the placement for the axis label suffixes.

See also
labelSuffixPlacement()
setLabelSuffix()
Since
QGIS 3.32

Definition at line 129 of file qgsplot.cpp.

◆ setNumericFormat()

void QgsPlotAxis::setNumericFormat ( QgsNumericFormat format)

Sets the numeric format used for the axis labels.

Ownership of format is transferred to the plot.

See also
numericFormat()

Definition at line 109 of file qgsplot.cpp.

◆ setTextFormat()

void QgsPlotAxis::setTextFormat ( const QgsTextFormat format)

Sets the text format used for the axis labels.

See also
textFormat()

Definition at line 159 of file qgsplot.cpp.

◆ textFormat()

QgsTextFormat QgsPlotAxis::textFormat ( ) const

Returns the text format used for the axis labels.

See also
setTextFormat()

Definition at line 154 of file qgsplot.cpp.

◆ writeXml()

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.


The documentation for this class was generated from the following files: