OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Protected Member Functions | List of all members
WUIWidgetFactory Class Referenceabstract

Create instances of WUI widgets. More...

#include <WUIWidgetFactory.h>

+ Inheritance diagram for WUIWidgetFactory:

Public Types

typedef std::shared_ptr< WUIWidgetFactorySPtr
 Convenience typedef for a std::shared_ptr< WUIWidgetFactory >. More...
 
typedef std::shared_ptr< const WUIWidgetFactoryConstSPtr
 Convenience typedef for a std::shared_ptr< const WUIWidgetFactory >. More...
 

Public Member Functions

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...
 
virtual bool implementsUI () const =0
 Query whether the WUI instance supports the WUI Widget interface properly as UIs can simply ignore the WUIWidgetFactory calls done in modules. More...
 

Protected Member Functions

void setParent (WUIWidgetBase::SPtr widget, WUIWidgetBase::SPtr parent) const
 Set the parent of a widget and notify parent about new child widget. More...
 
virtual WUIGridWidget::SPtr createGridWidgetImpl (const std::string &title, WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const =0
 Implementation of createGridWidget. More...
 
virtual WUITabbedWidget::SPtr createTabbedWidgetImpl (const std::string &title, WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const =0
 Implementation of createTabbedWidget. More...
 
virtual WUIPropertyGroupWidget::SPtr createPropertyGroupWidgetImpl (const std::string &title, WPropGroup properties, WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const =0
 Implementation of createPropertyGroupWidget. More...
 
virtual WUIViewWidget::SPtr createViewWidgetImpl (std::string title, WGECamera::ProjectionMode projectionMode, std::shared_ptr< WCondition > abordCondition=WCondition::SPtr(), WUIWidgetBase::SPtr parent=WUIWidgetBase::SPtr()) const =0
 Implementation of createViewWidget. More...
 

Detailed Description

Create instances of WUI widgets.

This needs to be implemented by the UI/GUI developer.

Definition at line 42 of file WUIWidgetFactory.h.

Member Typedef Documentation

◆ ConstSPtr

typedef std::shared_ptr< const WUIWidgetFactory > WUIWidgetFactory::ConstSPtr

Convenience typedef for a std::shared_ptr< const WUIWidgetFactory >.

Definition at line 53 of file WUIWidgetFactory.h.

◆ SPtr

typedef std::shared_ptr< WUIWidgetFactory > WUIWidgetFactory::SPtr

Convenience typedef for a std::shared_ptr< WUIWidgetFactory >.

Definition at line 48 of file WUIWidgetFactory.h.

Constructor & Destructor Documentation

◆ ~WUIWidgetFactory()

virtual WUIWidgetFactory::~WUIWidgetFactory ( )
inlinevirtual

Destructor.

Definition at line 165 of file WUIWidgetFactory.h.

Member Function Documentation

◆ createGridWidget()

virtual WUIGridWidget::SPtr WUIWidgetFactory::createGridWidget ( const std::string &  title,
WUIWidgetBase::SPtr  parent = WUIWidgetBase::SPtr() 
) const
inlinevirtual

Create a grid widget.

This kind of widget is basically empty. Add others to it. Parentless widgets are initially invisible. Use WUIWidgetBase::show() to make them visible.

Note
this function blocks until the widget was created. Check the resulting pointer for NULL.
Exceptions
WExceptionif something was wrong (like parent does not allow nesting). You need to catch this.
Parameters
titlethe title
parentthe parent widget which will contain this widget. Can be NULL.
Returns
the widget. Might be NULL if something goes wrong.

Definition at line 67 of file WUIWidgetFactory.h.

References createGridWidgetImpl().

+ Here is the call graph for this function:

◆ createGridWidgetImpl()

virtual WUIGridWidget::SPtr WUIWidgetFactory::createGridWidgetImpl ( const std::string &  title,
WUIWidgetBase::SPtr  parent = WUIWidgetBase::SPtr() 
) const
protectedpure virtual

Implementation of createGridWidget.

Parameters
titlethe title
parentthe parent widget which will contain this widget. Can be NULL.
Returns
the widget. Might be NULL if something goes wrong.

Implemented in WUIQtWidgetFactory.

Referenced by createGridWidget().

+ Here is the caller graph for this function:

◆ createPropertyGroupWidget()

virtual WUIPropertyGroupWidget::SPtr WUIWidgetFactory::createPropertyGroupWidget ( const std::string &  title,
WPropGroup  properties,
WUIWidgetBase::SPtr  parent = WUIWidgetBase::SPtr() 
) const
inlinevirtual

Create a property widget.

Parentless widgets are initially invisible. Use WUIWidgetBase::show() to make them visible.

Note
this function blocks until the widget was created. Check the resulting pointer for NULL.
Exceptions
WExceptionif something was wrong (like parent does not allow nesting). You need to catch this.
Parameters
titlethe title
propertiesthe property group
parentthe parent widget which will contain this widget. Can be NULL.
Returns
the widget. Might be NULL if something goes wrong.

Definition at line 117 of file WUIWidgetFactory.h.

References createPropertyGroupWidgetImpl().

+ Here is the call graph for this function:

◆ createPropertyGroupWidgetImpl()

virtual WUIPropertyGroupWidget::SPtr WUIWidgetFactory::createPropertyGroupWidgetImpl ( const std::string &  title,
WPropGroup  properties,
WUIWidgetBase::SPtr  parent = WUIWidgetBase::SPtr() 
) const
protectedpure virtual

Implementation of createPropertyGroupWidget.

Parameters
titlethe title
propertiesthe property group
parentthe parent widget which will contain this widget. Can be NULL.
Returns
the widget. Might be NULL if something goes wrong.

Implemented in WUIQtWidgetFactory.

Referenced by createPropertyGroupWidget().

+ Here is the caller graph for this function:

◆ createTabbedWidget()

virtual WUITabbedWidget::SPtr WUIWidgetFactory::createTabbedWidget ( const std::string &  title,
WUIWidgetBase::SPtr  parent = WUIWidgetBase::SPtr() 
) const
inlinevirtual

Create a tabed widget.

This kind of widget is basically empty. Add others to it. Parentless widgets are initially invisible. Use WUIWidgetBase::show() to make them visible.

Note
this function blocks until the widget was created. Check the resulting pointer for NULL.
Exceptions
WExceptionif something was wrong (like parent does not allow nesting). You need to catch this.
Parameters
titlethe title
parentthe parent widget which will contain this widget. Can be NULL.
Returns
the widget. Might be NULL if something goes wrong.

Definition at line 91 of file WUIWidgetFactory.h.

References createTabbedWidgetImpl().

+ Here is the call graph for this function:

◆ createTabbedWidgetImpl()

virtual WUITabbedWidget::SPtr WUIWidgetFactory::createTabbedWidgetImpl ( const std::string &  title,
WUIWidgetBase::SPtr  parent = WUIWidgetBase::SPtr() 
) const
protectedpure virtual

Implementation of createTabbedWidget.

Parameters
titlethe title
parentthe parent widget which will contain this widget. Can be NULL.
Returns
the widget. Might be NULL if something goes wrong.

Implemented in WUIQtWidgetFactory.

Referenced by createTabbedWidget().

+ Here is the caller graph for this function:

◆ createViewWidget()

virtual WUIViewWidget::SPtr WUIWidgetFactory::createViewWidget ( std::string  title,
WGECamera::ProjectionMode  projectionMode,
std::shared_ptr< WCondition abordCondition = WCondition::SPtr(),
WUIWidgetBase::SPtr  parent = WUIWidgetBase::SPtr() 
) const
inlinevirtual

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. Parentless widgets are initially invisible. Use WUIWidgetBase::show() to make them visible.

Note
this function blocks until the widget was created. Check the resulting pointer for NULL.
Exceptions
WExceptionif something was wrong (like parent does not allow nesting). You need to catch this.
Parameters
titlethe title of the widget
projectionModethe kind of projection which should be used
abordConditiona condition enforcing abort of widget creation. Can be NULL
parentthe parent widget which will contain this widget. Can be NULL.
Returns
the created widget

Definition at line 146 of file WUIWidgetFactory.h.

References createViewWidgetImpl().

+ Here is the call graph for this function:

◆ createViewWidgetImpl()

virtual WUIViewWidget::SPtr WUIWidgetFactory::createViewWidgetImpl ( std::string  title,
WGECamera::ProjectionMode  projectionMode,
std::shared_ptr< WCondition abordCondition = WCondition::SPtr(),
WUIWidgetBase::SPtr  parent = WUIWidgetBase::SPtr() 
) const
protectedpure virtual

Implementation of createViewWidget.

Parameters
titlethe title of the widget
projectionModethe kind of projection which should be used
abordConditiona condition enforcing abort of widget creation. Can be NULL
parentthe parent widget which will contain this widget. Can be NULL.
Returns
the created widget

Implemented in WUIQtWidgetFactory.

Referenced by createViewWidget().

+ Here is the caller graph for this function:

◆ implementsUI()

virtual bool WUIWidgetFactory::implementsUI ( ) const
pure 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.

Returns
true if the UI properly implements the WUI widget interface.

Implemented in WUIQtWidgetFactory.

◆ setParent()

void WUIWidgetFactory::setParent ( WUIWidgetBase::SPtr  widget,
WUIWidgetBase::SPtr  parent 
) const
inlineprotected

Set the parent of a widget and notify parent about new child widget.

This is needed as WUIWidgetBase and WUIWidgetFactory are friends. Friendship is not derivable.

Parameters
widgetthe widget to set the parent to
parentthe parent

Definition at line 184 of file WUIWidgetFactory.h.

Referenced by WUIQtWidgetFactory::createGridWidgetImpl(), WUIQtWidgetFactory::createPropertyGroupWidgetImpl(), WUIQtWidgetFactory::createTabbedWidgetImpl(), and WUIQtWidgetFactory::createViewWidgetImpl().

+ Here is the caller graph for this function:

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