Extending Qt Creator Manual | BaseFileWizardFactory

Extending Qt Creator Manual 4.3.1

# BaseFileWizardFactory Class

(Core::BaseFileWizardFactory)

Inherits: | Core::IWizardFactory
Inherited By: | ProjectExplorer::CustomWizard

- List of all members, including inherited members

## Static Public Members

QString | buildFileName(const QString &path, const QString &baseName, const QString &extension)

- 8 static public members inherited from Core::IWizardFactory

## Protected Types

enum | OverwriteResult { OverwriteOk, OverwriteError, OverwriteCanceled }

## Protected Functions

virtual BaseFileWizard * | create(QWidget *parent, const WizardDialogParameters &parameters) const = 0
virtual GeneratedFiles | generateFiles(const QWizard *w, QString *errorMessage) const = 0
virtual bool | postGenerateFiles(const QWizard *w, const GeneratedFiles &l, QString *errorMessage) const
OverwriteResult | promptOverwrite(GeneratedFiles *files, QString *errorMessage) const
virtual bool | writeFiles(const GeneratedFiles &files, QString *errorMessage) const

- 3 protected functions inherited from Core::IWizardFactory

## Static Protected Members

bool | postGenerateOpenEditors(const GeneratedFiles &l, QString *errorMessage = 0)
QString | preferredSuffix(const QString &mimeType)

### Additional Inherited Members

- 26 public functions inherited from Core::IWizardFactory

## Member Type Documentation

### enum BaseFileWizardFactory::OverwriteResult

## Member Function Documentation

### `[static]` QString BaseFileWizardFactory::buildFileName(const QString &path, const QString &baseName, const QString &extension)

Constructs a file name, adding the extension unless baseName already has one.

### `[pure virtual protected]` BaseFileWizard *BaseFileWizardFactory::create(QWidget *parent, const WizardDialogParameters &parameters) const

### `[pure virtual protected]` GeneratedFiles BaseFileWizardFactory::generateFiles(const QWizard *w, QString *errorMessage) const

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

Overwrite to perform steps to be done after files are actually created.

The default implementation opens editors with the newly generated files.

### `[static protected]` bool BaseFileWizardFactory::postGenerateOpenEditors(const GeneratedFiles &l, QString *errorMessage = 0)

Opens the editors for the files whose attribute is set accordingly.

### `[static protected]` QString BaseFileWizardFactory::preferredSuffix(const QString &mimeType)

Returns the preferred suffix for mimeType.

### `[protected]` OverwriteResult BaseFileWizardFactory::promptOverwrite(GeneratedFiles *files, QString *errorMessage) const

Performs an overwrite check on a set of files. Checks if the file exists and can be overwritten at all, and then prompts the user with a summary.

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

Physically writes files.

Re-implement (calling the base implementation) to create files with CustomGeneratorAttribute set.