class KEditListBox

# class KEditListBox | An editable listbox More...
Definition | `#include <keditlistbox.h>`
Inherits | QGroupBox (qt) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- class CustomEditor
- enum Button { Add = 1, Remove = 2, UpDown = 4, All = Add|Remove|UpDown }

#### Public Methods

- 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

#### Signals

- void changed ()

#### Protected Methods

- virtual void virtual_hook ( int id, void* data )

#### Protected Slots

- void moveItemUp ()
- void moveItemDown ()
- void addItem ()
- void removeItem ()
- void enableMoveButtons (int index)
- void typedSomething (const QString& text)

## 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.

CustomEditor (class) | ### CustomEditor

enum Button { Add = 1, Remove = 2, UpDown = 4, All = Add|Remove|UpDown } | ### Button

Enumeration of the buttons, the listbox offers. Specify them in the constructor in the buttons parameter.

KEditListBox (QWidget *parent = 0, const char *name = 0, bool checkAtEntering=false, int buttons = All ) | ### KEditListBox

Create an editable listbox.

If `checkAtEntering` is true, after every character you type in the line edit KEditListBox will enable or disable the Add-button, depending whether the current content of the line edit is already in the listbox. Maybe this can become a performance hit with large lists on slow machines. If `checkAtEntering` is false, it will be checked if you press the Add-button. It is not possible to enter items twice into the listbox.

KEditListBox (const QString& title, QWidget *parent = 0, const char *name = 0, bool checkAtEntering=false, int buttons = All ) | ### KEditListBox

Create an editable listbox.

The same as the other constructor, additionally it takes @title, which will be the title of the frame around the listbox.

KEditListBox ( const QString& title, const CustomEditor &customEditor, QWidget *parent = 0, const char *name = 0, bool checkAtEntering = false, int buttons = All ) | ### KEditListBox

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.

See also: KURLRequester::customEditor()

~KEditListBox () | ### ~KEditListBox

[virtual]

QListBox* listBox () | ### listBox

[const]

Return a pointer to the embedded QListBox.

KLineEdit* lineEdit () | ### lineEdit

[const]

Return a pointer to the embedded QLineEdit.

QPushButton* addButton () | ### addButton

[const]

Return a pointer to the Add button

QPushButton* removeButton () | ### removeButton

[const]

Return a pointer to the Remove button

QPushButton* upButton () | ### upButton

[const]

Return a pointer to the Up button

QPushButton* downButton () | ### downButton

[const]

Return a pointer to the Down button

int count () | ### count

[const]

See QListBox::count()

void insertStringList (const QStringList& list, int index=-1) | ### insertStringList

See QListBox::insertStringList()

void insertStrList (const QStrList* list, int index=-1) | ### insertStrList

See QListBox::insertStringList()

void insertStrList (const QStrList& list, int index=-1) | ### insertStrList

See QListBox::insertStrList()

void insertStrList (const char ** list, int numStrings=-1, int index=-1) | ### insertStrList

See QListBox::insertStrList()

void insertItem (const QString& text, int index=-1) | ### insertItem

See QListBox::insertItem()

void clear () | ### clear

Clears both the listbox and the line edit.

QString text (int index) | ### text

[const]

See QListBox::text()

int currentItem () | ### currentItem

[const]

See QListBox::currentItem()

QString currentText () | ### currentText

[const]

See QListBox::currentText()

QStringList items () | ### items

[const]

Returns: a stringlist of all items in the listbox

void changed () | ### changed

[signal]

void moveItemUp () | ### moveItemUp

[protected slots slot]

void moveItemDown () | ### moveItemDown

[protected slots slot]

void addItem () | ### addItem

[protected slots slot]

void removeItem () | ### removeItem

[protected slots slot]

void enableMoveButtons (int index) | ### enableMoveButtons

[protected slots slot]

void typedSomething (const QString& text) | ### typedSomething

[protected slots slot]

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:37 2003, using kdoc 2.0a54.