qt5base-lts/examples/opengl/hellogl2/window.h
Friedemann Kleint 62eaaeb4f5 hellogl2 example: Decouple mainwindow from window
The circular dependency cannot be ported to the corresponding Python
example.

Task-number: PYSIDE-2206
Pick-to: 6.6 6.5
Change-Id: I031b3fffdd7bd677d2fc55e132975a65f66ad128
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-09-18 22:45:36 +02:00

40 lines
630 B
C++

// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef WINDOW_H
#define WINDOW_H
#include <QWidget>
QT_FORWARD_DECLARE_CLASS(QSlider)
QT_FORWARD_DECLARE_CLASS(QPushButton)
class GLWidget;
class Window : public QWidget
{
Q_OBJECT
public:
Window();
protected:
void keyPressEvent(QKeyEvent *event) override;
private slots:
void dockUndock();
private:
void dock();
void undock();
QSlider *createSlider();
GLWidget *glWidget;
QSlider *xSlider;
QSlider *ySlider;
QSlider *zSlider;
QPushButton *dockBtn;
};
#endif