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

kio

KFileIconView Class Reference

An icon-view capable of showing KFileItem's. More...

#include <kfileiconview.h>

Inheritance diagram for KFileIconView:

Inheritance graph
[legend]

List of all members.


Public Slots

virtual void arrangeItemsInGrid (bool updated=true)
void showPreviews ()
void zoomIn ()
void zoomOut ()

Signals

void dropped (QDropEvent *event, const KURL::List &urls, const KURL &url)
void dropped (QDropEvent *event, KFileItem *fileItem)

Public Member Functions

virtual void clearSelection ()
virtual void clearView ()
virtual KFileItem * currentFileItem () const
void determineIcon (KFileIconViewItem *item)
void ensureItemVisible (const KFileItem *)
virtual KFileItem * firstFileItem () const
int iconSize () const
virtual void insertItem (KFileItem *i)
virtual void invertSelection ()
virtual bool isSelected (const KFileItem *i) const
 KFileIconView (QWidget *parent, const char *name)
virtual void listingCompleted ()
void mimeTypeDeterminationFinished ()
virtual KFileItem * nextItem (const KFileItem *) const
virtual KFileItem * prevItem (const KFileItem *) const
virtual void readConfig (KConfig *, const QString &group=QString::null)
virtual void removeItem (const KFileItem *)
QScrollView * scrollWidget () const
virtual void selectAll ()
void setAcceptDrops (bool b)
virtual void setAutoUpdate (bool)
virtual void setCurrentItem (const KFileItem *)
void setIconSize (int size)
void setIgnoreMaximumSize (bool ignoreSize=true)
void setPreviewSize (int size)
virtual void setSelected (const KFileItem *, bool)
virtual void setSelectionMode (KFile::SelectionMode sm)
virtual void setSorting (QDir::SortSpec sort)
virtual void updateView (const KFileItem *)
virtual void updateView (bool)
virtual QWidget * widget ()
virtual void writeConfig (KConfig *, const QString &group=QString::null)
virtual ~KFileIconView ()

Protected Member Functions

bool acceptDrag (QDropEvent *e) const
virtual void contentsDragEnterEvent (QDragEnterEvent *e)
virtual void contentsDragLeaveEvent (QDragLeaveEvent *e)
virtual void contentsDragMoveEvent (QDragMoveEvent *e)
virtual void contentsDropEvent (QDropEvent *ev)
virtual QDragObject * dragObject ()
virtual bool eventFilter (QObject *o, QEvent *e)
virtual void hideEvent (QHideEvent *)
virtual void keyPressEvent (QKeyEvent *)
virtual void showEvent (QShowEvent *)
virtual void virtual_hook (int id, void *data)

Detailed Description

An icon-view capable of showing KFileItem's.

Used in the filedialog for example. Most of the documentation is in KFileView class.

See also:
KDirOperator

KCombiView

KFileDetailView

Definition at line 81 of file kfileiconview.h.


Constructor & Destructor Documentation

KFileIconView::KFileIconView ( QWidget *  parent,
const char *  name 
)

Definition at line 114 of file kfileiconview.cpp.

KFileIconView::~KFileIconView (  )  [virtual]

Definition at line 182 of file kfileiconview.cpp.


Member Function Documentation

bool KFileIconView::acceptDrag ( QDropEvent *  e  )  const [protected]

Definition at line 848 of file kfileiconview.cpp.

void KFileIconView::arrangeItemsInGrid ( bool  updated = true  )  [virtual, slot]

Reimplemented for performance reasons.

Since:
3.1

Definition at line 791 of file kfileiconview.cpp.

void KFileIconView::clearSelection (  )  [virtual]

Clears any selection, unhighlights everything.

Must be implemented by the view.

Implements KFileView.

Definition at line 317 of file kfileiconview.cpp.

void KFileIconView::clearView (  )  [virtual]

pure virtual function, that should be implemented to clear the view.

At this moment the list is already empty

Implements KFileView.

Definition at line 327 of file kfileiconview.cpp.

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

Definition at line 857 of file kfileiconview.cpp.

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

Definition at line 906 of file kfileiconview.cpp.

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

Definition at line 880 of file kfileiconview.cpp.

void KFileIconView::contentsDropEvent ( QDropEvent *  ev  )  [protected, virtual]

Definition at line 912 of file kfileiconview.cpp.

KFileItem * KFileIconView::currentFileItem (  )  const [virtual]

Returns:
the "current" KFileItem, e.g. where the cursor is. Returns 0L when there is no current item (e.g. in an empty view). Subclasses have to implement this.

Implements KFileView.

Definition at line 381 of file kfileiconview.cpp.

void KFileIconView::determineIcon ( KFileIconViewItem *  item  ) 

Definition at line 711 of file kfileiconview.cpp.

QDragObject * KFileIconView::dragObject (  )  [protected, virtual]

Definition at line 809 of file kfileiconview.cpp.

void KFileIconView::dropped ( QDropEvent *  event,
const KURL::List &  urls,
const KURL &  url 
) [signal]

The user dropped the URLs urls.

url points to the item dropped on or can be empty if the user dropped on empty space.

Since:
3.2

void KFileIconView::dropped ( QDropEvent *  event,
KFileItem *  fileItem 
) [signal]

The user dropped something.

fileItem points to the item dropped on or can be 0 if the user dropped on empty space.

Since:
3.2

void KFileIconView::ensureItemVisible ( const KFileItem *  i  )  [virtual]

pure virtual function, that should be implemented to make item i visible, i.e.

by scrolling the view appropriately.

Implements KFileView.

Definition at line 508 of file kfileiconview.cpp.

bool KFileIconView::eventFilter ( QObject *  o,
QEvent *  e 
) [protected, virtual]

Definition at line 736 of file kfileiconview.cpp.

KFileItem * KFileIconView::firstFileItem (  )  const [virtual]

Implements KFileView.

Definition at line 647 of file kfileiconview.cpp.

void KFileIconView::hideEvent ( QHideEvent *  e  )  [protected, virtual]

Reimplemented to remove an eventual tooltip.

Definition at line 285 of file kfileiconview.cpp.

int KFileIconView::iconSize (  )  const [inline]

Returns:
the current size used for icons.

Definition at line 136 of file kfileiconview.h.

void KFileIconView::insertItem ( KFileItem *  i  )  [virtual]

The derived view must implement this function to add the file in the widget.

Make sure to call this implementation, i.e. KFileView::insertItem( i );

Reimplemented from KFileView.

Definition at line 335 of file kfileiconview.cpp.

void KFileIconView::invertSelection (  )  [virtual]

Inverts the current selection, i.e.

selects all items, that were up to now not selected and deselects the other.

Reimplemented from KFileView.

Definition at line 322 of file kfileiconview.cpp.

bool KFileIconView::isSelected ( const KFileItem *   )  const [virtual]

Returns:
whether the given item is currently selected. Must be implemented by the view.

Implements KFileView.

Definition at line 429 of file kfileiconview.cpp.

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

Reimplemented to not let QIconView eat return-key events.

Definition at line 291 of file kfileiconview.cpp.

void KFileIconView::listingCompleted (  )  [virtual]

This hook is called when all items of the currently listed directory are listed and inserted into the view, i.e.

there won't come any new items anymore.

Reimplemented from KFileView.

Definition at line 717 of file kfileiconview.cpp.

void KFileIconView::mimeTypeDeterminationFinished (  ) 

Definition at line 706 of file kfileiconview.cpp.

KFileItem * KFileIconView::nextItem ( const KFileItem *  fileItem  )  const [virtual]

Implements KFileView.

Definition at line 655 of file kfileiconview.cpp.

KFileItem * KFileIconView::prevItem ( const KFileItem *  fileItem  )  const [virtual]

Implements KFileView.

Definition at line 665 of file kfileiconview.cpp.

void KFileIconView::readConfig ( KConfig *  kc,
const QString &  group = QString::null 
) [virtual]

Reimplemented from KFileView.

Definition at line 189 of file kfileiconview.cpp.

void KFileIconView::removeItem ( const KFileItem *  item  )  [virtual]

Removes an item from the list; has to be implemented by the view.

Call KFileView::removeItem( item ) after removing it.

Reimplemented from KFileView.

Definition at line 466 of file kfileiconview.cpp.

QScrollView* KFileIconView::scrollWidget (  )  const [inline]

Definition at line 148 of file kfileiconview.h.

void KFileIconView::selectAll (  )  [virtual]

Selects all items.

You may want to override this, if you can implement it more efficiently than calling setSelected() with every item. This works only in Multiselection mode of course.

Reimplemented from KFileView.

Definition at line 308 of file kfileiconview.cpp.

void KFileIconView::setAcceptDrops ( bool  b  )  [inline]

Definition at line 149 of file kfileiconview.h.

virtual void KFileIconView::setAutoUpdate ( bool   )  [inline, virtual]

Definition at line 91 of file kfileiconview.h.

void KFileIconView::setCurrentItem ( const KFileItem *  item  )  [virtual]

Reimplement this to set item the current item in the view, e.g.

the item having focus.

Implements KFileView.

Definition at line 374 of file kfileiconview.cpp.

void KFileIconView::setIconSize ( int  size  ) 

Sets the size of the icons to show.

Defaults to KIcon::SizeSmall.

Definition at line 481 of file kfileiconview.cpp.

void KFileIconView::setIgnoreMaximumSize ( bool  ignoreSize = true  ) 

Disables the "Maximum file size" configuration option for previews.

Set this before calling showPreviews()

Since:
3.4

Definition at line 497 of file kfileiconview.cpp.

void KFileIconView::setPreviewSize ( int  size  ) 

Sets the size of the previews.

Defaults to KIcon::SizeLarge.

Definition at line 487 of file kfileiconview.cpp.

void KFileIconView::setSelected ( const KFileItem *  ,
bool  enable 
) [virtual]

Tells the view that it should highlight the item.

This function must be implemented by the view.

Implements KFileView.

Definition at line 301 of file kfileiconview.cpp.

void KFileIconView::setSelectionMode ( KFile::SelectionMode  sm  )  [virtual]

Reimplemented from KFileView.

Definition at line 399 of file kfileiconview.cpp.

void KFileIconView::setSorting ( QDir::SortSpec  sort  )  [virtual]

Sets the sorting order of the view.

Default is QDir::Name | QDir::IgnoreCase | QDir::DirsFirst Override this in your subclass and sort accordingly (usually by setting the sorting-key for every item and telling QIconView or QListView to sort.

A view may choose to use a different sorting than QDir::Name, Time or Size. E.g. to sort by mimetype or any possible string. Set the sorting to QDir::Unsorted for that and do the rest internally.

See also:
sortingKey

Reimplemented from KFileView.

Definition at line 675 of file kfileiconview.cpp.

void KFileIconView::showEvent ( QShowEvent *  e  )  [protected, virtual]

Definition at line 751 of file kfileiconview.cpp.

void KFileIconView::showPreviews (  )  [slot]

Starts loading previews for all files shown and shows them.

Switches into 'large rows' mode, if that isn't the current mode yet.

See also:
setIgnoreMaximumSize

Definition at line 577 of file kfileiconview.cpp.

void KFileIconView::updateView ( const KFileItem *  i  )  [virtual]

Reimplemented from KFileView.

Definition at line 459 of file kfileiconview.cpp.

void KFileIconView::updateView ( bool  f  )  [virtual]

does a repaint of the view.

The default implementation calls

 widget()->repaint(f)

Reimplemented from KFileView.

Definition at line 435 of file kfileiconview.cpp.

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

Reimplemented from KFileView.

Definition at line 938 of file kfileiconview.cpp.

virtual QWidget* KFileIconView::widget (  )  [inline, virtual]

a pure virtual function to get a QWidget, that can be added to other widgets.

This function is needed to make it possible for derived classes to derive from other widgets.

Implements KFileView.

Definition at line 89 of file kfileiconview.h.

void KFileIconView::writeConfig ( KConfig *  kc,
const QString &  group = QString::null 
) [virtual]

Reimplemented from KFileView.

Definition at line 210 of file kfileiconview.cpp.

void KFileIconView::zoomIn (  )  [slot]

Definition at line 799 of file kfileiconview.cpp.

void KFileIconView::zoomOut (  )  [slot]

Definition at line 804 of file kfileiconview.cpp.


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

kio

Skip menu "kio"
  • Main Page
  • Modules
  • 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