kio
KFileDetailView Class Reference
A list-view capable of showing KFileItem'. More...
#include <kfiledetailview.h>
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 (KFileListViewItem *item) |
void | ensureItemVisible (const KFileItem *) |
virtual KFileItem * | firstFileItem () const |
virtual void | insertItem (KFileItem *i) |
virtual void | invertSelection () |
virtual bool | isSelected (const KFileItem *i) const |
KFileDetailView (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 () |
virtual void | setAutoUpdate (bool) |
virtual void | setCurrentItem (const KFileItem *) |
virtual void | setSelected (const KFileItem *, bool) |
virtual void | setSelectionMode (KFile::SelectionMode sm) |
virtual void | setSorting (QDir::SortSpec) |
virtual void | updateView (const KFileItem *) |
virtual void | updateView (bool) |
virtual QWidget * | widget () |
virtual void | writeConfig (KConfig *, const QString &group=QString::null) |
virtual | ~KFileDetailView () |
Protected Slots | |
void | slotSelectionChanged () |
Protected Member Functions | |
virtual 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 void | keyPressEvent (QKeyEvent *) |
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
Definition at line 109 of file kfiledetailview.h.
Constructor & Destructor Documentation
KFileDetailView::KFileDetailView | ( | QWidget * | parent, | |
const char * | name | |||
) |
Definition at line 58 of file kfiledetailview.cpp.
KFileDetailView::~KFileDetailView | ( | ) | [virtual] |
Definition at line 127 of file kfiledetailview.cpp.
Member Function Documentation
bool KFileDetailView::acceptDrag | ( | QDropEvent * | e | ) | const [protected, virtual] |
Definition at line 575 of file kfiledetailview.cpp.
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::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.
void KFileDetailView::contentsDragEnterEvent | ( | QDragEnterEvent * | e | ) | [protected, virtual] |
Definition at line 584 of file kfiledetailview.cpp.
void KFileDetailView::contentsDragLeaveEvent | ( | QDragLeaveEvent * | e | ) | [protected, virtual] |
Definition at line 633 of file kfiledetailview.cpp.
void KFileDetailView::contentsDragMoveEvent | ( | QDragMoveEvent * | e | ) | [protected, virtual] |
Definition at line 607 of file kfiledetailview.cpp.
void KFileDetailView::contentsDropEvent | ( | QDropEvent * | ev | ) | [protected, virtual] |
Definition at line 639 of file kfiledetailview.cpp.
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.
void KFileDetailView::determineIcon | ( | KFileListViewItem * | item | ) |
Definition at line 525 of file kfiledetailview.cpp.
QDragObject * KFileDetailView::dragObject | ( | ) | [protected, virtual] |
Definition at line 536 of file kfiledetailview.cpp.
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
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::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 454 of file kfiledetailview.cpp.
KFileItem * KFileDetailView::firstFileItem | ( | ) | const [virtual] |
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.
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.
bool KFileDetailView::isSelected | ( | const KFileItem * | ) | 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.
void KFileDetailView::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
Definition at line 505 of file kfiledetailview.cpp.
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.
void KFileDetailView::mimeTypeDeterminationFinished | ( | ) |
Definition at line 520 of file kfiledetailview.cpp.
void KFileDetailView::readConfig | ( | KConfig * | config, | |
const QString & | group = QString::null | |||
) | [virtual] |
void KFileDetailView::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 340 of file kfiledetailview.cpp.
QScrollView* KFileDetailView::scrollWidget | ( | ) | const [inline] |
Definition at line 150 of file kfiledetailview.h.
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.
virtual void KFileDetailView::setAutoUpdate | ( | bool | ) | [inline, virtual] |
Definition at line 119 of file kfiledetailview.h.
void KFileDetailView::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 155 of file kfiledetailview.cpp.
void KFileDetailView::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 143 of file kfiledetailview.cpp.
void KFileDetailView::setSelectionMode | ( | KFile::SelectionMode | sm | ) | [virtual] |
void KFileDetailView::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 426 of file kfiledetailview.cpp.
void KFileDetailView::slotSelectionChanged | ( | ) | [protected, slot] |
Definition at line 466 of file kfiledetailview.cpp.
void KFileDetailView::updateView | ( | const KFileItem * | i | ) | [virtual] |
void KFileDetailView::updateView | ( | bool | f | ) | [virtual] |
void KFileDetailView::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
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::writeConfig | ( | KConfig * | config, | |
const QString & | group = QString::null | |||
) | [virtual] |
Member Data Documentation
int KFileDetailView::m_sortingCol [protected] |
Definition at line 182 of file kfiledetailview.h.
The documentation for this class was generated from the following files: