src/hbcore/inputfw/hbinputlanguage.h
changeset 6 c3690ec91ef8
parent 0 16d8024aca5e
equal deleted inserted replaced
5:627c4a0fd0e7 6:c3690ec91ef8
    32 #include <hbinputdef.h>
    32 #include <hbinputdef.h>
    33 
    33 
    34 class HB_CORE_EXPORT HbInputLanguage
    34 class HB_CORE_EXPORT HbInputLanguage
    35 {
    35 {
    36 public:
    36 public:
    37     HbInputLanguage() : mLanguage((QLocale::Language)0), mVariant(QLocale::AnyCountry)  
    37     HbInputLanguage() : mLanguage((QLocale::Language)0), mVariant(QLocale::AnyCountry)
    38         {}
    38     {}
    39 
    39 
    40     HbInputLanguage(QLocale::Language language, QLocale::Country variant = QLocale::AnyCountry)
    40     HbInputLanguage(QLocale::Language language, QLocale::Country variant = QLocale::AnyCountry)
    41         : mLanguage(language), mVariant(variant)
    41         : mLanguage(language), mVariant(variant)
    42         {}
    42     {}
    43 
    43 
    44     HbInputLanguage(const HbInputLanguage &other) {
    44     HbInputLanguage(const HbInputLanguage &other) {
    45         mLanguage = other.mLanguage;
    45         mLanguage = other.mLanguage;
    46         mVariant = other.mVariant;
    46         mVariant = other.mVariant;
    47     }
    47     }
    48 
    48 
    49     QLocale::Language language() const { return mLanguage; }
    49     QLocale::Language language() const {
    50     QLocale::Country variant() const { return mVariant; }
    50         return mLanguage;
    51     bool undefined() const { return (mLanguage == (QLocale::Language)0); }
    51     }
    52     bool defined() const { return (mLanguage != (QLocale::Language)0); }
    52 
       
    53     QLocale::Country variant() const {
       
    54         return mVariant;
       
    55     }
       
    56 
       
    57     bool undefined() const {
       
    58         return (mLanguage == (QLocale::Language)0);
       
    59     }
       
    60 
       
    61     bool defined() const {
       
    62         return (mLanguage != (QLocale::Language)0);
       
    63     }
    53 
    64 
    54     bool operator==(const HbInputLanguage &other) const {
    65     bool operator==(const HbInputLanguage &other) const {
    55         return (mLanguage == other.mLanguage && mVariant == other.mVariant);
    66         return (mLanguage == other.mLanguage && mVariant == other.mVariant);
    56     }
    67     }
    57 
    68 
    62     bool operator!=(const HbInputLanguage &other) const {
    73     bool operator!=(const HbInputLanguage &other) const {
    63         return (mLanguage != other.mLanguage || mVariant != other.mVariant);
    74         return (mLanguage != other.mLanguage || mVariant != other.mVariant);
    64     }
    75     }
    65 
    76 
    66     bool operator!=(const QLocale::Language language) const {
    77     bool operator!=(const QLocale::Language language) const {
    67          return (mLanguage != language);
    78         return (mLanguage != language);
    68     }
    79     }
    69 
    80 
    70     QString localisedName();
    81     QString localisedName();
    71     bool isCaseSensitiveLanguage() const;
    82     bool isCaseSensitiveLanguage() const;
    72     bool isLatinAlphabetLanguage() const;
    83     bool isLatinAlphabetLanguage() const;