OpenWalnut
1.5.0dev
|
Implementation of WUIWidgetFactory. More...
#include <WUIQtWidgetFactory.h>
Public Types | |
typedef std::shared_ptr< WUIQtWidgetFactory > | SPtr |
Convenience typedef for a std::shared_ptr< WUIQtWidgetFactory >. More... | |
typedef std::shared_ptr< const WUIQtWidgetFactory > | ConstSPtr |
Convenience typedef for a std::shared_ptr< const WUIQtWidgetFactory >. More... | |
Public Types inherited from WUIWidgetFactory | |
typedef std::shared_ptr< WUIWidgetFactory > | SPtr |
Convenience typedef for a std::shared_ptr< WUIWidgetFactory >. More... | |
typedef std::shared_ptr< const WUIWidgetFactory > | ConstSPtr |
Convenience typedef for a std::shared_ptr< const WUIWidgetFactory >. More... | |
Public Member Functions | |
WUIQtWidgetFactory (WMainWindow *mainWindow) | |
Default constructor. More... | |
virtual | ~WUIQtWidgetFactory () |
Destructor. More... | |
virtual bool | implementsUI () const |
Query whether the WUI instance supports the WUI Widget interface properly as UIs can simply ignore the WUIWidgetFactory calls done in modules. More... | |
Public Member Functions inherited from WUIWidgetFactory | |
virtual WUIGridWidget::SPtr | createGridWidget (const std::string &title, WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const |
Create a grid widget. More... | |
virtual WUITabbedWidget::SPtr | createTabbedWidget (const std::string &title, WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const |
Create a tabed widget. More... | |
virtual WUIPropertyGroupWidget::SPtr | createPropertyGroupWidget (const std::string &title, WPropGroup properties, WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const |
Create a property widget. More... | |
virtual WUIViewWidget::SPtr | createViewWidget (std::string title, WGECamera::ProjectionMode projectionMode, std::shared_ptr< WCondition > abordCondition=WCondition::SPtr(), WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const |
Instruct to open a new view widget. More... | |
virtual | ~WUIWidgetFactory () |
Destructor. More... | |
Static Public Member Functions | |
static std::shared_ptr< WUIQtWidgetBase > | getAsQtWidgetBase (WUIWidgetBase::SPtr widget) |
Convert the given WUIWidgetBase to the corresponding WUIQtWidgetBase. More... | |
Protected Member Functions | |
virtual WUIGridWidget::SPtr | createGridWidgetImpl (const std::string &title, WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const |
Create a grid widget. More... | |
virtual WUITabbedWidget::SPtr | createTabbedWidgetImpl (const std::string &title, WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const |
Implementation of createTabbedWidget. More... | |
virtual WUIPropertyGroupWidget::SPtr | createPropertyGroupWidgetImpl (const std::string &title, WPropGroup properties, WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const |
Create a property widget. More... | |
virtual WUIViewWidget::SPtr | createViewWidgetImpl (std::string title, WGECamera::ProjectionMode projectionMode, std::shared_ptr< WCondition > abordCondition=WCondition::SPtr(), WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const |
Instruct to open a new view widget. More... | |
Protected Member Functions inherited from WUIWidgetFactory | |
void | setParent (WUIWidgetBase::SPtr widget, WUIWidgetBase::SPtr parent) const |
Set the parent of a widget and notify parent about new child widget. More... | |
Private Attributes | |
WMainWindow * | m_mainWindow |
The main window instance. More... | |
Implementation of WUIWidgetFactory.
Definition at line 41 of file WUIQtWidgetFactory.h.
typedef std::shared_ptr< const WUIQtWidgetFactory > WUIQtWidgetFactory::ConstSPtr |
Convenience typedef for a std::shared_ptr< const WUIQtWidgetFactory >.
Definition at line 52 of file WUIQtWidgetFactory.h.
typedef std::shared_ptr< WUIQtWidgetFactory > WUIQtWidgetFactory::SPtr |
Convenience typedef for a std::shared_ptr< WUIQtWidgetFactory >.
Definition at line 47 of file WUIQtWidgetFactory.h.
|
explicit |
Default constructor.
mainWindow | the main window instance |
Definition at line 37 of file WUIQtWidgetFactory.cpp.
|
virtual |
Destructor.
Definition at line 44 of file WUIQtWidgetFactory.cpp.
|
protectedvirtual |
Create a grid widget.
This kind of widget is basically empty. Add others to it. The widgets are initially invisible. Use WUIWidgetBase::show() to make them visible. If a widget with this name already exists, it will be returned.
title | the title |
parent | the parent widget which will contain this widget. Can be NULL. |
Implements WUIWidgetFactory.
Definition at line 60 of file WUIQtWidgetFactory.cpp.
References getAsQtWidgetBase(), m_mainWindow, and WUIWidgetFactory::setParent().
|
protectedvirtual |
Create a property widget.
Parentless widgets are initially invisible. Use WUIWidgetBase::show() to make them visible.
title | the title |
properties | the property group |
parent | the parent widget which will contain this widget. Can be NULL. |
Implements WUIWidgetFactory.
Definition at line 76 of file WUIQtWidgetFactory.cpp.
References getAsQtWidgetBase(), m_mainWindow, and WUIWidgetFactory::setParent().
|
protectedvirtual |
Implementation of createTabbedWidget.
title | the title |
parent | the parent widget which will contain this widget. Can be NULL. |
Implements WUIWidgetFactory.
Definition at line 68 of file WUIQtWidgetFactory.cpp.
References getAsQtWidgetBase(), m_mainWindow, and WUIWidgetFactory::setParent().
|
protectedvirtual |
Instruct to open a new view widget.
The specified condition should be the shutdown condition of the module, as the function returns only if the widget was created. To ensure that the creation is aborted properly if the module shuts down in the meantime, this condition is used. The widgets are initially invisible. Use WUIWidgetBase::show() to make them visible. If a widget with this name already exists, it will be returned.
title | the title of the widget |
projectionMode | the kind of projection which should be used |
abordCondition | a condition enforcing abort of widget creation. Can be NULL |
parent | the parent widget which will contain this widget. Can be NULL. |
Implements WUIWidgetFactory.
Definition at line 85 of file WUIQtWidgetFactory.cpp.
References getAsQtWidgetBase(), m_mainWindow, and WUIWidgetFactory::setParent().
|
static |
Convert the given WUIWidgetBase to the corresponding WUIQtWidgetBase.
widget | the widget to convert |
Definition at line 54 of file WUIQtWidgetFactory.cpp.
Referenced by createGridWidgetImpl(), createPropertyGroupWidgetImpl(), createTabbedWidgetImpl(), and createViewWidgetImpl().
|
virtual |
Query whether the WUI instance supports the WUI Widget interface properly as UIs can simply ignore the WUIWidgetFactory calls done in modules.
This is used mainly by WUIRequirement.
Implements WUIWidgetFactory.
Definition at line 49 of file WUIQtWidgetFactory.cpp.
|
private |
The main window instance.
Definition at line 145 of file WUIQtWidgetFactory.h.
Referenced by createGridWidgetImpl(), createPropertyGroupWidgetImpl(), createTabbedWidgetImpl(), and createViewWidgetImpl().