#include <tdefileivi.h>
Inherits TDEIconViewItem.
Public Member Functions | |
KFileIVI (KonqIconViewWidget *iconview, KFileItem *fileitem, int size) | |
virtual void | returnPressed () |
KFileItem * | item () const |
virtual bool | acceptDrop (const TQMimeSource *mime) const |
virtual void | setIcon (int size, int state=TDEIcon::DefaultState, bool recalc=false, bool redraw=false) |
void | setPixmapDirect (const TQPixmap &pixmap, bool recalc=false, bool redraw=false) |
void | invalidateThumb (int state, bool redraw=false) |
void | invalidateThumbnail () |
bool | isThumbnailInvalid () const |
bool | hasValidThumbnail () const |
int | state () const |
int | iconSize () const |
void | setDisabled (bool disabled) |
void | setThumbnailPixmap (const TQPixmap &pixmap) |
void | setEffect (int state) |
bool | isThumbnail () const |
void | setOverlay (const TQString &iconName) |
void | setOverlayProgressBar (const int progress) |
virtual void | refreshIcon (bool redraw) |
virtual void | setKey (const TQString &key) |
virtual void | paintItem (TQPainter *p, const TQColorGroup &cg) |
virtual bool | move (int x, int y) |
void | setMouseOverAnimation (const TQString &movieFileName) |
TQString | mouseOverAnimation () const |
bool | hasAnimation () const |
bool | isAnimated () const |
void | setAnimated (bool) |
void | setActive (bool active) |
KIVDirectoryOverlay * | setShowDirectoryOverlay (bool) |
bool | showDirectoryOverlay () |
KIVFreeSpaceOverlay * | setShowFreeSpaceOverlay (bool) |
bool | showFreeSpaceOverlay () |
virtual int | compare (TQIconViewItem *i) const |
void | mimeTypeAndIconDetermined () |
Protected Member Functions | |
virtual void | dropped (TQDropEvent *e, const TQValueList< TQIconDragItem > &) |
void | paintOverlay (TQPainter *p) const |
void | paintOverlayProgressBar (TQPainter *p) const |
TQColorGroup | updateColors (const TQColorGroup &c) const |
void | paintFontUpdate (TQPainter *p) const |
Detailed Description
KFileIVI (short form of "Konq - File - IconViewItem") is, as expected, an improved TDEIconViewItem, because it represents a file.
All the information about the file is contained in the KFileItem pointer.
Definition at line 39 of file tdefileivi.h.
Constructor & Destructor Documentation
KFileIVI::KFileIVI | ( | KonqIconViewWidget * | iconview, |
KFileItem * | fileitem, | ||
int | size | ||
) |
Create an icon, within a qlistview, representing a file.
- Parameters
-
iconview the parent widget fileitem the file item created by KDirLister size the icon size
Definition at line 55 of file tdefileivi.cpp.
Member Function Documentation
|
virtual |
- Returns
- true if dropping on this file is allowed Overloads TQIconView::acceptDrop()
Definition at line 336 of file tdefileivi.cpp.
bool KFileIVI::hasAnimation | ( | ) | const |
Return true if the icon might have an animation available.
This doesn't mean the .mng exists (only determined when hovering on the icon - and if it doesn't exist setMouseOverAnimation(TQString::null) is called), and it doesn't mean that it's currently running either.
Definition at line 517 of file tdefileivi.cpp.
|
inline |
Return the theorical size of the icon.
Definition at line 119 of file tdefileivi.h.
void KFileIVI::invalidateThumb | ( | int | state, |
bool | redraw = false |
||
) |
Notifies that all icon effects on thumbs should be invalidated, e.g.
because the effect settings have been changed. The thumb itself is assumed to be still valid (use setThumbnailPixmap() instead otherwise).
- Parameters
-
state the state of the icon (enum in TDEIcon) redraw whether to redraw the item after setting the icon
Definition at line 91 of file tdefileivi.cpp.
void KFileIVI::invalidateThumbnail | ( | ) |
Our current thumbnail is not longer "current".
Called when the file contents have changed.
Definition at line 326 of file tdefileivi.cpp.
bool KFileIVI::isAnimated | ( | ) | const |
Return true if we are currently animating this icon.
Definition at line 536 of file tdefileivi.cpp.
|
inline |
- Returns
- true if this item is a thumbnail
Definition at line 140 of file tdefileivi.h.
|
inline |
- Returns
- the file item held by this instance
Definition at line 60 of file tdefileivi.h.
|
protected |
Contains the logic and code for painting links.
Definition at line 485 of file tdefileivi.cpp.
|
virtual |
Paints this item.
Takes care of using the normal or alpha blending methods depending on the configuration.
Definition at line 407 of file tdefileivi.cpp.
|
protected |
Contains the logic and code for painting the overlay pixmap.
Definition at line 427 of file tdefileivi.cpp.
|
protected |
Contains the logic and code for painting the overlay progress bar.
Definition at line 435 of file tdefileivi.cpp.
|
virtual |
Redetermines the icon (useful if KFileItem might return another icon).
Does nothing with thumbnails
Definition at line 319 of file tdefileivi.cpp.
|
virtual |
Handler for return (or single/double click) on ONE icon.
Runs the file through KRun.
Definition at line 384 of file tdefileivi.cpp.
void KFileIVI::setActive | ( | bool | active | ) |
Called when the mouse is over the icon.
Definition at line 258 of file tdefileivi.cpp.
void KFileIVI::setDisabled | ( | bool | disabled | ) |
Set to true when this icon is 'cut'.
Definition at line 228 of file tdefileivi.cpp.
void KFileIVI::setEffect | ( | int | state | ) |
Set the icon to use the specified TDEIconEffect See the docs for TDEIconEffect for details.
Definition at line 266 of file tdefileivi.cpp.
|
virtual |
Changes the icon for this item.
- Parameters
-
size the icon size (0 for default, otherwise size in pixels) state the state of the icon (enum in TDEIcon) recalc whether to update the layout of the icon view when setting the icon redraw whether to redraw the item after setting the icon
Definition at line 117 of file tdefileivi.cpp.
void KFileIVI::setMouseOverAnimation | ( | const TQString & | movieFileName | ) |
Enable an animation on mouseover, if there is an available mng.
- Parameters
-
movieFileName the base name for the mng, e.g. "folder". Nothing happens if there is no animation available.
Definition at line 522 of file tdefileivi.cpp.
void KFileIVI::setOverlay | ( | const TQString & | iconName | ) |
Sets an icon to be shown over the bottom left corner of the icon.
Currently used for directory overlays. setOverlay(TQString::null) to remove icon.
Definition at line 141 of file tdefileivi.cpp.
void KFileIVI::setOverlayProgressBar | ( | const int | progress | ) |
Sets a progress bar to be shown on the right side of the icon.
Currently used for disk space overlays. setOverlayProgressBar(-1) to remove progress bar.
Definition at line 148 of file tdefileivi.cpp.
void KFileIVI::setPixmapDirect | ( | const TQPixmap & | pixmap, |
bool | recalc = false , |
||
bool | redraw = false |
||
) |
Bypass setIcon.
This is for animated icons, you should use setIcon in all other cases.
- Parameters
-
pixmap the pixmap to set - it SHOULD really have the right icon size! recalc whether to update the layout of the icon view when setting the icon redraw whether to redraw the item after setting the icon
Definition at line 200 of file tdefileivi.cpp.
KIVDirectoryOverlay * KFileIVI::setShowDirectoryOverlay | ( | bool | show | ) |
Sets showing of directory overlays.
Does nothing if this does not represent a folder.
Definition at line 155 of file tdefileivi.cpp.
KIVFreeSpaceOverlay * KFileIVI::setShowFreeSpaceOverlay | ( | bool | show | ) |
Sets showing of free space overlays.
Does nothing if this does not represent a media device.
Definition at line 177 of file tdefileivi.cpp.
void KFileIVI::setThumbnailPixmap | ( | const TQPixmap & | pixmap | ) |
Set this when the thumbnail was loaded.
Definition at line 239 of file tdefileivi.cpp.
|
inline |
Return the current state of the icon (TDEIcon::DefaultState, TDEIcon::ActiveState etc.)
Definition at line 114 of file tdefileivi.h.
|
protected |
Updates the colorgroup.
Definition at line 495 of file tdefileivi.cpp.
The documentation for this class was generated from the following files: