Annotation Items (annotationitem
)¶
-
class
orangecanvas.canvas.items.annotationitem.
Annotation
(parent=None, **kwargs)¶ Bases:
PyQt4.QtGui.QGraphicsWidget
Base class for annotations in the canvas scheme.
-
class
orangecanvas.canvas.items.annotationitem.
TextAnnotation
(parent=None, **kwargs)¶ Bases:
orangecanvas.canvas.items.annotationitem.Annotation
Text annotation item for the canvas scheme.
-
editingFinished
¶ Emitted when the editing is finished (i.e. the item loses focus).
-
textEdited
¶ Emitted when the edited text changes.
-
adjustSize
()¶ Resize to a reasonable size.
-
setFramePen
(pen)¶ Set the frame pen. By default Qt.NoPen is used (i.e. the frame is not shown).
-
framePen
()¶ Return the frame pen.
-
setFrameBrush
(brush)¶ Set the frame brush.
-
frameBrush
()¶ Return the frame brush.
-
setPlainText
(text)¶ Set the annotation plain text.
-
setHtml
(text)¶ Set the annotation rich text.
-
setDefaultTextColor
(color)¶ Set the default text color.
-
setTextMargins
(left, top, right, bottom)¶ Set the text margins.
-
textMargins
()¶ Return the text margins.
-
document
()¶ Return the QTextDocument instance used internally.
-
startEdit
()¶ Start the annotation text edit process.
-
endEdit
()¶ End the annotation edit.
-
-
class
orangecanvas.canvas.items.annotationitem.
ArrowAnnotation
(parent=None, line=None, **kwargs)¶ Bases:
orangecanvas.canvas.items.annotationitem.Annotation
-
setAutoAdjustGeometry
(autoAdjust)¶ If set to True then the geometry will be adjusted whenever the arrow is changed with setLine. Otherwise the geometry of the item is only updated so the line lies within the geometry() rect (i.e. it only grows). True by default
-
autoAdjustGeometry
()¶ Should the geometry of the item be adjusted automatically when setLine is called.
-
setLine
(line)¶ Set the arrow base line (a QLineF in object coordinates).
-
line
()¶ Return the arrow base line (QLineF in object coordinates).
-
setColor
(color)¶ Set arrow brush color.
-
color
()¶ Return the arrow brush color.
-
setLineWidth
(lineWidth)¶ Set the arrow line width.
-
lineWidth
()¶ Return the arrow line width.
-
adjustGeometry
()¶ Adjust the widget geometry to exactly fit the arrow inside while preserving the arrow path scene geometry.
-