Extending Qt Creator Manual | CustomWizard

Extending Qt Creator Manual 4.6.2

# CustomWizard Class

(ProjectExplorer::CustomWizard)

The CustomWizard class is a base class for custom wizards based on file templates and an XML configuration file (`share/qtcreator/templates/wizards`). More...

Header: | #include <CustomWizard>
Inherits: | Core::BaseFileWizardFactory
Inherited By: | ProjectExplorer::CustomProjectWizard

- List of all members, including inherited members

## Public Types

typedef | FieldReplacementMap

## Public Functions

| CustomWizard()
| ~CustomWizard() override
Core::BaseFileWizard * | create(QWidget *parent, const Core::WizardDialogParameters &parameters) const override

## Reimplemented Public Functions

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

- 28 public functions inherited from Core::IWizardFactory

## Static Public Members

QList<IWizardFactory *> | createWizards()
void | setVerbose(int)
int | verbose()

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

## Protected Types

typedef | CustomWizardContextPtr
typedef | CustomWizardParametersPtr

## Protected Functions

CustomWizardContextPtr | context() const
Core::GeneratedFiles | generateWizardFiles(QString *errorMessage) const
CustomWizardParametersPtr | parameters() const
FieldReplacementMap | replacementMap(const QWizard *w) const
bool | writeFiles(const Core::GeneratedFiles &files, QString *errorMessage) const override

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

## Static Protected Members

CustomWizard * | createWizard(const CustomWizardParametersPtr &p)

- 2 static protected members inherited from Core::BaseFileWizardFactory

## Detailed Description

The CustomWizard class is a base class for custom wizards based on file templates and an XML configuration file (`share/qtcreator/templates/wizards`).

Presents CustomWizardDialog (fields page containing path control) for wizards of type "class" or "file". Serves as base class for project wizards.

## Member Type Documentation

### typedef CustomWizard::CustomWizardContextPtr

### typedef CustomWizard::CustomWizardParametersPtr

### typedef CustomWizard::FieldReplacementMap

## Member Function Documentation

### CustomWizard::CustomWizard()

Default constructs an instance of CustomWizard.

### CustomWizard::~CustomWizard()

Destroys the instance of CustomWizard.

### `[protected]` CustomWizardContextPtr CustomWizard::context() const

### Core::BaseFileWizard *CustomWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const

### `[static protected]` CustomWizard *CustomWizard::createWizard(const CustomWizardParametersPtr &p)

### `[static]` QList<IWizardFactory *> CustomWizard::createWizards()

Reads `share/qtcreator/templates/wizards` and creates all custom wizards.

As other plugins might register factories for derived classes, call it in extensionsInitialized().

Scans the subdirectories of the template directory for directories containing valid configuration files and parse them into wizards.

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

### `[protected]` Core::GeneratedFiles CustomWizard::generateWizardFiles(QString *errorMessage) const

### `[protected]` CustomWizardParametersPtr CustomWizard::parameters() const

### `[protected]` FieldReplacementMap CustomWizard::replacementMap(const QWizard *w) const

### `[static]` void CustomWizard::setVerbose(int)

See also verbose().

### `[static]` int CustomWizard::verbose()

See also setVerbose().

### `[protected]` bool CustomWizard::writeFiles(const Core::GeneratedFiles &files, QString *errorMessage) const