Skip to content
ben-sangster edited this page Jan 10, 2011 · 2 revisions

Description

Bindings for GraphicsView widget, which inherits from Widget and acts as a container for a GraphicsScene. The GraphicsScene can be used to display GraphicsItems.

Signals

N/A

Constants

N/A

Functions

AlignmentFlag alignment ([AlignmentFlag align])

Brush backgroundBrush ([Brush brush])

bool cache ([bool cachingEnabled])

void centerOn (GraphicsItem item)

void centerOn (Number x, Number y)

void ensureVisible (GraphicsItem item, [Number xmargin, [Number ymargin] ])

void ensureVisible (Number x, *Number y, Number width, Number height, [Number xmargin, [Number ymargin] ])

Brush foregroundBrush ([Brush brush])

bool interactive ([bool isInteractive])

GraphicsItem itemAt (Number x, Number y)

GraphicsItem [] items (PainterPath path)

GraphicsItem [] items (Number x, Number y, [Number width, Number height])

Number rotate ([Number angle])

  • Angle is in degrees.

void scale (Number x, Number y)

GraphicsScene scene (GraphicsScene scene)

Object { x, y, width, height } sceneRect ([Object { x, y, width, height } rect])

Object { x, y, width, height } sceneRect ([Number x, Number y, Number width, Number height])

void render (PainterPath path, [Object { x, y, width, height } target, [Object { x, y, width, height } source] ])

Widget viewport ([Widget viewport])

GraphicsViewViewportUpdateMode viewportUpdateMode ([GraphicsViewViewportUpdateMode mode])

  • Note: The GraphicsView object created as a main window by the main window plugin will default to "FullViewportUpdate".
  • Note: This setting can have an extremely significant impact on performance. GraphicsView widgets with many moving objects per frame will perform much better under FullViewportMode.

void translate (Number x, Number y)

Clone this wiki locally