LocaleHandler

Since: BlackBerry 10.0.0

#include <bb/system/LocaleHandler>

To link against this class, add the following line to your .pro file: LIBS += -lbbsystem

Queries and listens for changes to system locales.

When creating a LocaleHandler, you can specify the type of changes to listen for using a LocaleType. LocalType::Region is used for listening to changes to regional formatting, such as currency, date and time, etc. LocalType::Messages is used for handling changes to strings as a result of localization.


Overview

Public Functions Index

LocaleHandler (LocaleType::Type type=LocaleType::Messages, QObject *parent=0)
virtual ~LocaleHandler ()
QLocalelocale () const
bb::system::MeasurementSystem::TypemeasurementSystem () const

Signals Index

voidchanged ()
voidmeasurementSystemChanged (bb::system::MeasurementSystem::Type measurementSystem)

Properties

QString forceUpdateOnChange[read-only]

A property that allows string parameters to automatically retranslate.

Since:

BlackBerry 10.0.0

bb::system::MeasurementSystem::Type measurementSystem[read-only]

The measurement system currently in use in the system.

Since:

BlackBerry 10.0.0

Public Functions

LocaleHandler (

Creates a locale handler for the supplied LocaleType.

Parameters
type

The type of locale this object should monitor.

parent

If not 0, the supplied parent will be responsible for deleting this instance.

Since:

BlackBerry 10.0.0

virtual~LocaleHandler ()

Destructor.

Since:

BlackBerry 10.0.0

QLocale locale ()

Returns the Qt representation of the currently selected locale.

Return:

The QtLocale object representing the currently selected locale.

Since:

BlackBerry 10.0.0

bb::system::MeasurementSystem::Type measurementSystem ()

Returns the measurement system currently in use on the system.

Since:

BlackBerry 10.0.0

Signals

void changed ()

Emitted when the locale type associated with this object changes.

Since:

BlackBerry 10.0.0

void measurementSystemChanged (

Emitted when the unit of measurement system is changed.

Parameters
measurementSystem

The system of measurement currently in use. One of MeasurementSystem::Metric or MeasurementSystem::Imperial.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus