7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtCore/qmetatype.h>
9#include <QtGui/qpainter.h>
10#include <QtWidgets/qscrollarea.h>
11#include <QtWidgets/qgraphicsscene.h>
26 Q_FLAGS(QPainter::RenderHints CacheMode OptimizationFlags)
28 Q_PROPERTY(
QBrush foregroundBrush READ foregroundBrush WRITE setForegroundBrush)
29 Q_PROPERTY(
bool interactive READ isInteractive WRITE setInteractive)
36 WRITE setTransformationAnchor)
39 WRITE setViewportUpdateMode)
40#if QT_CONFIG(rubberband)
42 WRITE setRubberBandSelectionMode)
44 Q_PROPERTY(OptimizationFlags optimizationFlags READ optimizationFlags
45 WRITE setOptimizationFlags)
73 BoundingRectViewportUpdate
78 DontSavePainterState = 0x1,
79 DontAdjustForAntialiasing = 0x2,
80 IndirectPainting = 0x4
88 QSize sizeHint()
const override;
90 QPainter::RenderHints renderHints()
const;
97 ViewportAnchor transformationAnchor()
const;
98 void setTransformationAnchor(ViewportAnchor anchor);
100 ViewportAnchor resizeAnchor()
const;
101 void setResizeAnchor(ViewportAnchor anchor);
103 ViewportUpdateMode viewportUpdateMode()
const;
104 void setViewportUpdateMode(ViewportUpdateMode
mode);
106 OptimizationFlags optimizationFlags()
const;
107 void setOptimizationFlag(OptimizationFlag flag,
bool enabled =
true);
108 void setOptimizationFlags(OptimizationFlags
flags);
110 DragMode dragMode()
const;
111 void setDragMode(DragMode
mode);
113#if QT_CONFIG(rubberband)
116 QRect rubberBandRect()
const;
119 CacheMode cacheMode()
const;
121 void resetCachedContent();
123 bool isInteractive()
const;
124 void setInteractive(
bool allowed);
135 bool isTransformed()
const;
137 void resetTransform();
146 void ensureVisible(
const QRectF &
rect,
int xmargin = 50,
int ymargin = 50);
148 void ensureVisible(
const QGraphicsItem *
item,
int xmargin = 50,
int ymargin = 50);
176 inline QPointF mapToScene(
int x,
int y)
const;
177 inline QPolygonF mapToScene(
int x,
int y,
int w,
int h)
const;
183 QBrush backgroundBrush()
const;
186 QBrush foregroundBrush()
const;
194#if QT_CONFIG(rubberband)
207#ifndef QT_NO_CONTEXTMENU
210#if QT_CONFIG(draganddrop)
211 void dragEnterEvent(QDragEnterEvent *
event)
override;
212 void dragLeaveEvent(QDragLeaveEvent *
event)
override;
213 void dragMoveEvent(QDragMoveEvent *
event)
override;
214 void dropEvent(QDropEvent *
event)
override;
217 bool focusNextPrevChild(
bool next)
override;
225#if QT_CONFIG(wheelevent)
226 void wheelEvent(QWheelEvent *
event)
override;
230 void scrollContentsBy(
int dx,
int dy)
override;
247 friend class QGraphicsSceneWidget;
257{ setSceneRect(
QRectF(ax, ay, aw, ah)); }
The QCursor class provides a mouse cursor with an arbitrary shape.
The QFocusEvent class contains event parameters for widget focus events.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
QPointF mapToScene(const QPoint &point) const
Returns the viewport coordinate point mapped to scene coordinates.
QList< QGraphicsItem * > items() const
Returns a list of all the items in the associated scene, in descending stacking order (i....
void centerOn(const QPointF &pos)
Scrolls the contents of the viewport to ensure that the scene coordinate pos, is centered in the view...
void ensureVisible(const QRectF &rect, int xmargin=50, int ymargin=50)
Scrolls the contents of the viewport so that the scene rectangle rect is visible, with margins specif...
ViewportAnchor
This enums describe the possible anchors that QGraphicsView can use when the user resizes the view or...
CacheModeFlag
This enum describes the flags that you can set for a QGraphicsView's cache mode.
void fitInView(const QRectF &rect, Qt::AspectRatioMode aspectRadioMode=Qt::IgnoreAspectRatio)
Scales the view matrix and scrolls the scroll bars to ensure that the scene rectangle rect fits insid...
DragMode
This enum describes the default action for the view when pressing and dragging the mouse over the vie...
QGraphicsItem * itemAt(const QPoint &pos) const
Returns the item at position pos, which is in viewport coordinates.
QPoint mapFromScene(const QPointF &point) const
Returns the scene coordinate point to viewport coordinates.
The QKeyEvent class describes a key event.
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
RenderHint
Renderhints are used to specify flags to QPainter that may or may not be respected by any given engin...
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
The QPolygonF class provides a list of points using floating point precision.
The QPolygon class provides a list of points using integer precision.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
The QResizeEvent class contains event parameters for resize events.
The QShowEvent class provides an event that is sent when a widget is shown.
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
Combined button and popup list for selecting options.
const EGLAttrib EGLOutputLayerEXT * layers
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLsizei GLchar * source
GLuint GLenum GLenum transform
GLsizei const GLchar *const * path
GLenum GLenum GLenum GLenum GLenum scale
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define QT_REQUIRE_CONFIG(feature)
static bool translate(xcb_connection_t *connection, xcb_window_t child, xcb_window_t parent, int *x, int *y)
label setAlignment(Qt::AlignLeft|Qt::AlignTop)
[0]
view setBackgroundBrush(QImage(":/images/backgroundtile.png"))
view setCacheMode(QGraphicsView::CacheBackground)
view setRenderHints(QPainter::Antialiasing|QPainter::SmoothPixmapTransform)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent