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

libkonq

  • libkonq
kfileivi.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 __kfileivi_h__
21 #define __kfileivi_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 
38 class LIBKONQ_EXPORT KFileIVI : public KIconViewItem
39 {
40 public:
47  KFileIVI( KonqIconViewWidget *iconview, KFileItem* fileitem, int size );
48  virtual ~KFileIVI();
49 
54  virtual void returnPressed();
55 
59  KFileItem * item() const { return m_fileitem; }
60 
65  virtual bool acceptDrop( const TQMimeSource *mime ) const;
66 
74  virtual void setIcon( int size,
75  int state=KIcon::DefaultState,
76  bool recalc=false,
77  bool redraw=false);
78 
86  void setPixmapDirect( const TQPixmap & pixmap,
87  bool recalc=false,
88  bool redraw=false);
89 
98  void invalidateThumb( int state, bool redraw = false );
99 
104  void invalidateThumbnail();
105  bool isThumbnailInvalid() const;
106 
107  bool hasValidThumbnail() const { return isThumbnail() && !isThumbnailInvalid(); }
108 
113  int state() const { return m_state; }
114 
118  int iconSize() const { return m_size; }
119 
123  void setDisabled( bool disabled );
124 
128  void setThumbnailPixmap( const TQPixmap & pixmap );
129 
134  void setEffect( /*int group,*/ int state );
135 
139  bool isThumbnail() const { return m_bThumbnail; }
140 
146  void setOverlay( const TQString & iconName);
147 
152  virtual void refreshIcon( bool redraw );
153 
154  virtual void setKey( const TQString &key );
155 
160  virtual void paintItem( TQPainter *p, const TQColorGroup &cg );
161 
162  virtual bool move( int x, int y );
163 
169  void setMouseOverAnimation( const TQString& movieFileName );
170  TQString mouseOverAnimation() const;
171 
178  bool hasAnimation() const;
179 
181  bool isAnimated() const;
182  void setAnimated( bool );
183 
185  void setActive( bool active );
186 
191  KIVDirectoryOverlay* setShowDirectoryOverlay( bool );
192  bool showDirectoryOverlay( );
193 
194  virtual int compare( TQIconViewItem *i ) const;
195 
196 protected:
197  virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & );
198 
202  void paintOverlay( TQPainter *p ) const;
203 
207  TQColorGroup updateColors(const TQColorGroup &c) const;
208 
212  void paintFontUpdate( TQPainter *p ) const;
213 
214 private:
217  virtual void setPixmap ( const TQPixmap & icon ) { KIconViewItem::setPixmap( icon ); }
218  virtual void setPixmap ( const TQPixmap & icon, bool recalc, bool redraw = TRUE )
219  { KIconViewItem::setPixmap( icon, recalc, redraw ); }
220 
222  void updatePixmapSize();
223 
224  int m_size, m_state;
225  bool m_bDisabled;
226  bool m_bThumbnail;
228  KFileItem* m_fileitem;
229 
234  struct Private;
235 
236  Private *d;
237 };
238 
239 #endif

libkonq

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

libkonq

Skip menu "libkonq"
  • kate
  • kwin
  •   lib
  • libkonq
Generated for libkonq by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |