libglom-1.26 1.28.5

- Main Page
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Glom::NumericFormat Class Reference
Collaboration diagram for Glom::NumericFormat:
[legend]

## Public Member Functions
| NumericFormat ()
| NumericFormat (const NumericFormat& src)
| ~NumericFormat ()
NumericFormat& | operator= (const NumericFormat& src)
bool | operator== (const NumericFormat& src) const
bool | operator!= (const NumericFormat& src) const

## Static Public Member Functions
static Glib::ustring | get_alternative_color_for_negatives ()
| The foreground color to use for negative values, if m_alt_foreground_color_for_negatives is true. More...
static guint | get_default_precision ()
| Get the number of significant figures we should allow to be shown until we show the awkward e syntax. More...

## Public Attributes
Glib::ustring | m_currency_symbol
| String to use as the currency symbol. More...
bool | m_use_thousands_separator
| Setting this to false would override the locale, if it used a 1000s separator. More...
bool | m_decimal_places_restricted
| Whether to restrict numeric precision. More...
guint | m_decimal_places
| The number of decimal places to show, although it is only used if m_decimal_places_restricted is false. More...
bool | m_alt_foreground_color_for_negatives
| Whether to use an alternative foreground color for negative values. More...

## Constructor & Destructor Documentation

Glom::NumericFormat::NumericFormat | ( |  | ) |

Glom::NumericFormat::NumericFormat | ( | const NumericFormat& | src | ) |

Glom::NumericFormat::~NumericFormat | ( |  | ) |

## Member Function Documentation

static Glib::ustring Glom::NumericFormat::get_alternative_color_for_negatives | ( |  | ) |
| static

The foreground color to use for negative values, if m_alt_foreground_color_for_negatives is true.

Returns
  the foreground color, in a format recognised by XParseColor

static guint Glom::NumericFormat::get_default_precision | ( |  | ) |
| static

Get the number of significant figures we should allow to be shown until we show the awkward e syntax.

This should not be used if m_decimal_places_restricted is true.

Returns
  the number of significant figures to show

bool Glom::NumericFormat::operator!= | ( | const NumericFormat& | src | ) | const

NumericFormat& Glom::NumericFormat::operator= | ( | const NumericFormat& | src | ) |

bool Glom::NumericFormat::operator== | ( | const NumericFormat& | src | ) | const

## Member Data Documentation

bool Glom::NumericFormat::m_alt_foreground_color_for_negatives

Whether to use an alternative foreground color for negative values.

Glib::ustring Glom::NumericFormat::m_currency_symbol

String to use as the currency symbol.

When the symbol is shown in the UI, a space is appended to the string, and the result is prepended to the data from the database. Be aware that the string supplied by the Glom document might have no representation in the current user's locale.

guint Glom::NumericFormat::m_decimal_places

The number of decimal places to show, although it is only used if m_decimal_places_restricted is false.

bool Glom::NumericFormat::m_decimal_places_restricted

Whether to restrict numeric precision.

If true, a fixed precision is set according to m_decimal_places. If false, the maximum precision is used. However, the chosen fixed precision might exceed the maximum precision.

bool Glom::NumericFormat::m_use_thousands_separator

Setting this to false would override the locale, if it used a 1000s separator.

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

- libglom/data_structure/numeric_format.h