RectangleMode

class glue.viewers.common.qt.mouse_mode.RectangleMode(viewer, **kwargs)[source]

Bases: glue.viewers.common.qt.mouse_mode.RoiMode

Defines a Rectangular ROI, accessible via the roi() method

Attributes Summary

action_text
enabled A property that callback functions can be added to.
icon
persistent
shortcut
status_tip
tool_id
tool_tip

Methods Summary

activate()
clear()
close()
deactivate() Fired when the toolbar button is deactivated
key(event)
menu_actions() List of QtWidgets.QActions to be attached to this tool as a context menu.
move(event)
press(event)
release(event)
roi() The ROI defined by this mouse mode

Attributes Documentation

action_text = 'Rectangular ROI'
enabled

A property that callback functions can be added to.

When a callback property changes value, each callback function is called with information about the state change. Otherwise, callback properties behave just like normal instance variables.

CallbackProperties must be defined at the class level. Use the helper function add_callback() to attach a callback to a specific instance of a class with CallbackProperties

Parameters:

default

The initial value for the property

docstring : str

The docstring for the property

getter, setter : func

Custom getter and setter functions (advanced)

icon = 'glue_square'
persistent = False
shortcut = 'R'
status_tip = 'CLICK and DRAG to define selection'
tool_id = 'select:rectangle'
tool_tip = 'Define a rectangular region of interest'

Methods Documentation

activate()
clear()
close()
deactivate()

Fired when the toolbar button is deactivated

key(event)
menu_actions()

List of QtWidgets.QActions to be attached to this tool as a context menu.

move(event)
press(event)
release(event)
roi()

The ROI defined by this mouse mode

Returns:roi : Roi