|
| ZoomView (QWidget *parent=nullptr) |
|
int | zoom () const |
|
qreal | zoomFactor () const |
|
bool | isZoomContextMenuEnabled () const |
|
void | setZoomContextMenuEnabled (bool e) |
|
QGraphicsScene & | scene () |
|
const QGraphicsScene & | scene () const |
|
ZoomMenu * | zoomMenu () |
|
QPoint | scrollPosition () const |
|
void | setScrollPosition (const QPoint &pos) |
|
void | scrollToOrigin () |
|
| QGraphicsView (QWidget *parent=nullptr) |
| Constructs a QGraphicsView.
|
|
| QGraphicsView (QGraphicsScene *scene, QWidget *parent=nullptr) |
| Constructs a QGraphicsView and sets the visualized scene to scene.
|
|
| ~QGraphicsView () |
| Destructs the QGraphicsView object.
|
|
QSize | sizeHint () const override |
| \reimp
|
|
QPainter::RenderHints | renderHints () const |
|
void | setRenderHint (QPainter::RenderHint hint, bool enabled=true) |
| If enabled is true, the render hint hint is enabled; otherwise it is disabled.
|
|
void | setRenderHints (QPainter::RenderHints hints) |
|
Qt::Alignment | alignment () const |
|
void | setAlignment (Qt::Alignment alignment) |
|
ViewportAnchor | transformationAnchor () const |
|
void | setTransformationAnchor (ViewportAnchor anchor) |
|
ViewportAnchor | resizeAnchor () const |
|
void | setResizeAnchor (ViewportAnchor anchor) |
|
ViewportUpdateMode | viewportUpdateMode () const |
|
void | setViewportUpdateMode (ViewportUpdateMode mode) |
|
OptimizationFlags | optimizationFlags () const |
|
void | setOptimizationFlag (OptimizationFlag flag, bool enabled=true) |
| Enables flag if enabled is true; otherwise disables flag.
|
|
void | setOptimizationFlags (OptimizationFlags flags) |
|
DragMode | dragMode () const |
|
void | setDragMode (DragMode mode) |
|
CacheMode | cacheMode () const |
|
void | setCacheMode (CacheMode mode) |
|
void | resetCachedContent () |
| Resets any cached content.
|
|
bool | isInteractive () const |
|
void | setInteractive (bool allowed) |
|
QGraphicsScene * | scene () const |
| Returns a pointer to the scene that is currently visualized in the view.
|
|
void | setScene (QGraphicsScene *scene) |
| Sets the current scene to scene.
|
|
QRectF | sceneRect () const |
|
void | setSceneRect (const QRectF &rect) |
|
void | setSceneRect (qreal x, qreal y, qreal w, qreal h) |
|
QTransform | transform () const |
| Returns the current transformation matrix for the view.
|
|
QTransform | viewportTransform () const |
| Returns a matrix that maps scene coordinates to viewport coordinates.
|
|
bool | isTransformed () const |
|
void | setTransform (const QTransform &matrix, bool combine=false) |
| Sets the view's current transformation matrix to matrix.
|
|
void | resetTransform () |
| Resets the view transformation to the identity matrix.
|
|
void | rotate (qreal angle) |
| Rotates the current view transformation angle degrees clockwise.
|
|
void | scale (qreal sx, qreal sy) |
| Scales the current view transformation by (sx, sy).
|
|
void | shear (qreal sh, qreal sv) |
| Shears the current view transformation by (sh, sv).
|
|
void | translate (qreal dx, qreal dy) |
| Translates the current view transformation by (dx, dy).
|
|
void | centerOn (const QPointF &pos) |
| Scrolls the contents of the viewport to ensure that the scene coordinate pos, is centered in the view.
|
|
void | centerOn (qreal x, qreal y) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This function is provided for convenience.
|
|
void | centerOn (const QGraphicsItem *item) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Scrolls the contents of the viewport to ensure that item 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 specified in pixels by xmargin and ymargin.
|
|
void | ensureVisible (qreal x, qreal y, qreal w, qreal h, int xmargin=50, int ymargin=50) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This function is provided for convenience.
|
|
void | ensureVisible (const QGraphicsItem *item, int xmargin=50, int ymargin=50) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Scrolls the contents of the viewport so that the center of item item is visible, with margins specified in pixels by xmargin and ymargin.
|
|
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 inside the viewport.
|
|
void | fitInView (qreal x, qreal y, qreal w, qreal h, Qt::AspectRatioMode aspectRadioMode=Qt::IgnoreAspectRatio) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This convenience function is equivalent to calling fitInView(QRectF(x, y, w, h), aspectRatioMode).
|
|
void | fitInView (const QGraphicsItem *item, Qt::AspectRatioMode aspectRadioMode=Qt::IgnoreAspectRatio) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Ensures that item fits tightly inside the view, scaling the view according to aspectRatioMode.
|
|
void | render (QPainter *painter, const QRectF &target=QRectF(), const QRect &source=QRect(), Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio) |
| Renders the source rect, which is in view coordinates, from the scene into target, which is in paint device coordinates, using painter.
|
|
QList< QGraphicsItem * > | items () const |
| Returns a list of all the items in the associated scene, in descending stacking order (i.e., the first item in the returned list is the uppermost item).
|
|
QList< QGraphicsItem * > | items (const QPoint &pos) const |
| Returns a list of all the items at the position pos in the view.
|
|
QList< QGraphicsItem * > | items (int x, int y) const |
| This function is provided for convenience.
|
|
QList< QGraphicsItem * > | items (const QRect &rect, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a list of all the items that, depending on mode, are either contained by or intersect with rect.
|
|
QList< QGraphicsItem * > | items (int x, int y, int w, int h, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const |
|
QList< QGraphicsItem * > | items (const QPolygon &polygon, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a list of all the items that, depending on mode, are either contained by or intersect with polygon.
|
|
QList< QGraphicsItem * > | items (const QPainterPath &path, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a list of all the items that, depending on mode, are either contained by or intersect with path.
|
|
QGraphicsItem * | itemAt (const QPoint &pos) const |
| Returns the item at position pos, which is in viewport coordinates.
|
|
QGraphicsItem * | itemAt (int x, int y) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
QPointF | mapToScene (const QPoint &point) const |
| Returns the viewport coordinate point mapped to scene coordinates.
|
|
QPolygonF | mapToScene (const QRect &rect) const |
| Returns the viewport rectangle rect mapped to a scene coordinate polygon.
|
|
QPolygonF | mapToScene (const QPolygon &polygon) const |
| Returns the viewport polygon polygon mapped to a scene coordinate polygon.
|
|
QPainterPath | mapToScene (const QPainterPath &path) const |
| Returns the viewport painter path path mapped to a scene coordinate painter path.
|
|
QPoint | mapFromScene (const QPointF &point) const |
| Returns the scene coordinate point to viewport coordinates.
|
|
QPolygon | mapFromScene (const QRectF &rect) const |
| Returns the scene rectangle rect to a viewport coordinate polygon.
|
|
QPolygon | mapFromScene (const QPolygonF &polygon) const |
| Returns the scene coordinate polygon polygon to a viewport coordinate polygon.
|
|
QPainterPath | mapFromScene (const QPainterPath &path) const |
| Returns the scene coordinate painter path path to a viewport coordinate painter path.
|
|
QPointF | mapToScene (int x, int y) const |
| This function is provided for convenience.
|
|
QPolygonF | mapToScene (int x, int y, int w, int h) const |
| This function is provided for convenience.
|
|
QPoint | mapFromScene (qreal x, qreal y) const |
| This function is provided for convenience.
|
|
QPolygon | mapFromScene (qreal x, qreal y, qreal w, qreal h) const |
| This function is provided for convenience.
|
|
QVariant | inputMethodQuery (Qt::InputMethodQuery query) const override |
| \reimp
|
|
QBrush | backgroundBrush () const |
|
void | setBackgroundBrush (const QBrush &brush) |
|
QBrush | foregroundBrush () const |
|
void | setForegroundBrush (const QBrush &brush) |
|