File indexing completed on 2024-04-28 08:51:01

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 "remoteview.h"
0011 #include "hostpreferences.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 
0047 class TestHostPreferences : public HostPreferences
0048 {
0049     Q_OBJECT
0050 public:
0051     explicit TestHostPreferences(KConfigGroup configGroup, QObject *parent = nullptr)
0052         : HostPreferences(configGroup, parent) {}
0053 
0054 protected:
0055     QWidget* createProtocolSpecificConfigPage() override { return nullptr; };
0056 };
0057 
0058 #endif // TESTVIEW_H