Public Types | Public Slots | Signals | Public Member Functions | Properties | Friends

QxtLanguageComboBox Class Reference
[QxtGui]

An extended QComboBox to display langauges. More...

#include <qxtlanguagecombobox.h>

Collaboration diagram for QxtLanguageComboBox:
Collaboration graph
[legend]

List of all members.

Public Types

enum  DisplayMode { AllLanguages, AvailableTranslations }

Public Slots

void setCurrentLanguage (QLocale::Language lang)
void setDisplayMode (DisplayMode mode)
void setTranslationPath (const QString &path)

Signals

void currentLanguageChanged (QLocale::Language country)
void currentLanguageNameChanged (const QString &name)

Public Member Functions

 QxtLanguageComboBox (QWidget *parent=0)
virtual ~QxtLanguageComboBox ()
 Q_ENUMS (DisplayMode)
DisplayMode displayMode () const
QString translationPath () const
QLocale::Language currentLanguage () const
QString currentLanguageName () const

Properties

QString currentLanguageName
 This property holds the name of the current selected language.
DisplayMode displayMode
 This property holds the display mode of the widget.
QString translationPath
 This property holds the path to the translation files.

Friends

class QxtLanguageComboBoxPrivate

Detailed Description

An extended QComboBox to display langauges.

QxtLanguageComboBox is a specialized combo box to display spoken languages. The languages are taken from QLocale::Language.

qxtlanguagecombobox.png

QxtLanguageComboBox in Plastique style.

Definition at line 36 of file qxtlanguagecombobox.h.


Member Enumeration Documentation

This enum describes the displayed languages.

See also:
QxtLanguageComboBox::displayMode
Enumerator:
AllLanguages 
AvailableTranslations 

Definition at line 51 of file qxtlanguagecombobox.h.


Constructor & Destructor Documentation

QxtLanguageComboBox::QxtLanguageComboBox ( QWidget *  parent = 0 ) [explicit]

Constructs a new QxtCountryComboBox with parent.

Definition at line 311 of file qxtlanguagecombobox.cpp.

References AllLanguages, QXT_INIT_PRIVATE, setCurrentLanguage(), and setDisplayMode().

        : QComboBox(parent)
{
    QXT_INIT_PRIVATE(QxtLanguageComboBox);
    setDisplayMode(AllLanguages);
    setCurrentLanguage(QLocale::system().language());
    qxt_d().init();
}
QxtLanguageComboBox::~QxtLanguageComboBox (  ) [virtual]

Destructs the combo box.

Definition at line 323 of file qxtlanguagecombobox.cpp.

{
}

Member Function Documentation

QLocale::Language QxtLanguageComboBox::currentLanguage (  ) const

Definition at line 331 of file qxtlanguagecombobox.cpp.

{
    return qxt_d().currentLanguage();
}
void QxtLanguageComboBox::currentLanguageChanged ( QLocale::Language  country ) [signal]
QString QxtLanguageComboBox::currentLanguageName (  ) const
QxtLanguageComboBox::currentLanguageNameChanged ( const QString &  name ) [signal]

This signal is emitted whenever the current selected language has been changed.

DisplayMode QxtLanguageComboBox::displayMode (  ) const
QxtLanguageComboBox::Q_ENUMS ( DisplayMode   )
void QxtLanguageComboBox::setCurrentLanguage ( QLocale::Language  lang ) [slot]

Definition at line 345 of file qxtlanguagecombobox.cpp.

Referenced by QxtLanguageComboBox().

{
    qxt_d().setCurrentLanguage(language);
}
void QxtLanguageComboBox::setDisplayMode ( DisplayMode  mode ) [slot]

Definition at line 354 of file qxtlanguagecombobox.cpp.

Referenced by QxtLanguageComboBox().

{
    qxt_d().setDisplayMode(mode);
}
void QxtLanguageComboBox::setTranslationPath ( const QString &  path ) [slot]

Definition at line 368 of file qxtlanguagecombobox.cpp.

{
    qxt_d().setTranslationPath(path);
}
QString QxtLanguageComboBox::translationPath (  ) const

Friends And Related Function Documentation

friend class QxtLanguageComboBoxPrivate [friend]

Definition at line 39 of file qxtlanguagecombobox.h.


Property Documentation

QString QxtLanguageComboBox::currentLanguageName [read]

This property holds the name of the current selected language.

Definition at line 39 of file qxtlanguagecombobox.h.

QxtLanguageComboBox::DisplayMode QxtLanguageComboBox::displayMode [read, write]

This property holds the display mode of the widget.

Definition at line 44 of file qxtlanguagecombobox.h.

QString QxtLanguageComboBox::translationPath [read, write]

This property holds the path to the translation files.

Definition at line 45 of file qxtlanguagecombobox.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines