blob: f4c43e7b4f605959ceab5900918e83f181c2b233 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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
|