File indexing completed on 2025-01-26 05:24:14

0001 /*
0002     This file is part of the Kasten Framework, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2009 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef KASTEN_FILESYSTEMBROWSERVIEW_HPP
0010 #define KASTEN_FILESYSTEMBROWSERVIEW_HPP
0011 
0012 // Qt
0013 #include <QWidget>
0014 
0015 class KDirOperator;
0016 class KUrlNavigator;
0017 class QUrl;
0018 class KFileItem;
0019 class KActionCollection;
0020 class KToolBar;
0021 
0022 namespace Kasten {
0023 
0024 class FileSystemBrowserTool;
0025 
0026 class FileSystemBrowserView : public QWidget
0027 {
0028     Q_OBJECT
0029 
0030 public:
0031     explicit FileSystemBrowserView(FileSystemBrowserTool* tool, QWidget* parent = nullptr);
0032     ~FileSystemBrowserView() override;
0033 
0034 public:
0035     FileSystemBrowserTool* tool() const;
0036 
0037 private Q_SLOTS:
0038     void init();
0039 
0040     void setDirOperatorUrl(const QUrl& url);
0041     void setNavigatorUrl(const QUrl& url);
0042     void syncCurrentDocumentDirectory();
0043     void openFile(const KFileItem& fileItem);
0044 
0045 private:
0046     FileSystemBrowserTool* const mTool;
0047 
0048     KActionCollection* mActionCollection;
0049     KToolBar* mToolbar;
0050     KDirOperator* mDirOperator;
0051     KUrlNavigator* mUrlNavigator;
0052 };
0053 
0054 inline FileSystemBrowserTool* FileSystemBrowserView::tool() const { return mTool; }
0055 
0056 }
0057 
0058 #endif