//
//     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
    };

    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;
    KLocale::SignPosition   positiveMonetarySignPosition () const;
    KLocale::SignPosition   negativeMonetarySignPosition () const;
    QString                 formatMoney (double num, const QString& currency = QString(), int digits = -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
    };

    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;
    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
    };

    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                    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                    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);
    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


