class KListBox

# class KListBox | A variant of QListBox that honors KDE's system-wide settings. More...
Definition | `#include <klistbox.h>`
Inherits | QListBox (qt) [public ]
Inherited by | IconListBox, KCompletionBox
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KListBox ( QWidget *parent = 0, const char *name = 0, WFlags f = 0 )

#### Signals

- void executed ( QListBoxItem *item )
- void executed ( QListBoxItem *item, const QPoint &pos )
- void doubleClicked ( QListBoxItem *item, const QPoint &pos )

#### Protected Methods

- void emitExecute ( QListBoxItem *item, const QPoint &pos )
- virtual void virtual_hook ( int id, void* data )

#### Protected Slots

- void slotOnItem ( QListBoxItem *item )
- void slotOnViewport ()
- void slotSettingsChanged (int)
- void slotAutoSelect ()

#### Protected Members

- bool m_bUseSingle
- bool m_bChangeCursorOverItem
- QListBoxItem* m_pCurrentItem
- QTimer* m_pAutoSelect
- int m_autoSelectDelay

## Detailed Description

Extends the functionality of QListBox to honor the system wide settings for Single Click/Double Click mode, Auto Selection and Change Cursor over Link.

There is a new signal executed(). It gets connected to either QListBox::clicked() or QListBox::doubleClicked() depending on the KDE wide Single Click/Double Click settings. It is strongly recomended that you use this signal instead of the above mentioned. This way you donīt need to care about the current settings. If you want to get informed when the user selects something connect to the QListBox::selectionChanged() signal.

KListBox ( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ) | ### KListBox

void executed ( QListBoxItem *item ) | ### executed

[signal]

Emitted whenever the user executes an listbox item.

That means depending on the KDE wide Single Click/Double Click setting the user clicked or double clicked on that item.

Note that you may not delete any QListBoxItem objects in slots connected to this signal.

Parameters:

item | is the pointer to the executed listbox item.

void executed ( QListBoxItem *item, const QPoint &pos ) | ### executed

[signal]

Emitted whenever the user executes an listbox item.

That means depending on the KDE wide Single Click/Double Click setting the user clicked or double clicked on that item.

Note that you may not delete any QListBoxItem objects in slots connected to this signal.

Parameters:

item | is the pointer to the executed listbox item.
pos | is the position where the user has clicked

void doubleClicked ( QListBoxItem *item, const QPoint &pos ) | ### doubleClicked

[signal]

This signal gets emitted whenever the user double clicks into the listbox.

Note that you may not delete any QListBoxItem objects in slots connected to this signal.

This signal is more or less here for the sake of completeness. You should normally not need to use this. In most cases itīs better to use executed() instead.

Parameters:

item | The pointer to the clicked listbox item.
pos | The position where the user has clicked.

void slotOnItem ( QListBoxItem *item ) | ### slotOnItem

[protected slots slot]

void slotOnViewport () | ### slotOnViewport

[protected slots slot]

void slotSettingsChanged (int) | ### slotSettingsChanged

[protected slots slot]

void slotAutoSelect () | ### slotAutoSelect

[protected slots slot]

Auto selection happend.

void emitExecute ( QListBoxItem *item, const QPoint &pos ) | ### emitExecute

[protected]

void keyPressEvent (QKeyEvent *e) | ### keyPressEvent

[protected virtual]

void focusOutEvent ( QFocusEvent *fe ) | ### focusOutEvent

[protected virtual]

void leaveEvent ( QEvent *e ) | ### leaveEvent

[protected virtual]

void contentsMousePressEvent ( QMouseEvent *e ) | ### contentsMousePressEvent

[protected virtual]

void contentsMouseDoubleClickEvent ( QMouseEvent *e ) | ### contentsMouseDoubleClickEvent

[protected virtual]

bool m_bUseSingle | ### m_bUseSingle

[protected]

bool m_bChangeCursorOverItem | ### m_bChangeCursorOverItem

[protected]

QListBoxItem* m_pCurrentItem | ### m_pCurrentItem

[protected]

QTimer* m_pAutoSelect | ### m_pAutoSelect

[protected]

int m_autoSelectDelay | ### m_autoSelectDelay

[protected]

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.