File indexing completed on 2024-05-05 16:45:35
0001 /* 0002 SPDX-FileCopyrightText: 2006 Alexander Dymo <adymo@kdevelop.org> 0003 SPDX-FileCopyrightText: 2006 Andreas Pakulat <apaku@gmx.de> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef KDEVPLATFORM_PLUGIN_FILEMANAGER_H 0009 #define KDEVPLATFORM_PLUGIN_FILEMANAGER_H 0010 0011 #include <QWidget> 0012 0013 #include <KFileItem> 0014 #include <KDirOperator> 0015 #include <KUrlNavigator> 0016 0017 class KActionCollection; 0018 class QAction; 0019 class QString; 0020 class QMenu; 0021 class KDevFileManagerPlugin; 0022 class BookmarkHandler; 0023 0024 class FileManager: public QWidget { 0025 Q_OBJECT 0026 public: 0027 FileManager(KDevFileManagerPlugin *plugin, QWidget* parent); 0028 ~FileManager() override; 0029 0030 QList<QAction*> toolBarActions() const; 0031 KActionCollection* actionCollection() const; 0032 KDirOperator* dirOperator() const; 0033 KDevFileManagerPlugin* plugin() const; 0034 0035 private Q_SLOTS: 0036 void fileCreated(KJob *job); 0037 void openFile(const KFileItem&); 0038 void gotoUrl(const QUrl&); 0039 void updateNav( const QUrl& url ); 0040 void syncCurrentDocumentDirectory(); 0041 void fillContextMenu(const KFileItem& item, QMenu* menu); 0042 void createNewFile(); 0043 0044 private: 0045 void setupActions(); 0046 QList<QAction*> tbActions; 0047 QAction* newFileAction; 0048 QList<QAction*> contextActions; 0049 KDirOperator* dirop; 0050 KUrlNavigator* urlnav; 0051 BookmarkHandler *m_bookmarkHandler; 0052 KActionCollection *m_actionCollection; 0053 KDevFileManagerPlugin *m_plugin; 0054 }; 0055 0056 #endif