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)
redoAvailable(bool)
modificationChanged(bool)
undoCommandAdded()
selectionChanged()
titleChanged()
pathChanged()
undoAvailable

Undo command has become available/unavailable.

redoAvailable

Redo command has become available/unavailable.

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)
menuBarActions()[source]

Return a list of actions that can be inserted into a QMenuBar.

isModified()[source]

Is the document is a modified state.

setModified(modified)[source]

Set the document modified state.

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.

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
quickMenuTriggers()[source]

Return quick menu trigger flags.

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.

channelNamesVisible()[source]

Return the channel name visibility state.

setNodeAnimationEnabled(enabled)[source]

Set the node item animation enabled state.

nodeAnimationEnabled()[source]

Return the node item animation enabled state.

undoStack()[source]

Return the undo stack.

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)

path()[source]

Return the path associated with the scheme

setScheme(scheme)[source]

Set the Scheme instance to display/edit.

ensureVisible(node)[source]

Scroll the contents of the viewport so that node is visible.

Parameters:node (SchemeNode) –
scheme()[source]

Return the Scheme edited by the widget.

scene()[source]

Return the QGraphicsScene instance used to display the current scheme.

view()[source]

Return the QGraphicsView instance used to display the current scene.

suggestions()[source]

Return the widget suggestion prediction class.

usageStatistics()[source]

Return the usage statistics logging class.

quickMenu()[source]

Return a QuickMenu popup menu instance for new node creation.

setTitle(title)[source]

Set the scheme title.

setDescription(description)[source]

Set the scheme description string.

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 using newNodeHelper() 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.

Add a link (SchemeLink) to the scheme.

Remove a link (SchemeLink) from the scheme.

insertNode(new_node, old_link)[source]

Insert a node in-between two linked nodes.

addAnnotation(annotation)[source]

Add annotation (BaseSchemeAnnotation) to the scheme

removeAnnotation(annotation)[source]

Remove annotation (BaseSchemeAnnotation) from the scheme.

removeSelected()[source]

Remove all selected items in the scheme.

selectAll()[source]

Select all selectable items in the scheme.

alignToGrid()[source]

Align nodes to a grid.

focusNode()[source]

Return the current focused SchemeNode or None if no node has focus.

selectedNodes()[source]

Return all selected SchemeNode items.

selectedAnnotations()[source]

Return all selected BaseSchemeAnnotation items.

openSelected()[source]

Open (show and raise) all widgets for the current selected nodes.

editNodeTitle(node)[source]

Edit (rename) the node’s title. Opens an input dialog.

changeEvent(self, QEvent)[source]
eventFilter(self, QObject, QEvent) → bool[source]
activateDefaultWindowGroup()[source]

Activate the default window group if one exists.

Return True if a default group exists and was activated; False if not.

widgetManager()[source]

Return the widget manager.