21 #ifndef __KATE_FILESELECTOR_H__
22 #define __KATE_FILESELECTOR_H__
25 #include "katedocmanager.h"
26 #include <kate/document.h>
31 #include <tdetoolbar.h>
35 class KateViewManager;
36 class TDEActionCollection;
37 class TDEActionSelector;
49 class KateFileSelectorToolBar:
public TDEToolBar
53 KateFileSelectorToolBar(TQWidget *parent);
54 virtual ~KateFileSelectorToolBar();
56 virtual void setMovingEnabled(
bool b );
59 class KateFileSelectorToolBarParent:
public TQFrame
63 KateFileSelectorToolBarParent(TQWidget *parent);
64 ~KateFileSelectorToolBarParent();
65 void setToolBar(KateFileSelectorToolBar *tb);
67 KateFileSelectorToolBar *m_tb;
69 virtual void resizeEvent ( TQResizeEvent * );
72 class KateFileSelector :
public TQVBox
76 friend class KFSConfigPage;
80 enum AutoSyncEvent { DocumentChanged=1, GotVisible=2 };
82 KateFileSelector( KateMainWindow *mainWindow=0, KateViewManager *viewManager=0,
83 TQWidget * parent = 0,
const char * name = 0 );
86 void readConfig( TDEConfig *,
const TQString & );
87 void writeConfig( TDEConfig *,
const TQString & );
88 void setupToolbar( TDEConfig * );
89 void setView( KFile::FileView );
90 KDirOperator *dirOperator(){
return dir; }
91 TDEActionCollection *actionCollection() {
return mActionCollection; };
94 void slotFilterChange(
const TQString&);
96 void setDir(
const TQString& url ) { setDir( KURL( url ) ); };
97 void kateViewChanged();
98 void selectorViewChanged( KFileView * );
101 void cmbPathActivated(
const KURL& u );
102 void cmbPathReturnPressed(
const TQString& u );
103 void dirUrlEntered(
const KURL& u );
104 void dirFinishedLoading();
105 void setActiveDocumentDir();
106 void btnFilterClick();
109 void focusInEvent( TQFocusEvent * );
110 void showEvent( TQShowEvent * );
111 bool eventFilter( TQObject *, TQEvent * );
112 void initialDirChangeHack();
115 class KateFileSelectorToolBar *toolbar;
116 TDEActionCollection *mActionCollection;
117 class KBookmarkHandler *bookmarkHandler;
118 KURLComboBox *cmbPath;
120 class TDEAction *acSyncDir;
121 KHistoryCombo * filter;
122 class TQToolButton *btnFilter;
124 KateMainWindow *mainwin;
125 KateViewManager *viewmanager;
146 class KFSConfigPage :
public Kate::ConfigPage {
149 KFSConfigPage( TQWidget* parent=0,
const char *name=0, KateFileSelector *kfs=0);
150 virtual ~KFSConfigPage() {};
152 virtual void apply();
153 virtual void reload();
156 void slotMyChanged();
161 KateFileSelector *fileSelector;
162 TDEActionSelector *acSel;
163 class TQSpinBox *sbPathHistLength, *sbFilterHistLength;
164 class TQCheckBox *cbSyncActive, *cbSyncShow;
165 class TQCheckBox *cbSesLocation, *cbSesFilter;