QGIS API Documentation 3.27.0-Master (1c05421486)
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 cannot be copied. More...
 
 ~QgsPlotAxis ()
 
double gridIntervalMajor () const
 Returns the interval of major grid lines for the axis. More...
 
double gridIntervalMinor () const
 Returns the interval of minor grid lines for the axis. More...
 
QgsLineSymbolgridMajorSymbol ()
 Returns the line symbol used to render the major lines in the axis grid. More...
 
QgsLineSymbolgridMinorSymbol ()
 Returns the line symbol used to render the minor lines in the axis grid. More...
 
double labelInterval () const
 Returns the interval of labels for the axis. More...
 
QgsNumericFormatnumericFormat () const
 Returns the numeric format used for the axis labels. More...
 
QgsPlotAxisoperator= (const QgsPlotAxis &other)=delete
 QgsPlotAxis cannot be copied. More...
 
bool readXml (const QDomElement &element, QgsReadWriteContext &context)
 Reads the axis' properties from an XML element. More...
 
void setGridIntervalMajor (double interval)
 Sets the interval of major grid lines for the axis. More...
 
void setGridIntervalMinor (double interval)
 Sets the interval of minor grid lines for the axis. More...
 
void setGridMajorSymbol (QgsLineSymbol *symbol)
 Sets the symbol used to render the major lines in the axis grid. More...
 
void setGridMinorSymbol (QgsLineSymbol *symbol)
 Sets the symbol used to render the minor lines in the axis grid. More...
 
void setLabelInterval (double interval)
 Sets the interval of labels for the axis. More...
 
void setNumericFormat (QgsNumericFormat *format)
 Sets the numeric format used for the axis labels. More...
 
void setTextFormat (const QgsTextFormat &format)
 Sets the text format used for the axis labels. More...
 
QgsTextFormat textFormat () const
 Returns the text format used for the axis labels. More...
 
bool writeXml (QDomElement &element, QDomDocument &document, QgsReadWriteContext &context) const
 Writes the axis' properties into an XML element. More...
 

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 77 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

QgsPlotAxis cannot be copied.

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 118 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 104 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 116 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 126 of file qgsplot.cpp.

◆ labelInterval()

double QgsPlotAxis::labelInterval ( ) const
inline

Returns the interval of labels for the axis.

See also
setLabelInterval()

Definition at line 132 of file qgsplot.h.

◆ numericFormat()

QgsNumericFormat * QgsPlotAxis::numericFormat ( ) const

Returns the numeric format used for the axis labels.

See also
setNumericFormat()

Definition at line 106 of file qgsplot.cpp.

◆ operator=()

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

QgsPlotAxis cannot be copied.

◆ readXml()

bool QgsPlotAxis::readXml ( const QDomElement &  element,
QgsReadWriteContext context 
)

Reads the axis' properties from an XML element.

Definition at line 86 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 125 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 111 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 121 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 131 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 139 of file qgsplot.h.

◆ 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 111 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 141 of file qgsplot.cpp.

◆ textFormat()

QgsTextFormat QgsPlotAxis::textFormat ( ) const

Returns the text format used for the axis labels.

See also
setTextFormat()

Definition at line 136 of file qgsplot.cpp.

◆ writeXml()

bool QgsPlotAxis::writeXml ( QDomElement &  element,
QDomDocument &  document,
QgsReadWriteContext context 
) const

Writes the axis' properties into an XML element.

Definition at line 62 of file qgsplot.cpp.


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