KEditListBox Class Reference
from PyKDE4.kdeui import *
Inherits: QGroupBox → QWidget → QObject
Detailed Description
An editable listbox
This class provides an 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"
Enumerations |
Button | { Add, Remove, UpDown, All } |
Signals |
| added (QString text) |
| changed () |
| removed (QString text) |
Methods |
| __init__ (self, QWidget parent=0) |
| __init__ (self, QString title, QWidget parent=0) |
| __init__ (self, QWidget parent, QString name, bool checkAtEntering=0, KEditListBox.Buttons buttons=KEditListBox.All) |
| __init__ (self, QString title, QWidget parent, QString name, bool checkAtEntering=0, KEditListBox.Buttons buttons=KEditListBox.All) |
| __init__ (self, QString title, KEditListBox.CustomEditor customEditor, QWidget parent=0, QString name=0, bool checkAtEntering=0, KEditListBox.Buttons buttons=KEditListBox.All) |
| __init__ (self, KEditListBox a0) |
QPushButton | addButton (self) |
| addItem (self) |
| added (self, QString text) |
KEditListBox.Buttons | buttons (self) |
| changed (self) |
bool | checkAtEntering (self) |
| clear (self) |
int | count (self) |
int | currentItem (self) |
QString | currentText (self) |
QPushButton | downButton (self) |
| enableMoveButtons (self, QModelIndex a0, QModelIndex a1) |
bool | eventFilter (self, QObject o, QEvent e) |
| insertItem (self, QString text, int index=-1) |
| insertStringList (self, QStringList list, int index=-1) |
QStringList | items (self) |
KLineEdit | lineEdit (self) |
QListView | listView (self) |
| moveItemDown (self) |
| moveItemUp (self) |
QPushButton | removeButton (self) |
| removeItem (self) |
| removed (self, QString text) |
| setButtons (self, KEditListBox.Buttons buttons) |
| setCheckAtEntering (self, bool check) |
| setCustomEditor (self, KEditListBox.CustomEditor editor) |
| setItems (self, QStringList items) |
QString | text (self, int index) |
| typedSomething (self, QString text) |
QPushButton | upButton (self) |
Method Documentation
__init__ |
( |
self, |
|
|
|
QWidget |
parent=0 |
|
) |
|
|
|
Return a pointer to the Add button
This signal is emitted when the user adds a new string to the list,
the parameter is the added string.
- Signal syntax:
QObject.connect(source, SIGNAL("added(const const QString&)"), target_slot)
Returns which buttons are visible
- Signal syntax:
QObject.connect(source, SIGNAL("changed()"), target_slot)
bool checkAtEntering |
( |
|
self ) |
|
Returns true if check at entering is enabled.
Clears both the listbox and the line edit.
See Q3ListBox.currentItem()
See Q3ListBox.currentText()
Return a pointer to the Down button
Reimplented for interal reasons. The API is not affected.
insertItem |
( |
self, |
|
|
|
QString |
text, |
|
|
int |
index=-1 |
|
) |
|
|
|
See Q3ListBox.insertItem()
insertStringList |
( |
self, |
|
|
|
QStringList |
list, |
|
|
int |
index=-1 |
|
) |
|
|
|
See Q3ListBox.insertStringList()
- Returns:
- a stringlist of all items in the listbox
Return a pointer to the embedded KLineEdit.
Return a pointer to the embedded QListView.
Return a pointer to the Remove button
This signal is emitted when the user removes a string from the list,
the parameter is the removed string.
- Signal syntax:
QObject.connect(source, SIGNAL("removed(const const QString&)"), target_slot)
Specifies which buttons should be visible
setCheckAtEntering |
( |
self, |
|
|
|
bool |
check |
|
) |
|
|
|
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.
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
Clears the listbox and sets the contents to items
typedSomething |
( |
self, |
|
|
|
QString |
text |
|
) |
|
|
|
Return a pointer to the Up button
Enumeration Documentation