KEditListBox Class Reference
An editable listbox. More...
#include <keditlistbox.h>
Inheritance diagram for KEditListBox:

Public Types | |
enum | Button { Add = 1, Remove = 2, UpDown = 4 } |
enum | { All = Add|Remove|UpDown } |
Signals | |
void | changed () |
void | added (const QString &text) |
void | removed (const QString &text) |
Public Member Functions | |
KEditListBox (QWidget *parent=0, const char *name=0, bool checkAtEntering=false, int buttons=All) | |
KEditListBox (const QString &title, QWidget *parent=0, const char *name=0, bool checkAtEntering=false, int buttons=All) | |
KEditListBox (const QString &title, const CustomEditor &customEditor, QWidget *parent=0, const char *name=0, bool checkAtEntering=false, int buttons=All) | |
virtual | ~KEditListBox () |
QListBox * | listBox () const |
KLineEdit * | lineEdit () const |
QPushButton * | addButton () const |
QPushButton * | removeButton () const |
QPushButton * | upButton () const |
QPushButton * | downButton () const |
int | count () const |
void | insertStringList (const QStringList &list, int index=-1) |
void | insertStrList (const QStrList *list, int index=-1) |
void | insertStrList (const QStrList &list, int index=-1) |
void | insertStrList (const char **list, int numStrings=-1, int index=-1) |
void | insertItem (const QString &text, int index=-1) |
void | clear () |
QString | text (int index) const |
int | currentItem () const |
QString | currentText () const |
QStringList | items () const |
void | setItems (const QStringList &items) |
int | buttons () const |
void | setButtons (uint buttons) |
Protected Slots | |
void | moveItemUp () |
void | moveItemDown () |
void | addItem () |
void | removeItem () |
void | enableMoveButtons (int index) |
void | typedSomething (const QString &text) |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Properties | |
Button | buttons |
QStringList | items |
Classes | |
class | CustomEditor |
Custom editor class. More... |
Detailed Description
An editable listbox.This class provides a editable listbox ;-), this means a listbox which is accompanied by a line edit to enter new items into the listbox and pushbuttons to add and remove items from the listbox and two buttons to move items up and down.

KDE Edit List Box Widget
Definition at line 44 of file keditlistbox.h.
Member Enumeration Documentation
|
Enumeration of the buttons, the listbox offers. Specify them in the constructor in the buttons parameter, or in setButtons. Definition at line 94 of file keditlistbox.h. |
Constructor & Destructor Documentation
|
Create an editable listbox.
If Definition at line 48 of file keditlistbox.cpp. |
|
Create an editable listbox.
The same as the other constructor, additionally it takes Definition at line 55 of file keditlistbox.cpp. |
|
Another constructor, which allows to use a custom editing widget instead of the standard KLineEdit widget. E.g. you can use a KURLRequester or a KComboBox as input widget. The custom editor must consist of a lineedit and optionally another widget that is used as representation. A KComboBox or a KURLRequester have a KLineEdit as child-widget for example, so the KComboBox is used as the representation widget.
Definition at line 62 of file keditlistbox.cpp. References KEditListBox::CustomEditor::lineEdit(), and KEditListBox::CustomEditor::representationWidget(). |
Member Function Documentation
|
Return a pointer to the embedded QListBox.
Definition at line 143 of file keditlistbox.h. |
|
Return a pointer to the embedded QLineEdit.
Definition at line 147 of file keditlistbox.h. |
|
Return a pointer to the Add button.
Definition at line 151 of file keditlistbox.h. |
|
Return a pointer to the Remove button.
Definition at line 155 of file keditlistbox.h. |
|
Return a pointer to the Up button.
Definition at line 159 of file keditlistbox.h. |
|
Return a pointer to the Down button.
Definition at line 163 of file keditlistbox.h. |
|
See QListBox::count().
Definition at line 168 of file keditlistbox.h. Referenced by removeItem(). |
|
See QListBox::insertStringList().
Definition at line 363 of file keditlistbox.cpp. References QListBox::insertStringList(). |
|
See QListBox::insertStringList().
Definition at line 368 of file keditlistbox.cpp. References QListBox::insertStrList(). |
|
See QListBox::insertStrList().
Definition at line 373 of file keditlistbox.cpp. References QListBox::insertStrList(). |
|
See QListBox::insertStrList().
Definition at line 378 of file keditlistbox.cpp. References QListBox::insertStrList(). |
|
Definition at line 188 of file keditlistbox.h. |
|
Clears both the listbox and the line edit.
Definition at line 356 of file keditlistbox.cpp. References QListBox::clear(), and KLineEdit::clear(). |
|
See QListBox::text().
Definition at line 196 of file keditlistbox.h. |
|
Definition at line 293 of file keditlistbox.cpp. References QListBox::currentItem(), and QListBox::item(). Referenced by addItem(), and typedSomething(). |
|
Definition at line 204 of file keditlistbox.h. Referenced by enableMoveButtons(), and typedSomething(). |
|
|
|
Clears the listbox and sets the contents to
Definition at line 392 of file keditlistbox.cpp. References QListBox::clear(), and QListBox::insertStringList(). |
|
Returns which buttons are visible.
|
|
Specifies which buttons should be visible.
Definition at line 116 of file keditlistbox.cpp. References addItem(), QGridLayout::addWidget(), moveItemDown(), moveItemUp(), and removeItem(). |
|
This signal is emitted when the user adds a new string to the list, the parameter is the added string.
Referenced by addItem(). |
|
This signal is emitted when the user removes a string from the list, the parameter is the removed string.
Referenced by removeItem(). |
The documentation for this class was generated from the following files: