QGIS API Documentation  3.24.2-Tisler (13c1a02865)
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
QgsRendererRangeLabelFormat Class Reference

#include <qgsrendererrange.h>

Public Member Functions

 QgsRendererRangeLabelFormat ()
 
 QgsRendererRangeLabelFormat (const QString &format, int precision=4, bool trimTrailingZeroes=false)
 
QString format () const
 
QString formatNumber (double value) const
 
QString labelForRange (const QgsRendererRange &range) const
 
QString labelForRange (double lower, double upper) const
 
bool operator!= (const QgsRendererRangeLabelFormat &other) const
 
bool operator== (const QgsRendererRangeLabelFormat &other) const
 
int precision () const
 
void saveToDomElement (QDomElement &element)
 
void setFormat (const QString &format)
 
void setFromDomElement (QDomElement &element)
 
void setPrecision (int precision)
 
void setTrimTrailingZeroes (bool trimTrailingZeroes)
 
bool trimTrailingZeroes () const
 

Static Public Attributes

static const int MAX_PRECISION = 15
 
static const int MIN_PRECISION = -6
 

Protected Attributes

QString mFormat
 
double mNumberScale = 1.0
 
QString mNumberSuffix
 
int mPrecision = 4
 
QRegularExpression mReNegativeZero
 
QRegularExpression mReTrailingZeroes
 
bool mTrimTrailingZeroes = false
 

Detailed Description

Since
QGIS 2.6
Deprecated:
since QGIS 3.10, use QgsClassificationMethod instead

Definition at line 108 of file qgsrendererrange.h.

Constructor & Destructor Documentation

◆ QgsRendererRangeLabelFormat() [1/2]

QgsRendererRangeLabelFormat::QgsRendererRangeLabelFormat ( )

Definition at line 167 of file qgsrendererrange.cpp.

◆ QgsRendererRangeLabelFormat() [2/2]

QgsRendererRangeLabelFormat::QgsRendererRangeLabelFormat ( const QString &  format,
int  precision = 4,
bool  trimTrailingZeroes = false 
)

Definition at line 174 of file qgsrendererrange.cpp.

Member Function Documentation

◆ format()

QString QgsRendererRangeLabelFormat::format ( ) const
inline

Definition at line 117 of file qgsrendererrange.h.

◆ formatNumber()

QString QgsRendererRangeLabelFormat::formatNumber ( double  value) const

Definition at line 217 of file qgsrendererrange.cpp.

◆ labelForRange() [1/2]

QString QgsRendererRangeLabelFormat::labelForRange ( const QgsRendererRange range) const

Definition at line 212 of file qgsrendererrange.cpp.

◆ labelForRange() [2/2]

QString QgsRendererRangeLabelFormat::labelForRange ( double  lower,
double  upper 
) const
Note
labelForLowerUpper in Python bindings

Definition at line 239 of file qgsrendererrange.cpp.

◆ operator!=()

bool QgsRendererRangeLabelFormat::operator!= ( const QgsRendererRangeLabelFormat other) const

Definition at line 192 of file qgsrendererrange.cpp.

◆ operator==()

bool QgsRendererRangeLabelFormat::operator== ( const QgsRendererRangeLabelFormat other) const

Definition at line 184 of file qgsrendererrange.cpp.

◆ precision()

int QgsRendererRangeLabelFormat::precision ( ) const
inline

Definition at line 120 of file qgsrendererrange.h.

◆ saveToDomElement()

void QgsRendererRangeLabelFormat::saveToDomElement ( QDomElement &  element)

Definition at line 259 of file qgsrendererrange.cpp.

◆ setFormat()

void QgsRendererRangeLabelFormat::setFormat ( const QString &  format)
inline

Definition at line 118 of file qgsrendererrange.h.

◆ setFromDomElement()

void QgsRendererRangeLabelFormat::setFromDomElement ( QDomElement &  element)

Definition at line 248 of file qgsrendererrange.cpp.

◆ setPrecision()

void QgsRendererRangeLabelFormat::setPrecision ( int  precision)

Definition at line 197 of file qgsrendererrange.cpp.

◆ setTrimTrailingZeroes()

void QgsRendererRangeLabelFormat::setTrimTrailingZeroes ( bool  trimTrailingZeroes)
inline

Definition at line 124 of file qgsrendererrange.h.

◆ trimTrailingZeroes()

bool QgsRendererRangeLabelFormat::trimTrailingZeroes ( ) const
inline

Definition at line 123 of file qgsrendererrange.h.

Member Data Documentation

◆ MAX_PRECISION

const int QgsRendererRangeLabelFormat::MAX_PRECISION = 15
static

Definition at line 134 of file qgsrendererrange.h.

◆ mFormat

QString QgsRendererRangeLabelFormat::mFormat
protected

Definition at line 138 of file qgsrendererrange.h.

◆ MIN_PRECISION

const int QgsRendererRangeLabelFormat::MIN_PRECISION = -6
static

Definition at line 135 of file qgsrendererrange.h.

◆ mNumberScale

double QgsRendererRangeLabelFormat::mNumberScale = 1.0
protected

Definition at line 142 of file qgsrendererrange.h.

◆ mNumberSuffix

QString QgsRendererRangeLabelFormat::mNumberSuffix
protected

Definition at line 143 of file qgsrendererrange.h.

◆ mPrecision

int QgsRendererRangeLabelFormat::mPrecision = 4
protected

Definition at line 139 of file qgsrendererrange.h.

◆ mReNegativeZero

QRegularExpression QgsRendererRangeLabelFormat::mReNegativeZero
protected

Definition at line 145 of file qgsrendererrange.h.

◆ mReTrailingZeroes

QRegularExpression QgsRendererRangeLabelFormat::mReTrailingZeroes
protected

Definition at line 144 of file qgsrendererrange.h.

◆ mTrimTrailingZeroes

bool QgsRendererRangeLabelFormat::mTrimTrailingZeroes = false
protected

Definition at line 140 of file qgsrendererrange.h.


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