class KLanguageButton |
|
|
KLanguageButton is a pushbutton which allows a language to be selected from a popup list. Languages are identified by their ISO 639-1 codes, e.g. en, pt_BR. |
|
Constructs a button whose text is determined by the current language in the popup list.
parent - the parent of the button |
|
Constructs a button with static text.
text - the text of the button parent - the parent of the button |
|
This signal is emitted when a new item is activated.
languageCode - code of the activated language |
|
Removes all combobox items. |
|
Checks whether the specified language is in the popup list.
languageCode - the language's code Returns true if in the list |
|
Returns the number of items in the combo box. |
|
Returns the language code of the combobox's current item. Returns the current item's language code |
|
This signal is emitted when a new item is highlighted.
languageCode - code of the highlighted language |
|
Inserts a language into the combo box. Normally the display name of the language is obtained automatically, but if either the language code does not exist, or there are special display requirements, the name of the language can be specified in name.
languageCode - the code for the language name - language name. If empty, the name is obtained automatically. index - the insertion position, or -1 to insert in alphabetical order |
|
Inserts a separator item into the combo box. A negative index will append the item.
index - the insertion position |
|
Load all known languages into the popup list. The current language in the list is set to the default language for the current locale (as modified by setLocale()). |
|
Sets a given language to be the current item.
languageCode - the language's code |
|
Sets the locale to display language names. By default, KGlobal.locale() is used.
locale - locale to use |
|
Sets a static button text.
text - button text |
|
Specifies whether language codes should be shown alongside language names in the popup. Calling this method does not affect any previously inserted language texts, so it should normally be called before populating the list.
show - true to show codes, false to hide codes |