An extended QComboBox to display langauges. More...
#include <qxtlanguagecombobox.h>

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 |
An extended QComboBox to display langauges.
QxtLanguageComboBox is a specialized combo box to display spoken languages. The languages are taken from QLocale::Language.
QxtLanguageComboBox in Plastique style.
Definition at line 36 of file qxtlanguagecombobox.h.
This enum describes the displayed languages.
Definition at line 51 of file qxtlanguagecombobox.h.
| 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] |
| 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 |
friend class QxtLanguageComboBoxPrivate [friend] |
Definition at line 39 of file qxtlanguagecombobox.h.
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.
1.7.2