#include <konq_iconviewwidget.h>
Inherits TDEIconView.
Public Types | |
enum | LineupMode { LineupHorizontal =1 , LineupVertical , LineupBoth } |
enum | UrlFlags { UserVisibleUrls = 0 , MostLocalUrls = 1 } |
Public Slots | |
virtual void | slotSelectionChanged () |
void | slotSaveIconPositions () |
void | renameSelectedItem () |
void | renameCurrentItem () |
void | slotToolTipPreview (const KFileItem *, const TQPixmap &) |
void | slotToolTipPreviewResult () |
Signals | |
void | enableAction (const char *name, bool enabled) |
void | dropped () |
void | imagePreviewFinished () |
void | incIconSize () |
void | decIconSize () |
void | dragEntered (bool accepted) |
void | dragLeft () |
void | dragMove (bool accepted) |
void | dragFinished () |
Public Member Functions | |
KonqIconViewWidget (TQWidget *parent=0L, const char *name=0L, WFlags f=0, bool kdesktop=FALSE) | |
bool | initConfig (bool bInit) |
void | setIconArea (const TQRect &rect) |
virtual void | focusOutEvent (TQFocusEvent *) |
TQRect | iconArea () const |
void | setLineupMode (int mode) |
int | lineupMode () const |
void | lineupIcons () |
void | lineupIcons (TQIconView::Arrangement arrangement) |
void | setIcons (int size, const TQStringList &stopImagePreviewFor=TQStringList()) |
void | refreshMimeTypes () |
int | iconSize () |
void | calculateGridX () |
int | gridXValue () const |
void | gridValues (int *x, int *y, int *dx, int *dy, int *nx, int *ny) |
void | startImagePreview (const TQStringList &ignored, bool force) |
void | stopImagePreview () |
bool | isPreviewRunning () const |
void | setThumbnailPixmap (KFileIVI *item, const TQPixmap &pixmap) |
void | disableSoundPreviews () |
void | setURL (const KURL &kurl) |
const KURL & | url () |
TQString | urlString () const |
void | setRootItem (const KFileItem *item) |
KFileItemList | selectedFileItems () |
void | setItemColor (const TQColor &c) |
TQColor | itemColor () const |
virtual void | cutSelection () |
virtual void | copySelection () |
virtual void | pasteSelection () |
virtual KURL::List | selectedUrls () |
KURL::List | selectedUrls (UrlFlags flags) const |
void | paste (const KURL &url) |
bool | sortDirectoriesFirst () const |
void | setSortDirectoriesFirst (bool b) |
void | setCaseInsensitiveSort (bool b) |
bool | caseInsensitiveSort () const |
const KURL::List & | dragURLs () |
virtual void | clear () |
virtual void | takeItem (TQIconViewItem *item) |
virtual void | insertInGrid (TQIconViewItem *item) |
virtual void | setItemTextPos (ItemTextPos pos) |
virtual void | visualActivate (TQIconViewItem *) |
bool | isDesktop () const |
virtual void | setWallpaper (const KURL &) |
bool | maySetWallpaper () |
void | setMaySetWallpaper (bool b) |
void | disableIcons (const KURL::List &lst) |
TQString | iconPositionGroupPrefix () const |
TQString | dotDirectoryPath () const |
void | setPreviewSettings (const TQStringList &mimeTypes) |
const TQStringList & | previewSettings () |
void | setNewURL (const TQString &url) |
Protected Member Functions | |
virtual TQDragObject * | dragObject () |
KonqIconDrag * | konqDragObject (TQWidget *dragSource=0L) |
bool | mimeTypeMatch (const TQString &mimeType, const TQStringList &mimeList) const |
virtual void | drawBackground (TQPainter *p, const TQRect &r) |
virtual void | drawBackground (TQPainter *p, const TQRect &r, const TQPoint &pt) |
virtual void | contentsDragEnterEvent (TQDragEnterEvent *e) |
virtual void | contentsDragLeaveEvent (TQDragLeaveEvent *e) |
virtual void | contentsDragMoveEvent (TQDragMoveEvent *e) |
virtual void | contentsDropEvent (TQDropEvent *e) |
virtual void | contentsMousePressEvent (TQMouseEvent *e) |
virtual void | contentsMouseReleaseEvent (TQMouseEvent *e) |
virtual void | contentsMouseMoveEvent (TQMouseEvent *e) |
virtual void | backgroundPixmapChange (const TQPixmap &) |
virtual void | wheelEvent (TQWheelEvent *) |
virtual void | leaveEvent (TQEvent *e) |
void | readAnimatedIconsConfig () |
void | mousePressChangeValue () |
bool | boostPreview () const |
int | previewIconSize (int size) const |
int | largestPreviewIconSize (int size) const |
bool | canPreview (KFileItem *item) |
void | updatePreviewMimeTypes () |
Friends | |
class | KFileIVI |
Detailed Description
A file-aware icon view, implementing drag'n'drop, KDE icon sizes, user settings, animated icons...
Used by kdesktop and konq_iconview.
Definition at line 42 of file konq_iconviewwidget.h.
Constructor & Destructor Documentation
◆ KonqIconViewWidget()
KonqIconViewWidget::KonqIconViewWidget | ( | TQWidget * | parent = 0L , |
const char * | name = 0L , |
||
WFlags | f = 0 , |
||
bool | kdesktop = FALSE |
||
) |
Constructor.
Definition at line 117 of file konq_iconviewwidget.cpp.
Member Function Documentation
◆ clear()
|
virtual |
Reimplemented from QIconView.
Definition at line 508 of file konq_iconviewwidget.cpp.
◆ dragEntered
|
signal |
We need to track drag in icon views for the spring loading folders.
◆ dragFinished
|
signal |
Emited after the dropped() event.
This way we know when the drag'n'drop is really finished.
◆ dragURLs()
|
inline |
Cache of the dragged URLs over the icon view, used by KFileIVI.
Definition at line 201 of file konq_iconviewwidget.h.
◆ drawBackground()
|
protectedvirtual |
r is the rectangle which you want to paint from the background.
pt is the upper left point in the painter device where you want to paint the rectangle r.
Definition at line 933 of file konq_iconviewwidget.cpp.
◆ enableAction
|
signal |
For cut/copy/paste/move/delete (see tdeparts/browserextension.h)
◆ focusOutEvent()
|
virtual |
Reimplemented to make the slotOnItem highlighting work.
Definition at line 175 of file konq_iconviewwidget.cpp.
◆ gridValues()
void KonqIconViewWidget::gridValues | ( | int * | x, |
int * | y, | ||
int * | dx, | ||
int * | dy, | ||
int * | nx, | ||
int * | ny | ||
) |
Calculate the geometry of the fixed grid that is used to line up the icons, for example when using the lineupIcons() method.
- Parameters
-
x y dx Cell width dy Cell height nx Number of columns ny Number of rows
Definition at line 726 of file konq_iconviewwidget.cpp.
◆ gridXValue()
int KonqIconViewWidget::gridXValue | ( | ) | const |
The horizontal distance between two icons (whether or not a grid has been given to TQIconView)
Definition at line 790 of file konq_iconviewwidget.cpp.
◆ iconArea()
TQRect KonqIconViewWidget::iconArea | ( | ) | const |
Returns the icon area.
Definition at line 1194 of file konq_iconviewwidget.cpp.
◆ initConfig()
bool KonqIconViewWidget::initConfig | ( | bool | bInit | ) |
Read the configuration and apply it.
Call this in the inherited constructor with bInit=true, and in some reparseConfiguration() slot with bInit=false. Returns true if the font was changed (which means something has to be done so that the icon's texts don't run into each other). However Konq and KDesktop handle this differently.
Definition at line 550 of file konq_iconviewwidget.cpp.
◆ insertInGrid()
|
virtual |
Reimplemented from TQIconView to take into account iconArea.
Definition at line 1483 of file konq_iconviewwidget.cpp.
◆ lineupIcons() [1/2]
void KonqIconViewWidget::lineupIcons | ( | ) |
Line up the icons to a regular grid.
The outline of the grid is specified by iconArea. The two length parameters are gridX and gridY.
Definition at line 1557 of file konq_iconviewwidget.cpp.
◆ lineupIcons() [2/2]
void KonqIconViewWidget::lineupIcons | ( | TQIconView::Arrangement | arrangement | ) |
Line up the icons to a regular grid horizontally or vertically.
- Parameters
-
arrangement the arrangement to use (TQIconView::LeftToRight for a horizontal arrangement and TQIconView::TopToBottom for vertical)
Definition at line 1769 of file konq_iconviewwidget.cpp.
◆ lineupMode()
int KonqIconViewWidget::lineupMode | ( | ) | const |
Returns the lineup mode.
Definition at line 1204 of file konq_iconviewwidget.cpp.
◆ refreshMimeTypes()
void KonqIconViewWidget::refreshMimeTypes | ( | ) |
Called on databaseChanged.
Definition at line 805 of file konq_iconviewwidget.cpp.
◆ selectedFileItems()
KFileItemList KonqIconViewWidget::selectedFileItems | ( | ) |
Get list of selected KFileItems.
Definition at line 899 of file konq_iconviewwidget.cpp.
◆ setIconArea()
void KonqIconViewWidget::setIconArea | ( | const TQRect & | rect | ) |
Set the area that will be occupied by icons.
It is still possible to drag icons outside this area; this only applies to automatically placed icons.
Definition at line 1199 of file konq_iconviewwidget.cpp.
◆ setIcons()
void KonqIconViewWidget::setIcons | ( | int | size, |
const TQStringList & | stopImagePreviewFor = TQStringList() |
||
) |
Sets the icons of all items, and stores the size
This doesn't touch thumbnails, except if stopImagePreviewFor
is set.
Takes care of the grid, when changing the size.
- Parameters
-
size size to use for the icons stopImagePreviewFor set to a list of mimetypes which should be made normal again. For instance "text/plain,image/wmf". Can be set to "*" for "all mimetypes" and to "image/"+"*" for "all images".
Definition at line 625 of file konq_iconviewwidget.cpp.
◆ setItemTextPos()
|
virtual |
Reimplemented from TQIconView to update the gridX.
Definition at line 707 of file konq_iconviewwidget.cpp.
◆ setLineupMode()
void KonqIconViewWidget::setLineupMode | ( | int | mode | ) |
Set the lineup mode.
This determines in which direction(s) icons are moved when lineing them up.
Definition at line 1209 of file konq_iconviewwidget.cpp.
◆ setWallpaper()
|
inlinevirtual |
Provided for KDesktop.
Definition at line 233 of file konq_iconviewwidget.h.
◆ slotSelectionChanged
|
virtualslot |
Checks the new selection and emits enableAction() signals.
Definition at line 1086 of file konq_iconviewwidget.cpp.
◆ startImagePreview()
void KonqIconViewWidget::startImagePreview | ( | const TQStringList & | ignored, |
bool | force | ||
) |
Start generating the previews.
- Parameters
-
ignored this parameter is probably ignored force if true, all files are looked at. Otherwise, only those which are not a thumbnail already.
- Todo:
- figure out the parameter meanings again
Definition at line 826 of file konq_iconviewwidget.cpp.
◆ takeItem()
|
virtual |
Reimplemented from QIconView.
Definition at line 516 of file konq_iconviewwidget.cpp.
◆ visualActivate()
|
virtual |
Give feedback when item is activated.
Definition at line 1848 of file konq_iconviewwidget.cpp.
The documentation for this class was generated from the following files: