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

libkonq

  • libkonq
tdefileivi.h
1 /* This file is part of the KDE project
2  Copyright (C) 1999, 2000, 2001, 2002 David Faure <faure@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef __tdefileivi_h__
21 #define __tdefileivi_h__
22 
23 #include <kiconview.h>
24 #include <kiconloader.h>
25 #include <libkonq_export.h>
26 
27 class KFileItem;
28 class KonqIconViewWidget;
29 class KIVDirectoryOverlay;
30 class KIVFreeSpaceOverlay;
31 
39 class LIBKONQ_EXPORT KFileIVI : public TDEIconViewItem
40 {
41 public:
48  KFileIVI( KonqIconViewWidget *iconview, KFileItem* fileitem, int size );
49  virtual ~KFileIVI();
50 
55  virtual void returnPressed();
56 
60  KFileItem * item() const { return m_fileitem; }
61 
66  virtual bool acceptDrop( const TQMimeSource *mime ) const;
67 
75  virtual void setIcon( int size,
76  int state=TDEIcon::DefaultState,
77  bool recalc=false,
78  bool redraw=false);
79 
87  void setPixmapDirect( const TQPixmap & pixmap,
88  bool recalc=false,
89  bool redraw=false);
90 
99  void invalidateThumb( int state, bool redraw = false );
100 
105  void invalidateThumbnail();
106  bool isThumbnailInvalid() const;
107 
108  bool hasValidThumbnail() const { return isThumbnail() && !isThumbnailInvalid(); }
109 
114  int state() const { return m_state; }
115 
119  int iconSize() const { return m_size; }
120 
124  void setDisabled( bool disabled );
125 
129  void setThumbnailPixmap( const TQPixmap & pixmap );
130 
135  void setEffect( /*int group,*/ int state );
136 
140  bool isThumbnail() const { return m_bThumbnail; }
141 
147  void setOverlay( const TQString & iconName);
148 
154  void setOverlayProgressBar( const int progress);
155 
160  virtual void refreshIcon( bool redraw );
161 
162  virtual void setKey( const TQString &key );
163 
168  virtual void paintItem( TQPainter *p, const TQColorGroup &cg );
169 
170  virtual bool move( int x, int y );
171 
177  void setMouseOverAnimation( const TQString& movieFileName );
178  TQString mouseOverAnimation() const;
179 
186  bool hasAnimation() const;
187 
189  bool isAnimated() const;
190  void setAnimated( bool );
191 
193  void setActive( bool active );
194 
199  KIVDirectoryOverlay* setShowDirectoryOverlay( bool );
200  bool showDirectoryOverlay( );
201 
206  KIVFreeSpaceOverlay* setShowFreeSpaceOverlay( bool );
207  bool showFreeSpaceOverlay( );
208 
209  virtual int compare( TQIconViewItem *i ) const;
210 
211  void mimeTypeAndIconDetermined();
212 
213 protected:
214  virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & );
215 
219  void paintOverlay( TQPainter *p ) const;
220 
224  void paintOverlayProgressBar( TQPainter *p ) const;
225 
229  TQColorGroup updateColors(const TQColorGroup &c) const;
230 
234  void paintFontUpdate( TQPainter *p ) const;
235 
236 private:
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 ); }
242 
244  void updatePixmapSize();
245 
246  int m_size, m_state;
247  bool m_bDisabled;
248  bool m_bThumbnail;
250  KFileItem* m_fileitem;
251 
256  struct Private;
257 
258  Private *d;
259 };
260 
261 #endif
KFileIVI
KFileIVI (short form of "Konq - File - IconViewItem") is, as expected, an improved TDEIconViewItem,...
Definition: tdefileivi.h:40
KFileIVI::state
int state() const
Return the current state of the icon (TDEIcon::DefaultState, TDEIcon::ActiveState etc....
Definition: tdefileivi.h:114
KFileIVI::isThumbnail
bool isThumbnail() const
Definition: tdefileivi.h:140
KFileIVI::item
KFileItem * item() const
Definition: tdefileivi.h:60
KFileIVI::iconSize
int iconSize() const
Return the theorical size of the icon.
Definition: tdefileivi.h:119
KonqIconViewWidget
A file-aware icon view, implementing drag'n'drop, KDE icon sizes, user settings, animated icons....
Definition: konq_iconviewwidget.h:43

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.9.1
This website is maintained by Timothy Pearson.