20 #ifndef __konqdirpart_h
21 #define __konqdirpart_h
24 #include <tdeparts/part.h>
25 #include <tdeparts/browserextension.h>
26 #include <tdefileitem.h>
27 #include <kdatastream.h>
28 #include <tdeio/global.h>
29 #include <libkonq_export.h>
32 namespace KParts {
class BrowserExtension; }
36 class TDEToggleAction;
37 class KonqDirPartBrowserExtension;
39 class LIBKONQ_EXPORT KonqDirPart:
public KParts::ReadOnlyPart
43 friend class KonqDirPartBrowserExtension;
46 KonqDirPart( TQObject *parent,
const char *name );
48 virtual ~KonqDirPart();
53 void setBrowserExtension( KonqDirPartBrowserExtension * extension )
54 { m_extension = extension; }
56 KonqDirPartBrowserExtension * extension()
57 {
return m_extension; }
62 void setDirLister( KDirLister* lister );
65 TQScrollView * scrollWidget();
67 virtual void saveState( TQDataStream &stream );
68 virtual void restoreState( TQDataStream &stream );
73 void lmbClicked( KFileItem * fileItem );
77 void mmbClicked( KFileItem * fileItem );
79 void setNameFilter(
const TQString & nameFilter ) { m_nameFilter = nameFilter; }
81 TQString nameFilter()
const {
return m_nameFilter; }
83 void setFilesToSelect(
const TQStringList & filesToSelect ) { m_filesToSelect = filesToSelect; }
99 void setMimeFilter (
const TQStringList& filters);
105 TQStringList mimeFilter()
const;
113 virtual void disableIcons(
const KURL::List & lst ) = 0;
124 void newItems(
const KFileItemList & entries );
129 void deleteItem( KFileItem * fileItem );
134 void refreshItems(
const KFileItemList &entries);
139 void emitTotalCount();
150 void emitCounts(
const KFileItemList & lst,
bool selectionChanged );
159 void emitCounts(
const KFileItemList & lst );
161 void emitMouseOver(
const KFileItem * item );
168 void updatePasteAction();
175 virtual void newIconSize(
int size );
181 void setIconSize(
int size );
186 void setFindPart( KParts::ReadOnlyPart * part );
188 KParts::ReadOnlyPart * findPart()
const {
return m_findPart; }
190 virtual const KFileItem * currentItem() = 0;
192 virtual KFileItemList selectedFileItems() {
return KFileItemList(); }
205 void aboutToOpenURL();
211 void findOpen( KonqDirPart * );
217 void findOpened( KonqDirPart * );
222 void findClosed( KonqDirPart * );
228 void itemsAdded(
const KFileItemList &);
234 void itemRemoved(
const KFileItem *);
240 void itemsRefresh(
const KFileItemList &);
246 void itemsFilteredByMime(
const KFileItemList& );
254 bool openURL (
const KURL&);
261 void slotFindClosed();
266 void slotStartAnimationSearching();
271 void slotStopAnimationSearching();
273 void slotBackgroundSettings();
279 void slotClipboardDataChanged();
281 void slotIncIconSize();
282 void slotDecIconSize();
284 void slotIconSizeToggled(
bool );
287 virtual void slotStarted() = 0;
288 virtual void slotCanceled() = 0;
289 virtual void slotCompleted() = 0;
290 virtual void slotNewItems(
const KFileItemList& ) = 0;
291 virtual void slotDeleteItem( KFileItem * ) = 0;
292 virtual void slotRefreshItems(
const KFileItemList& ) = 0;
293 virtual void slotClear() = 0;
294 virtual void slotRedirection(
const KURL & ) = 0;
297 void slotIconChanged(
int group);
303 virtual bool doOpenURL(
const KURL& ) = 0;
304 virtual bool doCloseURL () = 0;
308 TQString m_nameFilter;
309 TQStringList m_filesToSelect;
313 TDEAction *m_paIncIconSize;
314 TDEAction *m_paDecIconSize;
315 TDEToggleAction *m_paDefaultIcons;
316 TDEToggleAction *m_paHugeIcons;
317 TDEToggleAction *m_paLargeIcons;
318 TDEToggleAction *m_paMediumIcons;
319 TDEToggleAction *m_paSmallIcons;
321 KParts::ReadOnlyPart * m_findPart;
322 KonqDirPartBrowserExtension * m_extension;
326 TDEIO::filesize_t m_lDirSize;
331 void saveFindState( TQDataStream& );
332 void restoreFindState( TQDataStream& );
334 void adjustIconSizes();
336 class KonqDirPartPrivate;
337 KonqDirPartPrivate* d;
340 class LIBKONQ_EXPORT KonqDirPartBrowserExtension :
public KParts::BrowserExtension
343 KonqDirPartBrowserExtension( KonqDirPart* dirPart )
344 : KParts::BrowserExtension( dirPart )
345 , m_dirPart( dirPart )
355 virtual void saveState( TQDataStream &stream );
356 virtual void restoreState( TQDataStream &stream );
359 KonqDirPart* m_dirPart;
The class KonqPropsView holds the properties for a Konqueror View.