IWizardFactory Class
class Core::IWizardFactoryThe IWizardFactory class is the base class for all wizard factories. More...
Header: | #include <coreplugin/iwizardfactory.h> |
Inherits: | QObject |
Inherited By: |
Public Types
enum | WizardKind { FileWizard, ProjectWizard } |
Detailed Description
Note: Instead of using this class, we recommend that you create JSON-based wizards, as instructed in Adding New Custom Wizards.
The wizard interface is a very thin abstraction for the wizards in File > New File and New Project. 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. 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::BaseFileWizardFactory and Core::BaseFileWizard.
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::ProjectWizard | 0x02 | The wizard creates a new project. |