#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 Slots | |
virtual void | slotDropped (TQDropEvent *e, const TQValueList< TQIconDragItem > &) |
void | slotItemRenamed (TQIconViewItem *item, const TQString &name) |
void | slotIconChanged (int) |
void | slotOnItem (TQIconViewItem *) |
void | slotOnViewport () |
void | slotStartSoundPreview () |
void | slotPreview (const KFileItem *, const TQPixmap &) |
void | slotPreviewResult () |
void | slotMovieUpdate (const TQRect &rect) |
void | slotMovieStatus (int status) |
void | slotReenableAnimation () |
void | slotAboutToCreate (const TQPoint &pos, const TQValueList< TDEIO::CopyInfo > &files) |
void | doubleClickTimeout () |
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.
Member Enumeration Documentation
◆ LineupMode
enum KonqIconViewWidget::LineupMode |
Definition at line 54 of file konq_iconviewwidget.h.
◆ UrlFlags
enum KonqIconViewWidget::UrlFlags |
Definition at line 188 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.
◆ ~KonqIconViewWidget()
|
virtual |
Definition at line 158 of file konq_iconviewwidget.cpp.
Member Function Documentation
◆ backgroundPixmapChange()
|
protectedvirtual |
Definition at line 1868 of file konq_iconviewwidget.cpp.
◆ boostPreview()
|
protected |
Definition at line 606 of file konq_iconviewwidget.cpp.
◆ calculateGridX()
void KonqIconViewWidget::calculateGridX | ( | ) |
Definition at line 776 of file konq_iconviewwidget.cpp.
◆ canPreview()
|
protected |
Definition at line 1908 of file konq_iconviewwidget.cpp.
◆ caseInsensitiveSort()
bool KonqIconViewWidget::caseInsensitiveSort | ( | ) | const |
Definition at line 1903 of file konq_iconviewwidget.cpp.
◆ clear()
|
virtual |
Reimplemented from QIconView.
Definition at line 508 of file konq_iconviewwidget.cpp.
◆ contentsDragEnterEvent()
|
protectedvirtual |
Definition at line 998 of file konq_iconviewwidget.cpp.
◆ contentsDragLeaveEvent()
|
protectedvirtual |
Definition at line 1049 of file konq_iconviewwidget.cpp.
◆ contentsDragMoveEvent()
|
protectedvirtual |
Definition at line 1028 of file konq_iconviewwidget.cpp.
◆ contentsDropEvent()
|
protectedvirtual |
Definition at line 1244 of file konq_iconviewwidget.cpp.
◆ contentsMouseMoveEvent()
|
protectedvirtual |
Definition at line 1224 of file konq_iconviewwidget.cpp.
◆ contentsMousePressEvent()
|
protectedvirtual |
Definition at line 1368 of file konq_iconviewwidget.cpp.
◆ contentsMouseReleaseEvent()
|
protectedvirtual |
Definition at line 1410 of file konq_iconviewwidget.cpp.
◆ copySelection()
|
virtual |
Definition at line 1160 of file konq_iconviewwidget.cpp.
◆ cutSelection()
|
virtual |
Definition at line 1152 of file konq_iconviewwidget.cpp.
◆ disableIcons()
void KonqIconViewWidget::disableIcons | ( | const KURL::List & | lst | ) |
Definition at line 1067 of file konq_iconviewwidget.cpp.
◆ disableSoundPreviews()
void KonqIconViewWidget::disableSoundPreviews | ( | ) |
Definition at line 614 of file konq_iconviewwidget.cpp.
◆ dotDirectoryPath()
|
inline |
Definition at line 241 of file konq_iconviewwidget.h.
◆ doubleClickTimeout
|
protectedslot |
Definition at line 1287 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.
◆ dragObject()
|
protectedvirtual |
Definition at line 956 of file konq_iconviewwidget.cpp.
◆ dragURLs()
|
inline |
Cache of the dragged URLs over the icon view, used by KFileIVI.
Definition at line 201 of file konq_iconviewwidget.h.
◆ drawBackground() [1/2]
|
protectedvirtual |
Definition at line 928 of file konq_iconviewwidget.cpp.
◆ drawBackground() [2/2]
|
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.
◆ iconPositionGroupPrefix()
|
inline |
Definition at line 240 of file konq_iconviewwidget.h.
◆ iconSize()
|
inline |
Definition at line 133 of file konq_iconviewwidget.h.
◆ 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.
◆ isDesktop()
|
inline |
Definition at line 228 of file konq_iconviewwidget.h.
◆ isPreviewRunning()
bool KonqIconViewWidget::isPreviewRunning | ( | ) | const |
Definition at line 894 of file konq_iconviewwidget.cpp.
◆ itemColor()
TQColor KonqIconViewWidget::itemColor | ( | ) | const |
Definition at line 1062 of file konq_iconviewwidget.cpp.
◆ konqDragObject()
|
protected |
Definition at line 964 of file konq_iconviewwidget.cpp.
◆ largestPreviewIconSize()
|
protected |
Definition at line 1822 of file konq_iconviewwidget.cpp.
◆ leaveEvent()
|
protectedvirtual |
Definition at line 1346 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.
◆ maySetWallpaper()
bool KonqIconViewWidget::maySetWallpaper | ( | ) |
Definition at line 165 of file konq_iconviewwidget.cpp.
◆ mimeTypeMatch()
|
protected |
Definition at line 685 of file konq_iconviewwidget.cpp.
◆ mousePressChangeValue()
|
protected |
Definition at line 1354 of file konq_iconviewwidget.cpp.
◆ paste()
void KonqIconViewWidget::paste | ( | const KURL & | url | ) |
Definition at line 1172 of file konq_iconviewwidget.cpp.
◆ pasteSelection()
|
virtual |
Definition at line 1167 of file konq_iconviewwidget.cpp.
◆ previewIconSize()
|
protected |
Definition at line 1838 of file konq_iconviewwidget.cpp.
◆ previewSettings()
const TQStringList & KonqIconViewWidget::previewSettings | ( | ) |
Definition at line 1883 of file konq_iconviewwidget.cpp.
◆ readAnimatedIconsConfig()
|
protected |
Definition at line 228 of file konq_iconviewwidget.cpp.
◆ refreshMimeTypes()
void KonqIconViewWidget::refreshMimeTypes | ( | ) |
Called on databaseChanged.
Definition at line 805 of file konq_iconviewwidget.cpp.
◆ renameCurrentItem
|
slot |
Definition at line 1127 of file konq_iconviewwidget.cpp.
◆ renameSelectedItem
|
slot |
Definition at line 1133 of file konq_iconviewwidget.cpp.
◆ selectedFileItems()
KFileItemList KonqIconViewWidget::selectedFileItems | ( | ) |
Get list of selected KFileItems.
Definition at line 899 of file konq_iconviewwidget.cpp.
◆ selectedUrls() [1/2]
|
virtual |
Definition at line 1177 of file konq_iconviewwidget.cpp.
◆ selectedUrls() [2/2]
KURL::List KonqIconViewWidget::selectedUrls | ( | UrlFlags | flags | ) | const |
Definition at line 1182 of file konq_iconviewwidget.cpp.
◆ setCaseInsensitiveSort()
void KonqIconViewWidget::setCaseInsensitiveSort | ( | bool | b | ) |
Definition at line 1898 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.
◆ setItemColor()
void KonqIconViewWidget::setItemColor | ( | const TQColor & | c | ) |
Definition at line 1057 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.
◆ setMaySetWallpaper()
void KonqIconViewWidget::setMaySetWallpaper | ( | bool | b | ) |
Definition at line 170 of file konq_iconviewwidget.cpp.
◆ setNewURL()
void KonqIconViewWidget::setNewURL | ( | const TQString & | url | ) |
Definition at line 1888 of file konq_iconviewwidget.cpp.
◆ setPreviewSettings()
void KonqIconViewWidget::setPreviewSettings | ( | const TQStringList & | mimeTypes | ) |
Definition at line 1873 of file konq_iconviewwidget.cpp.
◆ setRootItem()
|
inline |
Definition at line 174 of file konq_iconviewwidget.h.
◆ setSortDirectoriesFirst()
void KonqIconViewWidget::setSortDirectoriesFirst | ( | bool | b | ) |
Definition at line 1219 of file konq_iconviewwidget.cpp.
◆ setThumbnailPixmap()
void KonqIconViewWidget::setThumbnailPixmap | ( | KFileIVI * | item, |
const TQPixmap & | pixmap | ||
) |
Definition at line 531 of file konq_iconviewwidget.cpp.
◆ setURL()
void KonqIconViewWidget::setURL | ( | const KURL & | kurl | ) |
Definition at line 813 of file konq_iconviewwidget.cpp.
◆ setWallpaper()
|
inlinevirtual |
Provided for KDesktop.
Definition at line 233 of file konq_iconviewwidget.h.
◆ slotAboutToCreate
|
protectedslot |
Definition at line 923 of file konq_iconviewwidget.cpp.
◆ slotDropped
|
protectedvirtualslot |
Definition at line 912 of file konq_iconviewwidget.cpp.
◆ slotIconChanged
|
protectedslot |
Definition at line 216 of file konq_iconviewwidget.cpp.
◆ slotItemRenamed
|
protectedslot |
Definition at line 192 of file konq_iconviewwidget.cpp.
◆ slotMovieStatus
|
protectedslot |
Definition at line 485 of file konq_iconviewwidget.cpp.
◆ slotMovieUpdate
|
protectedslot |
Definition at line 459 of file konq_iconviewwidget.cpp.
◆ slotOnItem
|
protectedslot |
Definition at line 234 of file konq_iconviewwidget.cpp.
◆ slotOnViewport
|
protectedslot |
Definition at line 375 of file konq_iconviewwidget.cpp.
◆ slotPreview
|
protectedslot |
Definition at line 422 of file konq_iconviewwidget.cpp.
◆ slotPreviewResult
|
protectedslot |
Definition at line 443 of file konq_iconviewwidget.cpp.
◆ slotReenableAnimation
|
protectedslot |
Definition at line 497 of file konq_iconviewwidget.cpp.
◆ slotSaveIconPositions
|
slot |
Definition at line 1420 of file konq_iconviewwidget.cpp.
◆ slotSelectionChanged
|
virtualslot |
Checks the new selection and emits enableAction() signals.
Definition at line 1086 of file konq_iconviewwidget.cpp.
◆ slotStartSoundPreview
|
protectedslot |
Definition at line 413 of file konq_iconviewwidget.cpp.
◆ slotToolTipPreview
|
slot |
Definition at line 449 of file konq_iconviewwidget.cpp.
◆ slotToolTipPreviewResult
|
slot |
Definition at line 454 of file konq_iconviewwidget.cpp.
◆ sortDirectoriesFirst()
bool KonqIconViewWidget::sortDirectoriesFirst | ( | ) | const |
Definition at line 1214 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.
◆ stopImagePreview()
void KonqIconViewWidget::stopImagePreview | ( | ) |
Definition at line 883 of file konq_iconviewwidget.cpp.
◆ takeItem()
|
virtual |
Reimplemented from QIconView.
Definition at line 516 of file konq_iconviewwidget.cpp.
◆ updatePreviewMimeTypes()
|
protected |
Definition at line 1919 of file konq_iconviewwidget.cpp.
◆ url()
|
inline |
Definition at line 172 of file konq_iconviewwidget.h.
◆ urlString()
|
inline |
Definition at line 173 of file konq_iconviewwidget.h.
◆ visualActivate()
|
virtual |
Give feedback when item is activated.
Definition at line 1848 of file konq_iconviewwidget.cpp.
◆ wheelEvent()
|
protectedvirtual |
Definition at line 1324 of file konq_iconviewwidget.cpp.
Friends And Related Function Documentation
◆ KFileIVI
|
friend |
Definition at line 50 of file konq_iconviewwidget.h.
The documentation for this class was generated from the following files: