- All Implemented Interfaces:
QtObjectInterface
,QtSignalBlockerInterface
,QtSignalEmitterInterface
,QtThreadAffineInterface
public class QGraphicsScene extends QObject
Surface for managing a large number of 2D graphical items
Java wrapper for Qt class QGraphicsScene
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QGraphicsScene.ItemIndexMethod
Java wrapper for Qt enum QGraphicsScene::ItemIndexMethodstatic class
QGraphicsScene.SceneLayer
Java wrapper for Qt enum QGraphicsScene::SceneLayerstatic class
QGraphicsScene.SceneLayers
QFlags type for enumQGraphicsScene.SceneLayer
Nested classes/interfaces inherited from class io.qt.core.QObject
QObject.MultiSignal, QObject.PrivateSignal0, QObject.PrivateSignal1<A>, QObject.PrivateSignal2<A,B>, QObject.PrivateSignal3<A,B,C>, QObject.PrivateSignal4<A,B,C,D>, QObject.PrivateSignal5<A,B,C,D,E>, QObject.PrivateSignal6<A,B,C,D,E,F>, QObject.PrivateSignal7<A,B,C,D,E,F,G>, QObject.PrivateSignal8<A,B,C,D,E,F,G,H>, QObject.PrivateSignal9<A,B,C,D,E,F,G,H,I>, QObject.QDeclarativeConstructor, QObject.Signal0, QObject.Signal1<A>, QObject.Signal1Default1<A>, QObject.Signal2<A,B>, QObject.Signal2Default1<A,B>, QObject.Signal2Default2<A,B>, QObject.Signal3<A,B,C>, QObject.Signal3Default1<A,B,C>, QObject.Signal3Default2<A,B,C>, QObject.Signal3Default3<A,B,C>, QObject.Signal4<A,B,C,D>, QObject.Signal4Default1<A,B,C,D>, QObject.Signal4Default2<A,B,C,D>, QObject.Signal4Default3<A,B,C,D>, QObject.Signal4Default4<A,B,C,D>, QObject.Signal5<A,B,C,D,E>, QObject.Signal5Default1<A,B,C,D,E>, QObject.Signal5Default2<A,B,C,D,E>, QObject.Signal5Default3<A,B,C,D,E>, QObject.Signal5Default4<A,B,C,D,E>, QObject.Signal5Default5<A,B,C,D,E>, QObject.Signal6<A,B,C,D,E,F>, QObject.Signal6Default1<A,B,C,D,E,F>, QObject.Signal6Default2<A,B,C,D,E,F>, QObject.Signal6Default3<A,B,C,D,E,F>, QObject.Signal6Default4<A,B,C,D,E,F>, QObject.Signal6Default5<A,B,C,D,E,F>, QObject.Signal6Default6<A,B,C,D,E,F>, QObject.Signal7<A,B,C,D,E,F,G>, QObject.Signal7Default1<A,B,C,D,E,F,G>, QObject.Signal7Default2<A,B,C,D,E,F,G>, QObject.Signal7Default3<A,B,C,D,E,F,G>, QObject.Signal7Default4<A,B,C,D,E,F,G>, QObject.Signal7Default5<A,B,C,D,E,F,G>, QObject.Signal7Default6<A,B,C,D,E,F,G>, QObject.Signal7Default7<A,B,C,D,E,F,G>, QObject.Signal8<A,B,C,D,E,F,G,H>, QObject.Signal8Default1<A,B,C,D,E,F,G,H>, QObject.Signal8Default2<A,B,C,D,E,F,G,H>, QObject.Signal8Default3<A,B,C,D,E,F,G,H>, QObject.Signal8Default4<A,B,C,D,E,F,G,H>, QObject.Signal8Default5<A,B,C,D,E,F,G,H>, QObject.Signal8Default6<A,B,C,D,E,F,G,H>, QObject.Signal8Default7<A,B,C,D,E,F,G,H>, QObject.Signal8Default8<A,B,C,D,E,F,G,H>, QObject.Signal9<A,B,C,D,E,F,G,H,I>, QObject.Signal9Default1<A,B,C,D,E,F,G,H,I>, QObject.Signal9Default2<A,B,C,D,E,F,G,H,I>, QObject.Signal9Default3<A,B,C,D,E,F,G,H,I>, QObject.Signal9Default4<A,B,C,D,E,F,G,H,I>, QObject.Signal9Default5<A,B,C,D,E,F,G,H,I>, QObject.Signal9Default6<A,B,C,D,E,F,G,H,I>, QObject.Signal9Default7<A,B,C,D,E,F,G,H,I>, QObject.Signal9Default8<A,B,C,D,E,F,G,H,I>, QObject.Signal9Default9<A,B,C,D,E,F,G,H,I>, QObject.SignalConfiguration
-
Field Summary
Fields Modifier and Type Field Description QObject.Signal1<List<QRectF>>
changed
QObject.Signal3<QGraphicsItem,QGraphicsItem,Qt.FocusReason>
focusItemChanged
QObject.Signal1<QRectF>
sceneRectChanged
QObject.Signal0
selectionChanged
static QMetaObject
staticMetaObject
This variable stores the meta-object for the class. -
Constructor Summary
Constructors Modifier Constructor Description QGraphicsScene()
Overloaded constructor forQGraphicsScene(io.qt.core.QObject)
withparent = null
.QGraphicsScene(double x, double y, double width, double height)
Overloaded constructor forQGraphicsScene(double, double, double, double, io.qt.core.QObject)
withparent = null
.QGraphicsScene(double x, double y, double width, double height, QObject parent)
QGraphicsScene(QObject parent)
protected
QGraphicsScene(QObject.QDeclarativeConstructor constructor)
Constructor for internal use only.QGraphicsScene(QRectF sceneRect)
Overloaded constructor forQGraphicsScene(io.qt.core.QRectF, io.qt.core.QObject)
withparent = null
.QGraphicsScene(QRectF sceneRect, QObject parent)
protected
QGraphicsScene(QtObject.QPrivateConstructor p)
Constructor for internal use only. -
Method Summary
Modifier and Type Method Description QGraphicsItem
activePanel()
QGraphicsWidget
activeWindow()
QGraphicsEllipseItem
addEllipse(double x, double y, double w, double h)
Equivalent to addEllipse(x, y, w, h, null, null)QGraphicsEllipseItem
addEllipse(double x, double y, double w, double h, QPen pen)
Equivalent to addEllipse(x, y, w, h, pen, null)QGraphicsEllipseItem
addEllipse(double x, double y, double w, double h, QPen pen, QBrush brush)
Creates and adds an ellipse item to the scene, and returns the item reference.QGraphicsEllipseItem
addEllipse(QRectF rect)
Equivalent to addEllipse(rect, null, null)QGraphicsEllipseItem
addEllipse(QRectF rect, QPen pen)
Equivalent to addEllipse(rect, pen, null)QGraphicsEllipseItem
addEllipse(QRectF rect, QPen pen, QBrush brush)
Creates and adds an ellipse item to the scene, and returns the item reference.void
addItem(QGraphicsItem item)
QGraphicsLineItem
addLine(double x1, double y1, double x2, double y2)
Equivalent to addLine(x1, y1, x2, y2, null)QGraphicsLineItem
addLine(double x1, double y1, double x2, double y2, QPen pen)
Creates and adds a line item to the scene, and returns the item reference.QGraphicsLineItem
addLine(QLineF line)
Equivalent to addLine(line, null)QGraphicsLineItem
addLine(QLineF line, QPen pen)
Creates and adds a line item to the scene, and returns the item reference.QGraphicsPathItem
addPath(QPainterPath path)
Equivalent to addPath(path, null, null)QGraphicsPathItem
addPath(QPainterPath path, QPen pen)
Equivalent to addPath(path, pen, null)QGraphicsPathItem
addPath(QPainterPath path, QPen pen, QBrush brush)
Creates and adds a path item to the scene, and returns the item reference.QGraphicsPixmapItem
addPixmap(QPixmap pixmap)
Creates and adds a pixmap item to the scene, and returns the item reference.QGraphicsPolygonItem
addPolygon(QPolygonF polygon)
Equivalent to addPolygon(polygon, null, null)QGraphicsPolygonItem
addPolygon(QPolygonF polygon, QPen pen)
Equivalent to addPolygon(polygon, pen, null)QGraphicsPolygonItem
addPolygon(QPolygonF polygon, QPen pen, QBrush brush)
Creates and adds a polygon item to the scene, and returns the item reference.QGraphicsRectItem
addRect(double x, double y, double w, double h)
Equivalent to addRect(x, y, w, h, null, null)QGraphicsRectItem
addRect(double x, double y, double w, double h, QPen pen)
Equivalent to addRect(x, y, w, h, pen, null)QGraphicsRectItem
addRect(double x, double y, double w, double h, QPen pen, QBrush brush)
Creates and adds a rectangle item to the scene, and returns the item reference.QGraphicsRectItem
addRect(QRectF rect)
Equivalent to addRect(rect, null, null)QGraphicsRectItem
addRect(QRectF rect, QPen pen)
Equivalent to addRect(rect, pen, null)QGraphicsRectItem
addRect(QRectF rect, QPen pen, QBrush brush)
Creates and adds a rectangle item to the scene, and returns the item reference.QGraphicsSimpleTextItem
addSimpleText(String text)
Equivalent to addSimpleText(text, null)QGraphicsSimpleTextItem
addSimpleText(String text, QFont font)
Creates and adds a QGraphicsSimpleTextItem to the scene, and returns the item reference.QGraphicsTextItem
addText(String text)
Equivalent to addText(text, null)QGraphicsTextItem
addText(String text, QFont font)
Creates and adds a text item to the scene, and returns the item reference.QGraphicsProxyWidget
addWidget(QWidget widget)
Overloaded function foraddWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)
withwFlags = new io.qt.core.Qt.WindowFlags(0)
.QGraphicsProxyWidget
addWidget(QWidget widget, Qt.WindowFlags wFlags)
QGraphicsProxyWidget
addWidget(QWidget widget, Qt.WindowType... wFlags)
Overloaded function foraddWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)
.void
advance()
QBrush
backgroundBrush()
int
bspTreeDepth()
void
clear()
void
clearFocus()
void
clearSelection()
QList<QGraphicsItem>
collidingItems(QGraphicsItem item)
Overloaded function forcollidingItems(io.qt.widgets.QGraphicsItem, io.qt.core.Qt.ItemSelectionMode)
withmode = io.qt.core.Qt.ItemSelectionMode.IntersectsItemShape
.QList<QGraphicsItem>
collidingItems(QGraphicsItem item, Qt.ItemSelectionMode mode)
protected void
contextMenuEvent(QGraphicsSceneContextMenuEvent event)
QGraphicsItemGroup
createItemGroup(Collection<QGraphicsItem> items)
void
destroyItemGroup(QGraphicsItemGroup group)
protected void
dragEnterEvent(QGraphicsSceneDragDropEvent event)
protected void
dragLeaveEvent(QGraphicsSceneDragDropEvent event)
protected void
dragMoveEvent(QGraphicsSceneDragDropEvent event)
protected void
drawBackground(QPainter painter, QRectF rect)
protected void
drawForeground(QPainter painter, QRectF rect)
protected void
drawItems(QPainter painter, QGraphicsItem[] items, QStyleOptionGraphicsItem[] options)
Overloaded function fordrawItems(io.qt.gui.QPainter, io.qt.widgets.QGraphicsItem[], io.qt.widgets.QStyleOptionGraphicsItem[], io.qt.widgets.QWidget)
withwidget = null
.protected void
drawItems(QPainter painter, QGraphicsItem[] items, QStyleOptionGraphicsItem[] options, QWidget widget)
protected void
dropEvent(QGraphicsSceneDragDropEvent event)
boolean
event(QEvent event)
boolean
eventFilter(QObject watched, QEvent event)
protected void
focusInEvent(QFocusEvent event)
QGraphicsItem
focusItem()
protected boolean
focusNextPrevChild(boolean next)
boolean
focusOnTouch()
protected void
focusOutEvent(QFocusEvent event)
QFont
font()
QBrush
foregroundBrush()
boolean
hasFocus()
double
height()
protected void
helpEvent(QGraphicsSceneHelpEvent event)
protected void
inputMethodEvent(QInputMethodEvent event)
Object
inputMethodQuery(Qt.InputMethodQuery query)
void
invalidate()
Overloaded function forinvalidate(io.qt.core.QRectF, io.qt.widgets.QGraphicsScene.SceneLayers)
void
invalidate(double x, double y, double w, double h)
Overloaded function forinvalidate(double, double, double, double, io.qt.widgets.QGraphicsScene.SceneLayers)
withlayers = new io.qt.widgets.QGraphicsScene.SceneLayers(65535)
.void
invalidate(double x, double y, double w, double h, QGraphicsScene.SceneLayer... layers)
Overloaded function forinvalidate(double, double, double, double, io.qt.widgets.QGraphicsScene.SceneLayers)
.void
invalidate(double x, double y, double w, double h, QGraphicsScene.SceneLayers layers)
void
invalidate(QRectF rect)
Overloaded function forinvalidate(io.qt.core.QRectF, io.qt.widgets.QGraphicsScene.SceneLayers)
withlayers = new io.qt.widgets.QGraphicsScene.SceneLayers(65535)
.void
invalidate(QRectF rect, QGraphicsScene.SceneLayer... layers)
Overloaded function forinvalidate(io.qt.core.QRectF, io.qt.widgets.QGraphicsScene.SceneLayers)
.void
invalidate(QRectF rect, QGraphicsScene.SceneLayers layers)
boolean
isActive()
boolean
isSortCacheEnabled()
Deprecated.QGraphicsItem
itemAt(double x, double y, QTransform deviceTransform)
QGraphicsItem
itemAt(QPointF pos, QTransform deviceTransform)
QGraphicsScene.ItemIndexMethod
itemIndexMethod()
QList<QGraphicsItem>
items()
Overloaded function foritems(io.qt.core.Qt.SortOrder)
withorder = io.qt.core.Qt.SortOrder.DescendingOrder
.QList<QGraphicsItem>
items(double x, double y, double w, double h, Qt.ItemSelectionMode mode, Qt.SortOrder order)
Overloaded function foritems(double, double, double, double, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
.QList<QGraphicsItem>
items(double x, double y, double w, double h, Qt.ItemSelectionMode mode, Qt.SortOrder order, QTransform deviceTransform)
Returns all visible items that, depending on mode, are either inside or intersect with the rectangle defined by x, y, w and h, in a list sorted using order.QList<QGraphicsItem>
items(QPointF pos)
QList<QGraphicsItem>
items(QPointF pos, Qt.ItemSelectionMode mode)
QList<QGraphicsItem>
items(QPointF pos, Qt.ItemSelectionMode mode, Qt.SortOrder order)
Overloaded function foritems(io.qt.core.QPointF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
.QList<QGraphicsItem>
items(QPointF pos, Qt.ItemSelectionMode mode, Qt.SortOrder order, QTransform deviceTransform)
Returns all visible items that, depending on mode, are at the specified pos in a list sorted using order.QList<QGraphicsItem>
items(QRectF rect)
QList<QGraphicsItem>
items(QRectF rect, Qt.ItemSelectionMode mode)
QList<QGraphicsItem>
items(QRectF rect, Qt.ItemSelectionMode mode, Qt.SortOrder order)
Overloaded function foritems(io.qt.core.QRectF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
.QList<QGraphicsItem>
items(QRectF rect, Qt.ItemSelectionMode mode, Qt.SortOrder order, QTransform deviceTransform)
Returns all visible items that, depending on mode, are either inside or intersect with the specified rect, in a list sorted using order.QList<QGraphicsItem>
items(Qt.SortOrder order)
QList<QGraphicsItem>
items(QPainterPath path)
QList<QGraphicsItem>
items(QPainterPath path, Qt.ItemSelectionMode mode)
QList<QGraphicsItem>
items(QPainterPath path, Qt.ItemSelectionMode mode, Qt.SortOrder order)
Overloaded function foritems(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
.QList<QGraphicsItem>
items(QPainterPath path, Qt.ItemSelectionMode mode, Qt.SortOrder order, QTransform deviceTransform)
Returns all visible items that, depending on mode, are either inside or intersect with the specified path, in a list sorted using order.QList<QGraphicsItem>
items(QPolygonF polygon)
QList<QGraphicsItem>
items(QPolygonF polygon, Qt.ItemSelectionMode mode)
QList<QGraphicsItem>
items(QPolygonF polygon, Qt.ItemSelectionMode mode, Qt.SortOrder order)
Overloaded function foritems(io.qt.gui.QPolygonF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
.QList<QGraphicsItem>
items(QPolygonF polygon, Qt.ItemSelectionMode mode, Qt.SortOrder order, QTransform deviceTransform)
Returns all visible items that, depending on mode, are either inside or intersect with the specified polygon, in a list sorted using order.QRectF
itemsBoundingRect()
protected void
keyPressEvent(QKeyEvent event)
protected void
keyReleaseEvent(QKeyEvent event)
double
minimumRenderSize()
protected void
mouseDoubleClickEvent(QGraphicsSceneMouseEvent event)
QGraphicsItem
mouseGrabberItem()
protected void
mouseMoveEvent(QGraphicsSceneMouseEvent event)
protected void
mousePressEvent(QGraphicsSceneMouseEvent event)
protected void
mouseReleaseEvent(QGraphicsSceneMouseEvent event)
QPalette
palette()
void
removeItem(QGraphicsItem item)
void
render(QPainter painter)
Overloaded function forrender(io.qt.gui.QPainter, io.qt.core.QRectF, io.qt.core.QRectF, io.qt.core.Qt.AspectRatioMode)
void
render(QPainter painter, QRectF target)
Overloaded function forrender(io.qt.gui.QPainter, io.qt.core.QRectF, io.qt.core.QRectF, io.qt.core.Qt.AspectRatioMode)
void
render(QPainter painter, QRectF target, QRectF source)
Overloaded function forrender(io.qt.gui.QPainter, io.qt.core.QRectF, io.qt.core.QRectF, io.qt.core.Qt.AspectRatioMode)
withaspectRatioMode = io.qt.core.Qt.AspectRatioMode.KeepAspectRatio
.void
render(QPainter painter, QRectF target, QRectF source, Qt.AspectRatioMode aspectRatioMode)
QRectF
sceneRect()
QList<QGraphicsItem>
selectedItems()
QPainterPath
selectionArea()
boolean
sendEvent(QGraphicsItem item, QEvent event)
void
setActivePanel(QGraphicsItem item)
void
setActiveWindow(QGraphicsWidget widget)
void
setBackgroundBrush(QBrush brush)
void
setBspTreeDepth(int depth)
void
setFocus()
Overloaded function forsetFocus(io.qt.core.Qt.FocusReason)
withfocusReason = io.qt.core.Qt.FocusReason.OtherFocusReason
.void
setFocus(Qt.FocusReason focusReason)
void
setFocusItem(QGraphicsItem item)
Overloaded function forsetFocusItem(io.qt.widgets.QGraphicsItem, io.qt.core.Qt.FocusReason)
withfocusReason = io.qt.core.Qt.FocusReason.OtherFocusReason
.void
setFocusItem(QGraphicsItem item, Qt.FocusReason focusReason)
void
setFocusOnTouch(boolean enabled)
void
setFont(QFont font)
void
setForegroundBrush(QBrush brush)
void
setItemIndexMethod(QGraphicsScene.ItemIndexMethod method)
void
setMinimumRenderSize(double minSize)
void
setPalette(QPalette palette)
void
setSceneRect(double x, double y, double w, double h)
void
setSceneRect(QRectF rect)
void
setSelectionArea(QPainterPath path)
Overloaded function forsetSelectionArea(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionMode, io.qt.gui.QTransform)
void
setSelectionArea(QPainterPath path, Qt.ItemSelectionMode mode)
Overloaded function forsetSelectionArea(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionMode, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
.void
setSelectionArea(QPainterPath path, Qt.ItemSelectionMode mode, QTransform deviceTransform)
void
setSelectionArea(QPainterPath path, Qt.ItemSelectionOperation selectionOperation)
void
setSelectionArea(QPainterPath path, Qt.ItemSelectionOperation selectionOperation, Qt.ItemSelectionMode mode)
Overloaded function forsetSelectionArea(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionOperation, io.qt.core.Qt.ItemSelectionMode, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
.void
setSelectionArea(QPainterPath path, Qt.ItemSelectionOperation selectionOperation, Qt.ItemSelectionMode mode, QTransform deviceTransform)
void
setSelectionArea(QPainterPath path, QTransform deviceTransform)
void
setSortCacheEnabled(boolean enabled)
Deprecated.void
setStickyFocus(boolean enabled)
void
setStyle(QStyle style)
boolean
stickyFocus()
QStyle
style()
void
update()
Overloaded function forupdate(io.qt.core.QRectF)
withrect = new io.qt.core.QRectF()
.void
update(double x, double y, double w, double h)
void
update(QRectF rect)
QList<QGraphicsView>
views()
protected void
wheelEvent(QGraphicsSceneWheelEvent event)
double
width()
Methods inherited from class io.qt.core.QObject
blockSignals, childEvent, children, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connect, connectNotify, customEvent, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnect, disconnectNotify, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, emit, emit, emit, emit, emit, emit, emit, emit, emit, findChild, findChild, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, findChildren, findChildren, findChildren, findChildren, findChildren, findChildren, findChildren, inherits, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, parent, property, qt_metacast, receivers, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, startTimer, thread, timerEvent, toString, tr, tr, tr
-
Field Details
-
staticMetaObject
This variable stores the meta-object for the class. -
changed
-
focusItemChanged
-
sceneRectChanged
-
selectionChanged
-
-
Constructor Details
-
QGraphicsScene
public QGraphicsScene()Overloaded constructor for
QGraphicsScene(io.qt.core.QObject)
withparent = null
. -
QGraphicsScene
-
QGraphicsScene
Overloaded constructor for
QGraphicsScene(io.qt.core.QRectF, io.qt.core.QObject)
withparent = null
. -
QGraphicsScene
-
QGraphicsScene
public QGraphicsScene(double x, double y, double width, double height)Overloaded constructor for
QGraphicsScene(double, double, double, double, io.qt.core.QObject)
withparent = null
. -
QGraphicsScene
-
QGraphicsScene
Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
QGraphicsScene
Constructor for internal use only. It is not allowed to call the declarative constructor from inside Java.
-
-
Method Details
-
activePanel
-
activeWindow
-
addItem
-
addWidget
@QtUninvokable public final QGraphicsProxyWidget addWidget(QWidget widget, Qt.WindowType... wFlags)Overloaded function for
addWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)
. -
addWidget
Overloaded function for
addWidget(io.qt.widgets.QWidget, io.qt.core.Qt.WindowFlags)
withwFlags = new io.qt.core.Qt.WindowFlags(0)
. -
addWidget
-
advance
public final void advance() -
backgroundBrush
-
bspTreeDepth
-
clear
public final void clear() -
clearFocus
-
clearSelection
public final void clearSelection() -
collidingItems
Overloaded function for
collidingItems(io.qt.widgets.QGraphicsItem, io.qt.core.Qt.ItemSelectionMode)
withmode = io.qt.core.Qt.ItemSelectionMode.IntersectsItemShape
. -
collidingItems
@QtUninvokable public final QList<QGraphicsItem> collidingItems(QGraphicsItem item, Qt.ItemSelectionMode mode) -
createItemGroup
-
destroyItemGroup
-
focusItem
-
focusNextPrevChild
protected final boolean focusNextPrevChild(boolean next) -
focusOnTouch
-
font
-
foregroundBrush
-
hasFocus
-
height
-
invalidate
Overloaded function for
invalidate(io.qt.core.QRectF, io.qt.widgets.QGraphicsScene.SceneLayers)
. -
invalidate
Overloaded function for
invalidate(io.qt.core.QRectF, io.qt.widgets.QGraphicsScene.SceneLayers)
withlayers = new io.qt.widgets.QGraphicsScene.SceneLayers(65535)
. -
invalidate
public final void invalidate()Overloaded function for
invalidate(io.qt.core.QRectF, io.qt.widgets.QGraphicsScene.SceneLayers)
with:
rect = new io.qt.core.QRectF()
layers = new io.qt.widgets.QGraphicsScene.SceneLayers(65535)
-
invalidate
-
invalidate
@QtUninvokable public final void invalidate(double x, double y, double w, double h, QGraphicsScene.SceneLayer... layers)Overloaded function for
invalidate(double, double, double, double, io.qt.widgets.QGraphicsScene.SceneLayers)
. -
invalidate
Overloaded function for
invalidate(double, double, double, double, io.qt.widgets.QGraphicsScene.SceneLayers)
withlayers = new io.qt.widgets.QGraphicsScene.SceneLayers(65535)
. -
invalidate
@QtUninvokable public final void invalidate(double x, double y, double w, double h, QGraphicsScene.SceneLayers layers) -
isActive
-
isSortCacheEnabled
Deprecated. -
itemAt
-
itemAt
-
itemIndexMethod
-
items
Overloaded function for
items(io.qt.core.Qt.SortOrder)
withorder = io.qt.core.Qt.SortOrder.DescendingOrder
. -
items
-
items
@QtUninvokable public final QList<QGraphicsItem> items(QPainterPath path, Qt.ItemSelectionMode mode, Qt.SortOrder order)Overloaded function for
items(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
. -
items
@QtUninvokable public final QList<QGraphicsItem> items(QPainterPath path, Qt.ItemSelectionMode mode)Overloaded function for
items(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
with:
order = io.qt.core.Qt.SortOrder.DescendingOrder
deviceTransform = new io.qt.gui.QTransform()
-
items
Overloaded function for
items(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
with:
mode = io.qt.core.Qt.ItemSelectionMode.IntersectsItemShape
order = io.qt.core.Qt.SortOrder.DescendingOrder
deviceTransform = new io.qt.gui.QTransform()
-
items
@QtUninvokable public final QList<QGraphicsItem> items(QPainterPath path, Qt.ItemSelectionMode mode, Qt.SortOrder order, QTransform deviceTransform)Returns all visible items that, depending on mode, are either inside or intersect with the specified path, in a list sorted using order. In this case, "visible" defines items for which: isVisible() returns true, effectiveOpacity() returns a value greater than 0.0 (which is fully transparent) and the parent item does not clip it
See QGraphicsScene::items(QPainterPath,Qt::ItemSelectionMode,Qt::SortOrder,QTransform)const
-
items
@QtUninvokable public final QList<QGraphicsItem> items(QPointF pos, Qt.ItemSelectionMode mode, Qt.SortOrder order)Overloaded function for
items(io.qt.core.QPointF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
. -
items
Overloaded function for
items(io.qt.core.QPointF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
with:
order = io.qt.core.Qt.SortOrder.DescendingOrder
deviceTransform = new io.qt.gui.QTransform()
-
items
Overloaded function for
items(io.qt.core.QPointF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
with:
mode = io.qt.core.Qt.ItemSelectionMode.IntersectsItemShape
order = io.qt.core.Qt.SortOrder.DescendingOrder
deviceTransform = new io.qt.gui.QTransform()
-
items
@QtUninvokable public final QList<QGraphicsItem> items(QPointF pos, Qt.ItemSelectionMode mode, Qt.SortOrder order, QTransform deviceTransform)Returns all visible items that, depending on mode, are at the specified pos in a list sorted using order. In this case, "visible" defines items for which: isVisible() returns true, effectiveOpacity() returns a value greater than 0.0 (which is fully transparent) and the parent item does not clip it
See QGraphicsScene::items(QPointF,Qt::ItemSelectionMode,Qt::SortOrder,QTransform)const
-
items
@QtUninvokable public final QList<QGraphicsItem> items(QPolygonF polygon, Qt.ItemSelectionMode mode, Qt.SortOrder order)Overloaded function for
items(io.qt.gui.QPolygonF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
. -
items
@QtUninvokable public final QList<QGraphicsItem> items(QPolygonF polygon, Qt.ItemSelectionMode mode)Overloaded function for
items(io.qt.gui.QPolygonF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
with:
order = io.qt.core.Qt.SortOrder.DescendingOrder
deviceTransform = new io.qt.gui.QTransform()
-
items
Overloaded function for
items(io.qt.gui.QPolygonF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
with:
mode = io.qt.core.Qt.ItemSelectionMode.IntersectsItemShape
order = io.qt.core.Qt.SortOrder.DescendingOrder
deviceTransform = new io.qt.gui.QTransform()
-
items
@QtUninvokable public final QList<QGraphicsItem> items(QPolygonF polygon, Qt.ItemSelectionMode mode, Qt.SortOrder order, QTransform deviceTransform)Returns all visible items that, depending on mode, are either inside or intersect with the specified polygon, in a list sorted using order. In this case, "visible" defines items for which: isVisible() returns true, effectiveOpacity() returns a value greater than 0.0 (which is fully transparent) and the parent item does not clip it
See QGraphicsScene::items(QPolygonF,Qt::ItemSelectionMode,Qt::SortOrder,QTransform)const
-
items
@QtUninvokable public final QList<QGraphicsItem> items(QRectF rect, Qt.ItemSelectionMode mode, Qt.SortOrder order)Overloaded function for
items(io.qt.core.QRectF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
. -
items
Overloaded function for
items(io.qt.core.QRectF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
with:
order = io.qt.core.Qt.SortOrder.DescendingOrder
deviceTransform = new io.qt.gui.QTransform()
-
items
Overloaded function for
items(io.qt.core.QRectF, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
with:
mode = io.qt.core.Qt.ItemSelectionMode.IntersectsItemShape
order = io.qt.core.Qt.SortOrder.DescendingOrder
deviceTransform = new io.qt.gui.QTransform()
-
items
@QtUninvokable public final QList<QGraphicsItem> items(QRectF rect, Qt.ItemSelectionMode mode, Qt.SortOrder order, QTransform deviceTransform)Returns all visible items that, depending on mode, are either inside or intersect with the specified rect, in a list sorted using order. In this case, "visible" defines items for which: isVisible() returns true, effectiveOpacity() returns a value greater than 0.0 (which is fully transparent) and the parent item does not clip it
See QGraphicsScene::items(QRectF,Qt::ItemSelectionMode,Qt::SortOrder,QTransform)const
-
items
@QtUninvokable public final QList<QGraphicsItem> items(double x, double y, double w, double h, Qt.ItemSelectionMode mode, Qt.SortOrder order)Overloaded function for
items(double, double, double, double, io.qt.core.Qt.ItemSelectionMode, io.qt.core.Qt.SortOrder, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
. -
items
@QtUninvokable public final QList<QGraphicsItem> items(double x, double y, double w, double h, Qt.ItemSelectionMode mode, Qt.SortOrder order, QTransform deviceTransform)Returns all visible items that, depending on mode, are either inside or intersect with the rectangle defined by x, y, w and h, in a list sorted using order. In this case, "visible" defines items for which: isVisible() returns true, effectiveOpacity() returns a value greater than 0.0 (which is fully transparent) and the parent item does not clip it
See QGraphicsScene::items(qreal,qreal,qreal,qreal,Qt::ItemSelectionMode,Qt::SortOrder,QTransform)const
-
itemsBoundingRect
-
minimumRenderSize
-
mouseGrabberItem
-
palette
-
removeItem
-
render
Overloaded function for
render(io.qt.gui.QPainter, io.qt.core.QRectF, io.qt.core.QRectF, io.qt.core.Qt.AspectRatioMode)
withaspectRatioMode = io.qt.core.Qt.AspectRatioMode.KeepAspectRatio
. -
render
Overloaded function for
render(io.qt.gui.QPainter, io.qt.core.QRectF, io.qt.core.QRectF, io.qt.core.Qt.AspectRatioMode)
with:
source = new io.qt.core.QRectF()
aspectRatioMode = io.qt.core.Qt.AspectRatioMode.KeepAspectRatio
-
render
Overloaded function for
render(io.qt.gui.QPainter, io.qt.core.QRectF, io.qt.core.QRectF, io.qt.core.Qt.AspectRatioMode)
with:
target = new io.qt.core.QRectF()
source = new io.qt.core.QRectF()
aspectRatioMode = io.qt.core.Qt.AspectRatioMode.KeepAspectRatio
-
render
@QtUninvokable public final void render(QPainter painter, QRectF target, QRectF source, Qt.AspectRatioMode aspectRatioMode) -
sceneRect
-
selectedItems
-
selectionArea
-
sendEvent
-
setActivePanel
-
setActiveWindow
-
setBackgroundBrush
-
setBspTreeDepth
-
setFocus
Overloaded function for
setFocus(io.qt.core.Qt.FocusReason)
withfocusReason = io.qt.core.Qt.FocusReason.OtherFocusReason
. -
setFocus
-
setFocusItem
Overloaded function for
setFocusItem(io.qt.widgets.QGraphicsItem, io.qt.core.Qt.FocusReason)
withfocusReason = io.qt.core.Qt.FocusReason.OtherFocusReason
. -
setFocusItem
-
setFocusOnTouch
-
setFont
-
setForegroundBrush
-
setItemIndexMethod
-
setMinimumRenderSize
-
setPalette
-
setSceneRect
-
setSceneRect
-
setSelectionArea
Overloaded function for
setSelectionArea(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionMode, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
. -
setSelectionArea
Overloaded function for
setSelectionArea(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionMode, io.qt.gui.QTransform)
with:
mode = io.qt.core.Qt.ItemSelectionMode.IntersectsItemShape
deviceTransform = new io.qt.gui.QTransform()
-
setSelectionArea
@QtUninvokable public final void setSelectionArea(QPainterPath path, Qt.ItemSelectionMode mode, QTransform deviceTransform) -
setSelectionArea
@QtUninvokable public final void setSelectionArea(QPainterPath path, Qt.ItemSelectionOperation selectionOperation, Qt.ItemSelectionMode mode)Overloaded function for
setSelectionArea(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionOperation, io.qt.core.Qt.ItemSelectionMode, io.qt.gui.QTransform)
withdeviceTransform = new io.qt.gui.QTransform()
. -
setSelectionArea
@QtUninvokable public final void setSelectionArea(QPainterPath path, Qt.ItemSelectionOperation selectionOperation)Overloaded function for
setSelectionArea(io.qt.gui.QPainterPath, io.qt.core.Qt.ItemSelectionOperation, io.qt.core.Qt.ItemSelectionMode, io.qt.gui.QTransform)
with:
mode = io.qt.core.Qt.ItemSelectionMode.IntersectsItemShape
deviceTransform = new io.qt.gui.QTransform()
-
setSelectionArea
@QtUninvokable public final void setSelectionArea(QPainterPath path, Qt.ItemSelectionOperation selectionOperation, Qt.ItemSelectionMode mode, QTransform deviceTransform) -
setSelectionArea
-
setSortCacheEnabled
Deprecated. -
setStickyFocus
-
setStyle
-
stickyFocus
-
style
-
update
public final void update()Overloaded function for
update(io.qt.core.QRectF)
withrect = new io.qt.core.QRectF()
. -
update
-
update
-
views
-
width
-
contextMenuEvent
-
dragEnterEvent
-
dragLeaveEvent
-
dragMoveEvent
-
drawBackground
-
drawForeground
-
drawItems
@QtUninvokable protected final void drawItems(QPainter painter, QGraphicsItem[] items, QStyleOptionGraphicsItem[] options)Overloaded function for
drawItems(io.qt.gui.QPainter, io.qt.widgets.QGraphicsItem[], io.qt.widgets.QStyleOptionGraphicsItem[], io.qt.widgets.QWidget)
withwidget = null
. -
drawItems
@QtUninvokable protected void drawItems(QPainter painter, QGraphicsItem[] items, QStyleOptionGraphicsItem[] options, QWidget widget) -
dropEvent
-
event
-
eventFilter
- Overrides:
eventFilter
in classQObject
-
focusInEvent
-
focusOutEvent
-
helpEvent
-
inputMethodEvent
-
inputMethodQuery
-
keyPressEvent
-
keyReleaseEvent
-
mouseDoubleClickEvent
-
mouseMoveEvent
-
mousePressEvent
-
mouseReleaseEvent
-
wheelEvent
-
addEllipse
Equivalent to addEllipse(rect, null, null) -
addEllipse
Equivalent to addEllipse(rect, pen, null) -
addEllipse
Creates and adds an ellipse item to the scene, and returns the item reference. The geometry of the ellipse is defined by rect, and its pen and brush are initialized to pen and brush. Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0). If the item is visible (i.e., QGraphicsItem::isVisible() returns true), QGraphicsScene will emit changed() once control goes back to the event loop.- Parameters:
rect
- The bounding rectangle of the ellipse.pen
- The pen for the resulting QGraphicsEllipseItem.brush
- The brush for the resulting QGraphicsEllipseItem.- Returns:
- The resulting item.
-
addEllipse
Equivalent to addEllipse(x, y, w, h, null, null) -
addEllipse
Equivalent to addEllipse(x, y, w, h, pen, null) -
addEllipse
public final QGraphicsEllipseItem addEllipse(double x, double y, double w, double h, QPen pen, QBrush brush)Creates and adds an ellipse item to the scene, and returns the item reference. The geometry of the ellipse is defined by x, y, w, h, and its pen and brush are initialized to pen and brush. Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0). If the item is visible (i.e., QGraphicsItem.isVisible() returns true), QGraphicsScene will emit changed once control goes back to the event loop.- Parameters:
x
- The left horizontal coordinate of the ellipse's bounding rectangle.y
- The top vertical coordinate of the ellipse's bounding rectangle.w
- The width of the ellipse's bounding rectangle.h
- The height of the ellipse's bounding rectangle.pen
- The pen for the resulting QGraphicsEllipseItem.brush
- The brush for the resulting QGraphicsEllipseItem.- Returns:
- The resulting item.
-
addLine
Equivalent to addLine(line, null) -
addLine
Creates and adds a line item to the scene, and returns the item reference. The geometry of the line is defined by line, and its pen is initialized to pen. Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0). If the item is visible (i.e., QGraphicsItem.isVisible() returns true), QGraphicsScene will emit changed once control goes back to the event loop.- Parameters:
line
- The definition of the line.pen
- The pen with which to draw the line.- Returns:
- The resulting item.
-
addLine
Equivalent to addLine(x1, y1, x2, y2, null) -
addLine
Creates and adds a line item to the scene, and returns the item reference. The geometry of the line is defined by x1, y1, x2, y2, and its pen is initialized to pen. Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0). If the item is visible (i.e., QGraphicsItem.isVisible() returns true), QGraphicsScene will emit changed once control goes back to the event loop.- Parameters:
x1
- The first horizontal coordinate of the line.y1
- The first vertical coordinate of the line.x2
- The second horizontal coordinate of the line.y2
- The second vertical coordinate of the line.pen
- The pen with which to draw the line.- Returns:
- The resulting item.
-
addPath
Equivalent to addPath(path, null, null) -
addPath
Equivalent to addPath(path, pen, null) -
addPath
Creates and adds a path item to the scene, and returns the item reference. The geometry of the path is defined by path, and its pen and brush are initialized to pen and brush. Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0). If the item is visible (i.e., QGraphicsItem.isVisible() returns true), QGraphicsScene will emit changed once control goes back to the event loop.- Parameters:
path
- The definition of the path.pen
- The pen for drawing the path.brush
- The brush for drawing the path.- Returns:
- The resulting item.
-
addPixmap
Creates and adds a pixmap item to the scene, and returns the item reference. The pixmap is defined by pixmap. Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0). If the item is visible (i.e., QGraphicsItem.isVisible() returns true), QGraphicsScene will emit changed once control goes back to the event loop.- Parameters:
pixmap
- The pixmap for which to create a graphics item.- Returns:
- The resulting item.
-
addPolygon
Equivalent to addPolygon(polygon, null, null) -
addPolygon
Equivalent to addPolygon(polygon, pen, null) -
addPolygon
Creates and adds a polygon item to the scene, and returns the item reference. The polygon is defined by polygon, and its pen and brush are initialized to pen and brush. Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0). If the item is visible (i.e., QGraphicsItem.isVisible() returns true), QGraphicsScene will emit changed once control goes back to the event loop.- Parameters:
polygon
- The definition of the polygon.pen
- The pen with which to draw the polygon.brush
- The brush with which to draw the polygon.- Returns:
- The resulting item.
-
addRect
Equivalent to addRect(rect, null, null) -
addRect
Equivalent to addRect(rect, pen, null) -
addRect
Creates and adds a rectangle item to the scene, and returns the item reference. The geometry of the rectangle is defined by rect, and its pen and brush are initialized to pen and brush. Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0). For example, if a QRect(50, 50, 100, 100) is added, its top-left corner will be at (50, 50) relative to the origin in the item's coordinate system. If the item is visible (i.e., QGraphicsItem.isVisible() returns true), QGraphicsScene will emit changed once control goes back to the event loop.- Parameters:
rect
- The definition of the rectangle.pen
- The pen with which to draw the rectangle.brush
- The brush with which to draw the rectangle.- Returns:
- The resulting item.
-
addRect
Equivalent to addRect(x, y, w, h, null, null) -
addRect
Equivalent to addRect(x, y, w, h, pen, null) -
addRect
public final QGraphicsRectItem addRect(double x, double y, double w, double h, QPen pen, QBrush brush)Creates and adds a rectangle item to the scene, and returns the item reference. The geometry of the rectangle is defined by x, y, w, h, and its pen and brush are initialized to pen and brush. Note that the item's geometry is provided in item coordinates, and its position is initialized to (0, 0). If the item is visible (i.e., QGraphicsItem.isVisible() returns true), QGraphicsScene will emit changed once control goes back to the event loop.- Parameters:
x
- The left horizontal coordinate of the rectangle.y
- The top vertical coordinate of the rectangle.w
- The width of the rectangle.h
- The height of the rectangle.pen
- The pen with which to draw the rectangle.brush
- The brush with which to draw the rectangle.- Returns:
- The resulting item.
-
addSimpleText
Equivalent to addSimpleText(text, null) -
addSimpleText
Creates and adds a QGraphicsSimpleTextItem to the scene, and returns the item reference. The text string is initialized to text, and its font is initialized to font. The item's position is initialized to (0, 0). If the item is visible (i.e., QGraphicsItem.isVisible() returns true), QGraphicsScene will emit changed once control goes back to the event loop.- Parameters:
text
- The text to add to the scene.font
- The font to use for displaying the text.- Returns:
- The resulting item.
-
addText
Equivalent to addText(text, null) -
addText
Creates and adds a text item to the scene, and returns the item reference. The text string is initialized to text, and its font is initialized to font. The item's position is initialized to (0, 0). If the item is visible (i.e., QGraphicsItem.isVisible() returns true), QGraphicsScene will emit changed once control goes back to the event loop.- Parameters:
text
- The text to add to the scene.font
- The font to use for displaying the text.- Returns:
- The resulting item.
-