dRonin
adbada4
dRonin GCS
|
The class IWizard is the base class for all wizards (for example shown in {File | New}). More...
#include <iwizard.h>
Public Types | |
enum | Kind { FileWizard, ClassWizard, ProjectWizard } |
Public Member Functions | |
IWizard (QObject *parent=nullptr) | |
virtual | ~IWizard () |
virtual Kind | kind () const =0 |
virtual QIcon | icon () const =0 |
virtual QString | description () const =0 |
virtual QString | name () const =0 |
virtual QString | category () const =0 |
virtual QString | trCategory () const =0 |
virtual QStringList | runWizard (const QString &path, QWidget *parent)=0 |
Static Public Member Functions | |
static QList< IWizard * > | allWizards () |
static QList< IWizard * > | wizardsOfKind (Kind kind) |
The class IWizard is the base class for all wizards (for example shown in {File | New}).
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 IWizard instance to the plugin manager's object pool in your plugin's initialize method: