Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Tool.Tool Class Reference

Abstract base class for tools that manipulate (or otherwise interact with) the scene. More...

Inheritance diagram for UM.Tool.Tool:
UM.PluginObject.PluginObject

Public Member Functions

 __init__ (self)
 
 getExposedProperties (self)
 
 setExposedProperties (self, *args)
 
 getShortcutKey (self)
 
Optional[bool] event (self, Event event)
 Handle an event.
 
Controller getController (self)
 Convenience function.
 
bool getEnabled (self)
 Get the enabled state of the tool.
 
Optional[ToolHandlegetHandle (self)
 Get the associated handle.
 
 setHandle (self, ToolHandle handle)
 set the associated handle
 
 getLockedAxis (self)
 
 setLockedAxis (self, axis)
 
 getDragPlane (self)
 
 setDragPlane (self, plane)
 
 getDragStart (self)
 
 setDragStart (self, x, y)
 
 getDragPosition (self, x, y)
 
 getDragVector (self, x, y)
 
- Public Member Functions inherited from UM.PluginObject.PluginObject
 __init__ (self)
 
 getPluginId (self)
 
 setPluginId (self, plugin_id)
 

Static Public Attributes

 operationStarted = Signal()
 Should be emitted whenever a longer running operation is started, like a drag to scale an object.
 
 operationStopped = Signal()
 Should be emitted whenever a longer running operation is stopped.
 
 propertyChanged = Signal()
 

Protected Member Functions

 _onToolEnabledChanged (self, str tool_id, bool enabled)
 

Protected Attributes

 _controller
 
 _enabled
 
 _handle
 
 _locked_axis
 
 _drag_plane
 
 _drag_start
 
 _exposed_properties
 
 _selection_pass
 
 _onToolEnabledChanged
 
 _shortcut_key
 
- Protected Attributes inherited from UM.PluginObject.PluginObject
 _plugin_id
 

Detailed Description

Abstract base class for tools that manipulate (or otherwise interact with) the scene.

Constructor & Destructor Documentation

◆ __init__()

UM.Tool.Tool.__init__ (   self)

Reimplemented from UM.PluginObject.PluginObject.

Member Function Documentation

◆ event()

Optional[bool] UM.Tool.Tool.event (   self,
Event  event 
)

Handle an event.

Parameters
eventEvent The event to handle.
Returns
bool true if this event has been handled and requires no further processing.
See also
Event

◆ getHandle()

Optional[ToolHandle] UM.Tool.Tool.getHandle (   self)

Get the associated handle.

Returns
ToolHandle

◆ setHandle()

UM.Tool.Tool.setHandle (   self,
ToolHandle  handle 
)

set the associated handle

Parameters
<em>ToolHandle</em>

Member Data Documentation

◆ operationStarted

UM.Tool.Tool.operationStarted = Signal()
static

Should be emitted whenever a longer running operation is started, like a drag to scale an object.

Parameters
toolThe tool that started the operation.

◆ operationStopped

UM.Tool.Tool.operationStopped = Signal()
static

Should be emitted whenever a longer running operation is stopped.

Parameters
toolThe tool that stopped the operation.

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