File indexing completed on 2024-03-24 05:01:35
0001 /* 0002 SPDX-FileCopyrightText: 2008 Urs Wolfer <uwolfer@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef TESTVIEW_H 0008 #define TESTVIEW_H 0009 0010 #include "hostpreferences.h" 0011 #include "remoteview.h" 0012 0013 #include <KConfigGroup> 0014 0015 class TestHostPreferences; 0016 0017 class TestView : public RemoteView 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 explicit TestView(QWidget *parent = nullptr, const QUrl &url = QUrl(), KConfigGroup configGroup = KConfigGroup()); 0023 0024 ~TestView() override; 0025 0026 QSize framebufferSize() override; 0027 QSize sizeHint() const override; 0028 0029 bool isQuitting() override; 0030 bool start() override; 0031 HostPreferences *hostPreferences() override; 0032 0033 public Q_SLOTS: 0034 void switchFullscreen(bool on) override; 0035 0036 protected: 0037 bool eventFilter(QObject *obj, QEvent *event) override; 0038 0039 private: 0040 TestHostPreferences *m_hostPreferences; 0041 0042 private Q_SLOTS: 0043 void asyncConnect(); 0044 }; 0045 0046 class TestHostPreferences : public HostPreferences 0047 { 0048 Q_OBJECT 0049 public: 0050 explicit TestHostPreferences(KConfigGroup configGroup, QObject *parent = nullptr) 0051 : HostPreferences(configGroup, parent) 0052 { 0053 } 0054 0055 protected: 0056 QWidget *createProtocolSpecificConfigPage() override 0057 { 0058 return nullptr; 0059 }; 0060 }; 0061 0062 #endif // TESTVIEW_H