20 #ifndef TDEFILEDETAILVIEW_H
21 #define TDEFILEDETAILVIEW_H
27 #include <tdelistview.h>
28 #include <kmimetyperesolver.h>
30 #include "tdefileview.h"
40 const TQPixmap &icon, KFileItem *fi )
41 : TDEListViewItem( parent, text ), inf( fi ) {
50 : TDEListViewItem( parent ), inf( fi ) {
55 const TQPixmap &icon, KFileItem *fi,
56 TQListViewItem *after)
57 : TDEListViewItem( parent, after ), inf( fi ) {
62 inf->removeExtraData( listView() );
72 virtual TQString key(
int ,
bool )
const {
76 void setKey(
const TQString& key ) { m_key = key; }
80 TQRect r = listView()->itemRect(
this);
81 return TQRect( listView()->viewportToContents( r.topLeft() ),
82 TQSize( r.width(), r.height() ) );
95 class KFileListViewItemPrivate;
96 KFileListViewItemPrivate *d;
116 virtual TQWidget *
widget() {
return this; }
117 virtual void clearView();
118 virtual void setAutoUpdate(
bool ) {}
120 virtual void setSelectionMode( KFile::SelectionMode sm );
122 virtual void updateView(
bool );
123 virtual void updateView(
const KFileItem*);
124 virtual void removeItem(
const KFileItem *);
125 virtual void listingCompleted();
127 virtual void setSelected(
const KFileItem *,
bool);
128 virtual bool isSelected(
const KFileItem *i)
const;
129 virtual void clearSelection();
130 virtual void selectAll();
131 virtual void invertSelection();
133 virtual void setCurrentItem(
const KFileItem * );
134 virtual KFileItem * currentFileItem()
const;
135 virtual KFileItem * firstFileItem()
const;
136 virtual KFileItem * nextItem(
const KFileItem * )
const;
137 virtual KFileItem * prevItem(
const KFileItem * )
const;
139 virtual void insertItem( KFileItem *i );
142 virtual void setSorting( TQDir::SortSpec );
144 void ensureItemVisible(
const KFileItem * );
147 void mimeTypeDeterminationFinished();
149 TQScrollView *scrollWidget()
const {
return (TQScrollView*)
this; }
151 virtual void readConfig( TDEConfig *,
const TQString& group = TQString::null );
152 virtual void writeConfig( TDEConfig *,
const TQString& group = TQString::null);
161 void dropped(TQDropEvent *event, KFileItem *fileItem);
168 void dropped(TQDropEvent *event,
const KURL::List &urls,
const KURL &url);
171 virtual void keyPressEvent( TQKeyEvent * );
174 virtual TQDragObject *dragObject();
175 virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
176 virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
177 virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
178 virtual void contentsDropEvent( TQDropEvent *ev );
179 virtual bool acceptDrag(TQDropEvent* e )
const;
184 void slotSelectionChanged();
187 void slotSortingChanged(
int );
188 void selected( TQListViewItem *item );
189 void slotActivate( TQListViewItem *item );
190 void highlighted( TQListViewItem *item );
191 void slotActivateMenu ( TQListViewItem *item,
const TQPoint& pos );
195 virtual void insertItem(TQListViewItem *i) { TDEListView::insertItem(i); }
196 virtual void setSorting(
int i,
bool b) { TDEListView::setSorting(i, b); }
197 virtual void setSelected(TQListViewItem *i,
bool b) { TDEListView::setSelected(i, b); }
208 bool m_blockSortingSignal;
209 KMimeTypeResolver<KFileListViewItem,KFileDetailView> *m_resolver;
212 virtual void virtual_hook(
int id,
void* data );
214 class KFileDetailViewPrivate;
215 KFileDetailViewPrivate *d;
A list-view capable of showing KFileItem'.
void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url)
The user dropped the URLs urls.
virtual TQWidget * widget()
a pure virtual function to get a TQWidget, that can be added to other widgets.
void dropped(TQDropEvent *event, KFileItem *fileItem)
The user dropped something.
An item for the listiew, that has a reference to its corresponding KFileItem.
KFileItem * fileInfo() const
KFileListViewItem(TQListView *parent, KFileItem *fi)
This class defines an interface to all file views.