| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause |
| 3 |
|
| 4 |
#ifndef WIDGET_H |
| 5 |
#define WIDGET_H |
| 6 |
|
| 7 |
#include <QWidget> |
| 8 |
|
| 9 |
QT_FORWARD_DECLARE_CLASS(QComboBox) |
| 10 |
QT_FORWARD_DECLARE_CLASS(QTextEdit) |
| 11 |
QT_FORWARD_DECLARE_CLASS(QVBoxLayout) |
| 12 |
QT_FORWARD_DECLARE_CLASS(QSurfaceFormat) |
| 13 |
QT_FORWARD_DECLARE_CLASS(QSurface) |
| 14 |
|
| 15 |
class Widget : public QWidget |
| 16 |
{ |
| 17 |
Q_OBJECT |
| 18 |
|
| 19 |
public: |
| 20 |
explicit Widget(QWidget *parent = nullptr); |
| 21 |
|
| 22 |
private slots: |
| 23 |
void start(); |
| 24 |
void renderWindowReady(); |
| 25 |
void renderWindowError(const QString &msg); |
| 26 |
|
| 27 |
private: |
| 28 |
void addVersions(QLayout *layout); |
| 29 |
void addProfiles(QLayout *layout); |
| 30 |
void addOptions(QLayout *layout); |
| 31 |
void addRenderableTypes(QLayout *layout); |
| 32 |
void addRenderWindow(); |
| 33 |
void printFormat(const QSurfaceFormat &format); |
| 34 |
|
| 35 |
QComboBox *m_version; |
| 36 |
QLayout *m_profiles; |
| 37 |
QLayout *m_options; |
| 38 |
QLayout *m_renderables; |
| 39 |
QTextEdit *m_output; |
| 40 |
QTextEdit *m_extensions; |
| 41 |
QVBoxLayout *m_renderWindowLayout; |
| 42 |
QWidget *m_renderWindowContainer; |
| 43 |
QSurface *m_surface; |
| 44 |
}; |
| 45 |
|
| 46 |
#endif // WIDGET_H |