diff options
Diffstat (limited to 'tests/manual/examples/widgets/widgets/styles/widgetgallery.h')
-rw-r--r-- | tests/manual/examples/widgets/widgets/styles/widgetgallery.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/tests/manual/examples/widgets/widgets/styles/widgetgallery.h b/tests/manual/examples/widgets/widgets/styles/widgetgallery.h new file mode 100644 index 0000000000..f4c43e7b4f --- /dev/null +++ b/tests/manual/examples/widgets/widgets/styles/widgetgallery.h @@ -0,0 +1,86 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +#ifndef WIDGETGALLERY_H +#define WIDGETGALLERY_H + +#include <QDialog> + +QT_BEGIN_NAMESPACE +class QCheckBox; +class QComboBox; +class QDateTimeEdit; +class QDial; +class QGroupBox; +class QLabel; +class QLineEdit; +class QProgressBar; +class QPushButton; +class QRadioButton; +class QScrollBar; +class QSlider; +class QSpinBox; +class QTabWidget; +class QTableWidget; +class QTextEdit; +QT_END_NAMESPACE + +//! [0] +class WidgetGallery : public QDialog +{ + Q_OBJECT + +public: + WidgetGallery(QWidget *parent = nullptr); + +protected: + void changeEvent(QEvent *) override; + +private slots: + void changeStyle(const QString &styleName); + void styleChanged(); + void changePalette(); + void advanceProgressBar(); + +private: + void createTopLeftGroupBox(); + void createTopRightGroupBox(); + void createBottomLeftTabWidget(); + void createBottomRightGroupBox(); + void createProgressBar(); + + QLabel *styleLabel; + QComboBox *styleComboBox; + QCheckBox *useStylePaletteCheckBox; + QCheckBox *disableWidgetsCheckBox; +//! [0] + + QGroupBox *topLeftGroupBox; + QRadioButton *radioButton1; + QRadioButton *radioButton2; + QRadioButton *radioButton3; + QCheckBox *checkBox; + + QGroupBox *topRightGroupBox; + QPushButton *defaultPushButton; + QPushButton *togglePushButton; + QPushButton *flatPushButton; + + QTabWidget *bottomLeftTabWidget; + QTableWidget *tableWidget; + QTextEdit *textEdit; + + QGroupBox *bottomRightGroupBox; + QLineEdit *lineEdit; + QSpinBox *spinBox; + QDateTimeEdit *dateTimeEdit; + QSlider *slider; + QScrollBar *scrollBar; + QDial *dial; + + QProgressBar *progressBar; +//! [1] +}; +//! [1] + +#endif |