Skip to main content
`Ctrl`+`K`

# `tools`

This module provides tool widgets that can be attached to a plot3DWidget.

## Toolbars

### `InteractiveModeToolbar`

class InteractiveModeToolBar(parent=None, title='Plot3D Interaction')

  Bases: `Plot3DWidgetToolBar`

  Toolbar providing icons to change the interaction mode

  Parameters:

    - parent – See `QWidget`

    - title (str) – Title of the toolbar.

  getRotateAction()

    Returns the QAction setting rotate interaction of the Plot3DWidget

    Return type:

      qt.QAction

  getPanAction()

    Returns the QAction setting pan interaction of the Plot3DWidget

    Return type:

      qt.QAction

### `OutputToolBar`

class OutputToolBar(parent=None, title='Plot3D Output')

  Bases: `Plot3DWidgetToolBar`

  Toolbar providing icons to copy, save and print the OpenGL scene

  Parameters:

    - parent – See `QWidget`

    - title (str) – Title of the toolbar.

  getCopyAction()

    Returns the QAction performing copy to clipboard of the Plot3DWidget

    Return type:

      qt.QAction

  getSaveAction()

    Returns the QAction performing save to file of the Plot3DWidget

    Return type:

      qt.QAction

  getVideoRecordAction()

    Returns the QAction performing record video of the Plot3DWidget

    Return type:

      qt.QAction

  getPrintAction()

    Returns the QAction performing printing of the Plot3DWidget

    Return type:

      qt.QAction

### `ViewpointToolbar`

class ViewpointToolBar(parent=None, title='Viewpoint control')

  Bases: `Plot3DWidgetToolBar`

  A toolbar providing icons to reset the viewpoint.

  Parameters:

    - parent – See `QToolBar`

    - title (str) – Title of the toolbar

  getViewpointToolButton()

    Returns the ViewpointToolButton to set viewpoint of the Plot3DWidget

    Return type:

      ViewpointToolButton

  getRotateViewpointAction()

    Returns the QAction to start/stop rotation of the Plot3DWidget

    Return type:

      qt.QAction

## Tool Buttons

### `ViewpointToolButton`

class ViewpointToolButton(parent=None)

  Bases: `QToolButton`

  A toolbutton with a drop-down list of ways to reset the viewpoint.

  Parameters:

    parent – See `QToolButton`

  setPlot3DWidget(widget)

    Set the Plot3DWidget this toolbar is associated with

    Parameters:

      widget (Plot3DWidget) – The widget to control

  getPlot3DWidget()

    Return the Plot3DWidget associated to this toolbar.

    If no widget is associated, it returns None.

    Return type:

      Plot3DWidget or None

## Widgets

### `PositionInfoWidget`

This module provides a widget that displays data values of a SceneWidget.

class PositionInfoWidget(parent=None)

  Widget displaying information about picked position

  Parameters:

    parent (QWidget) – See `QWidget`

  toggleAction()

    The action to toggle the picking mode.

    Return type:

      QAction

  getSceneWidget()

    Returns the associated `SceneWidget` or None.

    Return type:

      Union[None,SceneWidget]

  setSceneWidget(widget)

    Set the associated `SceneWidget`

    Parameters:

      widget (SceneWidget) – 3D scene for which to display information

  clear()

    Clean-up displayed values

  pick(x, y)

    Pick items in the associated SceneWidget and display result

    Only the closest point is displayed.

    Parameters:

      - x (int) – X coordinate in pixel in the SceneWidget

      - y (int) – Y coordinate in pixel in the SceneWidget

  updateInfo()

    Update information according to cursor position

### `GroupPropertiesWidget`

`GroupPropertiesWidget` allows to reset properties in a GroupItem.

class GroupPropertiesWidget(parent=None)

  Set properties of all items in a `GroupItem`

  Parameters:

    parent (QWidget)

  MAX_MARKER_SIZE = 20

    Maximum value for marker size

  MAX_LINE_WIDTH = 10

    Maximum value for line width

  getGroup()

    Returns the `GroupItem` this widget is attached to.

    Return type:

      Union[GroupItem, None]

  setGroup(group)

    Set the `GroupItem` this widget is attached to.

    Parameters:

      group (GroupItem) – GroupItem to control (or None)