kdeui
KLanguageButton Class Reference
KLanguageButton provides a combobox with a 2-D dataset. More...
#include <klanguagebutton.h>
Signals | |
void | activated (const QString &id) |
void | highlighted (const QString &id) |
Public Member Functions | |
void | clear () |
bool | contains (const QString &id) const |
int | count () const |
QString | current () const |
QString | id (int i) const |
void | insertItem (const QString &text, const QString &id, const QString &submenu=QString::null, int index=-1) |
void | insertItem (const QIconSet &icon, const QString &text, const QString &id, const QString &submenu=QString::null, int index=-1) |
void | insertLanguage (const QString &path, const QString &name, const QString &sub=QString::null, const QString &submenu=QString::null, int index=-1) |
void | insertSeparator (const QString &submenu=QString::null, int index=-1) |
void | insertSubmenu (const QString &text, const QString &id, const QString &submenu=QString::null, int index=-1) |
void | insertSubmenu (const QIconSet &icon, const QString &text, const QString &id, const QString &submenu=QString::null, int index=-1) |
KLanguageButton (const QString &text, QWidget *parent=0, const char *name=0) | |
KLanguageButton (QWidget *parent=0, const char *name=0) | |
void | setCurrentItem (const QString &id) |
void | setText (const QString &text) |
virtual | ~KLanguageButton () |
Detailed Description
KLanguageButton provides a combobox with a 2-D dataset.It also supports icons. It is also possible to construct a non combobox version.
All items are identified using strings, not integers.
Combined version of KTagCombo and KLanguageCombo but using a QPushButton instead.
Definition at line 47 of file klanguagebutton.h.
Constructor & Destructor Documentation
KLanguageButton::KLanguageButton | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) |
Constructs a combobox widget with parent parent called name.
- Parameters:
-
parent The parent of the combo box name The name of the combo box
Definition at line 84 of file klanguagebutton.cpp.
KLanguageButton::KLanguageButton | ( | const QString & | text, | |
QWidget * | parent = 0 , |
|||
const char * | name = 0 | |||
) |
Constructs a version with static text.
The parent parent is called name.
- Parameters:
-
text The text of the button parent The parent of the button name The name of the button
Definition at line 90 of file klanguagebutton.cpp.
KLanguageButton::~KLanguageButton | ( | ) | [virtual] |
Member Function Documentation
void KLanguageButton::activated | ( | const QString & | id | ) | [signal] |
This signal is emitted when a new item is activated.
The id is the identificator of the selected item.
void KLanguageButton::clear | ( | ) |
bool KLanguageButton::contains | ( | const QString & | id | ) | const |
int KLanguageButton::count | ( | ) | const |
Definition at line 206 of file klanguagebutton.cpp.
QString KLanguageButton::current | ( | ) | const |
void KLanguageButton::highlighted | ( | const QString & | id | ) | [signal] |
QString KLanguageButton::id | ( | int | i | ) | const |
Definition at line 244 of file klanguagebutton.cpp.
void KLanguageButton::insertItem | ( | const QString & | text, | |
const QString & | id, | |||
const QString & | submenu = QString::null , |
|||
int | index = -1 | |||
) |
Inserts an item into the combo box.
A negative index will append the item.
- Parameters:
-
text The text string used when displaying the item. id The text string used to identify the item. submenu The place where the item should be placed. index The visual position in the submenu.
Definition at line 153 of file klanguagebutton.cpp.
void KLanguageButton::insertItem | ( | const QIconSet & | icon, | |
const QString & | text, | |||
const QString & | id, | |||
const QString & | submenu = QString::null , |
|||
int | index = -1 | |||
) |
Inserts an item into the combo box.
A negative index will append the item.
- Parameters:
-
icon The icon used used when displaying the item. text The text string used when displaying the item. id The text string used to identify the item. submenu The place where the item should be placed. index The visual position in the submenu.
Definition at line 144 of file klanguagebutton.cpp.
void KLanguageButton::insertLanguage | ( | const QString & | path, | |
const QString & | name, | |||
const QString & | sub = QString::null , |
|||
const QString & | submenu = QString::null , |
|||
int | index = -1 | |||
) |
Definition at line 131 of file klanguagebutton.cpp.
void KLanguageButton::insertSeparator | ( | const QString & | submenu = QString::null , |
|
int | index = -1 | |||
) |
Inserts a seperator item into the combo box.
A negative index will append the item.
- Parameters:
-
submenu The place where the item should be placed. index The visual position in the submenu.
Definition at line 159 of file klanguagebutton.cpp.
void KLanguageButton::insertSubmenu | ( | const QString & | text, | |
const QString & | id, | |||
const QString & | submenu = QString::null , |
|||
int | index = -1 | |||
) |
Inserts a submenu into the combo box.
A negative index will append the item.
- Parameters:
-
text The text string used when displaying the item. id The text string used to identify the item. submenu The place where the item should be placed. index The visual position in the submenu.
Definition at line 181 of file klanguagebutton.cpp.
void KLanguageButton::insertSubmenu | ( | const QIconSet & | icon, | |
const QString & | text, | |||
const QString & | id, | |||
const QString & | submenu = QString::null , |
|||
int | index = -1 | |||
) |
Inserts a submenu into the combo box.
A negative index will append the item.
- Parameters:
-
icon The icon used used when displaying the item. text The text string used when displaying the item. id The text string used to identify the item. submenu The place where the item should be placed. index The visual position in the submenu.
Definition at line 166 of file klanguagebutton.cpp.
void KLanguageButton::setCurrentItem | ( | const QString & | id | ) |
void KLanguageButton::setText | ( | const QString & | text | ) |
Changes the current text item of the combobox, and makes the text static.
Definition at line 98 of file klanguagebutton.cpp.
The documentation for this class was generated from the following files: