• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kdeui

KListBox Class Reference

A variant of QListBox that honors KDE's system-wide settings. More...

#include <klistbox.h>

Inheritance diagram for KListBox:

Inheritance graph
[legend]

List of all members.


Signals

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

Public Member Functions

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

Protected Slots

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

Protected Member Functions

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

Protected Attributes

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

Detailed Description

A variant of QListBox that honors KDE's system-wide settings.

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 recommended 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 40 of file klistbox.h.


Constructor & Destructor Documentation

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

Definition at line 30 of file klistbox.cpp.


Member Function Documentation

void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent *  e  )  [protected, virtual]

Definition at line 243 of file klistbox.cpp.

void KListBox::contentsMousePressEvent ( QMouseEvent *  e  )  [protected, virtual]

Definition at line 229 of file klistbox.cpp.

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.

void KListBox::emitExecute ( QListBoxItem *  item,
const QPoint &  pos 
) [protected]

Definition at line 179 of file klistbox.cpp.

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::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::focusOutEvent ( QFocusEvent *  fe  )  [protected, virtual]

Definition at line 215 of file klistbox.cpp.

void KListBox::keyPressEvent ( QKeyEvent *  e  )  [protected, virtual]

Definition at line 199 of file klistbox.cpp.

void KListBox::leaveEvent ( QEvent *  e  )  [protected, virtual]

Definition at line 222 of file klistbox.cpp.

void KListBox::slotAutoSelect (  )  [protected, slot]

Auto selection happend.

Definition at line 109 of file klistbox.cpp.

void KListBox::slotOnItem ( QListBoxItem *  item  )  [protected, slot]

Definition at line 51 of file klistbox.cpp.

void KListBox::slotOnViewport (  )  [protected, slot]

Definition at line 62 of file klistbox.cpp.

void KListBox::slotSettingsChanged ( int  category  )  [protected, slot]

Definition at line 72 of file klistbox.cpp.

void KListBox::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented in KCompletionBox.

Definition at line 263 of file klistbox.cpp.


Member Data Documentation

int KListBox::m_autoSelectDelay [protected]

Definition at line 116 of file klistbox.h.

bool KListBox::m_bChangeCursorOverItem [protected]

Definition at line 111 of file klistbox.h.

bool KListBox::m_bUseSingle [protected]

Definition at line 110 of file klistbox.h.

QTimer* KListBox::m_pAutoSelect [protected]

Definition at line 115 of file klistbox.h.

QListBoxItem* KListBox::m_pCurrentItem [protected]

Definition at line 113 of file klistbox.h.


The documentation for this class was generated from the following files:
  • klistbox.h
  • klistbox.cpp

kdeui

Skip menu "kdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal