• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | List of all members
KLocalePrivate Class Reference

#include <klocale_p.h>

Inheritance diagram for KLocalePrivate:
Inheritance graph
[legend]

Public Member Functions

 KLocalePrivate (KLocale *q_ptr)
 
 KLocalePrivate (const KLocalePrivate &rhs)
 
virtual ~KLocalePrivate ()
 
virtual QStringList allCountriesList () const
 
virtual QList< KLocale::DigitSet > allDigitSetsList () const
 
virtual QStringList allLanguagesList ()
 
virtual KLocale::BinaryUnitDialect binaryUnitDialect () const
 
virtual const KCalendarSystem * calendar ()
 
KLocale::CalendarSystem calendarSystem () const
 
virtual QString calendarType () const
 
virtual QTextCodec * codecForEncoding () const
 
virtual QString convertDigits (const QString &str, KLocale::DigitSet digitSet, bool ignoreContext=false) const
 
virtual void copyCatalogsTo (KLocale *locale)
 
virtual QString country () const
 
virtual QString countryCodeToName (const QString &country) const
 
QString countryDivisionCode () const
 
virtual KCurrencyCode * currency ()
 
virtual QString currencyCode () const
 
virtual QStringList currencyCodeList () const
 
virtual QString currencySymbol () const
 
virtual QString dateFormat () const
 
virtual QString dateFormatShort () const
 
virtual bool dateMonthNamePossessive () const
 
virtual KLocale::DigitSet dateTimeDigitSet () const
 
virtual KDayPeriod dayPeriodForTime (const QTime &time) const
 
virtual QList< KDayPeriod > dayPeriods () const
 
virtual int decimalPlaces () const
 
virtual QString decimalSymbol () const
 
virtual KLocale::DigitSet digitSet () const
 
virtual QString digitSetToName (KLocale::DigitSet digitSet, bool withDigits=false) const
 
virtual const QByteArray encoding ()
 
virtual int encodingMib () const
 
virtual int fileEncodingMib () const
 
virtual QString formatByteSize (double size)
 
virtual QString formatByteSize (double size, int precision, KLocale::BinaryUnitDialect dialect=KLocale::DefaultBinaryDialect, KLocale::BinarySizeUnits specificUnit=KLocale::DefaultBinaryUnits)
 
virtual QString formatDate (const QDate &date, KLocale::DateFormat format=KLocale::LongDate)
 
virtual QString formatDateTime (const QDateTime &dateTime, KLocale::DateFormat format=KLocale::ShortDate, bool includeSecs=false) const
 
virtual QString formatDateTime (const KDateTime &dateTime, KLocale::DateFormat format=KLocale::ShortDate, KLocale::DateTimeFormatOptions options=0)
 
virtual QString formatDuration (unsigned long mSec) const
 
virtual QString formatLocaleTime (const QTime &pTime, KLocale::TimeFormatOptions options=KLocale::TimeDefault) const
 
virtual QString formatLong (long num) const
 
virtual QString formatMoney (double num, const QString &currency=QString(), int precision=-1) const
 
virtual QString formatNumber (double num, int precision=-1) const
 
virtual QString formatNumber (const QString &numStr, bool round=true, int precision=-1) const
 
virtual QString formatTime (const QTime &pTime, bool includeSecs=false, bool isDuration=false) const
 
virtual void initFormat ()
 
virtual void insertCatalog (const QString &catalog)
 
virtual QStringList installedLanguages ()
 
virtual bool isApplicationTranslatedInto (const QString &language)
 
virtual QString language () const
 
virtual QString languageCodeToName (const QString &language)
 
virtual QStringList languageList () const
 
virtual QString localizedFilePath (const QString &filePath) const
 
virtual KLocale::MeasureSystem measureSystem () const
 
virtual int monetaryDecimalPlaces () const
 
virtual QString monetaryDecimalSymbol () const
 
virtual QList< int > monetaryDigitGrouping () const
 
virtual KLocale::DigitSet monetaryDigitSet () const
 
virtual QString monetaryThousandsSeparator () const
 
virtual KLocale::SignPosition negativeMonetarySignPosition () const
 
virtual bool negativePrefixCurrencySymbol () const
 
virtual QString negativeSign () const
 
virtual bool nounDeclension () const
 
virtual QList< int > numericDigitGrouping () const
 
KLocalePrivate & operator= (const KLocalePrivate &rhs)
 
virtual int pageSize () const
 
virtual KLocale::SignPosition positiveMonetarySignPosition () const
 
virtual bool positivePrefixCurrencySymbol () const
 
virtual QString positiveSign () const
 
virtual QString prettyFormatDuration (unsigned long mSec) const
 
virtual QDate readDate (const QString &str, bool *ok=0)
 
virtual QDate readDate (const QString &intstr, const QString &fmt, bool *ok=0)
 
virtual QDate readDate (const QString &str, KLocale::ReadDateFlags flags, bool *ok=0)
 
virtual QTime readLocaleTime (const QString &str, bool *ok=0, KLocale::TimeFormatOptions options=KLocale::TimeDefault, KLocale::TimeProcessingOptions processing=KLocale::ProcessNonStrict) const
 
virtual double readMoney (const QString &numStr, bool *ok=0) const
 
virtual double readNumber (const QString &numStr, bool *ok=0) const
 
virtual QTime readTime (const QString &str, bool *ok=0) const
 
virtual QTime readTime (const QString &str, KLocale::ReadTimeFlags flags, bool *ok=0) const
 
virtual QString removeAcceleratorMarker (const QString &label) const
 
virtual void removeCatalog (const QString &catalog)
 
virtual void setActiveCatalog (const QString &catalog)
 
virtual void setBinaryUnitDialect (KLocale::BinaryUnitDialect newDialect)
 
virtual void setCalendar (const QString &calendarType)
 
virtual void setCalendarSystem (KLocale::CalendarSystem)
 
virtual bool setCountry (const QString &country, KConfig *config)
 
bool setCountryDivisionCode (const QString &countryDivision)
 
virtual void setCurrencyCode (const QString &newCurrencyCode)
 
virtual void setCurrencySymbol (const QString &symbol)
 
virtual void setDateFormat (const QString &format)
 
virtual void setDateFormatShort (const QString &format)
 
virtual void setDateMonthNamePossessive (bool possessive)
 
virtual void setDateTimeDigitSet (KLocale::DigitSet digitSet)
 
virtual void setDayPeriods (const QList< KDayPeriod > &dayPeriods)
 
virtual void setDecimalPlaces (int digits)
 
virtual void setDecimalSymbol (const QString &symbol)
 
virtual void setDigitSet (KLocale::DigitSet digitSet)
 
virtual bool setEncoding (int mibEnum)
 
virtual bool setLanguage (const QString &language, KConfig *config)
 
virtual bool setLanguage (const QStringList &languages)
 
virtual void setMeasureSystem (KLocale::MeasureSystem value)
 
virtual void setMonetaryDecimalPlaces (int digits)
 
virtual void setMonetaryDecimalSymbol (const QString &symbol)
 
virtual void setMonetaryDigitGrouping (QList< int > groupList)
 
virtual void setMonetaryDigitSet (KLocale::DigitSet digitSet)
 
virtual void setMonetaryThousandsSeparator (const QString &separator)
 
virtual void setNegativeMonetarySignPosition (KLocale::SignPosition signpos)
 
virtual void setNegativePrefixCurrencySymbol (bool prefix)
 
virtual void setNegativeSign (const QString &sign)
 
virtual void setNumericDigitGrouping (QList< int > groupList)
 
virtual void setPageSize (int paperFormat)
 
virtual void setPositiveMonetarySignPosition (KLocale::SignPosition signpos)
 
virtual void setPositivePrefixCurrencySymbol (bool prefix)
 
virtual void setPositiveSign (const QString &sign)
 
virtual void setThousandsSeparator (const QString &separator)
 
virtual void setTimeFormat (const QString &format)
 
virtual void setWeekDayOfPray (int day)
 
void setWeekNumberSystem (KLocale::WeekNumberSystem weekNumberSystem)
 
virtual void setWeekStartDay (int day)
 
virtual void setWorkingWeekEndDay (int day)
 
virtual void setWorkingWeekStartDay (int day)
 
virtual QString thousandsSeparator () const
 
virtual QString timeFormat () const
 
virtual QString translateQt (const char *context, const char *sourceText, const char *comment) const
 
virtual void translateRawFrom (const char *catname, const char *msgctxt, const char *msgid, const char *msgid_plural=0, unsigned long n=0, QString *language=0, QString *translation=0) const
 
virtual bool use12Clock () const
 
virtual bool useTranscript () const
 
virtual int weekDayOfPray () const
 
KLocale::WeekNumberSystem weekNumberSystem ()
 
virtual int weekStartDay () const
 
virtual int workingWeekEndDay () const
 
virtual int workingWeekStartDay () const
 

Static Public Member Functions

static QString defaultCountry ()
 
static QString defaultCurrencyCode ()
 
static QString defaultLanguage ()
 
static QString formatDateTime (const KLocale *locale, const QDateTime &dateTime, KLocale::DateFormat, bool includeSeconds, int daysToNow, int secsToNow)
 
static QString langLookup (const QString &fname, const char *rtype="html")
 
static void setMainCatalog (const char *catalog)
 
static void splitLocale (const QString &locale, QString &language, QString &country, QString &modifier, QString &charset)
 

Public Attributes

KLocale * q
 

Protected Types

enum  DurationType { DaysDurationType = 0, HoursDurationType, MinutesDurationType, SecondsDurationType }
 

Protected Member Functions

virtual QString calendarSystemToCalendarType (KLocale::CalendarSystem) const
 
virtual KLocale::CalendarSystem calendarTypeToCalendarSystem (const QString &calendarType) const
 
KConfig * config ()
 
virtual void copy (const KLocalePrivate &rhs)
 
QList< QString > dialectUnitsList (KLocale::BinaryUnitDialect dialect)
 
virtual void init (const QString &catalogName, const QString &language, const QString &country, KSharedConfig::Ptr persistantconfig, KConfig *tempConfig)
 
virtual void initConfig (KConfig *config)
 
virtual void initCountry (const QString &country, const QString &configCountry)
 
virtual void initCurrency ()
 
virtual void initDayPeriods (const KConfigGroup &cg)
 
virtual void initEncoding ()
 
virtual void initFileNameEncoding ()
 
virtual void initLanguageList (const QString &language, const QString &configLanguages, bool useEnv)
 
virtual void initMainCatalogs ()
 
virtual QByteArray systemCodeset () const
 
virtual QString systemCountry () const
 
virtual QStringList systemLanguageList () const
 
virtual void updateCatalogs ()
 
virtual bool useDefaultLanguage () const
 

Static Protected Member Functions

static QString decodeFileNameUTF8 (const QByteArray &localFileName)
 
static QString digitSetString (KLocale::DigitSet digitSet)
 
static QByteArray encodeFileNameUTF8 (const QString &fileName)
 
static QString formatSingleDuration (KLocalePrivate::DurationType durationType, int n)
 
static void getLanguagesFromVariable (QStringList &list, const char *variable, bool isLanguageList=false)
 
static QString toArabicDigits (const QString &str)
 

Detailed Description

Definition at line 34 of file klocale_p.h.

Member Enumeration Documentation

enum KLocalePrivate::DurationType
protected
Enumerator
DaysDurationType 
HoursDurationType 
MinutesDurationType 
SecondsDurationType 

Definition at line 978 of file klocale_p.h.

Constructor & Destructor Documentation

KLocalePrivate::KLocalePrivate ( KLocale *  q_ptr)

Constructors.

This class should not be instantited directly, it is intended as a base class for each platform to provide a common KDE fallback implementation. Instead use the relevant derived system class for Unix, Win, or Mac which will prefer the local platform settings where possible.

Definition at line 106 of file klocale_kde.cpp.

KLocalePrivate::KLocalePrivate ( const KLocalePrivate &  rhs)

Copy constructor.

Definition at line 119 of file klocale_kde.cpp.

KLocalePrivate::~KLocalePrivate ( )
virtual

Destructor.

Definition at line 220 of file klocale_kde.cpp.

Member Function Documentation

QStringList KLocalePrivate::allCountriesList ( ) const
virtual

Returns a list of all known country codes. The worker of the same-name KLocale API function.

Definition at line 3113 of file klocale_kde.cpp.

QList< KLocale::DigitSet > KLocalePrivate::allDigitSetsList ( ) const
virtual

Provides list of all known digit set identifiers. The worker of the same-name KLocale API function.

Definition at line 1034 of file klocale_kde.cpp.

QStringList KLocalePrivate::allLanguagesList ( )
virtual

Returns a list of all known language codes. The worker of the same-name KLocale API function.

Definition at line 3083 of file klocale_kde.cpp.

KLocale::BinaryUnitDialect KLocalePrivate::binaryUnitDialect ( ) const
virtual

Returns the user's default binary unit dialect. The worker of the same-name KLocale API function.

Definition at line 1763 of file klocale_kde.cpp.

const KCalendarSystem * KLocalePrivate::calendar ( )
virtual

Returns a pointer to the calendar system object. The worker of the same-name KLocale API function.

Definition at line 3223 of file klocale_kde.cpp.

KLocale::CalendarSystem KLocalePrivate::calendarSystem ( ) const

Returns the type of the calendar system that is currently being used by the system. The worker of the same-name KLocale API function.

Definition at line 3218 of file klocale_kde.cpp.

QString KLocalePrivate::calendarSystemToCalendarType ( KLocale::CalendarSystem  calendarSystem) const
protectedvirtual

Converts a CalendarSystem into a CalendarType

Definition at line 3169 of file klocale_kde.cpp.

QString KLocalePrivate::calendarType ( ) const
virtual

Returns the name of the calendar system that is currently being used by the system. The worker of the same-name KLocale API function.

Definition at line 3213 of file klocale_kde.cpp.

KLocale::CalendarSystem KLocalePrivate::calendarTypeToCalendarSystem ( const QString &  calendarType) const
protectedvirtual

Converts a CalendarType into a CalendarSystem

Definition at line 3138 of file klocale_kde.cpp.

QTextCodec * KLocalePrivate::codecForEncoding ( ) const
virtual

Returns the user's preferred encoding. The worker of the same-name KLocale API function.

Definition at line 3068 of file klocale_kde.cpp.

KConfig * KLocalePrivate::config ( )
protected

Returns config object

Definition at line 130 of file klocale_kde.cpp.

QString KLocalePrivate::convertDigits ( const QString &  str,
KLocale::DigitSet  digitSet,
bool  ignoreContext = false 
) const
virtual

Convert all digits in the string to the given digit set. The worker of the same-name KLocale API function.

Definition at line 1145 of file klocale_kde.cpp.

void KLocalePrivate::copy ( const KLocalePrivate &  rhs)
protectedvirtual

Copies object members

Definition at line 139 of file klocale_kde.cpp.

void KLocalePrivate::copyCatalogsTo ( KLocale *  locale)
virtual

Copies the catalogs of this object to an other KLocale object. The worker of the same-name KLocale API function.

Definition at line 3242 of file klocale_kde.cpp.

QString KLocalePrivate::country ( ) const
virtual

Returns the Locale ISO Country Code The worker of the same-name KLocale API function.

Definition at line 785 of file klocale_kde.cpp.

QString KLocalePrivate::countryCodeToName ( const QString &  country) const
virtual

Convert a known country code to a human readable, localized form. The worker of the same-name KLocale API function.

Definition at line 3126 of file klocale_kde.cpp.

QString KLocalePrivate::countryDivisionCode ( ) const

Returns the Country Division Code The worker of the same-name KLocale API function.

Definition at line 790 of file klocale_kde.cpp.

KCurrencyCode * KLocalePrivate::currency ( )
virtual

Returns the Locale Currency object The worker of the same-name KLocale API function.

Definition at line 799 of file klocale_kde.cpp.

QString KLocalePrivate::currencyCode ( ) const
virtual

Returns the Locale ISO Currency Code The worker of the same-name KLocale API function.

Definition at line 807 of file klocale_kde.cpp.

QStringList KLocalePrivate::currencyCodeList ( ) const
virtual

Returns the ISO Currency Codes used in the locale The worker of the same-name KLocale API function.

Definition at line 2499 of file klocale_kde.cpp.

QString KLocalePrivate::currencySymbol ( ) const
virtual

Returns the default currency symbol used by locale. The worker of the same-name KLocale API function.

Definition at line 1232 of file klocale_kde.cpp.

QString KLocalePrivate::dateFormat ( ) const
virtual

Returns the currently selected date format. The worker of the same-name KLocale API function.

Definition at line 2916 of file klocale_kde.cpp.

QString KLocalePrivate::dateFormatShort ( ) const
virtual

Returns the currently selected short date format. The worker of the same-name KLocale API function.

Definition at line 2921 of file klocale_kde.cpp.

bool KLocalePrivate::dateMonthNamePossessive ( ) const
virtual

Returns if possessive form of month name should be used The worker of the same-name KLocale API function.

Definition at line 1187 of file klocale_kde.cpp.

KLocale::DigitSet KLocalePrivate::dateTimeDigitSet ( ) const
virtual

Returns the identifier of the digit set used to display dates and time. The worker of the same-name KLocale API function.

Definition at line 3312 of file klocale_kde.cpp.

KDayPeriod KLocalePrivate::dayPeriodForTime ( const QTime &  time) const
virtual

The worker of the same-name KLocale API function.

Definition at line 2482 of file klocale_kde.cpp.

QList< KDayPeriod > KLocalePrivate::dayPeriods ( ) const
virtual

The worker of the same-name KLocale API function.

Definition at line 2461 of file klocale_kde.cpp.

int KLocalePrivate::decimalPlaces ( ) const
virtual

Returns the number of numeric decimal places used by locale. The worker of the same-name KLocale API function.

Definition at line 1212 of file klocale_kde.cpp.

QString KLocalePrivate::decimalSymbol ( ) const
virtual

Returns the decimal symbol used by locale. The worker of the same-name KLocale API function.

Definition at line 1217 of file klocale_kde.cpp.

QString KLocalePrivate::decodeFileNameUTF8 ( const QByteArray &  localFileName)
staticprotected

QFile filename decoding function (QFile::decodeFn).

Definition at line 2789 of file klocale_kde.cpp.

QString KLocalePrivate::defaultCountry ( )
static

Returns the name of the default country. The worker of the same-name KLocale API function.

Definition at line 3035 of file klocale_kde.cpp.

QString KLocalePrivate::defaultCurrencyCode ( )
static

Returns the ISO Code of the default currency. The worker of the same-name KLocale API function.

Definition at line 3040 of file klocale_kde.cpp.

QString KLocalePrivate::defaultLanguage ( )
static

Returns the name of the internal language. The worker of the same-name KLocale API function.

Definition at line 3029 of file klocale_kde.cpp.

QList< QString > KLocalePrivate::dialectUnitsList ( KLocale::BinaryUnitDialect  dialect)
protected
Returns
list of translated binary unit for dialect.

Definition at line 1620 of file klocale_kde.cpp.

KLocale::DigitSet KLocalePrivate::digitSet ( ) const
virtual

Returns the identifier of the digit set used to display numbers. The worker of the same-name KLocale API function.

Definition at line 3292 of file klocale_kde.cpp.

QString KLocalePrivate::digitSetString ( KLocale::DigitSet  digitSet)
staticprotected

Returns the digits for a digit set as a string, e.g. "0123456789"

Definition at line 1055 of file klocale_kde.cpp.

QString KLocalePrivate::digitSetToName ( KLocale::DigitSet  digitSet,
bool  withDigits = false 
) const
virtual

Convert a digit set identifier to a human readable, localized name. The worker of the same-name KLocale API function.

Definition at line 1089 of file klocale_kde.cpp.

QByteArray KLocalePrivate::encodeFileNameUTF8 ( const QString &  fileName)
staticprotected

A QFile filename encoding function (QFile::encodeFn).

Definition at line 2712 of file klocale_kde.cpp.

const QByteArray KLocalePrivate::encoding ( )
virtual

Returns the user's preferred encoding. The worker of the same-name KLocale API function.

Reimplemented in KLocaleWindowsPrivate.

Definition at line 3050 of file klocale_kde.cpp.

int KLocalePrivate::encodingMib ( ) const
virtual

Returns the user's preferred encoding. The worker of the same-name KLocale API function.

Definition at line 3055 of file klocale_kde.cpp.

int KLocalePrivate::fileEncodingMib ( ) const
virtual

Returns the file encoding. The worker of the same-name KLocale API function.

Definition at line 3060 of file klocale_kde.cpp.

QString KLocalePrivate::formatByteSize ( double  size)
virtual

Returns converted size as a string The worker of the same-name KLocale API function.

Definition at line 1758 of file klocale_kde.cpp.

QString KLocalePrivate::formatByteSize ( double  size,
int  precision,
KLocale::BinaryUnitDialect  dialect = KLocale::DefaultBinaryDialect,
KLocale::BinarySizeUnits  specificUnit = KLocale::DefaultBinaryUnits 
)
virtual

Returns converted size as a translated string including the units. The worker of the same-name KLocale API function.

Definition at line 1700 of file klocale_kde.cpp.

QString KLocalePrivate::formatDate ( const QDate &  date,
KLocale::DateFormat  format = KLocale::LongDate 
)
virtual

Returns a string formatted to the current locale's conventions The worker of the same-name KLocale API function.

Definition at line 1852 of file klocale_kde.cpp.

QString KLocalePrivate::formatDateTime ( const KLocale *  locale,
const QDateTime &  dateTime,
KLocale::DateFormat  format,
bool  includeSeconds,
int  daysToNow,
int  secsToNow 
)
static

Formats a date/time according to specified format. The worker of the same-name KLocale API function.

Definition at line 2504 of file klocale_kde.cpp.

QString KLocalePrivate::formatDateTime ( const QDateTime &  dateTime,
KLocale::DateFormat  format = KLocale::ShortDate,
bool  includeSecs = false 
) const
virtual

Return the date and time as a string The worker of the same-name KLocale API function.

Definition at line 2547 of file klocale_kde.cpp.

QString KLocalePrivate::formatDateTime ( const KDateTime &  dateTime,
KLocale::DateFormat  format = KLocale::ShortDate,
KLocale::DateTimeFormatOptions  options = 0 
)
virtual

Return the date and time as a string The worker of the same-name KLocale API function.

Definition at line 2555 of file klocale_kde.cpp.

QString KLocalePrivate::formatDuration ( unsigned long  mSec) const
virtual

Returns converted duration as a string The worker of the same-name KLocale API function.

Definition at line 1777 of file klocale_kde.cpp.

QString KLocalePrivate::formatLocaleTime ( const QTime &  pTime,
KLocale::TimeFormatOptions  options = KLocale::TimeDefault 
) const
virtual

Returns a string formatted to the current locale's conventions regarding times. The worker of the same-name KLocale API function.

Definition at line 2341 of file klocale_kde.cpp.

QString KLocalePrivate::formatLong ( long  num) const
virtual

Returns a number as a localized string The worker of the same-name KLocale API function.

Definition at line 1465 of file klocale_kde.cpp.

QString KLocalePrivate::formatMoney ( double  num,
const QString &  currency = QString(),
int  precision = -1 
) const
virtual

Returns an amount of money as a localized string The worker of the same-name KLocale API function.

Definition at line 1392 of file klocale_kde.cpp.

QString KLocalePrivate::formatNumber ( double  num,
int  precision = -1 
) const
virtual

Returns a number as a localized string The worker of the same-name KLocale API function.

Definition at line 1456 of file klocale_kde.cpp.

QString KLocalePrivate::formatNumber ( const QString &  numStr,
bool  round = true,
int  precision = -1 
) const
virtual

Returns a number as a localized string The worker of the same-name KLocale API function.

Definition at line 1563 of file klocale_kde.cpp.

QString KLocalePrivate::formatSingleDuration ( KLocalePrivate::DurationType  durationType,
int  n 
)
staticprotected

Formats a duration according to the given type and number

Definition at line 1795 of file klocale_kde.cpp.

QString KLocalePrivate::formatTime ( const QTime &  pTime,
bool  includeSecs = false,
bool  isDuration = false 
) const
virtual
Deprecated:
replaced by formatLocaleTime()

Definition at line 2329 of file klocale_kde.cpp.

void KLocalePrivate::getLanguagesFromVariable ( QStringList &  list,
const char *  variable,
bool  isLanguageList = false 
)
staticprotected

Converts a language variable in a list of languages

Definition at line 329 of file klocale_kde.cpp.

void KLocalePrivate::init ( const QString &  catalogName,
const QString &  language,
const QString &  country,
KSharedConfig::Ptr  persistantconfig,
KConfig *  tempConfig 
)
protectedvirtual

Main init function, needs to be called by appropriate child constructor.

Definition at line 229 of file klocale_kde.cpp.

void KLocalePrivate::initConfig ( KConfig *  config)
protectedvirtual

Init config.

Definition at line 271 of file klocale_kde.cpp.

void KLocalePrivate::initCountry ( const QString &  country,
const QString &  configCountry 
)
protectedvirtual

Initializes the country if not already explicitly set when calling the constructor Will default to any value set in the config, otherwise will attempt to use the host system country, or finally fall back to the default C.

Definition at line 359 of file klocale_kde.cpp.

void KLocalePrivate::initCurrency ( )
protectedvirtual

Initialises the Currency

Definition at line 699 of file klocale_kde.cpp.

void KLocalePrivate::initDayPeriods ( const KConfigGroup &  cg)
protectedvirtual

initialises the Day Periods

Definition at line 568 of file klocale_kde.cpp.

void KLocalePrivate::initEncoding ( )
protectedvirtual

Figures out which encoding the user prefers.

Definition at line 2623 of file klocale_kde.cpp.

void KLocalePrivate::initFileNameEncoding ( )
protectedvirtual

Figures out which encoding the user prefers for filenames and sets up the appropriate QFile encoding and decoding functions.

Definition at line 2668 of file klocale_kde.cpp.

void KLocalePrivate::initFormat ( )
virtual

Reads the format configuration from disk.

Definition at line 452 of file klocale_kde.cpp.

void KLocalePrivate::initLanguageList ( const QString &  language,
const QString &  configLanguages,
bool  useEnv 
)
protectedvirtual

Initializes the list of valid languages from the user's point of view. This is the list of languages that the user picks in kcontrol. The config object should be valid and contain the global entries.

Parameters
languageThe defualt language to use
configLanguagesThe "Language" setting from the current config
useEnvWhether to use the envvars

Definition at line 402 of file klocale_kde.cpp.

void KLocalePrivate::initMainCatalogs ( )
protectedvirtual

Initializes the catalogs appname, kdelibs and kio for all chosen languages.

Definition at line 296 of file klocale_kde.cpp.

void KLocalePrivate::insertCatalog ( const QString &  catalog)
virtual

Adds another catalog to search for translation lookup. The worker of the same-name KLocale API function.

Definition at line 812 of file klocale_kde.cpp.

QStringList KLocalePrivate::installedLanguages ( )
virtual

Returns a list of all installed KDE languages. The worker of the same-name KLocale API function.

Definition at line 3091 of file klocale_kde.cpp.

bool KLocalePrivate::isApplicationTranslatedInto ( const QString &  language)
virtual

Checks whether or not the active catalog is found for the given language. The worker of the same-name KLocale API function.

Definition at line 720 of file klocale_kde.cpp.

QString KLocalePrivate::langLookup ( const QString &  fname,
const char *  rtype = "html" 
)
static
Deprecated:

Definition at line 2589 of file klocale_kde.cpp.

QString KLocalePrivate::language ( ) const
virtual

Returns the Locale Language The worker of the same-name KLocale API function.

Definition at line 780 of file klocale_kde.cpp.

QString KLocalePrivate::languageCodeToName ( const QString &  language)
virtual

Convert a known language code to a human readable, localized form. The worker of the same-name KLocale API function.

Definition at line 3103 of file klocale_kde.cpp.

QStringList KLocalePrivate::languageList ( ) const
virtual

Returns the language codes selected by user The worker of the same-name KLocale API function.

Definition at line 2494 of file klocale_kde.cpp.

QString KLocalePrivate::localizedFilePath ( const QString &  filePath) const
virtual

Tries to find a path to the localized file for the given original path. The worker of the same-name KLocale API function.

Definition at line 3249 of file klocale_kde.cpp.

KLocale::MeasureSystem KLocalePrivate::measureSystem ( ) const
virtual

Returns which measuring system we use. The worker of the same-name KLocale API function.

Definition at line 3019 of file klocale_kde.cpp.

int KLocalePrivate::monetaryDecimalPlaces ( ) const
virtual

Returns the number of monetary decimal places used by locale. The worker of the same-name KLocale API function.

Definition at line 1269 of file klocale_kde.cpp.

QString KLocalePrivate::monetaryDecimalSymbol ( ) const
virtual

Returns the monetary decimal symbol used by locale. The worker of the same-name KLocale API function.

Definition at line 1237 of file klocale_kde.cpp.

QList< int > KLocalePrivate::monetaryDigitGrouping ( ) const
virtual

Returns the digit grouping to apply to numbers For now internal only api designed for processing efficiency, if needed publicly then may need to review if this is the best way.

Definition at line 1247 of file klocale_kde.cpp.

KLocale::DigitSet KLocalePrivate::monetaryDigitSet ( ) const
virtual

Retuns the digit set used to display monetary values. The worker of the same-name KLocale API function.

Definition at line 3302 of file klocale_kde.cpp.

QString KLocalePrivate::monetaryThousandsSeparator ( ) const
virtual

Returns the monetary thousands separator used by locale. The worker of the same-name KLocale API function. KDE5 Rename to monetaryDigitGroupSeparator()

Definition at line 1242 of file klocale_kde.cpp.

KLocale::SignPosition KLocalePrivate::negativeMonetarySignPosition ( ) const
virtual

Returns where/how to print the negative sign. The worker of the same-name KLocale API function.

Definition at line 1289 of file klocale_kde.cpp.

bool KLocalePrivate::negativePrefixCurrencySymbol ( ) const
virtual

Returns if the currency symbol precedes negative numbers. The worker of the same-name KLocale API function.

Definition at line 1279 of file klocale_kde.cpp.

QString KLocalePrivate::negativeSign ( ) const
virtual

Returns the negative sign used by locale. The worker of the same-name KLocale API function.

Definition at line 1257 of file klocale_kde.cpp.

bool KLocalePrivate::nounDeclension ( ) const
virtual
Deprecated:

Definition at line 1182 of file klocale_kde.cpp.

QList< int > KLocalePrivate::numericDigitGrouping ( ) const
virtual

Returns the digit grouping to apply to numbers For now internal only api designed for processing efficiency, if needed publicly then may need to review if this is the best way.

Definition at line 1227 of file klocale_kde.cpp.

KLocalePrivate & KLocalePrivate::operator= ( const KLocalePrivate &  rhs)

Assignment operator.

Definition at line 124 of file klocale_kde.cpp.

int KLocalePrivate::pageSize ( ) const
virtual

Returns the preferred page size for printing. The worker of the same-name KLocale API function.

Definition at line 3008 of file klocale_kde.cpp.

KLocale::SignPosition KLocalePrivate::positiveMonetarySignPosition ( ) const
virtual

Returns where/how to print the positive sign. The worker of the same-name KLocale API function.

Definition at line 1284 of file klocale_kde.cpp.

bool KLocalePrivate::positivePrefixCurrencySymbol ( ) const
virtual

Returns where to print the currency symbol for positive numbers. The worker of the same-name KLocale API function.

Definition at line 1274 of file klocale_kde.cpp.

QString KLocalePrivate::positiveSign ( ) const
virtual

Returns the positive sign used by locale. The worker of the same-name KLocale API function.

Definition at line 1252 of file klocale_kde.cpp.

QString KLocalePrivate::prettyFormatDuration ( unsigned long  mSec) const
virtual

Returns converted duration as a string. The worker of the same-name KLocale API function.

Definition at line 1810 of file klocale_kde.cpp.

QDate KLocalePrivate::readDate ( const QString &  str,
bool *  ok = 0 
)
virtual

Converts a localized date string to a QDate. The worker of the same-name KLocale API function.

Definition at line 2093 of file klocale_kde.cpp.

QDate KLocalePrivate::readDate ( const QString &  intstr,
const QString &  fmt,
bool *  ok = 0 
)
virtual

Converts a localized date string to a QDate, using the specified format. The worker of the same-name KLocale API function.

Definition at line 2103 of file klocale_kde.cpp.

QDate KLocalePrivate::readDate ( const QString &  str,
KLocale::ReadDateFlags  flags,
bool *  ok = 0 
)
virtual

Converts a localized date string to a QDate. The worker of the same-name KLocale API function.

Definition at line 2098 of file klocale_kde.cpp.

QTime KLocalePrivate::readLocaleTime ( const QString &  str,
bool *  ok = 0,
KLocale::TimeFormatOptions  options = KLocale::TimeDefault,
KLocale::TimeProcessingOptions  processing = KLocale::ProcessNonStrict 
) const
virtual

Converts a localized time string to a QTime. The worker of the same-name KLocale API function.

Definition at line 2192 of file klocale_kde.cpp.

double KLocalePrivate::readMoney ( const QString &  numStr,
bool *  ok = 0 
) const
virtual

Converts a localized monetary string to a double. The worker of the same-name KLocale API function.

Definition at line 1950 of file klocale_kde.cpp.

double KLocalePrivate::readNumber ( const QString &  numStr,
bool *  ok = 0 
) const
virtual

Converts a localized numeric string to a double. The worker of the same-name KLocale API function.

Definition at line 1863 of file klocale_kde.cpp.

QTime KLocalePrivate::readTime ( const QString &  str,
bool *  ok = 0 
) const
virtual

Converts a localized time string to a QTime. The worker of the same-name KLocale API function.

Definition at line 2108 of file klocale_kde.cpp.

QTime KLocalePrivate::readTime ( const QString &  str,
KLocale::ReadTimeFlags  flags,
bool *  ok = 0 
) const
virtual
Deprecated:
replaced by readLocaleTime()

Definition at line 2117 of file klocale_kde.cpp.

QString KLocalePrivate::removeAcceleratorMarker ( const QString &  label) const
virtual

Removes accelerator marker from a UI text label. The worker of the same-name KLocale API function.

Definition at line 3282 of file klocale_kde.cpp.

void KLocalePrivate::removeCatalog ( const QString &  catalog)
virtual

Removes a catalog for translation lookup. The worker of the same-name KLocale API function.

Definition at line 861 of file klocale_kde.cpp.

void KLocalePrivate::setActiveCatalog ( const QString &  catalog)
virtual

Sets the active catalog for translation lookup.

Parameters
catalogThe catalog to activate.

Definition at line 878 of file klocale_kde.cpp.

void KLocalePrivate::setBinaryUnitDialect ( KLocale::BinaryUnitDialect  newDialect)
virtual

Sets the default dialect for this locale The worker of the same-name KLocale API function.

Definition at line 1768 of file klocale_kde.cpp.

void KLocalePrivate::setCalendar ( const QString &  calendarType)
virtual

Sets the current calendar system to the calendar specified. The worker of the same-name KLocale API function.

Definition at line 3201 of file klocale_kde.cpp.

void KLocalePrivate::setCalendarSystem ( KLocale::CalendarSystem  calendarSystem)
virtual

Sets the current calendar system to the calendar specified. The worker of the same-name KLocale API function.

Definition at line 3206 of file klocale_kde.cpp.

bool KLocalePrivate::setCountry ( const QString &  country,
KConfig *  config 
)
virtual

Sets the Locale Country The worker of the same-name KLocale API function.

Definition at line 593 of file klocale_kde.cpp.

bool KLocalePrivate::setCountryDivisionCode ( const QString &  countryDivision)

Sets the Country Division Code The worker of the same-name KLocale API function.

Definition at line 629 of file klocale_kde.cpp.

void KLocalePrivate::setCurrencyCode ( const QString &  newCurrencyCode)
virtual

Sets the Locale Currency Code The worker of the same-name KLocale API function.

Definition at line 711 of file klocale_kde.cpp.

void KLocalePrivate::setCurrencySymbol ( const QString &  symbol)
virtual

Sets the current currency symbol. The worker of the same-name KLocale API function.

Definition at line 3003 of file klocale_kde.cpp.

void KLocalePrivate::setDateFormat ( const QString &  format)
virtual

Sets the current date format. The worker of the same-name KLocale API function.

Definition at line 2868 of file klocale_kde.cpp.

void KLocalePrivate::setDateFormatShort ( const QString &  format)
virtual

Sets the current short date format. The worker of the same-name KLocale API function.

Definition at line 2873 of file klocale_kde.cpp.

void KLocalePrivate::setDateMonthNamePossessive ( bool  possessive)
virtual

Sets of the possessive form of month name should be used in dates. The worker of the same-name KLocale API function.

Definition at line 2878 of file klocale_kde.cpp.

void KLocalePrivate::setDateTimeDigitSet ( KLocale::DigitSet  digitSet)
virtual

Set digit characters used to display dates and time. The worker of the same-name KLocale API function.

Definition at line 3307 of file klocale_kde.cpp.

void KLocalePrivate::setDayPeriods ( const QList< KDayPeriod > &  dayPeriods)
virtual

The worker of the same-name KLocale API function.

Definition at line 2449 of file klocale_kde.cpp.

void KLocalePrivate::setDecimalPlaces ( int  digits)
virtual

Sets the number of decimal places used when formating numbers. The worker of the same-name KLocale API function.

Definition at line 2931 of file klocale_kde.cpp.

void KLocalePrivate::setDecimalSymbol ( const QString &  symbol)
virtual

Sets the symbol used to identify the decimal pointer. The worker of the same-name KLocale API function.

Definition at line 2936 of file klocale_kde.cpp.

void KLocalePrivate::setDigitSet ( KLocale::DigitSet  digitSet)
virtual

Sets the set of digit characters used to display numbers. The worker of the same-name KLocale API function.

Definition at line 3287 of file klocale_kde.cpp.

bool KLocalePrivate::setEncoding ( int  mibEnum)
virtual

Sets the current encoding The worker of the same-name KLocale API function.

Definition at line 3073 of file klocale_kde.cpp.

bool KLocalePrivate::setLanguage ( const QString &  language,
KConfig *  config 
)
virtual

Sets the Locale Language The worker of the same-name KLocale API function.

Definition at line 635 of file klocale_kde.cpp.

bool KLocalePrivate::setLanguage ( const QStringList &  languages)
virtual

Sets the list of preferred languages for the locale. The worker of the same-name KLocale API function.

Definition at line 661 of file klocale_kde.cpp.

void KLocalePrivate::setMainCatalog ( const char *  catalog)
static

Set the main catalog for all KLocales The worker of the same-name KLocale API function.

Definition at line 1857 of file klocale_kde.cpp.

void KLocalePrivate::setMeasureSystem ( KLocale::MeasureSystem  value)
virtual

Sets the preferred measuring system. The worker of the same-name KLocale API function.

Definition at line 3024 of file klocale_kde.cpp.

void KLocalePrivate::setMonetaryDecimalPlaces ( int  digits)
virtual

Sets the number of decimal places used when formating money. The worker of the same-name KLocale API function.

Definition at line 2982 of file klocale_kde.cpp.

void KLocalePrivate::setMonetaryDecimalSymbol ( const QString &  symbol)
virtual

Sets the symbol used to identify the decimal pointer for monetary values. The worker of the same-name KLocale API function.

Definition at line 2998 of file klocale_kde.cpp.

void KLocalePrivate::setMonetaryDigitGrouping ( QList< int >  groupList)
virtual

Sets the digit grouping to apply to numbers For now internal only api designed for processing efficiency, if needed publicly then may need to review if this is the best way.

Definition at line 2993 of file klocale_kde.cpp.

void KLocalePrivate::setMonetaryDigitSet ( KLocale::DigitSet  digitSet)
virtual

Set digit characters used to display monetary values. The worker of the same-name KLocale API function.

Definition at line 3297 of file klocale_kde.cpp.

void KLocalePrivate::setMonetaryThousandsSeparator ( const QString &  separator)
virtual

Sets the separator used to group digits when formating monetary values. The worker of the same-name KLocale API function. KDE5 Rename to setMonetaryDigitGroupSeparator()

Definition at line 2987 of file klocale_kde.cpp.

void KLocalePrivate::setNegativeMonetarySignPosition ( KLocale::SignPosition  signpos)
virtual

Sets the sign position used for negative monetary values. The worker of the same-name KLocale API function.

Definition at line 2967 of file klocale_kde.cpp.

void KLocalePrivate::setNegativePrefixCurrencySymbol ( bool  prefix)
virtual

Sets the position where the currency symbol should be printed for negative monetary values. The worker of the same-name KLocale API function.

Definition at line 2977 of file klocale_kde.cpp.

void KLocalePrivate::setNegativeSign ( const QString &  sign)
virtual

Sets the sign used to identify a negative number. The worker of the same-name KLocale API function.

Definition at line 2957 of file klocale_kde.cpp.

void KLocalePrivate::setNumericDigitGrouping ( QList< int >  groupList)
virtual

Sets the digit grouping to apply to numbers For now internal only api designed for processing efficiency, if needed publicly then may need to review if this is the best way.

Definition at line 2947 of file klocale_kde.cpp.

void KLocalePrivate::setPageSize ( int  paperFormat)
virtual

Sets the preferred page size when printing. The worker of the same-name KLocale API function.

Definition at line 3013 of file klocale_kde.cpp.

void KLocalePrivate::setPositiveMonetarySignPosition ( KLocale::SignPosition  signpos)
virtual

Sets the sign position used for positive monetary values. The worker of the same-name KLocale API function.

Definition at line 2962 of file klocale_kde.cpp.

void KLocalePrivate::setPositivePrefixCurrencySymbol ( bool  prefix)
virtual

Sets the position where the currency symbol should be printed for positive monetary values. The worker of the same-name KLocale API function.

Definition at line 2972 of file klocale_kde.cpp.

void KLocalePrivate::setPositiveSign ( const QString &  sign)
virtual

Sets the sign used to identify a positive number. The worker of the same-name KLocale API function.

Definition at line 2952 of file klocale_kde.cpp.

void KLocalePrivate::setThousandsSeparator ( const QString &  separator)
virtual

Sets the separator used to group digits when formating numbers. The worker of the same-name KLocale API function. KDE5 Rename to setNumericDigitGroupSeparator()

Definition at line 2941 of file klocale_kde.cpp.

void KLocalePrivate::setTimeFormat ( const QString &  format)
virtual

Changes the current time format. The worker of the same-name KLocale API function.

Definition at line 2883 of file klocale_kde.cpp.

void KLocalePrivate::setWeekDayOfPray ( int  day)
virtual

Changes how KLocale defines the day reserved for religious observance. The worker of the same-name KLocale API function.

Definition at line 2909 of file klocale_kde.cpp.

void KLocalePrivate::setWeekNumberSystem ( KLocale::WeekNumberSystem  weekNumberSystem)

Sets the Week Number System to use The worker of the same-name KLocale API function.

Definition at line 3232 of file klocale_kde.cpp.

void KLocalePrivate::setWeekStartDay ( int  day)
virtual

Changes how KLocale defines the first day in week. The worker of the same-name KLocale API function.

Definition at line 2888 of file klocale_kde.cpp.

void KLocalePrivate::setWorkingWeekEndDay ( int  day)
virtual

Changes how KLocale defines the last working day in week. The worker of the same-name KLocale API function.

Definition at line 2902 of file klocale_kde.cpp.

void KLocalePrivate::setWorkingWeekStartDay ( int  day)
virtual

Changes how KLocale defines the first working day in week. The worker of the same-name KLocale API function.

Definition at line 2895 of file klocale_kde.cpp.

void KLocalePrivate::splitLocale ( const QString &  locale,
QString &  language,
QString &  country,
QString &  modifier,
QString &  charset 
)
static

Parses locale string into distinct parts. The worker of the same-name KLocale API function.

Definition at line 742 of file klocale_kde.cpp.

QByteArray KLocalePrivate::systemCodeset ( ) const
protectedvirtual

Returns the system codeset.

Reimplemented in KLocaleWindowsPrivate, and KLocaleMacPrivate.

Definition at line 2649 of file klocale_kde.cpp.

QString KLocalePrivate::systemCountry ( ) const
protectedvirtual

Returns the host system country ISO code If country could not be determined then may return an empty string or "C"

Reimplemented in KLocaleMacPrivate, and KLocaleWindowsPrivate.

Definition at line 393 of file klocale_kde.cpp.

QStringList KLocalePrivate::systemLanguageList ( ) const
protectedvirtual

Returns the list of host system languages

Reimplemented in KLocaleWindowsPrivate.

Definition at line 447 of file klocale_kde.cpp.

QString KLocalePrivate::thousandsSeparator ( ) const
virtual

Returns the digit group separator used by locale. The worker of the same-name KLocale API function. KDE5 Rename to numericDigitGroupSeparator()

Definition at line 1222 of file klocale_kde.cpp.

QString KLocalePrivate::timeFormat ( ) const
virtual

Returns the currently selected time format. The worker of the same-name KLocale API function.

Definition at line 2926 of file klocale_kde.cpp.

QString KLocalePrivate::toArabicDigits ( const QString &  str)
staticprotected

Converts a number string in any digit set into Arabic digits

Definition at line 1169 of file klocale_kde.cpp.

QString KLocalePrivate::translateQt ( const char *  context,
const char *  sourceText,
const char *  comment 
) const
virtual

Translates a message as a QTranslator is supposed to. The worker of the same-name KLocale API function.

Definition at line 973 of file klocale_kde.cpp.

void KLocalePrivate::translateRawFrom ( const char *  catname,
const char *  msgctxt,
const char *  msgid,
const char *  msgid_plural = 0,
unsigned long  n = 0,
QString *  language = 0,
QString *  translation = 0 
) const
virtual

Function used by the translate versions The worker of the same-name KLocale API function.

Definition at line 890 of file klocale_kde.cpp.

void KLocalePrivate::updateCatalogs ( )
protectedvirtual

evaluate the list of catalogs and check that all instances for all languages are loaded and that they are sorted according to the catalog names

Callers must lock the mutex first.

Definition at line 827 of file klocale_kde.cpp.

bool KLocalePrivate::use12Clock ( ) const
virtual

Returns if the user wants 12h clock The worker of the same-name KLocale API function.

Definition at line 2439 of file klocale_kde.cpp.

bool KLocalePrivate::useDefaultLanguage ( ) const
protectedvirtual

function used to determine if we are using the en_US translation

Definition at line 2618 of file klocale_kde.cpp.

bool KLocalePrivate::useTranscript ( ) const
virtual

Returns whether evaluation of translation scripts is enabled. The worker of the same-name KLocale API function.

Definition at line 3045 of file klocale_kde.cpp.

int KLocalePrivate::weekDayOfPray ( ) const
virtual

Returns which day is reserved for religious observance The worker of the same-name KLocale API function.

Definition at line 1207 of file klocale_kde.cpp.

KLocale::WeekNumberSystem KLocalePrivate::weekNumberSystem ( )

Returns the Week Number System used The worker of the same-name KLocale API function.

Definition at line 3237 of file klocale_kde.cpp.

int KLocalePrivate::weekStartDay ( ) const
virtual

Returns which day is the first day of the week. The worker of the same-name KLocale API function.

Definition at line 1192 of file klocale_kde.cpp.

int KLocalePrivate::workingWeekEndDay ( ) const
virtual

Returns which day is the last working day of the week. The worker of the same-name KLocale API function.

Definition at line 1202 of file klocale_kde.cpp.

int KLocalePrivate::workingWeekStartDay ( ) const
virtual

Returns which day is the first working day of the week. The worker of the same-name KLocale API function.

Definition at line 1197 of file klocale_kde.cpp.

Member Data Documentation

KLocale* KLocalePrivate::q

Definition at line 1150 of file klocale_p.h.


The documentation for this class was generated from the following files:
  • klocale_p.h
  • klocale_kde.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal