Gui::WidgetFactoryInst Class Reference

The widget factory provides methods for the dynamic creation of widgets. More...

#include <WidgetFactory.h>

Inheritance diagram for Gui::WidgetFactoryInst:
Base::Factory

List of all members.

Public Member Functions

Gui::Dialog::PreferencePagecreatePreferencePage (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 WidgetFactoryInstinstance ()

Detailed Description

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.

Author:
Werner Mayer

Definition at line 47 of file WidgetFactory.h.


Member Function Documentation

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]

The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:05 2011 for FreeCAD by  doxygen 1.6.1