File indexing completed on 2024-04-28 16:26:31

0001 /********************************************************************************************
0002     begin                : Wed Aug 14 2002
0003     copyright            : (C) 2002 - 2003 by Pascal Brachet
0004                                2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)
0005                                2007, 2008 by Michel Ludwig (michel.ludwig@kdemail.net)
0006 
0007 from Kate (C) 2001 by Matt Newell
0008 
0009  ********************************************************************************************/
0010 
0011 /***************************************************************************
0012  *                                                                         *
0013  *   This program is free software; you can redistribute it and/or modify  *
0014  *   it under the terms of the GNU General Public License as published by  *
0015  *   the Free Software Foundation; either version 2 of the License, or     *
0016  *   (at your option) any later version.                                   *
0017  *                                                                         *
0018  ***************************************************************************/
0019 
0020 #ifndef FILEBROWSERWIDGET_H
0021 #define FILEBROWSERWIDGET_H
0022 
0023 #include <KFile>
0024 #include <KDirOperator>
0025 #include <KUrlNavigator>
0026 #include <QUrl>
0027 #include <KConfig>
0028 #include <KConfigGroup>
0029 
0030 #include "kileextensions.h"
0031 
0032 class KFileItem;
0033 class KToolBar;
0034 
0035 namespace KileWidget {
0036 
0037 class FileBrowserWidget : public QWidget
0038 {
0039     Q_OBJECT
0040 
0041 public:
0042     FileBrowserWidget(KileDocument::Extensions *extensions, QWidget *parent);
0043     ~FileBrowserWidget();
0044 
0045     QUrl currentUrl() const;
0046 
0047 public Q_SLOTS:
0048     void setDir(const QUrl &url);
0049     void writeConfig();
0050 
0051 private Q_SLOTS:
0052     void toggleShowLaTeXFilesOnly(bool filter);
0053     void dirUrlEntered(const QUrl &u);
0054     void emitFileSelectedSignal();
0055 
0056 protected:
0057     void setupToolbar();
0058     void readConfig();
0059 
0060 Q_SIGNALS:
0061     void fileSelected(const KFileItem& fileItem);
0062 
0063 private:
0064     KToolBar    *m_toolbar;
0065     KUrlNavigator   *m_urlNavigator;
0066     KDirOperator    *m_dirOperator;
0067     KConfig     *m_config;
0068     KConfigGroup    m_configGroup;
0069     KileDocument::Extensions *m_extensions;
0070 };
0071 
0072 }
0073 
0074 #endif