File indexing completed on 2024-04-28 04:58:29
0001 /* 0002 This file is part of the KDE project. 0003 0004 SPDX-FileCopyrightText: 2020 Stefano Crocco <stefano.crocco@alice.it> 0005 0006 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0007 */ 0008 0009 #ifndef KONQBROWSERWINDOWINTERFACE_H 0010 #define KONQBROWSERWINDOWINTERFACE_H 0011 0012 #include "browserinterface.h" 0013 0014 class KonqMainWindow; 0015 0016 namespace KParts { 0017 class ReadOnlyPart; 0018 } 0019 0020 /** 0021 * Implementation of KParts::BrowserInterface which redirects calls to KonqMainWindow 0022 */ 0023 class KonqBrowserWindowInterface : public BrowserInterface 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 /** 0029 * Default constructor 0030 */ 0031 KonqBrowserWindowInterface(KonqMainWindow *mainWindow, KParts::ReadOnlyPart *part); 0032 ~KonqBrowserWindowInterface() override {} 0033 0034 public slots: 0035 void toggleCompleteFullScreen(bool on); 0036 0037 /** 0038 * @brief Whether the given part is the correct one to use to open a local file 0039 * 0040 * This use @c KPluginMetadata::pluginId() to compare parts. 0041 * 0042 * @param part the part to test 0043 * @param path the file path 0044 * @return @e true if @p part is the correct part to use and @e false otherwise 0045 */ 0046 bool isCorrectPartForLocalFile(KParts::ReadOnlyPart *part, const QString &path); 0047 0048 private: 0049 KonqMainWindow *m_mainWindow; 0050 KParts::ReadOnlyPart *m_part; 0051 0052 }; 0053 0054 #endif // KONQBROWSERWINDOWINTERFACE_H