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, 2011 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_FILESYSTEMBROWSERTOOL_HPP 0010 #define KASTEN_FILESYSTEMBROWSERTOOL_HPP 0011 0012 // Kasten core 0013 #include <Kasten/AbstractTool> 0014 0015 class QUrl; 0016 0017 namespace Kasten { 0018 0019 class DocumentSyncManager; 0020 class AbstractDocument; 0021 0022 class FileSystemBrowserTool : public AbstractTool 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit FileSystemBrowserTool(DocumentSyncManager* documentSyncManager); 0028 ~FileSystemBrowserTool() override; 0029 0030 public: 0031 void open(const QUrl& url); 0032 0033 public: 0034 QUrl currentUrl() const; 0035 bool hasCurrentUrl() const; 0036 0037 public: // AbstractTool API 0038 // virtual AbstractModel* targetModel() const; 0039 QString title() const override; 0040 0041 void setTargetModel(AbstractModel* model) override; 0042 0043 Q_SIGNALS: 0044 void hasCurrentUrlChanged(bool hasCurrentUrl); 0045 0046 private: // sources 0047 DocumentSyncManager* mDocumentSyncManager; 0048 0049 AbstractDocument* mDocument = nullptr; 0050 }; 0051 0052 } 0053 0054 #endif