diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-05-16 15:32:28 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2023-05-16 18:33:18 +0200 |
commit | b7c15f7f24c1f0afcea87b31d3b4e096149c9e7d (patch) | |
tree | e0d96c8eb2239df3d0ab1b7784b3a7dfbb94fb84 /tests/manual/examples/widgets/dialogs/classwizard/classwizard.h | |
parent | 11da92ba94570e5eec01597fe09f0a9a48acc677 (diff) |
Remove the "classwizard" example
It adds nothing new to what the trivial and license wizard examples
show, other than a bunch of somewhat messy and outdated code to generate
C++ code files based on the input.
The example is referenced in a few parts of the documentation, but there
are equivalent snippets in the trivial and license wizard examples, so
point at those instead, and add some relevant API usage where needed.
Pick-to: 6.5
Change-Id: If1ff57e775bad28920d9e019aeccae69d1f4d127
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'tests/manual/examples/widgets/dialogs/classwizard/classwizard.h')
-rw-r--r-- | tests/manual/examples/widgets/dialogs/classwizard/classwizard.h | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/tests/manual/examples/widgets/dialogs/classwizard/classwizard.h b/tests/manual/examples/widgets/dialogs/classwizard/classwizard.h new file mode 100644 index 0000000000..61f63b5035 --- /dev/null +++ b/tests/manual/examples/widgets/dialogs/classwizard/classwizard.h @@ -0,0 +1,119 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +#ifndef CLASSWIZARD_H +#define CLASSWIZARD_H + +#include <QWizard> + +QT_BEGIN_NAMESPACE +class QCheckBox; +class QGroupBox; +class QLabel; +class QLineEdit; +class QRadioButton; +QT_END_NAMESPACE + +//! [0] +class ClassWizard : public QWizard +{ + Q_OBJECT + +public: + ClassWizard(QWidget *parent = nullptr); + + void accept() override; +}; +//! [0] + +//! [1] +class IntroPage : public QWizardPage +{ + Q_OBJECT + +public: + IntroPage(QWidget *parent = nullptr); + +private: + QLabel *label; +}; +//! [1] + +//! [2] +class ClassInfoPage : public QWizardPage +{ + Q_OBJECT + +public: + ClassInfoPage(QWidget *parent = nullptr); + +private: + QLabel *classNameLabel; + QLabel *baseClassLabel; + QLineEdit *classNameLineEdit; + QLineEdit *baseClassLineEdit; + QCheckBox *qobjectMacroCheckBox; + QGroupBox *groupBox; + QRadioButton *qobjectCtorRadioButton; + QRadioButton *qwidgetCtorRadioButton; + QRadioButton *defaultCtorRadioButton; + QCheckBox *copyCtorCheckBox; +}; +//! [2] + +//! [3] +class CodeStylePage : public QWizardPage +{ + Q_OBJECT + +public: + CodeStylePage(QWidget *parent = nullptr); + +protected: + void initializePage() override; + +private: + QCheckBox *commentCheckBox; + QCheckBox *protectCheckBox; + QCheckBox *includeBaseCheckBox; + QLabel *macroNameLabel; + QLabel *baseIncludeLabel; + QLineEdit *macroNameLineEdit; + QLineEdit *baseIncludeLineEdit; +}; +//! [3] + +class OutputFilesPage : public QWizardPage +{ + Q_OBJECT + +public: + OutputFilesPage(QWidget *parent = nullptr); + +protected: + void initializePage() override; + +private: + QLabel *outputDirLabel; + QLabel *headerLabel; + QLabel *implementationLabel; + QLineEdit *outputDirLineEdit; + QLineEdit *headerLineEdit; + QLineEdit *implementationLineEdit; +}; + +class ConclusionPage : public QWizardPage +{ + Q_OBJECT + +public: + ConclusionPage(QWidget *parent = nullptr); + +protected: + void initializePage() override; + +private: + QLabel *label; +}; + +#endif |