//
//     Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
//     Earlier copyrights 1998 - 2007 Jim Bublitz also apply

//                 Generated by twine

// This file is part of PyKDE4.

// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.

// PyKDE4 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 program.  If not, see <http://www.gnu.org/licenses/>.




class KLocale
{
%TypeHeaderCode
#include <klocale.h>
%End


public:
    explicit                KLocale (const QString& catalog, KSharedConfig::Ptr config = KSharedConfig::Ptr());
                            KLocale (const QString& catalog, const QString& language, const QString& country = QString(), KConfig* config = 0);
//ig                            KLocale (const KLocale& rhs);
    void                    translateRaw (const char* msg, QString* lang, QString* trans) const;
    void                    translateRaw (const char* ctxt, const char* msg, QString* lang, QString* trans) const;
    void                    translateRaw (const char* singular, const char* plural, unsigned long n, QString* lang, QString* trans) const;
    void                    translateRaw (const char* ctxt, const char* singular, const char* plural, unsigned long n, QString* lang, QString* trans) const;
    bool                    setEncoding (int mibEnum);

    enum SignPosition
    {
        ParensAround,
        BeforeQuantityMoney,
        AfterQuantityMoney,
        BeforeMoney,
        AfterMoney
    };


    enum DigitSet
    {
        ArabicDigits,
        ArabicIndicDigits,
        EasternArabicIndicDigits,
        DevenagariDigits,
        BengaliDigits,
        GujaratiDigits,
        GurmukhiDigits,
        KannadaDigits,
        KhmerDigits,
        MalayalamDigits,
        OriyaDigits,
        TamilDigits,
        TeluguDigits,
        ThaiDigits
    };

    QString                 digitSetToName (KLocale::DigitSet digitSet, bool withDigits = 0) const;
    QList<KLocale::DigitSet>  allDigitSetsList () const;
    QString                 decimalSymbol () const;
    QString                 thousandsSeparator () const;
    KLocale::DigitSet       digitSet () 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;
    KLocale::SignPosition   positiveMonetarySignPosition () const;
    KLocale::SignPosition   negativeMonetarySignPosition () const;
    KLocale::DigitSet       monetaryDigitSet () const;
    QString                 formatMoney (double num, const QString& currency = QString(), int precision = -1) const;
    QString                 formatNumber (double num, int precision = -1) const;
    QString                 formatNumber (const QString& numStr, bool round = 1, int precision = 2) const;
    QString                 formatLong (long num) const;
    QString                 formatByteSize (double size) const;
    QString                 formatDuration (unsigned long mSec) const;
    QString                 prettyFormatDuration (unsigned long mSec) const;
    bool                    nounDeclension () const;

    enum DateFormat
    {
        ShortDate,
        LongDate,
        FancyShortDate,
        FancyLongDate,
        IsoDate,
        IsoWeekDate,
        IsoOrdinalDate
    };

    QString                 formatDate (const QDate& date, KLocale::DateFormat format = KLocale::LongDate) const;
    QString                 formatDateTime (const QDateTime& dateTime, KLocale::DateFormat format = KLocale::ShortDate, bool includeSecs = 0) const;

    enum DateTimeFormatOption
    {
        TimeZone,
        Seconds
    };

    typedef QFlags<KLocale::DateTimeFormatOption> DateTimeFormatOptions;

    QString                 formatDateTime (const KDateTime& dateTime, KLocale::DateFormat format = KLocale::ShortDate, KLocale::DateTimeFormatOptions options = 0) const;
    bool                    dateMonthNamePossessive () const;
    QString                 formatTime (const QTime& pTime, bool includeSecs = 0, bool isDuration = 0) const;
    KLocale::DigitSet       dateTimeDigitSet () const;
    bool                    use12Clock () const;
    int                     weekStartDay () const;
    int                     workingWeekStartDay () const;
    int                     workingWeekEndDay () const;
    int                     weekDayOfPray () const;
    const KCalendarSystem*  calendar () const;
    QString                 calendarType () const;
    void                    setCalendar (const QString& calendarType);
    double                  readMoney (const QString& numStr, bool* ok /Out/ = 0) const;
    double                  readNumber (const QString& numStr, bool* ok /Out/ = 0) const;
    QDate                   readDate (const QString& str, bool* ok /Out/ = 0) const;
    QDate                   readDate (const QString& intstr, const QString& fmt, bool* ok /Out/ = 0) const;

    enum ReadDateFlags
    {
        NormalFormat,
        ShortFormat,
        IsoFormat,
        IsoWeekFormat,
        IsoOrdinalFormat
    };

    QDate                   readDate (const QString& str, KLocale::ReadDateFlags flags, bool* ok /Out/ = 0) const;
    QTime                   readTime (const QString& str, bool* ok /Out/ = 0) const;

    enum ReadTimeFlags
    {
        WithSeconds,
        WithoutSeconds
    };

    QTime                   readTime (const QString& str, KLocale::ReadTimeFlags flags, bool* ok /Out/ = 0) const;
    QString                 language () const;
    QString                 country () const;
    QStringList             languageList () const;
    const QByteArray        encoding () const;
    int                     encodingMib () const;
    QTextCodec*             codecForEncoding () const;
    int                     fileEncodingMib () const;
    void                    setDateFormat (const QString& format);
    void                    setDateFormatShort (const QString& format);
    void                    setDateMonthNamePossessive (bool possessive);
    void                    setTimeFormat (const QString& format);
    void                    setDateTimeDigitSet (KLocale::DigitSet digitSet);
    void                    setWeekStartDay (int day);
    void                    setWorkingWeekStartDay (int day);
    void                    setWorkingWeekEndDay (int day);
    void                    setWeekDayOfPray (int day);
    QString                 dateFormat () const;
    QString                 dateFormatShort () const;
    QString                 timeFormat () const;
    void                    setDecimalSymbol (const QString& symbol);
    void                    setThousandsSeparator (const QString& separator);
    void                    setPositiveSign (const QString& sign);
    void                    setNegativeSign (const QString& sign);
    void                    setDigitSet (KLocale::DigitSet digitSet);
    void                    setPositiveMonetarySignPosition (KLocale::SignPosition signpos);
    void                    setNegativeMonetarySignPosition (KLocale::SignPosition signpos);
    void                    setPositivePrefixCurrencySymbol (bool prefix);
    void                    setNegativePrefixCurrencySymbol (bool prefix);
    void                    setFracDigits (int digits);
    void                    setMonetaryThousandsSeparator (const QString& separator);
    void                    setMonetaryDecimalSymbol (const QString& symbol);
    void                    setCurrencySymbol (const QString& symbol);
    void                    setMonetaryDigitSet (KLocale::DigitSet digitSet);
    int                     pageSize () const;
    void                    setPageSize (int paperFormat);

    enum MeasureSystem
    {
        Metric,
        Imperial
    };

    KLocale::MeasureSystem  measureSystem () const;
    void                    setMeasureSystem (KLocale::MeasureSystem value);
    void                    insertCatalog (const QString& catalog);
    void                    removeCatalog (const QString& catalog);
    void                    setActiveCatalog (const QString& catalog);
    QString                 translateQt (const char* context, const char* sourceText, const char* comment) const;
    QStringList             allLanguagesList () const;
    QString                 languageCodeToName (const QString& language) const;
    QStringList             allCountriesList () const;
    QString                 countryCodeToName (const QString& country) const;
    static void             splitLocale (const QString& locale, QString& language, QString& country, QString& modifier, QString& charset);
    static void             setMainCatalog (const char* catalog);
    static QString          langLookup (const QString& fname, const char* rtype = "html");
    static QString          defaultLanguage ();
    static QString          defaultCountry ();
    bool                    useTranscript () const;
    bool                    isApplicationTranslatedInto (const QString& language);
    void                    copyCatalogsTo (KLocale* locale);
    bool                    setCountry (const QString& country, KConfig* config);
    bool                    setLanguage (const QString& language, KConfig* config);
    bool                    setLanguage (const QStringList& languages);
    QString                 localizedFilePath (const QString& filePath) const;
    QString                 removeAcceleratorMarker (const QString& label) const;
    ~KLocale ();
    QString                 convertDigits (const QString& str, KLocale::DigitSet digitSet, bool ignoreContext = 0) const;
    enum BinarySizeUnits
    {
        DefaultBinaryUnits,
        UnitByte,
        UnitKiloByte,
        UnitMegaByte,
        UnitGigaByte,
        UnitTeraByte,
        UnitPetaByte,
        UnitExaByte,
        UnitZettaByte,
        UnitYottaByte,
        UnitLastUnit
    };
    enum BinaryUnitDialect
    {
        DefaultBinaryDialect,
        IECBinaryDialect,
        JEDECBinaryDialect,
        MetricBinaryDialect,
        LastBinaryDialect
    };
    QString                 formatByteSize (double size, int precision, KLocale::BinaryUnitDialect dialect = KLocale::DefaultBinaryDialect, KLocale::BinarySizeUnits specificUnit = KLocale::DefaultBinaryUnits) const;
    KLocale::BinaryUnitDialect  binaryUnitDialect () const;
    void                    setBinaryUnitDialect (KLocale::BinaryUnitDialect newDialect);
    enum TimeFormatOption
    {
        TimeDefault,
        TimeWithoutSeconds,
        TimeWithoutAmPm,
        TimeDuration,
        TimeFoldHours
    };
    typedef QFlags<KLocale::TimeFormatOption> TimeFormatOptions;
    QString                 formatLocaleTime (const QTime& pTime, KLocale::TimeFormatOptions options = KLocale::TimeDefault) const;
    enum TimeProcessingOption
    {
        ProcessStrict,
        ProcessNonStrict
    };
    typedef QFlags<KLocale::TimeProcessingOption> TimeProcessingOptions;
    QTime                   readLocaleTime (const QString& str, bool* ok = 0, KLocale::TimeFormatOptions options = KLocale::TimeDefault, KLocale::TimeProcessingOptions processing = KLocale::ProcessNonStrict) const;
    QString                 currencyCode () const;
    KCurrencyCode*          currency () const;
    int                     decimalPlaces () const;
    int                     monetaryDecimalPlaces () const;
    QStringList             currencyCodeList () const;
    void                    setDecimalPlaces (int digits);
    void                    setMonetaryDecimalPlaces (int digits);
    void                    setCurrencyCode (const QString& newCurrencyCode);
    static QString          defaultCurrencyCode ();
    enum DateTimeFormatStandard
    {
        KdeFormat,
        PosixFormat,
        UnicodeFormat
    };
    void                    translateRawFrom (const char* catname, const char* msg, QString* lang, QString* trans) const;
    void                    translateRawFrom (const char* catname, const char* ctxt, const char* msg, QString* lang, QString* trans) const;
    void                    translateRawFrom (const char* catname, const char* singular, const char* plural, unsigned long n, QString* lang, QString* trans) const;
    void                    translateRawFrom (const char* catname, const char* ctxt, const char* singular, const char* plural, unsigned long n, QString* lang, QString* trans) const;
    enum CalendarSystem
    {
        QDateCalendar,
        CopticCalendar,
        EthiopianCalendar,
        GregorianCalendar,
        HebrewCalendar,
        IslamicCivilCalendar,
        IndianNationalCalendar,
        JalaliCalendar,
        JapaneseCalendar,
        JulianCalendar,
        MinguoCalendar,
        ThaiCalendar
    };
    enum WeekNumberSystem
    {
        DefaultWeekNumber,
        IsoWeekNumber,
        FirstFullWeek,
        FirstPartialWeek,
        SimpleWeek
    };
    enum DateTimeParseMode
    {
        LiberalParsing
    };
    enum DateTimeComponent
    {
        Year,
        YearName,
        Month,
        MonthName,
        Day,
        DayName,
        JulianDay,
        EraName,
        EraYear,
        YearInEra,
        DayOfYear,
        DayOfYearName,
        DayOfWeek,
        DayOfWeekName,
        Week,
        WeekYear,
        MonthsInYear,
        WeeksInYear,
        DaysInYear,
        DaysInMonth,
        DaysInWeek,
        Hour,
        Minute,
        Second,
        Millisecond,
        DayPeriod,
        DayPeriodHour,
        Timezone,
        TimezoneName,
        UnixTime
    };
    typedef QFlags<KLocale::DateTimeComponent> DateTimeComponents;
    enum DateTimeComponentFormat
    {
        DefaultComponentFormat,
        ShortNumber,
        LongNumber,
        NarrowName,
        ShortName,
        LongName
    };
    QString                 dayPeriodText (const QTime& time, KLocale::DateTimeComponentFormat format = KLocale::DefaultComponentFormat) const;
    KLocale::CalendarSystem  calendarSystem () const;
    void                    setCalendarSystem (KLocale::CalendarSystem calendarSystem);
    void                    setWeekNumberSystem (KLocale::WeekNumberSystem weekNumberSystem);
    KLocale::WeekNumberSystem  weekNumberSystem ();
    QString                 countryDivisionCode () const;
    QStringList             installedLanguages () const;
    bool                    setCountryDivisionCode (const QString& countryDivision);
//ig    KLocale::WeekNumberSystem  weekNumberSystem () const;
};
// KLocale


