• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libkonq
 

libkonq

Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
KFileIVI Class Reference

#include <tdefileivi.h>

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 ()
void rename ()

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
void renameItem ()
void cancelRenameItem ()
void removeRenameBox ()

Protected Attributes

KFileIVILineEdit * m_renameBox

Friends

class KFileIVILineEdit
class KonqIconViewWidget

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 40 of file tdefileivi.h.

Constructor & Destructor Documentation

◆ KFileIVI()

KFileIVI::KFileIVI ( KonqIconViewWidget * iconview,
KFileItem * fileitem,
int size )

Create an icon, within a qlistview, representing a file.

Parameters
iconviewthe parent widget
fileitemthe file item created by KDirLister
sizethe icon size

Definition at line 58 of file tdefileivi.cpp.

◆ ~KFileIVI()

KFileIVI::~KFileIVI ( )
virtual

Definition at line 88 of file tdefileivi.cpp.

Member Function Documentation

◆ acceptDrop()

bool KFileIVI::acceptDrop ( const TQMimeSource * mime) const
virtual
Returns
true if dropping on this file is allowed Overloads TQIconView::acceptDrop()

Definition at line 341 of file tdefileivi.cpp.

◆ cancelRenameItem()

void KFileIVI::cancelRenameItem ( )
protected

Definition at line 762 of file tdefileivi.cpp.

◆ compare()

int KFileIVI::compare ( TQIconViewItem * i) const
virtual

Definition at line 572 of file tdefileivi.cpp.

◆ dropped()

void KFileIVI::dropped ( TQDropEvent * e,
const TQValueList< TQIconDragItem > &  )
protectedvirtual

Definition at line 384 of file tdefileivi.cpp.

◆ hasAnimation()

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 543 of file tdefileivi.cpp.

◆ hasValidThumbnail()

bool KFileIVI::hasValidThumbnail ( ) const
inline

Definition at line 111 of file tdefileivi.h.

◆ iconSize()

int KFileIVI::iconSize ( ) const
inline

Return the theorical size of the icon.

Definition at line 122 of file tdefileivi.h.

◆ invalidateThumb()

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
statethe state of the icon (enum in TDEIcon)
redrawwhether to redraw the item after setting the icon

Definition at line 96 of file tdefileivi.cpp.

◆ invalidateThumbnail()

void KFileIVI::invalidateThumbnail ( )

Our current thumbnail is not longer "current".

Called when the file contents have changed.

Definition at line 331 of file tdefileivi.cpp.

◆ isAnimated()

bool KFileIVI::isAnimated ( ) const

Return true if we are currently animating this icon.

Definition at line 562 of file tdefileivi.cpp.

◆ isThumbnail()

bool KFileIVI::isThumbnail ( ) const
inline
Returns
true if this item is a thumbnail

Definition at line 143 of file tdefileivi.h.

◆ isThumbnailInvalid()

bool KFileIVI::isThumbnailInvalid ( ) const

Definition at line 336 of file tdefileivi.cpp.

◆ item()

KFileItem * KFileIVI::item ( ) const
inline
Returns
the file item held by this instance

Definition at line 63 of file tdefileivi.h.

◆ mimeTypeAndIconDetermined()

void KFileIVI::mimeTypeAndIconDetermined ( )

Definition at line 621 of file tdefileivi.cpp.

◆ mouseOverAnimation()

TQString KFileIVI::mouseOverAnimation ( ) const

Definition at line 557 of file tdefileivi.cpp.

◆ move()

bool KFileIVI::move ( int x,
int y )
virtual

Definition at line 528 of file tdefileivi.cpp.

◆ paintFontUpdate()

void KFileIVI::paintFontUpdate ( TQPainter * p) const
protected

Contains the logic and code for painting links.

Definition at line 511 of file tdefileivi.cpp.

◆ paintItem()

void KFileIVI::paintItem ( TQPainter * p,
const TQColorGroup & cg )
virtual

Paints this item.

Takes care of using the normal or alpha blending methods depending on the configuration.

Definition at line 433 of file tdefileivi.cpp.

◆ paintOverlay()

void KFileIVI::paintOverlay ( TQPainter * p) const
protected

Contains the logic and code for painting the overlay pixmap.

Definition at line 453 of file tdefileivi.cpp.

◆ paintOverlayProgressBar()

void KFileIVI::paintOverlayProgressBar ( TQPainter * p) const
protected

Contains the logic and code for painting the overlay progress bar.

Definition at line 461 of file tdefileivi.cpp.

◆ refreshIcon()

void KFileIVI::refreshIcon ( bool redraw)
virtual

Redetermines the icon (useful if KFileItem might return another icon).

Does nothing with thumbnails

Definition at line 324 of file tdefileivi.cpp.

◆ removeRenameBox()

void KFileIVI::removeRenameBox ( )
protected

Definition at line 777 of file tdefileivi.cpp.

◆ rename()

void KFileIVI::rename ( )

Definition at line 718 of file tdefileivi.cpp.

◆ renameItem()

void KFileIVI::renameItem ( )
protected

Reimplementation of TQt inline rename.

Definition at line 745 of file tdefileivi.cpp.

◆ returnPressed()

void KFileIVI::returnPressed ( )
virtual

Handler for return (or single/double click) on ONE icon.

Runs the file through KRun.

Definition at line 389 of file tdefileivi.cpp.

◆ setActive()

void KFileIVI::setActive ( bool active)

Called when the mouse is over the icon.

Definition at line 263 of file tdefileivi.cpp.

◆ setAnimated()

void KFileIVI::setAnimated ( bool a)

Definition at line 567 of file tdefileivi.cpp.

◆ setDisabled()

void KFileIVI::setDisabled ( bool disabled)

Set to true when this icon is 'cut'.

Definition at line 233 of file tdefileivi.cpp.

◆ setEffect()

void KFileIVI::setEffect ( int state)

Set the icon to use the specified TDEIconEffect See the docs for TDEIconEffect for details.

Definition at line 271 of file tdefileivi.cpp.

◆ setIcon()

void KFileIVI::setIcon ( int size,
int state = TDEIcon::DefaultState,
bool recalc = false,
bool redraw = false )
virtual

Changes the icon for this item.

Parameters
sizethe icon size (0 for default, otherwise size in pixels)
statethe state of the icon (enum in TDEIcon)
recalcwhether to update the layout of the icon view when setting the icon
redrawwhether to redraw the item after setting the icon

Definition at line 122 of file tdefileivi.cpp.

◆ setKey()

void KFileIVI::setKey ( const TQString & key)
virtual

Definition at line 363 of file tdefileivi.cpp.

◆ setMouseOverAnimation()

void KFileIVI::setMouseOverAnimation ( const TQString & movieFileName)

Enable an animation on mouseover, if there is an available mng.

Parameters
movieFileNamethe base name for the mng, e.g. "folder". Nothing happens if there is no animation available.

Definition at line 548 of file tdefileivi.cpp.

◆ setOverlay()

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 146 of file tdefileivi.cpp.

◆ setOverlayProgressBar()

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 153 of file tdefileivi.cpp.

◆ setPixmapDirect()

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
pixmapthe pixmap to set - it SHOULD really have the right icon size!
recalcwhether to update the layout of the icon view when setting the icon
redrawwhether to redraw the item after setting the icon

Definition at line 205 of file tdefileivi.cpp.

◆ setShowDirectoryOverlay()

KIVDirectoryOverlay * KFileIVI::setShowDirectoryOverlay ( bool show)

Sets showing of directory overlays.

Does nothing if this does not represent a folder.

Definition at line 160 of file tdefileivi.cpp.

◆ setShowFreeSpaceOverlay()

KIVFreeSpaceOverlay * KFileIVI::setShowFreeSpaceOverlay ( bool show)

Sets showing of free space overlays.

Does nothing if this does not represent a media device.

Definition at line 182 of file tdefileivi.cpp.

◆ setThumbnailPixmap()

void KFileIVI::setThumbnailPixmap ( const TQPixmap & pixmap)

Set this when the thumbnail was loaded.

Definition at line 244 of file tdefileivi.cpp.

◆ showDirectoryOverlay()

bool KFileIVI::showDirectoryOverlay ( )

Definition at line 177 of file tdefileivi.cpp.

◆ showFreeSpaceOverlay()

bool KFileIVI::showFreeSpaceOverlay ( )

Definition at line 200 of file tdefileivi.cpp.

◆ state()

int KFileIVI::state ( ) const
inline

Return the current state of the icon (TDEIcon::DefaultState, TDEIcon::ActiveState etc.).

Definition at line 117 of file tdefileivi.h.

◆ updateColors()

TQColorGroup KFileIVI::updateColors ( const TQColorGroup & c) const
protected

Updates the colorgroup.

Definition at line 521 of file tdefileivi.cpp.

Friends And Related Symbol Documentation

◆ KFileIVILineEdit

friend class KFileIVILineEdit
friend

Definition at line 42 of file tdefileivi.h.

◆ KonqIconViewWidget

friend class KonqIconViewWidget
friend

Definition at line 43 of file tdefileivi.h.

Member Data Documentation

◆ m_renameBox

KFileIVILineEdit* KFileIVI::m_renameBox
protected

Definition at line 246 of file tdefileivi.h.


The documentation for this class was generated from the following files:
  • tdefileivi.h
  • tdefileivi.cpp

libkonq

Skip menu "libkonq"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

libkonq

Skip menu "libkonq"
  • kate
  • libkonq
  • twin
  •   lib
Generated for libkonq by doxygen 1.15.0
This website is maintained by Timothy Pearson.