kio Library API Documentation

KFileDetailView Class Reference

A list-view capable of showing KFileItem'. More...

#include <kfiledetailview.h>

Inheritance diagram for KFileDetailView:

KListView KFileView QListView List of all members.

Signals

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

Public Member Functions

 KFileDetailView (QWidget *parent, const char *name)
virtual QWidgetwidget ()
virtual void clearView ()
virtual void setAutoUpdate (bool)
virtual void setSelectionMode (KFile::SelectionMode sm)
virtual void updateView (bool)
virtual void updateView (const KFileItem *)
virtual void removeItem (const KFileItem *)
virtual void listingCompleted ()
virtual void setSelected (const KFileItem *, bool)
virtual bool isSelected (const KFileItem *i) const
virtual void clearSelection ()
virtual void selectAll ()
virtual void invertSelection ()
virtual void setCurrentItem (const KFileItem *)
virtual KFileItemcurrentFileItem () const
virtual KFileItemfirstFileItem () const
virtual KFileItemnextItem (const KFileItem *) const
virtual KFileItemprevItem (const KFileItem *) const
virtual void insertItem (KFileItem *i)
virtual void setSorting (QDir::SortSpec)
void ensureItemVisible (const KFileItem *)
void mimeTypeDeterminationFinished ()
void determineIcon (KFileListViewItem *item)
QScrollViewscrollWidget () const
virtual void readConfig (KConfig *, const QString &group=QString::null)
virtual void writeConfig (KConfig *, const QString &group=QString::null)

Protected Slots

void slotSelectionChanged ()

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *)
virtual QDragObjectdragObject ()
virtual void contentsDragEnterEvent (QDragEnterEvent *e)
virtual void contentsDragMoveEvent (QDragMoveEvent *e)
virtual void contentsDragLeaveEvent (QDragLeaveEvent *e)
virtual void contentsDropEvent (QDropEvent *ev)
virtual bool acceptDrag (QDropEvent *e) const
virtual void virtual_hook (int id, void *data)

Protected Attributes

int m_sortingCol

Detailed Description

A list-view capable of showing KFileItem'.

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

See also:
KDirOperator

KCombiView

KFileIconView

Definition at line 109 of file kfiledetailview.h.


Member Function Documentation

virtual QWidget* KFileDetailView::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 117 of file kfiledetailview.h.

void KFileDetailView::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 202 of file kfiledetailview.cpp.

References KMimeTypeResolver< KFileListViewItem, KFileDetailView >::m_lstPendingMimeIconItems.

void KFileDetailView::updateView bool   )  [virtual]
 

does a repaint of the view.

The default implementation calls

widget()->repaint(f)

Reimplemented from KFileView.

Definition at line 296 of file kfiledetailview.cpp.

References KFileListViewItem::fileInfo(), KFileItem::pixmap(), and updateView().

Referenced by updateView().

void KFileDetailView::removeItem const KFileItem  )  [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 340 of file kfiledetailview.cpp.

References KFileItem::extraData(), KMimeTypeResolver< KFileListViewItem, KFileDetailView >::m_lstPendingMimeIconItems, and removeItem().

Referenced by removeItem().

void KFileDetailView::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 531 of file kfiledetailview.cpp.

References KMimeTypeResolver< KFileListViewItem, KFileDetailView >::start().

void KFileDetailView::setSelected const KFileItem ,
bool 
[virtual]
 

Tells the view that it should highlight the item.

This function must be implemented by the view.

Implements KFileView.

Definition at line 143 of file kfiledetailview.cpp.

References KFileItem::extraData(), and setSelected().

Referenced by setSelected().

bool KFileDetailView::isSelected const KFileItem i  )  const [virtual]
 

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

Implements KFileView.

Definition at line 286 of file kfiledetailview.cpp.

References KFileItem::extraData(), and isSelected().

Referenced by isSelected().

void KFileDetailView::clearSelection  )  [virtual]
 

Clears any selection, unhighlights everything.

Must be implemented by the view.

Implements KFileView.

Definition at line 173 of file kfiledetailview.cpp.

void KFileDetailView::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 178 of file kfiledetailview.cpp.

void KFileDetailView::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 187 of file kfiledetailview.cpp.

void KFileDetailView::setCurrentItem const KFileItem  )  [virtual]
 

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

the item having focus.

Implements KFileView.

Definition at line 155 of file kfiledetailview.cpp.

References KFileItem::extraData(), and setCurrentItem().

Referenced by setCurrentItem().

KFileItem * KFileDetailView::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 164 of file kfiledetailview.cpp.

References KFileListViewItem::fileInfo().

void KFileDetailView::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 208 of file kfiledetailview.cpp.

References insertItem(), KFileItem::isMimeTypeKnown(), KMimeTypeResolver< KFileListViewItem, KFileDetailView >::m_lstPendingMimeIconItems, and KFileItem::setExtraData().

Referenced by insertItem().

void KFileDetailView::setSorting QDir::SortSpec   )  [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 426 of file kfiledetailview.cpp.

References setSorting().

Referenced by setSorting().

void KFileDetailView::ensureItemVisible const KFileItem  )  [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 454 of file kfiledetailview.cpp.

References ensureItemVisible(), and KFileItem::extraData().

Referenced by ensureItemVisible().

void KFileDetailView::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 KFileDetailView::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


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Oct 10 18:55:31 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003