Scheme Editor (schemeedit
)
Scheme Editor Widget
- class orangecanvas.document.schemeedit.SchemeEditWidget(parent=None)[source]
Bases:
PyQt5.QtWidgets.QWidget
A widget for editing a
Scheme
instance.- undoAvailable(bool)
Undo command has become available/unavailable.
- redoAvailable(bool)
Redo command has become available/unavailable.
- modificationChanged(bool)
Document modified state has changed.
- undoCommandAdded
Undo command was added to the undo stack.
- selectionChanged
Item selection has changed.
- titleChanged
Document title has changed.
- pathChanged
Document path has changed.
- class OpenAnchors(value)[source]
Bases:
enum.Enum
Interactions with individual anchors
- Never = 'Never'
Channel anchors never separate
- Always = 'Always'
Channel anchors separate on hover
- OnShift = 'OnShift'
Channel anchors separate on hover on Shift key
- toolbarActions()[source]
Return a list of actions that can be inserted into a toolbar. At the moment these are:
‘Zoom in’ action
‘Zoom out’ action
‘Zoom Reset’ action
‘Clean up’ action (align to grid)
‘New text annotation’ action (with a size menu)
‘New arrow annotation’ action (with a color menu)
Return a list of actions that can be inserted into a QMenuBar.
- modified
Is the document is a modified state.
- isModifiedStrict()[source]
Is the document modified.
Run a strict check against all node properties as they were at the time when the last call to setModified(True) was made.
- uncleanProperties()[source]
Returns node properties differences since last clean state, excluding unclean nodes.
- setQuickMenuTriggers(triggers)[source]
Set quick menu trigger flags.
Flags can be a bitwise or of:
SchemeEditWidget.NoTrigeres
SchemeEditWidget.RightClicked
SchemeEditWidget.DoubleClicked
SchemeEditWidget.SpaceKey
SchemeEditWidget.AnyKey
- setChannelNamesVisible(visible)[source]
Set channel names visibility state. When enabled the links in the view will have a source/sink channel names displayed over them.
- setPath(path)[source]
Set the path associated with the current scheme.
Note
Calling setScheme will invalidate the path (i.e. set it to an empty string)
- ensureVisible(node)[source]
Scroll the contents of the viewport so that node is visible.
- Parameters
node (SchemeNode) –
- addNode(node)[source]
Add a new node (
SchemeNode
) to the document.
- createNewNode(description, title=None, position=None)[source]
Create a new
SchemeNode
and add it to the document. The new node is constructed usingnewNodeHelper()
method
- newNodeHelper(description, title=None, position=None)[source]
Return a new initialized
SchemeNode
. If title and position are not supplied they are initialized to sensible defaults.
- enumerateTitle(title)[source]
Enumerate a title string (i.e. add a number in parentheses) so it is not equal to any node title in the current scheme.
- nextPosition()[source]
Return the next default node position as a (x, y) tuple. This is a position left of the last added node.
- removeNode(node)[source]
Remove a node (
SchemeNode
) from the scheme
- renameNode(node, title)[source]
Rename a node (
SchemeNode
) to title.
- addLink(link)[source]
Add a link (
SchemeLink
) to the scheme.
- removeLink(link)[source]
Remove a link (
SchemeLink
) from the scheme.
- addAnnotation(annotation)[source]
Add annotation (
BaseSchemeAnnotation
) to the scheme
- removeAnnotation(annotation)[source]
Remove annotation (
BaseSchemeAnnotation
) from the scheme.
- focusNode()[source]
Return the current focused
SchemeNode
orNone
if no node has focus.
- selectedNodes()[source]
Return all selected
SchemeNode
items.
- selectedAnnotations()[source]
Return all selected
BaseSchemeAnnotation
items.
- setDropHandlers(dropHandlers: Sequence[orangecanvas.document.interactions.DropHandler]) None [source]
Set handlers for drop events onto the workflow view.