![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/Widgets/ctkLanguageComboBox.h>
Public Types | |
typedef QComboBox | Superclass |
Public Slots | |
void | setCurrentLanguage (const QString &language) |
Signals | |
void | currentLanguageNameChanged (const QString &) |
Public Member Functions | |
ctkLanguageComboBox (const QString &defaultLanguage, QWidget *parent=0) | |
ctkLanguageComboBox (QWidget *parent=0) | |
Constructor of ctkLanguageComboBox. More... | |
QString | currentLanguage () const |
QString | defaultLanguage () const |
QString | directory () const |
void | setDefaultLanguage (const QString &language) |
void | setDirectory (const QString &dir) |
virtual | ~ctkLanguageComboBox () |
Protected Slots | |
void | onLanguageChanged (int index) |
Protected Attributes | |
QScopedPointer< ctkLanguageComboBoxPrivate > | d_ptr |
Properties | |
QString | currentLanguage |
QString | defaultLanguage |
This property controls the default language of the application. More... | |
QString | directory |
ctkLanguageComboBox is a simple QComboBox to select the language of your application. You have to set the default language of your application and then set the directory to allow the comboBox to find the translation files. ctkLanguageComboBox automatically recognizes the language of the translation file by the suffix "_en" or "_fr" and add the associated language to the comboBox.
Definition at line 43 of file ctkLanguageComboBox.h.
typedef QComboBox ctkLanguageComboBox::Superclass |
Definition at line 70 of file ctkLanguageComboBox.h.
ctkLanguageComboBox::ctkLanguageComboBox | ( | QWidget * | parent = 0 | ) |
Constructor of ctkLanguageComboBox.
ctkLanguageComboBox::ctkLanguageComboBox | ( | const QString & | defaultLanguage, |
QWidget * | parent = 0 |
||
) |
Constructor that specifies a default language.
|
virtual |
QString ctkLanguageComboBox::currentLanguage | ( | ) | const |
Return the currently selected language of the combobox.
|
signal |
Signals emitted when the current language changed.
QString ctkLanguageComboBox::defaultLanguage | ( | ) | const |
Return the default language.
QString ctkLanguageComboBox::directory | ( | ) | const |
Set the directory with all the translation files. The list of available languages will be populated based on the discovered translation files. The default language will still be the first item in the menu. Empty by default.
|
protectedslot |
|
slot |
Set the current language
void ctkLanguageComboBox::setDefaultLanguage | ( | const QString & | language | ) |
Set the default language. The previous default language is removed and replaced with the new default language.
void ctkLanguageComboBox::setDirectory | ( | const QString & | dir | ) |
|
protected |
Definition at line 113 of file ctkLanguageComboBox.h.
|
readwrite |
This property controls the current language of the combobox. The defaultLanguage by default.
Definition at line 1 of file ctkLanguageComboBox.h.
|
readwrite |
This property controls the default language of the application.
The default language is the language in which all the texts in GUI elements are written. As the application doesn't have translation file for the default language, this property adds an item to the combobox. The language format is a lowercase, two-letter, ISO 639 language code. For example: "fr", "en" or "de_ch". If empty, there is no default language, and there is no entry added. By default, there is no default language.
Definition at line 1 of file ctkLanguageComboBox.h.
|
readwrite |
This property controls the directory where the translation files are located.
Definition at line 1 of file ctkLanguageComboBox.h.