05fc3aef53
Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
120 lines
2.0 KiB
C++
120 lines
2.0 KiB
C++
// 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
|