Developer Documentation
ACG::QtWidgets::SceneGraphWidgetGenerator Class Reference
Inheritance diagram for ACG::QtWidgets::SceneGraphWidgetGenerator:
LightWidgetGenerator

Public Member Functions

virtual QWidget * getWidget (SceneGraph::BaseNode *_node)
 Get a widget for this Node. More...
 
virtual bool canHandle (std::string _className)
 returns if the widgets can handle the given class More...
 
virtual std::string handles ()
 return the type this generator handles More...
 
virtual QString contextMenuName ()
 Return a name for your widget in the context menu. More...
 

Protected Attributes

QMap< SceneGraph::BaseNode *, QWidget *> widgetMap_
 

Detailed Description

Definition at line 81 of file QtSceneGraphWidget.hh.

Member Function Documentation

◆ canHandle()

bool ACG::QtWidgets::SceneGraphWidgetGenerator::canHandle ( std::string  _className)
virtual

returns if the widgets can handle the given class

This function has to check if the given classname is supported

Reimplemented in LightWidgetGenerator.

Definition at line 91 of file QtSceneGraphWidget.cc.

◆ contextMenuName()

QString ACG::QtWidgets::SceneGraphWidgetGenerator::contextMenuName ( )
virtual

Return a name for your widget in the context menu.

This name will be the same for all passed in nodes

Reimplemented in LightWidgetGenerator.

Definition at line 103 of file QtSceneGraphWidget.cc.

◆ getWidget()

QWidget * ACG::QtWidgets::SceneGraphWidgetGenerator::getWidget ( SceneGraph::BaseNode _node)
virtual

Get a widget for this Node.

Derive from this class to get a widget for the given node you have to overload this function. First check, if your widget can handle nodes of the given type (check for _node->className() ) Then generate your widget and handle the _node inside it. Return 0 if you can not handle it and check if the map already contains a widget for this node so that you generate one widget per node.

Reimplemented in LightWidgetGenerator.

Definition at line 85 of file QtSceneGraphWidget.cc.

◆ handles()

std::string ACG::QtWidgets::SceneGraphWidgetGenerator::handles ( )
virtual

return the type this generator handles

return the classname of the node this generator can handle

Reimplemented in LightWidgetGenerator.

Definition at line 97 of file QtSceneGraphWidget.cc.


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