QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsNumericFormatContext Class Reference

A context for numeric formats. More...

#include <qgsnumericformat.h>

Public Types

enum class  Interpretation { Generic , Latitude , Longitude }
 Interpretation of numeric values. More...

Public Member Functions

 QgsNumericFormatContext ()
 Constructor for QgsNumericFormatContext.
QChar decimalSeparator () const
 Returns the decimal separator character.
QChar exponential () const
 Returns the exponential character.
QgsExpressionContext expressionContext () const
 Returns the expression context to use when evaluating QgsExpressions.
Interpretation interpretation () const
 Returns the interpretation of the numbers being converted.
QChar negativeSign () const
 Returns the negative sign character.
QChar percent () const
 Returns the percent character.
QChar positiveSign () const
 Returns the positive sign character.
void setDecimalSeparator (const QChar &separator)
 Returns the decimal separator character.
void setExponential (const QChar &character)
 Sets the exponential character.
void setExpressionContext (const QgsExpressionContext &context)
 Sets the expression context to use when evaluating QgsExpressions.
void setInterpretation (Interpretation interpretation)
 Sets the interpretation of the numbers being converted.
void setNegativeSign (const QChar &character)
 Sets the negative sign character.
void setPercent (const QChar &character)
 Sets the percent character.
void setPositiveSign (const QChar &character)
 Sets the positive sign character.
void setThousandsSeparator (const QChar &separator)
 Sets the thousands separator character.
void setZeroDigit (const QChar &character)
 Returns the zero digit character.
QChar thousandsSeparator () const
 Returns the thousands separator character.
QChar zeroDigit () const
 Returns the zero digit character.

Detailed Description

A context for numeric formats.

Since
QGIS 3.12

Definition at line 34 of file qgsnumericformat.h.

Member Enumeration Documentation

◆ Interpretation

Interpretation of numeric values.

Since
QGIS 3.26
Enumerator
Generic 

Generic.

Latitude 

Latitude values.

Longitude 

Longitude values.

Definition at line 192 of file qgsnumericformat.h.

Constructor & Destructor Documentation

◆ QgsNumericFormatContext()

QgsNumericFormatContext::QgsNumericFormatContext ( )

Constructor for QgsNumericFormatContext.

The context will be populated based on the user's current locale settings.

Definition at line 26 of file qgsnumericformat.cpp.

Member Function Documentation

◆ decimalSeparator()

QChar QgsNumericFormatContext::decimalSeparator ( ) const
inline

Returns the decimal separator character.

See also
setDecimalSeparator()

Definition at line 72 of file qgsnumericformat.h.

◆ exponential()

QChar QgsNumericFormatContext::exponential ( ) const
inline

Returns the exponential character.

See also
setExponential()

Definition at line 172 of file qgsnumericformat.h.

◆ expressionContext()

QgsExpressionContext QgsNumericFormatContext::expressionContext ( ) const

Returns the expression context to use when evaluating QgsExpressions.

See also
setExpressionContext()
Since
QGIS 3.40

Definition at line 51 of file qgsnumericformat.cpp.

◆ interpretation()

Interpretation QgsNumericFormatContext::interpretation ( ) const
inline

Returns the interpretation of the numbers being converted.

See also
setInterpretation()
Since
QGIS 3.26

Definition at line 207 of file qgsnumericformat.h.

◆ negativeSign()

QChar QgsNumericFormatContext::negativeSign ( ) const
inline

Returns the negative sign character.

See also
setNegativeSign()

Definition at line 132 of file qgsnumericformat.h.

◆ percent()

QChar QgsNumericFormatContext::percent ( ) const
inline

Returns the percent character.

See also
setPercent()

Definition at line 92 of file qgsnumericformat.h.

◆ positiveSign()

QChar QgsNumericFormatContext::positiveSign ( ) const
inline

Returns the positive sign character.

See also
setPositiveSign()

Definition at line 152 of file qgsnumericformat.h.

◆ setDecimalSeparator()

void QgsNumericFormatContext::setDecimalSeparator ( const QChar & separator)
inline

Returns the decimal separator character.

See also
setDecimalSeparator()

Definition at line 82 of file qgsnumericformat.h.

◆ setExponential()

void QgsNumericFormatContext::setExponential ( const QChar & character)
inline

Sets the exponential character.

See also
exponential()

Definition at line 182 of file qgsnumericformat.h.

◆ setExpressionContext()

void QgsNumericFormatContext::setExpressionContext ( const QgsExpressionContext & context)

Sets the expression context to use when evaluating QgsExpressions.

See also
expressionContext()
Since
QGIS 3.40

Definition at line 56 of file qgsnumericformat.cpp.

◆ setInterpretation()

void QgsNumericFormatContext::setInterpretation ( Interpretation interpretation)
inline

Sets the interpretation of the numbers being converted.

See also
interpretation()
Since
QGIS 3.26

Definition at line 219 of file qgsnumericformat.h.

◆ setNegativeSign()

void QgsNumericFormatContext::setNegativeSign ( const QChar & character)
inline

Sets the negative sign character.

See also
negativeSign()

Definition at line 142 of file qgsnumericformat.h.

◆ setPercent()

void QgsNumericFormatContext::setPercent ( const QChar & character)
inline

Sets the percent character.

See also
percent()

Definition at line 102 of file qgsnumericformat.h.

◆ setPositiveSign()

void QgsNumericFormatContext::setPositiveSign ( const QChar & character)
inline

Sets the positive sign character.

See also
positiveSign()

Definition at line 162 of file qgsnumericformat.h.

◆ setThousandsSeparator()

void QgsNumericFormatContext::setThousandsSeparator ( const QChar & separator)
inline

Sets the thousands separator character.

See also
thousandsSeparator()

Definition at line 62 of file qgsnumericformat.h.

◆ setZeroDigit()

void QgsNumericFormatContext::setZeroDigit ( const QChar & character)
inline

Returns the zero digit character.

See also
zeroDigit()

Definition at line 122 of file qgsnumericformat.h.

◆ thousandsSeparator()

QChar QgsNumericFormatContext::thousandsSeparator ( ) const
inline

Returns the thousands separator character.

See also
setThousandsSeparator()

Definition at line 52 of file qgsnumericformat.h.

◆ zeroDigit()

QChar QgsNumericFormatContext::zeroDigit ( ) const
inline

Returns the zero digit character.

See also
setZeroDigit()

Definition at line 112 of file qgsnumericformat.h.


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