• 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 class KFileIVILineEdit;
32 
40 class LIBKONQ_EXPORT KFileIVI : public TDEIconViewItem
41 {
42 friend class KFileIVILineEdit;
43 friend class KonqIconViewWidget;
44 public:
51  KFileIVI( KonqIconViewWidget *iconview, KFileItem* fileitem, int size );
52  virtual ~KFileIVI();
53 
58  virtual void returnPressed();
59 
63  KFileItem * item() const { return m_fileitem; }
64 
69  virtual bool acceptDrop( const TQMimeSource *mime ) const;
70 
78  virtual void setIcon( int size,
79  int state=TDEIcon::DefaultState,
80  bool recalc=false,
81  bool redraw=false);
82 
90  void setPixmapDirect( const TQPixmap & pixmap,
91  bool recalc=false,
92  bool redraw=false);
93 
102  void invalidateThumb( int state, bool redraw = false );
103 
108  void invalidateThumbnail();
109  bool isThumbnailInvalid() const;
110 
111  bool hasValidThumbnail() const { return isThumbnail() && !isThumbnailInvalid(); }
112 
117  int state() const { return m_state; }
118 
122  int iconSize() const { return m_size; }
123 
127  void setDisabled( bool disabled );
128 
132  void setThumbnailPixmap( const TQPixmap & pixmap );
133 
138  void setEffect( /*int group,*/ int state );
139 
143  bool isThumbnail() const { return m_bThumbnail; }
144 
150  void setOverlay( const TQString & iconName);
151 
157  void setOverlayProgressBar( const int progress);
158 
163  virtual void refreshIcon( bool redraw );
164 
165  virtual void setKey( const TQString &key );
166 
171  virtual void paintItem( TQPainter *p, const TQColorGroup &cg );
172 
173  virtual bool move( int x, int y );
174 
180  void setMouseOverAnimation( const TQString& movieFileName );
181  TQString mouseOverAnimation() const;
182 
189  bool hasAnimation() const;
190 
192  bool isAnimated() const;
193  void setAnimated( bool );
194 
196  void setActive( bool active );
197 
202  KIVDirectoryOverlay* setShowDirectoryOverlay( bool );
203  bool showDirectoryOverlay( );
204 
209  KIVFreeSpaceOverlay* setShowFreeSpaceOverlay( bool );
210  bool showFreeSpaceOverlay( );
211 
212  virtual int compare( TQIconViewItem *i ) const;
213 
214  void mimeTypeAndIconDetermined();
215 
216  void rename();
217 
218 protected:
219  virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & );
220 
224  void paintOverlay( TQPainter *p ) const;
225 
229  void paintOverlayProgressBar( TQPainter *p ) const;
230 
234  TQColorGroup updateColors(const TQColorGroup &c) const;
235 
239  void paintFontUpdate( TQPainter *p ) const;
240 
242  void renameItem();
243  void cancelRenameItem();
244  void removeRenameBox();
245 
246  KFileIVILineEdit *m_renameBox;
247 
248 
249 private:
252  virtual void setPixmap ( const TQPixmap & icon ) { TDEIconViewItem::setPixmap( icon ); }
253  virtual void setPixmap ( const TQPixmap & icon, bool recalc, bool redraw = true )
254  { TDEIconViewItem::setPixmap( icon, recalc, redraw ); }
255 
257  void updatePixmapSize();
258 
259  int m_size, m_state;
260  bool m_bDisabled;
261  bool m_bThumbnail;
263  KFileItem* m_fileitem;
264  TQRect oldRect;
265 
270  struct Private;
271 
272  Private *d;
273 };
274 
275 #endif
KFileIVI
KFileIVI (short form of "Konq - File - IconViewItem") is, as expected, an improved TDEIconViewItem,...
Definition: tdefileivi.h:41
KFileIVI::state
int state() const
Return the current state of the icon (TDEIcon::DefaultState, TDEIcon::ActiveState etc....
Definition: tdefileivi.h:117
KFileIVI::isThumbnail
bool isThumbnail() const
Definition: tdefileivi.h:143
KFileIVI::item
KFileItem * item() const
Definition: tdefileivi.h:63
KFileIVI::iconSize
int iconSize() const
Return the theorical size of the icon.
Definition: tdefileivi.h:122
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.