20 #ifndef __tdefileivi_h__
21 #define __tdefileivi_h__
23 #include <kiconview.h>
24 #include <kiconloader.h>
25 #include <libkonq_export.h>
29 class KIVDirectoryOverlay;
30 class KIVFreeSpaceOverlay;
39 class LIBKONQ_EXPORT
KFileIVI :
public TDEIconViewItem
55 virtual void returnPressed();
60 KFileItem *
item()
const {
return m_fileitem; }
66 virtual bool acceptDrop(
const TQMimeSource *mime )
const;
75 virtual void setIcon(
int size,
76 int state=TDEIcon::DefaultState,
87 void setPixmapDirect(
const TQPixmap & pixmap,
99 void invalidateThumb(
int state,
bool redraw =
false );
105 void invalidateThumbnail();
106 bool isThumbnailInvalid()
const;
108 bool hasValidThumbnail()
const {
return isThumbnail() && !isThumbnailInvalid(); }
114 int state()
const {
return m_state; }
124 void setDisabled(
bool disabled );
129 void setThumbnailPixmap(
const TQPixmap & pixmap );
135 void setEffect(
int state );
147 void setOverlay(
const TQString & iconName);
154 void setOverlayProgressBar(
const int progress);
160 virtual void refreshIcon(
bool redraw );
162 virtual void setKey(
const TQString &key );
168 virtual void paintItem( TQPainter *p,
const TQColorGroup &cg );
170 virtual bool move(
int x,
int y );
177 void setMouseOverAnimation(
const TQString& movieFileName );
178 TQString mouseOverAnimation()
const;
186 bool hasAnimation()
const;
189 bool isAnimated()
const;
190 void setAnimated(
bool );
193 void setActive(
bool active );
199 KIVDirectoryOverlay* setShowDirectoryOverlay(
bool );
200 bool showDirectoryOverlay( );
206 KIVFreeSpaceOverlay* setShowFreeSpaceOverlay(
bool );
207 bool showFreeSpaceOverlay( );
209 virtual int compare( TQIconViewItem *i )
const;
211 void mimeTypeAndIconDetermined();
214 virtual void dropped( TQDropEvent *e,
const TQValueList<TQIconDragItem> & );
219 void paintOverlay( TQPainter *p )
const;
224 void paintOverlayProgressBar( TQPainter *p )
const;
229 TQColorGroup updateColors(
const TQColorGroup &c)
const;
234 void paintFontUpdate( TQPainter *p )
const;
239 virtual void setPixmap (
const TQPixmap & icon ) { TDEIconViewItem::setPixmap( icon ); }
240 virtual void setPixmap (
const TQPixmap & icon,
bool recalc,
bool redraw = TRUE )
241 { TDEIconViewItem::setPixmap( icon, recalc, redraw ); }
244 void updatePixmapSize();
250 KFileItem* m_fileitem;
KFileIVI (short form of "Konq - File - IconViewItem") is, as expected, an improved TDEIconViewItem,...
int state() const
Return the current state of the icon (TDEIcon::DefaultState, TDEIcon::ActiveState etc....
int iconSize() const
Return the theorical size of the icon.