• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDE3Support

Public Types | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Properties | List of all members
K3IconView Class Reference

#include <k3iconview.h>

Inheritance diagram for K3IconView:
Inheritance graph
[legend]

Public Types

enum  Mode { Execute, Select }
 

Signals

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

Public Member Functions

 K3IconView (QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0)
 
 ~K3IconView ()
 
int iconTextHeight () const
 
Mode mode () const
 
virtual void setFont (const QFont &)
 
void setIconTextHeight (int n)
 
void setMode (Mode m)
 
virtual void takeItem (Q3IconViewItem *item)
 

Protected Slots

void slotAutoSelect ()
 
void slotOnItem (Q3IconViewItem *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 (Q3IconViewItem *item, const QPoint &pos)
 
virtual void focusOutEvent (QFocusEvent *fe)
 
virtual void leaveEvent (QEvent *e)
 
void updateDragHoldItem (QDropEvent *e)
 
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 41 of file k3iconview.h.

Member Enumeration Documentation

enum K3IconView::Mode

K3IconView 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 61 of file k3iconview.h.

Constructor & Destructor Documentation

K3IconView::K3IconView ( QWidget *  parent = 0,
const char *  name = 0,
Qt::WindowFlags  f = 0 
)

Definition at line 58 of file k3iconview.cpp.

K3IconView::~K3IconView ( )

Definition at line 79 of file k3iconview.cpp.

Member Function Documentation

void K3IconView::cancelPendingHeldSignal ( )
protected

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

Definition at line 382 of file k3iconview.cpp.

void K3IconView::contentsDragEnterEvent ( QDragEnterEvent *  e)
protectedvirtual

Definition at line 337 of file k3iconview.cpp.

void K3IconView::contentsDragLeaveEvent ( QDragLeaveEvent *  e)
protectedvirtual

Definition at line 343 of file k3iconview.cpp.

void K3IconView::contentsDragMoveEvent ( QDragMoveEvent *  e)
protectedvirtual

Definition at line 351 of file k3iconview.cpp.

void K3IconView::contentsDropEvent ( QDropEvent *  e)
protectedvirtual

Definition at line 357 of file k3iconview.cpp.

void K3IconView::contentsMouseDoubleClickEvent ( QMouseEvent *  e)
protectedvirtual

Definition at line 305 of file k3iconview.cpp.

void K3IconView::contentsMousePressEvent ( QMouseEvent *  e)
protectedvirtual

Definition at line 290 of file k3iconview.cpp.

void K3IconView::contentsMouseReleaseEvent ( QMouseEvent *  e)
protectedvirtual

Definition at line 331 of file k3iconview.cpp.

void K3IconView::doubleClicked ( Q3IconViewItem *  item,
const QPoint &  pos 
)
signal

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

Parameters
itemis the pointer to the clicked iconview item.
posis 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 K3IconView::emitExecute ( Q3IconViewItem *  item,
const QPoint &  pos 
)
protected

Definition at line 236 of file k3iconview.cpp.

void K3IconView::executed ( Q3IconViewItem *  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
itemis the pointer to the executed iconview item.

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

void K3IconView::executed ( Q3IconViewItem *  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
itemis the pointer to the executed iconview item.
posis the position where the user has clicked

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

void K3IconView::focusOutEvent ( QFocusEvent *  fe)
protectedvirtual

Definition at line 276 of file k3iconview.cpp.

void K3IconView::held ( Q3IconViewItem *  item)
signal

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

Parameters
itemis 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 K3IconView::iconTextHeight ( ) const
Returns
The height of icon text in lines

Definition at line 435 of file k3iconview.cpp.

void K3IconView::leaveEvent ( QEvent *  e)
protectedvirtual

Definition at line 283 of file k3iconview.cpp.

Mode K3IconView::mode ( ) const
Returns
the current Mode, either Execute or Select.
void K3IconView::setFont ( const QFont &  font)
virtual

Reimplemented for internal purposes.

Definition at line 401 of file k3iconview.cpp.

void K3IconView::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.

Parameters
nNumber of lines

Definition at line 440 of file k3iconview.cpp.

void K3IconView::setMode ( K3IconView::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 86 of file k3iconview.cpp.

void K3IconView::slotAutoSelect ( )
protectedslot

Auto selection happend.

Definition at line 157 of file k3iconview.cpp.

void K3IconView::slotOnItem ( Q3IconViewItem *  item)
protectedslot

Definition at line 96 of file k3iconview.cpp.

void K3IconView::slotOnViewport ( )
protectedslot

Definition at line 112 of file k3iconview.cpp.

void K3IconView::slotSettingsChanged ( int  category)
protectedslot

Definition at line 121 of file k3iconview.cpp.

void K3IconView::takeItem ( Q3IconViewItem *  item)
virtual

Reimplemented for held() signal behavior internal purposes.

Definition at line 371 of file k3iconview.cpp.

void K3IconView::updateDragHoldItem ( QDropEvent *  e)
protected

Definition at line 257 of file k3iconview.cpp.

void K3IconView::wheelEvent ( QWheelEvent *  e)
protectedvirtual

Definition at line 388 of file k3iconview.cpp.

Property Documentation

K3IconView::Mode K3IconView::mode
readwrite

Definition at line 46 of file k3iconview.h.


The documentation for this class was generated from the following files:
  • k3iconview.h
  • k3iconview.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDE3Support

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal