MeVisLab Scripting Reference
MLABGraphicsScene Class Reference

#include <mlabGraphicsScene.h>

Inherits QGraphicsScene.

Public Slots

Scripting


MLABGraphicsInventorRenderAreaaddInventorRenderArea (MLABSoNodeField *field)
 
void initVTKSupport ()
 
MLABVTKGraphicsItemaddVTKGraphicsItem (vtkRenderer *renderer=nullptr)
 
QGraphicsProxyWidget * addMDL (const QString &mdl, bool transparentBackground=false)
 
QGraphicsProxyWidget * addMDL (MLABTree *tree, bool transparentBackground=false)
 
MLABWebGraphicsProxyWidgetaddWebView ()
 
QGraphicsWidget * addLayer (QGraphicsWidget *widget=nullptr)
 
QGraphicsWidget * addGroup ()
 
MLABGraphicsMouseAreaaddMouseArea (QGraphicsWidget *widget=nullptr)
 
MLABGraphicsHotAreaaddHotArea (QGraphicsWidget *widget)
 
MLABGraphicsHotAreaLayeraddHotAreaLayer ()
 
MLABGraphicsHotAreaLayeraddHotAreaGroup ()
 
MLABGraphicsFrameaddFrame (QGraphicsWidget *widget)
 
MLABGraphicsNetworkViewaddNetworkView (MLABNetwork *network)
 
MLABGraphicsIntegerAlignmentWidget * addIntegerAlignmentWidget (QGraphicsWidget *widget)
 
QGraphicsLinearLayout * createHorizontalLayout (QGraphicsWidget *widget)
 
QGraphicsLinearLayout * createVerticalLayout (QGraphicsWidget *widget)
 
QGraphicsGridLayout * createGridLayout (QGraphicsWidget *widget)
 
QGraphicsAnchorLayout * createAnchorLayout (QGraphicsWidget *widget)
 
QAbstractAnimation * createRotationAnimation (QGraphicsItem *item, float startAngle, float endAngle, Qt::Axis axis, float transfromOriginX, float transformOriginY)
 

Detailed Description

MLABGraphicsScene extends QGraphicsScene with additional methods.

Member Function Documentation

◆ addFrame

MLABGraphicsFrame * MLABGraphicsScene::addFrame ( QGraphicsWidget * widget)
slot

Creates a frame that contains the given widget.

◆ addGroup

QGraphicsWidget * MLABGraphicsScene::addGroup ( )
slot

Creates an empty widget for layout/grouping purposes.

◆ addHotArea

MLABGraphicsHotArea * MLABGraphicsScene::addHotArea ( QGraphicsWidget * widget)
slot

Creates a new hot area for given widget.

◆ addHotAreaGroup

MLABGraphicsHotAreaLayer * MLABGraphicsScene::addHotAreaGroup ( )
slot

Creates a new hot area group (which is not resized to the viewer)

◆ addHotAreaLayer

MLABGraphicsHotAreaLayer * MLABGraphicsScene::addHotAreaLayer ( )
slot

Creates a new hot area layer (which is resized to the full viewer)

◆ addIntegerAlignmentWidget

MLABGraphicsIntegerAlignmentWidget * MLABGraphicsScene::addIntegerAlignmentWidget ( QGraphicsWidget * widget)
slot

Returns a new widget that wraps and aligns the given widget so that it is positioned at an integer position (moving the widget by the sub-pixel fraction of the parent item)

◆ addInventorRenderArea

MLABGraphicsInventorRenderArea * MLABGraphicsScene::addInventorRenderArea ( MLABSoNodeField * field)
slot

Create a new Open Inventor render area item which shows the given field's scene.

◆ addLayer

QGraphicsWidget * MLABGraphicsScene::addLayer ( QGraphicsWidget * widget = nullptr)
slot

Adds a graphics widget that is auto-resized to the size of the view and can be used as the parent item for a layer of items.

If a widget is passed in this widget is used as the layer itself.

◆ addMDL [1/2]

QGraphicsProxyWidget * MLABGraphicsScene::addMDL ( const QString & mdl,
bool transparentBackground = false )
slot

Add MDL GUI from a given string.

◆ addMDL [2/2]

QGraphicsProxyWidget * MLABGraphicsScene::addMDL ( MLABTree * tree,
bool transparentBackground = false )
slot

Add MDL GUI from a MDL tree.

◆ addMouseArea

MLABGraphicsMouseArea * MLABGraphicsScene::addMouseArea ( QGraphicsWidget * widget = nullptr)
slot

Creates a mouse area (if a widget is given, the mouse area gets the z of the widget and fills the area of the complete widget)

◆ addNetworkView

MLABGraphicsNetworkView * MLABGraphicsScene::addNetworkView ( MLABNetwork * network)
slot

Creates a view of the given network.

◆ addVTKGraphicsItem

MLABVTKGraphicsItem * MLABGraphicsScene::addVTKGraphicsItem ( vtkRenderer * renderer = nullptr)
slot

Creates a VTK graphics item.

If a renderer is passed, the item uses that renderer for its content. Alternatively you can use the scripting API of MLABVTKGraphicsItem to specify the content. NOTE: Make sure that you call initVTKSupport() once before calling this method with a renderer, otherwise the parameter can not be passed correctly and you will get a "can not find matching overload error".

◆ addWebView

MLABWebGraphicsProxyWidget * MLABGraphicsScene::addWebView ( )
slot

Add a web view item.

◆ createAnchorLayout

QGraphicsAnchorLayout * MLABGraphicsScene::createAnchorLayout ( QGraphicsWidget * widget)
slot

Create an anchor layout inside the given widget, the layout is owned by the widget.

◆ createGridLayout

QGraphicsGridLayout * MLABGraphicsScene::createGridLayout ( QGraphicsWidget * widget)
slot

Create a grid layout inside the given widget, the layout is owned by the widget.

◆ createHorizontalLayout

QGraphicsLinearLayout * MLABGraphicsScene::createHorizontalLayout ( QGraphicsWidget * widget)
slot

Create a horizontal layout inside the given widget, the layout is owned by the widget.

◆ createRotationAnimation

QAbstractAnimation * MLABGraphicsScene::createRotationAnimation ( QGraphicsItem * item,
float startAngle,
float endAngle,
Qt::Axis axis,
float transfromOriginX,
float transformOriginY )
slot

Create a rotation animation that animates the given graphics item via setTransform.

◆ createVerticalLayout

QGraphicsLinearLayout * MLABGraphicsScene::createVerticalLayout ( QGraphicsWidget * widget)
slot

Create a vertical layout inside the given widget, the layout is owned by the widget.

◆ initVTKSupport

void MLABGraphicsScene::initVTKSupport ( )
slot

This method needs to be called before calling addVTKGraphicsItem(renderer) if VTK support has not been initialized by other means.

This call is not needed if your network already contains modules that depend on MLVTKSupport.