You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
244 lines
8.0 KiB
244 lines
8.0 KiB
//
|
|
// Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com>
|
|
// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson
|
|
// may also apply
|
|
|
|
|
|
// Generated by preSip
|
|
// module kdecore version KDE 3.5.3
|
|
|
|
|
|
// This software is free software; you can redistribute it and/or
|
|
// modify it under the terms of the GNU General Public License as
|
|
// published by the Free Software Foundation; either version 2 of
|
|
// the License, or (at your option) any later version.
|
|
//
|
|
// This software is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public
|
|
// License along with this library; see the file COPYING.
|
|
// If not, write to the Free Software Foundation, Inc.,
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
class KLocale
|
|
{
|
|
%TypeHeaderCode
|
|
#include <klocale.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
KLocale (const QString&, KConfig* = 0);
|
|
//ig KLocale (const KLocale&);
|
|
QString translate (const char*) const;
|
|
QString translate (const char*, const char*) const;
|
|
QString translate (const char*, const char*, ulong) const;
|
|
bool setEncoding (int);
|
|
bool setLanguage (const QString&);
|
|
bool setLanguage (const QStringList&);
|
|
bool setCountry (const QString&);
|
|
|
|
enum SignPosition
|
|
{
|
|
ParensAround,
|
|
BeforeQuantityMoney,
|
|
AfterQuantityMoney,
|
|
BeforeMoney,
|
|
AfterMoney
|
|
};
|
|
|
|
QString decimalSymbol () const;
|
|
QString thousandsSeparator () const;
|
|
QString currencySymbol () const;
|
|
QString monetaryDecimalSymbol () const;
|
|
QString monetaryThousandsSeparator () const;
|
|
QString positiveSign () const;
|
|
QString negativeSign () const;
|
|
int fracDigits () const;
|
|
bool positivePrefixCurrencySymbol () const;
|
|
bool negativePrefixCurrencySymbol () const;
|
|
SignPosition positiveMonetarySignPosition () const;
|
|
SignPosition negativeMonetarySignPosition () const;
|
|
QString formatMoney (double, const QString& = QString ::null , int = -1) const;
|
|
QString formatNumber (double, int = -1) const;
|
|
QString formatNumber (const QString&) const;
|
|
|
|
%If ( KDE_3_5_0 - )
|
|
QString formatNumber (const QString&, bool, int) const;
|
|
%End
|
|
|
|
|
|
%If ( KDE_3_2_0 - )
|
|
QString formatLong (long) const;
|
|
%End
|
|
|
|
|
|
%If ( KDE_3_1_0 - )
|
|
bool nounDeclension () const;
|
|
%End
|
|
|
|
QString formatDate (const QDate&, bool = 0) const;
|
|
|
|
%If ( KDE_3_1_0 - )
|
|
bool dateMonthNamePossessive () const;
|
|
|
|
%If ( KDE_3_3_0 - )
|
|
QString formatTime (const QTime&, bool, bool) const;
|
|
%End
|
|
|
|
%End
|
|
|
|
QString formatTime (const QTime&, bool = 0) const;
|
|
bool use12Clock () const;
|
|
bool weekStartsMonday () const;
|
|
|
|
%If ( KDE_3_1_0 - )
|
|
int weekStartDay () const;
|
|
%End
|
|
|
|
QString monthName (int, bool = 0) const;
|
|
|
|
%If ( KDE_3_1_0 - )
|
|
QString monthNamePossessive (int, bool = 0) const;
|
|
%End
|
|
|
|
QString weekDayName (int, bool = 0) const;
|
|
|
|
%If ( KDE_3_2_0 - )
|
|
const KCalendarSystem* calendar () const;
|
|
QString calendarType () const;
|
|
void setCalendar (const QString&);
|
|
%End
|
|
|
|
QString formatDateTime (const QDateTime&, bool, bool = 0) const;
|
|
double readMoney (const QString&, bool* = 0) const;
|
|
double readNumber (const QString&, bool* = 0) const;
|
|
QDate readDate (const QString&, bool* = 0) const;
|
|
QDate readDate (const QString&, const QString&, bool* = 0) const;
|
|
|
|
%If ( KDE_3_2_0 - )
|
|
|
|
enum ReadDateFlags
|
|
{
|
|
NormalFormat,
|
|
ShortFormat
|
|
};
|
|
|
|
QDate readDate (const QString&, KLocale::ReadDateFlags, bool* = 0) const;
|
|
%End
|
|
|
|
QTime readTime (const QString&, bool* = 0) const;
|
|
|
|
%If ( KDE_3_2_0 - )
|
|
|
|
enum ReadTimeFlags
|
|
{
|
|
WithSeconds,
|
|
WithoutSeconds
|
|
};
|
|
|
|
QTime readTime (const QString&, KLocale::ReadTimeFlags, bool* = 0) const;
|
|
%End
|
|
|
|
QString language () const;
|
|
QString country () const;
|
|
QStringList languagesTwoAlpha () const;
|
|
QStringList languageList () const;
|
|
const char* encoding () const;
|
|
int encodingMib () const;
|
|
QTextCodec* codecForEncoding () const;
|
|
|
|
%If ( KDE_3_2_0 - )
|
|
int fileEncodingMib () const;
|
|
%End
|
|
|
|
void setDateFormat (const QString&);
|
|
void setDateFormatShort (const QString&);
|
|
|
|
%If ( KDE_3_1_0 - )
|
|
void setDateMonthNamePossessive (bool);
|
|
%End
|
|
|
|
void setTimeFormat (const QString&);
|
|
void setWeekStartsMonday (bool);
|
|
|
|
%If ( KDE_3_1_0 - )
|
|
void setWeekStartDay (int);
|
|
%End
|
|
|
|
QString dateFormat () const;
|
|
QString dateFormatShort () const;
|
|
QString timeFormat () const;
|
|
void setDecimalSymbol (const QString&);
|
|
void setThousandsSeparator (const QString&);
|
|
void setPositiveSign (const QString&);
|
|
void setNegativeSign (const QString&);
|
|
void setPositiveMonetarySignPosition (KLocale::SignPosition);
|
|
void setNegativeMonetarySignPosition (KLocale::SignPosition);
|
|
void setPositivePrefixCurrencySymbol (bool);
|
|
void setNegativePrefixCurrencySymbol (bool);
|
|
void setFracDigits (int);
|
|
void setMonetaryThousandsSeparator (const QString&);
|
|
void setMonetaryDecimalSymbol (const QString&);
|
|
void setCurrencySymbol (const QString&);
|
|
int pageSize () const;
|
|
void setPageSize (int);
|
|
|
|
enum MeasureSystem
|
|
{
|
|
Metric,
|
|
Imperial
|
|
};
|
|
|
|
KLocale::MeasureSystem measureSystem () const;
|
|
void setMeasureSystem (KLocale::MeasureSystem);
|
|
void insertCatalogue (const QString&);
|
|
void removeCatalogue (const QString&);
|
|
void setActiveCatalogue (const QString&);
|
|
QString translateQt (const char*, const char*, const char*) const;
|
|
|
|
%If ( KDE_3_1_0 - )
|
|
QStringList allLanguagesTwoAlpha () const;
|
|
QString twoAlphaToLanguageName (const QString&) const;
|
|
QStringList allCountriesTwoAlpha () const;
|
|
QString twoAlphaToCountryName (const QString&) const;
|
|
%End
|
|
|
|
static void splitLocale (const QString&, QString&, QString&, QString&);
|
|
static void setMainCatalogue (const char*);
|
|
static QString langLookup (const QString&, const char* = "html");
|
|
static QString defaultLanguage ();
|
|
static QString defaultCountry ();
|
|
|
|
%If ( KDE_3_0_1 - )
|
|
static QString _initLanguage (KConfigBase*);
|
|
%End
|
|
|
|
QString formatMoney (const QString&) const;
|
|
QString languages () const;
|
|
//ig bool setCharset (const QString&);
|
|
//ig QString charset () const;
|
|
|
|
protected:
|
|
//ig static void initInstance ();
|
|
//force
|
|
|
|
private:
|
|
KLocale (const KLocale&);
|
|
//end
|
|
|
|
}; // class KLocale
|
|
|
|
|
|
%ModuleCode
|
|
#include <klocale.h>
|
|
%End
|
|
|
|
QString i18n (const char*);
|
|
QString i18n (const char*, const char*);
|
|
QString i18n (const char*, const char*, ulong);
|