20 #ifndef TDEFILEICONVIEW_H
21 #define TDEFILEICONVIEW_H
25 #include <kiconview.h>
26 #include <kiconloader.h>
27 #include <tdefileview.h>
28 #include <kmimetyperesolver.h>
43 const TQPixmap &pixmap,
45 : TDEIconViewItem( parent, text, pixmap ), inf( fi ) {}
50 : TDEIconViewItem( parent ), inf( fi ) {}
65 class KFileIconViewItemPrivate;
66 KFileIconViewItemPrivate *d;
90 virtual TQWidget *
widget() {
return this; }
91 virtual void clearView();
92 virtual void setAutoUpdate(
bool ) {}
94 virtual void updateView(
bool );
95 virtual void updateView(
const KFileItem*);
96 virtual void removeItem(
const KFileItem*);
98 virtual void listingCompleted();
100 virtual void insertItem( KFileItem *i );
101 virtual void setSelectionMode( KFile::SelectionMode sm );
103 virtual void setSelected(
const KFileItem *,
bool);
104 virtual bool isSelected(
const KFileItem *i)
const;
105 virtual void clearSelection();
106 virtual void selectAll();
107 virtual void invertSelection();
109 virtual void setCurrentItem(
const KFileItem * );
110 virtual KFileItem * currentFileItem()
const;
111 virtual KFileItem * firstFileItem()
const;
112 virtual KFileItem * nextItem(
const KFileItem * )
const;
113 virtual KFileItem * prevItem(
const KFileItem * )
const;
118 void setIconSize(
int size );
123 void setPreviewSize(
int size );
132 void setIgnoreMaximumSize(
bool ignoreSize=
true);
139 void ensureItemVisible(
const KFileItem * );
141 virtual void setSorting(TQDir::SortSpec sort);
143 virtual void readConfig( TDEConfig *,
const TQString& group = TQString::null );
144 virtual void writeConfig( TDEConfig *,
const TQString& group = TQString::null);
147 void mimeTypeDeterminationFinished();
149 TQScrollView *scrollWidget()
const {
return (TQScrollView*)
this; }
150 void setAcceptDrops(
bool b)
152 TDEIconView::setAcceptDrops(b);
153 viewport()->setAcceptDrops(b);
173 virtual void arrangeItemsInGrid(
bool updated =
true );
179 virtual void keyPressEvent( TQKeyEvent * );
184 virtual void hideEvent( TQHideEvent * );
187 virtual void showEvent( TQShowEvent * );
189 virtual bool eventFilter( TQObject *o, TQEvent *e );
192 virtual TQDragObject *dragObject();
193 virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
194 virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
195 virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
196 virtual void contentsDropEvent( TQDropEvent *ev );
199 bool acceptDrag(TQDropEvent* e )
const;
202 void selected( TQIconViewItem *item );
203 void slotActivate( TQIconViewItem * );
204 void highlighted( TQIconViewItem *item );
205 void showToolTip( TQIconViewItem *item );
206 void removeToolTip();
207 void slotActivateMenu( TQIconViewItem *,
const TQPoint& );
208 void slotSelectionChanged();
210 void slotSmallColumns();
211 void slotLargeRows();
212 void slotPreviewsToggled(
bool );
214 void slotPreviewResult( TDEIO::Job * );
215 void gotPreview(
const KFileItem *item,
const TQPixmap& pix );
225 void dropped(TQDropEvent *event, KFileItem *fileItem);
232 void dropped(TQDropEvent *event,
const KURL::List &urls,
const KURL &url);
235 KMimeTypeResolver<KFileIconViewItem,KFileIconView> *m_resolver;
241 virtual void insertItem(TQIconViewItem *a, TQIconViewItem *b) { TDEIconView::insertItem(a, b); }
242 virtual void setSelectionMode(TQIconView::SelectionMode m) { TDEIconView::setSelectionMode(m); }
243 virtual void setSelected(TQIconViewItem *i,
bool a,
bool b) { TDEIconView::setSelected(i, a, b); }
245 bool canPreview(
const KFileItem * )
const;
257 bool updateTextAndPixmap );
260 virtual void virtual_hook(
int id,
void* data );
262 class KFileIconViewPrivate;
263 KFileIconViewPrivate *d;
An item for the iconview, that has a reference to its corresponding KFileItem.
KFileItem * fileInfo() const
KFileIconViewItem(TQIconView *parent, KFileItem *fi)
An icon-view capable of showing KFileItem's.
void dropped(TQDropEvent *event, KFileItem *fileItem)
The user dropped something.
virtual TQWidget * widget()
a pure virtual function to get a TQWidget, that can be added to other widgets.
void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url)
The user dropped the URLs urls.
This class defines an interface to all file views.