21 #ifndef TDEFILEDETAILVIEW_H 22 #define TDEFILEDETAILVIEW_H 28 #include <tdelistview.h> 29 #include <kmimetyperesolver.h> 31 #include "tdefileview.h" 41 const TQPixmap &icon, KFileItem *fi )
42 : TDEListViewItem( parent, text ), inf( fi ) {
51 : TDEListViewItem( parent ), inf( fi ) {
56 const TQPixmap &icon, KFileItem *fi,
57 TQListViewItem *after)
58 : TDEListViewItem( parent, after ), inf( fi ) {
63 inf->removeExtraData( listView() );
73 virtual TQString key(
int ,
bool )
const {
77 void setKey(
const TQString& key ) { m_key = key; }
81 TQRect r = listView()->itemRect(
this);
82 return TQRect( listView()->viewportToContents( r.topLeft() ),
83 TQSize( r.width(), r.height() ) );
96 class KFileListViewItemPrivate;
97 KFileListViewItemPrivate *d;
117 virtual TQWidget *
widget() {
return this; }
119 virtual void setAutoUpdate(
bool ) {}
121 virtual void setSelectionMode( KFile::SelectionMode sm );
129 virtual bool isSelected(
const KFileItem *i)
const;
136 virtual KFileItem * firstFileItem()
const;
137 virtual KFileItem * nextItem(
const KFileItem * )
const;
138 virtual KFileItem * prevItem(
const KFileItem * )
const;
148 void mimeTypeDeterminationFinished();
150 TQScrollView *scrollWidget()
const {
return (TQScrollView*)
this; }
152 virtual void readConfig( TDEConfig *,
const TQString& group = TQString::null );
153 virtual void writeConfig( TDEConfig *,
const TQString& group = TQString::null);
162 void dropped(TQDropEvent *event, KFileItem *fileItem);
169 void dropped(TQDropEvent *event,
const KURL::List &urls,
const KURL &url);
172 virtual void keyPressEvent( TQKeyEvent * );
175 virtual TQDragObject *dragObject();
176 virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
177 virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
178 virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
179 virtual void contentsDropEvent( TQDropEvent *ev );
180 virtual bool acceptDrag(TQDropEvent* e )
const;
185 void slotSelectionChanged();
188 void slotSortingChanged(
int );
189 void selected( TQListViewItem *item );
190 void slotActivate( TQListViewItem *item );
191 void highlighted( TQListViewItem *item );
192 void slotActivateMenu ( TQListViewItem *item,
const TQPoint& pos );
196 virtual void insertItem(TQListViewItem *i) { TDEListView::insertItem(i); }
197 virtual void setSorting(
int i,
bool b) { TDEListView::setSorting(i, b); }
198 virtual void setSelected(TQListViewItem *i,
bool b) { TDEListView::setSelected(i, b); }
209 bool m_blockSortingSignal;
210 KMimeTypeResolver<KFileListViewItem,KFileDetailView> *m_resolver;
213 virtual void virtual_hook(
int id,
void* data );
215 class KFileDetailViewPrivate;
216 KFileDetailViewPrivate *d;
219 #endif // TDEFILEDETAILVIEW_H void setCurrentItem(const TQString &filename)
Sets filename the current item in the view, if available.
virtual TQWidget * widget()
a pure virtual function to get a TQWidget, that can be added to other widgets.
virtual void insertItem(KFileItem *i)
The derived view must implement this function to add the file in the widget.
This class defines an interface to all file views.
KFileItem * fileInfo() const
virtual void clearSelection()=0
Clears any selection, unhighlights everything.
virtual void selectAll()
Selects all items.
virtual KFileItem * currentFileItem() const =0
virtual void setSelected(const KFileItem *, bool enable)=0
Tells the view that it should highlight the item.
KFileListViewItem(TQListView *parent, KFileItem *fi)
virtual bool isSelected(const KFileItem *) const =0
virtual void removeItem(const KFileItem *item)
Removes an item from the list; has to be implemented by the view.
virtual void invertSelection()
Inverts the current selection, i.e.
virtual void setSorting(TQDir::SortSpec sort)
Sets the sorting order of the view.
virtual void updateView(bool f=true)
does a repaint of the view.
virtual void ensureItemVisible(const KFileItem *i)=0
pure virtual function, that should be implemented to make item i visible, i.e.
virtual void clearView()=0
pure virtual function, that should be implemented to clear the view.
An item for the listiew, that has a reference to its corresponding KFileItem.
virtual void listingCompleted()
This hook is called when all items of the currently listed directory are listed and inserted into the...
A list-view capable of showing KFileItem'.