Extending Qt Creator Manual | CustomProjectWizard

Extending Qt Creator Manual 4.4.0

# CustomProjectWizard Class

(ProjectExplorer::CustomProjectWizard)

The CustomProjectWizard class provides a custom project wizard. More...

Header: | #include <CustomProjectWizard>
Inherits: | ProjectExplorer::CustomWizard

- List of all members, including inherited members

## Public Functions

| CustomProjectWizard()

- 2 public functions inherited from ProjectExplorer::CustomWizard
- 28 public functions inherited from Core::IWizardFactory

## Signals

void | projectLocationChanged(const QString &path)

## Static Public Members

bool | postGenerateOpen(const Core::GeneratedFiles &l, QString *errorMessage = nullptr)

- 3 static public members inherited from ProjectExplorer::CustomWizard
- 1 static public member inherited from Core::BaseFileWizardFactory
- 8 static public members inherited from Core::IWizardFactory

## Protected Functions

Core::BaseFileWizard * | create(QWidget *parent, const Core::WizardDialogParameters &parameters) const override
void | initProjectWizardDialog(BaseProjectWizardDialog *w, const QString &defaultPath, const QList<QWizardPage *> &extensionPages) const
bool | postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage) const override

## Reimplemented Protected Functions

virtual Core::GeneratedFiles | generateFiles(const QWizard *w, QString *errorMessage) const override

- 5 protected functions inherited from ProjectExplorer::CustomWizard
- 5 protected functions inherited from Core::BaseFileWizardFactory
- 3 protected functions inherited from Core::IWizardFactory

### Additional Inherited Members

- 1 static protected member inherited from ProjectExplorer::CustomWizard
- 2 static protected members inherited from Core::BaseFileWizardFactory

## Detailed Description

The CustomProjectWizard class provides a custom project wizard.

Presents a CustomProjectWizardDialog (Project intro page and fields page) for wizards of type "project". Overwrites postGenerateFiles() to open the project files according to the file attributes. Also inserts `'%ProjectName%'` into the base replacement map once the intro page is left to have it available for QLineEdit-type fields' default text.

## Member Function Documentation

### CustomProjectWizard::CustomProjectWizard()

Default constructs an instance of CustomProjectWizard.

### `[protected]` Core::BaseFileWizard *CustomProjectWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const

Can be reimplemented to create custom project wizards.

initProjectWizardDialog() needs to be called.

### `[override virtual protected]` Core::GeneratedFiles CustomProjectWizard::generateFiles(const QWizard *w, QString *errorMessage) const

### `[protected]` void CustomProjectWizard::initProjectWizardDialog(BaseProjectWizardDialog *w, const QString &defaultPath, const QList<QWizardPage *> &extensionPages) const

### `[protected]` bool CustomProjectWizard::postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage) const

### `[static]` bool CustomProjectWizard::postGenerateOpen(const Core::GeneratedFiles &l, QString *errorMessage = nullptr)

Opens the projects and editors for the files that have the respective attributes set.

### `[signal]` void CustomProjectWizard::projectLocationChanged(const QString &path)