Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Qtx::Localizer Class Reference

Localization helper. More...

#include <Qtx.h>

Public Member Functions

 Localizer ()
 Constructor. Forces "C" locale to be set. More...
 
 ~Localizer ()
 Destructor. Reverts back to the initial locale. More...
 

Private Attributes

QString myCurLocale
 

Detailed Description

This helper class can be used to solve the localization problems, usually related to the textual files reading/writing, namely when floating point values are read / written with API functions. The problem relates to such locale specific settings as decimal point separator, thousands separator, etc.

To use the Localizer class, just create a local variable in the beginning of the code where you need to read / write data from textual file(s). The constructor of the class forces setting "C" locale temporariy. The destructor switches back to the initial locale.

readSomething();
writeSomething();

Constructor & Destructor Documentation

Qtx::Localizer::Localizer ( )

References myCurLocale.

Qtx::Localizer::~Localizer ( )

Member Data Documentation

QString Qtx::Localizer::myCurLocale
private

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