#include <tdefileiconview.h>

Public Slots | |
void | showPreviews () |
void | zoomIn () |
void | zoomOut () |
virtual void | arrangeItemsInGrid (bool updated=true) |
Signals | |
void | dropped (TQDropEvent *event, KFileItem *fileItem) |
void | dropped (TQDropEvent *event, const KURL::List &urls, const KURL &url) |
Public Member Functions | |
KFileIconView (TQWidget *parent, const char *name) | |
virtual TQWidget * | widget () |
virtual void | clearView () |
virtual void | setAutoUpdate (bool) |
virtual void | updateView (bool) |
virtual void | updateView (const KFileItem *) |
virtual void | removeItem (const KFileItem *) |
virtual void | listingCompleted () |
virtual void | insertItem (KFileItem *i) |
virtual void | setSelectionMode (KFile::SelectionMode sm) |
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 KFileItem * | currentFileItem () const |
virtual KFileItem * | firstFileItem () const |
virtual KFileItem * | nextItem (const KFileItem *) const |
virtual KFileItem * | prevItem (const KFileItem *) const |
void | setIconSize (int size) |
void | setPreviewSize (int size) |
void | setIgnoreMaximumSize (bool ignoreSize=true) |
int | iconSize () const |
void | ensureItemVisible (const KFileItem *) |
virtual void | setSorting (TQDir::SortSpec sort) |
virtual void | readConfig (TDEConfig *, const TQString &group=TQString::null) |
virtual void | writeConfig (TDEConfig *, const TQString &group=TQString::null) |
void | mimeTypeDeterminationFinished () |
void | determineIcon (KFileIconViewItem *item) |
TQScrollView * | scrollWidget () const |
void | setAcceptDrops (bool b) |
![]() | |
virtual | ~KFileView () |
void | addItemList (const KFileItemList &list) |
virtual TQWidget * | widget ()=0 |
TQWidget * | widget () const |
void | setCurrentItem (const TQString &filename) |
virtual void | setCurrentItem (const KFileItem *item)=0 |
virtual KFileItem * | currentFileItem () const =0 |
virtual void | clear () |
virtual void | updateView (bool f=true) |
virtual void | updateView (const KFileItem *) |
virtual void | removeItem (const KFileItem *item) |
virtual void | listingCompleted () |
TQDir::SortSpec | sorting () const |
virtual void | setSorting (TQDir::SortSpec sort) |
bool | isReversed () const |
void | sortReversed () |
uint | count () const |
uint | numFiles () const |
uint | numDirs () const |
virtual void | setSelectionMode (KFile::SelectionMode sm) |
virtual KFile::SelectionMode | selectionMode () const |
virtual void | setViewMode (ViewMode vm) |
virtual ViewMode | viewMode () const |
TQString | viewName () const |
void | setViewName (const TQString &name) |
virtual void | setParentView (KFileView *parent) |
virtual void | insertItem (KFileItem *i) |
virtual void | clearView ()=0 |
virtual void | ensureItemVisible (const KFileItem *i)=0 |
virtual void | clearSelection ()=0 |
virtual void | selectAll () |
virtual void | invertSelection () |
virtual void | setSelected (const KFileItem *, bool enable)=0 |
virtual bool | isSelected (const KFileItem *) const =0 |
const KFileItemList * | selectedItems () const |
const KFileItemList * | items () const |
virtual KFileItem * | firstFileItem () const =0 |
virtual KFileItem * | nextItem (const KFileItem *) const =0 |
virtual KFileItem * | prevItem (const KFileItem *) const =0 |
void | setOnlyDoubleClickSelectsFiles (bool enable) |
bool | onlyDoubleClickSelectsFiles () const |
bool | updateNumbers (const KFileItem *i) |
virtual TDEActionCollection * | actionCollection () const |
KFileViewSignaler * | signaler () const |
virtual void | readConfig (TDEConfig *, const TQString &group=TQString::null) |
virtual void | writeConfig (TDEConfig *, const TQString &group=TQString::null) |
void | setDropOptions (int options) |
int | dropOptions () |
Protected Member Functions | |
virtual void | keyPressEvent (TQKeyEvent *) |
virtual void | hideEvent (TQHideEvent *) |
virtual void | showEvent (TQShowEvent *) |
virtual bool | eventFilter (TQObject *o, TQEvent *e) |
virtual TQDragObject * | dragObject () |
virtual void | contentsDragEnterEvent (TQDragEnterEvent *e) |
virtual void | contentsDragMoveEvent (TQDragMoveEvent *e) |
virtual void | contentsDragLeaveEvent (TQDragLeaveEvent *e) |
virtual void | contentsDropEvent (TQDropEvent *ev) |
bool | acceptDrag (TQDropEvent *e) const |
virtual void | virtual_hook (int id, void *data) |
![]() | |
virtual void | virtual_hook (int id, void *data) |
void | setDropOptions_impl (int options) |
Additional Inherited Members | |
![]() | |
enum | ViewMode { Files = 1 , Directories = 2 , All = Files | Directories } |
enum | DropOptions { AutoOpenDirs = 1 } |
![]() | |
static TQString | sortingKey (const TQString &value, bool isDir, int sortSpec) |
static TQString | sortingKey (TDEIO::filesize_t value, bool isDir, int sortSpec) |
static int | autoOpenDelay () |
![]() | |
enum | { VIRTUAL_SET_DROP_OPTIONS = 1 } |
![]() | |
KFileViewSignaler * | sig |
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 82 of file tdefileiconview.h.
Constructor & Destructor Documentation
◆ KFileIconView()
KFileIconView::KFileIconView | ( | TQWidget * | parent, |
const char * | name | ||
) |
Definition at line 114 of file tdefileiconview.cpp.
◆ ~KFileIconView()
|
virtual |
Definition at line 182 of file tdefileiconview.cpp.
Member Function Documentation
◆ acceptDrag()
|
protected |
Definition at line 850 of file tdefileiconview.cpp.
◆ arrangeItemsInGrid
|
virtualslot |
◆ clearSelection()
|
virtual |
Clears any selection, unhighlights everything.
Must be implemented by the view.
Implements KFileView.
Definition at line 317 of file tdefileiconview.cpp.
◆ 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 tdefileiconview.cpp.
◆ contentsDragEnterEvent()
|
protectedvirtual |
Definition at line 859 of file tdefileiconview.cpp.
◆ contentsDragLeaveEvent()
|
protectedvirtual |
Definition at line 908 of file tdefileiconview.cpp.
◆ contentsDragMoveEvent()
|
protectedvirtual |
Definition at line 882 of file tdefileiconview.cpp.
◆ contentsDropEvent()
|
protectedvirtual |
Definition at line 914 of file tdefileiconview.cpp.
◆ currentFileItem()
|
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 tdefileiconview.cpp.
◆ determineIcon()
void KFileIconView::determineIcon | ( | KFileIconViewItem * | item | ) |
Definition at line 713 of file tdefileiconview.cpp.
◆ dragObject()
|
protectedvirtual |
Definition at line 811 of file tdefileiconview.cpp.
◆ dropped [1/2]
|
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
◆ dropped [2/2]
|
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
◆ ensureItemVisible()
|
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 tdefileiconview.cpp.
◆ eventFilter()
|
protectedvirtual |
Definition at line 738 of file tdefileiconview.cpp.
◆ firstFileItem()
|
virtual |
Implements KFileView.
Definition at line 649 of file tdefileiconview.cpp.
◆ hideEvent()
|
protectedvirtual |
Reimplemented to remove an eventual tooltip.
Definition at line 285 of file tdefileiconview.cpp.
◆ iconSize()
|
inline |
- Returns
- the current size used for icons.
Definition at line 137 of file tdefileiconview.h.
◆ insertItem()
|
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 tdefileiconview.cpp.
◆ 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 tdefileiconview.cpp.
◆ isSelected()
|
virtual |
- Returns
- whether the given item is currently selected. Must be implemented by the view.
Implements KFileView.
Definition at line 429 of file tdefileiconview.cpp.
◆ keyPressEvent()
|
protectedvirtual |
Reimplemented to not let TQIconView eat return-key events.
Definition at line 291 of file tdefileiconview.cpp.
◆ 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 719 of file tdefileiconview.cpp.
◆ mimeTypeDeterminationFinished()
void KFileIconView::mimeTypeDeterminationFinished | ( | ) |
Definition at line 708 of file tdefileiconview.cpp.
◆ nextItem()
|
virtual |
Implements KFileView.
Definition at line 657 of file tdefileiconview.cpp.
◆ prevItem()
|
virtual |
Implements KFileView.
Definition at line 667 of file tdefileiconview.cpp.
◆ readConfig()
|
virtual |
Reimplemented from KFileView.
Definition at line 189 of file tdefileiconview.cpp.
◆ removeItem()
|
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 tdefileiconview.cpp.
◆ scrollWidget()
|
inline |
Definition at line 149 of file tdefileiconview.h.
◆ 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 tdefileiconview.cpp.
◆ setAcceptDrops()
|
inline |
Definition at line 150 of file tdefileiconview.h.
◆ setAutoUpdate()
|
inlinevirtual |
Definition at line 92 of file tdefileiconview.h.
◆ setCurrentItem()
|
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 tdefileiconview.cpp.
◆ setIconSize()
void KFileIconView::setIconSize | ( | int | size | ) |
Sets the size of the icons to show.
Defaults to TDEIcon::SizeSmall.
Definition at line 481 of file tdefileiconview.cpp.
◆ setIgnoreMaximumSize()
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 tdefileiconview.cpp.
◆ setPreviewSize()
void KFileIconView::setPreviewSize | ( | int | size | ) |
Sets the size of the previews.
Defaults to TDEIcon::SizeLarge.
Definition at line 487 of file tdefileiconview.cpp.
◆ setSelected()
|
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 tdefileiconview.cpp.
◆ setSelectionMode()
|
virtual |
Reimplemented from KFileView.
Definition at line 399 of file tdefileiconview.cpp.
◆ setSorting()
|
virtual |
Sets the sorting order of the view.
Default is TQDir::Name | TQDir::IgnoreCase | TQDir::DirsFirst Override this in your subclass and sort accordingly (usually by setting the sorting-key for every item and telling QIconView or TQListView to sort.
A view may choose to use a different sorting than TQDir::Name, Time or Size. E.g. to sort by mimetype or any possible string. Set the sorting to TQDir::Unsorted for that and do the rest internally.
- See also
- sortingKey
Reimplemented from KFileView.
Definition at line 677 of file tdefileiconview.cpp.
◆ showEvent()
|
protectedvirtual |
Definition at line 753 of file tdefileiconview.cpp.
◆ 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 tdefileiconview.cpp.
◆ updateView() [1/2]
|
virtual |
does a repaint of the view.
The default implementation calls
Reimplemented from KFileView.
Definition at line 435 of file tdefileiconview.cpp.
◆ updateView() [2/2]
|
virtual |
Reimplemented from KFileView.
Definition at line 459 of file tdefileiconview.cpp.
◆ virtual_hook()
|
protectedvirtual |
Reimplemented from KFileView.
Definition at line 940 of file tdefileiconview.cpp.
◆ widget()
|
inlinevirtual |
a pure virtual function to get a TQWidget, 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 90 of file tdefileiconview.h.
◆ writeConfig()
|
virtual |
Reimplemented from KFileView.
Definition at line 210 of file tdefileiconview.cpp.
◆ zoomIn
|
slot |
Definition at line 801 of file tdefileiconview.cpp.
◆ zoomOut
|
slot |
Definition at line 806 of file tdefileiconview.cpp.
The documentation for this class was generated from the following files: