IWizardFactory Class
(Core::IWizardFactory)The class IWizardFactory is the base class for all wizard factories (for example shown in File | New). More...
| Header: | #include <IWizardFactory> |
Public Types
| flags | WizardFlags |
| enum | WizardKind { FileWizard, ClassWizard, ProjectWizard } |
Detailed Description
The wizard interface is a very thin abstraction for the New... wizards. Basically it defines what to show to the user in the wizard selection dialogs, and a hook that is called if the user selects the wizard.
Wizards can then perform any operations they like, including showing dialogs and creating files. Often it is not necessary to create your own wizard from scratch, instead use one of the predefined wizards and adapt it to your needs.
To make your wizard known to the system, add your IWizardFactory instance to the plugin manager's object pool in your plugin's initialize function:
bool MyPlugin::initialize(const QStringList &arguments, QString *errorString) { // ... do setup addAutoReleasedObject(new MyWizardFactory); // ... do more setup }
See also Core::BaseFileWizard and Core::StandardFileWizard.
Member Type Documentation
enum IWizardFactory::WizardKind
Used to specify what kind of objects the wizard creates. This information is used to show e.g. only wizards that create projects when selecting a New Project menu item.
| Constant | Value | Description |
|---|---|---|
Core::IWizardFactory::FileWizard | 0x01 | The wizard creates one or more files. |
Core::IWizardFactory::ClassWizard | ? | The wizard creates a new class (e.g. source+header files). |
Core::IWizardFactory::ProjectWizard | 0x02 | The wizard creates a new project. |