kdeui Library API Documentation

KListBox Class Reference

Extends the functionality of QListBox to honor the system wide settings for Single Click/Double Click mode, Auto Selection and Change Cursor over Link. A variant of QListBox that honors KDE's system-wide settings. More...

#include <klistbox.h>

Inheritance diagram for KListBox:

Inheritance graph
[legend]
Collaboration diagram for KListBox:

Collaboration graph
[legend]
List of all members.

Signals

void executed (QListBoxItem *item)
 Emitted whenever the user executes an listbox item.

void executed (QListBoxItem *item, const QPoint &pos)
 Emitted whenever the user executes an listbox item.

void doubleClicked (QListBoxItem *item, const QPoint &pos)
 This signal gets emitted whenever the user double clicks into the listbox.


Public Member Functions

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

Protected Slots

void slotOnItem (QListBoxItem *item)
void slotOnViewport ()
void slotSettingsChanged (int)
void slotAutoSelect ()
 Auto selection happend.


Protected Member Functions

void emitExecute (QListBoxItem *item, const QPoint &pos)
virtual void keyPressEvent (QKeyEvent *e)
virtual void focusOutEvent (QFocusEvent *fe)
virtual void leaveEvent (QEvent *e)
virtual void contentsMousePressEvent (QMouseEvent *e)
virtual void contentsMouseDoubleClickEvent (QMouseEvent *e)
virtual void virtual_hook (int id, void *data)

Protected Attributes

bool m_bUseSingle
bool m_bChangeCursorOverItem
QListBoxItemm_pCurrentItem
QTimerm_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. A variant of QListBox that honors KDE's system-wide settings.

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.

Definition at line 38 of file klistbox.h.


Member Function Documentation

void KListBox::executed QListBoxItem item  )  [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.

Parameters:
item is the pointer to the executed listbox item.
Note that you may not delete any QListBoxItem objects in slots connected to this signal.

void KListBox::executed QListBoxItem item,
const QPoint pos
[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.

Parameters:
item is the pointer to the executed listbox item.
pos is the position where the user has clicked
Note that you may not delete any QListBoxItem objects in slots connected to this signal.

void KListBox::doubleClicked QListBoxItem item,
const QPoint pos
[signal]
 

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

Parameters:
item The pointer to the clicked listbox item.
pos The position where the user has clicked.
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.

Referenced by KCompletionBox::KCompletionBox().

void KListBox::slotAutoSelect  )  [protected, slot]
 

Auto selection happend.

Definition at line 111 of file klistbox.cpp.

References QListBox::clearSelection(), QListBox::currentItem(), QListBox::index(), QListBoxItem::isSelected(), QListBox::item(), QListBoxItem::next(), QListBox::selectionChanged(), QListBox::selectionMode(), QListBox::setCurrentItem(), QListBox::setSelected(), and QListBox::triggerUpdate().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:02:20 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001