1 /******************************************************************************************** 2 begin : Wed Aug 14 2002 3 copyright : (C) 2002 - 2003 by Pascal Brachet 4 2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net) 5 2007, 2008 by Michel Ludwig (michel.ludwig@kdemail.net) 6 7 from Kate (C) 2001 by Matt Newell 8 9 ********************************************************************************************/ 10 11 /*************************************************************************** 12 * * 13 * This program is free software; you can redistribute it and/or modify * 14 * it under the terms of the GNU General Public License as published by * 15 * the Free Software Foundation; either version 2 of the License, or * 16 * (at your option) any later version. * 17 * * 18 ***************************************************************************/ 19 20 #ifndef FILEBROWSERWIDGET_H 21 #define FILEBROWSERWIDGET_H 22 23 #include <KFile> 24 #include <KDirOperator> 25 #include <KUrlNavigator> 26 #include <QUrl> 27 #include <KConfig> 28 #include <KConfigGroup> 29 30 #include "kileextensions.h" 31 32 class KFileItem; 33 class KToolBar; 34 35 namespace KileWidget { 36 37 class FileBrowserWidget : public QWidget 38 { 39 Q_OBJECT 40 41 public: 42 FileBrowserWidget(KileDocument::Extensions *extensions, QWidget *parent); 43 ~FileBrowserWidget(); 44 45 QUrl currentUrl() const; 46 47 public Q_SLOTS: 48 void setDir(const QUrl &url); 49 void writeConfig(); 50 51 private Q_SLOTS: 52 void toggleShowLaTeXFilesOnly(bool filter); 53 void dirUrlEntered(const QUrl &u); 54 void emitFileSelectedSignal(); 55 56 protected: 57 void setupToolbar(); 58 void readConfig(); 59 60 Q_SIGNALS: 61 void fileSelected(const KFileItem& fileItem); 62 63 private: 64 KToolBar *m_toolbar; 65 KUrlNavigator *m_urlNavigator; 66 KDirOperator *m_dirOperator; 67 KConfig *m_config; 68 KConfigGroup m_configGroup; 69 KileDocument::Extensions *m_extensions; 70 }; 71 72 } 73 74 #endif 75