The widget factory provides methods for the dynamic creation of widgets. More...
#include <WidgetFactory.h>
Public Member Functions | |
Gui::Dialog::PreferencePage * | createPreferencePage (const char *sName, QWidget *parent=0) const |
Creates a widget with the name sName which is a child of parent. | |
QWidget * | createPrefWidget (const char *sName, QWidget *parent, const char *sPref) |
Creates a preference widget with the name sName and the preference name sPref which is a child of parent. | |
QWidget * | createWidget (const char *sName, QWidget *parent=0) const |
Creates a widget with the name sName which is a child of parent. | |
Static Public Member Functions | |
static void | destruct () |
static WidgetFactoryInst & | instance () |
The widget factory provides methods for the dynamic creation of widgets.
To create these widgets once they must be registered to the factory. To register them use WidgetProducer or any subclasses; to register a preference page use PrefPageProducer instead.
Definition at line 47 of file WidgetFactory.h.
Gui::Dialog::PreferencePage * WidgetFactoryInst::createPreferencePage | ( | const char * | sName, | |
QWidget * | parent = 0 | |||
) | const |
Creates a widget with the name sName which is a child of parent.
To create an instance of this widget once it must has been registered. If there is no appropriate widget registered 0 is returned.
Definition at line 102 of file WidgetFactory.cpp.
References Base::Console(), Base::Factory::Produce(), and RobotExample::w.
QWidget * WidgetFactoryInst::createPrefWidget | ( | const char * | sName, | |
QWidget * | parent, | |||
const char * | sPref | |||
) |
Creates a preference widget with the name sName and the preference name sPref which is a child of parent.
To create an instance of this widget once it must has been registered. If there is no appropriate widget registered 0 is returned. After creation of this widget its recent preferences are restored automatically.
Definition at line 143 of file WidgetFactory.cpp.
References Base::Console(), createWidget(), and RobotExample::w.
QWidget * WidgetFactoryInst::createWidget | ( | const char * | sName, | |
QWidget * | parent = 0 | |||
) | const |
Creates a widget with the name sName which is a child of parent.
To create an instance of this widget once it must has been registered. If there is no appropriate widget registered 0 is returned.
Definition at line 60 of file WidgetFactory.cpp.
References Base::Console(), Base::Factory::Produce(), and RobotExample::w.
Referenced by createPrefWidget(), and Gui::UiLoader::createWidget().
void WidgetFactoryInst::destruct | ( | void | ) | [static] |
Definition at line 48 of file WidgetFactory.cpp.
WidgetFactoryInst & WidgetFactoryInst::instance | ( | void | ) | [static] |