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

kdeui

KIconView Class Reference

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

#include <kiconview.h>

Inheritance diagram for KIconView:

Inheritance graph
[legend]

List of all members.


Public Types

enum  Mode { Execute, Select }

Signals

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

Public Member Functions

int iconTextHeight () const
 KIconView (QWidget *parent=0, const char *name=0, WFlags f=0)
Mode mode () const
virtual void setFont (const QFont &)
void setIconTextHeight (int n)
void setMode (Mode m)
virtual void takeItem (QIconViewItem *item)
 ~KIconView ()

Protected Slots

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

Protected Member Functions

void cancelPendingHeldSignal ()
virtual void contentsDragEnterEvent (QDragEnterEvent *e)
virtual void contentsDragLeaveEvent (QDragLeaveEvent *e)
virtual void contentsDragMoveEvent (QDragMoveEvent *e)
virtual void contentsDropEvent (QDropEvent *e)
virtual void contentsMouseDoubleClickEvent (QMouseEvent *e)
virtual void contentsMousePressEvent (QMouseEvent *e)
virtual void contentsMouseReleaseEvent (QMouseEvent *e)
void emitExecute (QIconViewItem *item, const QPoint &pos)
virtual void focusOutEvent (QFocusEvent *fe)
virtual void leaveEvent (QEvent *e)
void updateDragHoldItem (QDropEvent *e)
virtual void virtual_hook (int id, void *data)
virtual void wheelEvent (QWheelEvent *e)

Properties

Mode mode

Detailed Description

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

This Widget extends the functionality of QIconView 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 QIconView::clicked() or QIconView::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 QIconView::selectionChanged() signal.

Definition at line 42 of file kiconview.h.


Member Enumeration Documentation

enum KIconView::Mode

KIconView has two different operating modes.

Execute mode is depending on the configuration of single-click or double-click where the signal executed() will be emitted upon click/double-click. In Select mode, this signal will not be emitted.

Default is Execute mode.

Enumerator:
Execute 
Select 

Definition at line 62 of file kiconview.h.


Constructor & Destructor Documentation

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

Definition at line 59 of file kiconview.cpp.

KIconView::~KIconView (  ) 

Definition at line 83 of file kiconview.cpp.


Member Function Documentation

void KIconView::cancelPendingHeldSignal (  )  [protected]

This method allows to handle correctly cases where a subclass needs the held() signal to not be triggered without calling a KIconView::contentsDrag*Event() method (which have side effects because they forward to QIconView).

Definition at line 382 of file kiconview.cpp.

void KIconView::contentsDragEnterEvent ( QDragEnterEvent *  e  )  [protected, virtual]

Definition at line 337 of file kiconview.cpp.

void KIconView::contentsDragLeaveEvent ( QDragLeaveEvent *  e  )  [protected, virtual]

Definition at line 343 of file kiconview.cpp.

void KIconView::contentsDragMoveEvent ( QDragMoveEvent *  e  )  [protected, virtual]

Definition at line 351 of file kiconview.cpp.

void KIconView::contentsDropEvent ( QDropEvent *  e  )  [protected, virtual]

Definition at line 357 of file kiconview.cpp.

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

Definition at line 306 of file kiconview.cpp.

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

Definition at line 291 of file kiconview.cpp.

void KIconView::contentsMouseReleaseEvent ( QMouseEvent *  e  )  [protected, virtual]

Definition at line 331 of file kiconview.cpp.

void KIconView::doubleClicked ( QIconViewItem *  item,
const QPoint &  pos 
) [signal]

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

Parameters:
item is the pointer to the clicked iconview item.
pos is the position where the user has clicked, and
Note that you may not delete any QIconViewItem 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 KIconView::emitExecute ( QIconViewItem *  item,
const QPoint &  pos 
) [protected]

Definition at line 238 of file kiconview.cpp.

void KIconView::executed ( QIconViewItem *  item,
const QPoint &  pos 
) [signal]

This signal is emitted whenever the user executes an iconview 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 iconview item.
pos is the position where the user has clicked
Note that you may not delete any QIconViewItem objects in slots connected to this signal.

void KIconView::executed ( QIconViewItem *  item  )  [signal]

This signal is emitted whenever the user executes an iconview 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 iconview item.
Note that you may not delete any QIconViewItem objects in slots connected to this signal.

void KIconView::focusOutEvent ( QFocusEvent *  fe  )  [protected, virtual]

Definition at line 277 of file kiconview.cpp.

void KIconView::held ( QIconViewItem *  item  )  [signal]

This signal is emitted whenever the user hold something on an iconview during a drag'n'drop.

Parameters:
item is the pointer to the iconview item the hold event occur.
Note that you may not delete any QIconViewItem objects in slots connected to this signal.

int KIconView::iconTextHeight (  )  const

Returns:
The height of icon text in lines
Since:
3.3

Definition at line 427 of file kiconview.cpp.

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

Definition at line 284 of file kiconview.cpp.

Mode KIconView::mode (  )  const

Returns:
the current Mode, either Execute or Select.

void KIconView::setFont ( const QFont &  font  )  [virtual]

Reimplemented for internal purposes.

Definition at line 401 of file kiconview.cpp.

void KIconView::setIconTextHeight ( int  n  ) 

Set the maximum number of lines that will be used to display icon text.

Setting this value will enable word-wrap, too.

Since:
3.3
Parameters:
n Number of lines

Definition at line 432 of file kiconview.cpp.

void KIconView::setMode ( KIconView::Mode  mode  ) 

Sets the mode to Execute or Select.

  • In Execute mode, the signal executed() will be emitted when the user clicks/double-clicks an item.
  • Select mode is the normal QIconView mode.
Default is Execute.

Definition at line 90 of file kiconview.cpp.

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

Auto selection happend.

Definition at line 160 of file kiconview.cpp.

void KIconView::slotOnItem ( QIconViewItem *  item  )  [protected, slot]

Definition at line 100 of file kiconview.cpp.

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

Definition at line 115 of file kiconview.cpp.

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

Definition at line 124 of file kiconview.cpp.

void KIconView::takeItem ( QIconViewItem *  item  )  [virtual]

Reimplemented for held() signal behavior internal purposes.

Reimplemented from QIconView.

Definition at line 371 of file kiconview.cpp.

void KIconView::updateDragHoldItem ( QDropEvent *  e  )  [protected]

Definition at line 259 of file kiconview.cpp.

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

Definition at line 731 of file kiconview.cpp.

void KIconView::wheelEvent ( QWheelEvent *  e  )  [protected, virtual]

Definition at line 388 of file kiconview.cpp.


Property Documentation

KIconView::Mode KIconView::mode [read, write]

Definition at line 47 of file kiconview.h.


The documentation for this class was generated from the following files:
  • kiconview.h
  • kiconview.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