# class KEditListBox

###

Module | kdeui
Namespace |
Class | KEditListBox
Inherits | QGroupBox

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.

### enums

- Button { Add, Remove, UpDown, All }
  typesafe object: Buttons

enum details

### methods

- KEditListBox (parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0

  Create an editable listbox.

- KEditListBox (title, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  title | QString |
  parent | QWidget | 0

  Create an editable listbox.

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

- KEditListBox (parent, name, checkAtEntering, buttons)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget |
  name | char |
  checkAtEntering | bool | 0
  buttons | KEditListBox.Buttons | KEditListBox.All

  Create an editable listbox.

  Deprecated

  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 (title, parent, name, checkAtEntering, buttons)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  title | QString |
  parent | QWidget |
  name | char |
  checkAtEntering | bool | 0
  buttons | KEditListBox.Buttons | KEditListBox.All

  Create an editable listbox.

  Deprecated

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

- KEditListBox (title, customEditor, parent, name, checkAtEntering, buttons)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  title | QString |
  customEditor | KEditListBox.CustomEditor |
  parent | QWidget | 0
  name | char | 0
  checkAtEntering | bool | 0
  buttons | KEditListBox.Buttons | KEditListBox.All

  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(), setCustomEditor

- KEditListBox (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KEditListBox |

- KEditListBox (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0

- KEditListBox (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |
  a1 | QWidget | 0

- KEditListBox (a0, a1, a2, a3)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget |
  a1 | char |
  a2 | bool | 0
  a3 | KEditListBox.Buttons | KEditListBox.All

- KEditListBox (a0, a1, a2, a3, a4)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |
  a1 | QWidget |
  a2 | char |
  a3 | bool | 0
  a4 | KEditListBox.Buttons | KEditListBox.All

- addButton ( )

  returns QPushButton

  Return a pointer to the Add button

- addItem ( )

  returns Nothing

- added (text)

  returns Nothing
  SIGNAL ("added (const QString&)")

  Argument | Type | Default
  --- | --- | ---
  text | QString |

  This signal is emitted when the user adds a new string to the list, the parameter is the added string.

- buttons ( )

  returns KEditListBox.Buttons

  Returns which buttons are visible

- changed ( )

  returns Nothing
  SIGNAL ("changed ()")

- checkAtEntering ( )

  returns bool

  Returns true if check at entering is enabled.

- clear ( )

  returns Nothing

  Clears both the listbox and the line edit.

- count ( )

  returns int

  See QListBox.count()

- currentItem ( )

  returns int

  See QListBox.currentItem()

- currentText ( )

  returns QString

  See QListBox.currentText()

- downButton ( )

  returns QPushButton

  Return a pointer to the Down button

- enableMoveButtons (a0, a1)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QModelIndex |
  a1 | QModelIndex |

- eventFilter (o, e)

  returns bool
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  o | QObject |
  e | QEvent |

  Reimplented for interal reasons. The API is not affected.

- insertItem (text, index)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  text | QString |
  index | int | -1

  See QListBox.insertStrList()

- insertStringList (list, index)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  list | QStringList |
  index | int | -1

  See QListBox.insertStringList()

- items ( )

  returns QStringList

  Returns a stringlist of all items in the listbox

- lineEdit ( )

  returns KLineEdit

  Return a pointer to the embedded KLineEdit.

- listView ( )

  returns QListView

  Return a pointer to the embedded QListView.

- moveItemDown ( )

  returns Nothing

- moveItemUp ( )

  returns Nothing

- removeButton ( )

  returns QPushButton

  Return a pointer to the Remove button

- removeItem ( )

  returns Nothing

- removed (text)

  returns Nothing
  SIGNAL ("removed (const QString&)")

  Argument | Type | Default
  --- | --- | ---
  text | QString |

  This signal is emitted when the user removes a string from the list, the parameter is the removed string.

- setButtons (buttons)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  buttons | KEditListBox.Buttons |

  Specifies which buttons should be visible

- setCheckAtEntering (check)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  check | bool |

  If check 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 check is false, it will be checked if you press the Add-button. It is not possible to enter items twice into the listbox. Default is false.

- setCustomEditor (editor)

  returns Nothing
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  editor | KEditListBox.CustomEditor |

  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.

  @since 4.1

- setItems (items)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  items | QStringList |

  Clears the listbox and sets the contents to items

- text (index)

  returns QString

  Argument | Type | Default
  --- | --- | ---
  index | int |

  See QListBox.text()

- typedSomething (text)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  text | QString |

- upButton ( )

  returns QPushButton

  Return a pointer to the Up button

### enums - detail

- Button { Add, Remove, UpDown, All }

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

  typesafe object: Buttons

Add - 0x0001 -
Remove - 0x0002 -
UpDown - 0x0004 -
All - Add|Remove|UpDown -