QtBase  v6.3.1
Public Slots | Public Member Functions | Protected Member Functions | List of all members
GraphWidget Class Reference

[0] More...

#include <graphwidget.h>

Inheritance diagram for GraphWidget:
Inheritance graph
[legend]
Collaboration diagram for GraphWidget:
Collaboration graph
[legend]

Public Slots

void shuffle ()
 [7] More...
 
void zoomIn ()
 
void zoomOut ()
 
- Public Slots inherited from QGraphicsView
void updateScene (const QList< QRectF > &rects)
 
void invalidateScene (const QRectF &rect=QRectF(), QGraphicsScene::SceneLayers layers=QGraphicsScene::AllLayers)
 
void updateSceneRect (const QRectF &rect)
 

Public Member Functions

 GraphWidget (QWidget *parent=nullptr)
 [0] More...
 
void itemMoved ()
 [1] More...
 
- Public Member Functions inherited from QGraphicsView
 QGraphicsView (QWidget *parent=nullptr)
 
 QGraphicsView (QGraphicsScene *scene, QWidget *parent=nullptr)
 
 ~QGraphicsView ()
 
QSize sizeHint () const override
 
QPainter::RenderHints renderHints () const
 
void setRenderHint (QPainter::RenderHint hint, bool enabled=true)
 
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)
 
void setOptimizationFlags (OptimizationFlags flags)
 
DragMode dragMode () const
 
void setDragMode (DragMode mode)
 
CacheMode cacheMode () const
 
void setCacheMode (CacheMode mode)
 
void resetCachedContent ()
 
bool isInteractive () const
 
void setInteractive (bool allowed)
 
QGraphicsScenescene () const
 
void setScene (QGraphicsScene *scene)
 
QRectF sceneRect () const
 
void setSceneRect (const QRectF &rect)
 
void setSceneRect (qreal x, qreal y, qreal w, qreal h)
 
QTransform transform () const
 
QTransform viewportTransform () const
 
bool isTransformed () const
 
void setTransform (const QTransform &matrix, bool combine=false)
 
void resetTransform ()
 
void rotate (qreal angle)
 
void scale (qreal sx, qreal sy)
 
void shear (qreal sh, qreal sv)
 
void translate (qreal dx, qreal dy)
 
void centerOn (const QPointF &pos)
 
void centerOn (qreal x, qreal y)
 
void centerOn (const QGraphicsItem *item)
 
void ensureVisible (const QRectF &rect, int xmargin=50, int ymargin=50)
 
void ensureVisible (qreal x, qreal y, qreal w, qreal h, int xmargin=50, int ymargin=50)
 
void ensureVisible (const QGraphicsItem *item, int xmargin=50, int ymargin=50)
 
void fitInView (const QRectF &rect, Qt::AspectRatioMode aspectRadioMode=Qt::IgnoreAspectRatio)
 
void fitInView (qreal x, qreal y, qreal w, qreal h, Qt::AspectRatioMode aspectRadioMode=Qt::IgnoreAspectRatio)
 
void fitInView (const QGraphicsItem *item, Qt::AspectRatioMode aspectRadioMode=Qt::IgnoreAspectRatio)
 
void render (QPainter *painter, const QRectF &target=QRectF(), const QRect &source=QRect(), Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio)
 
QList< QGraphicsItem * > items () const
 
QList< QGraphicsItem * > items (const QPoint &pos) const
 
QList< QGraphicsItem * > items (int x, int y) const
 
QList< QGraphicsItem * > items (const QRect &rect, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
 
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
 
QList< QGraphicsItem * > items (const QPainterPath &path, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
 
QGraphicsItemitemAt (const QPoint &pos) const
 
QGraphicsItemitemAt (int x, int y) const
 
QPointF mapToScene (const QPoint &point) const
 
QPolygonF mapToScene (const QRect &rect) const
 
QPolygonF mapToScene (const QPolygon &polygon) const
 
QPainterPath mapToScene (const QPainterPath &path) const
 
QPoint mapFromScene (const QPointF &point) const
 
QPolygon mapFromScene (const QRectF &rect) const
 
QPolygon mapFromScene (const QPolygonF &polygon) const
 
QPainterPath mapFromScene (const QPainterPath &path) const
 
QPointF mapToScene (int x, int y) const
 
QPolygonF mapToScene (int x, int y, int w, int h) const
 
QPoint mapFromScene (qreal x, qreal y) const
 
QPolygon mapFromScene (qreal x, qreal y, qreal w, qreal h) const
 
QVariant inputMethodQuery (Qt::InputMethodQuery query) const override
 
QBrush backgroundBrush () const
 
void setBackgroundBrush (const QBrush &brush)
 
QBrush foregroundBrush () const
 
void setForegroundBrush (const QBrush &brush)
 

Protected Member Functions

void keyPressEvent (QKeyEvent *event) override
 [2] More...
 
void timerEvent (QTimerEvent *event) override
 [3] More...
 
void drawBackground (QPainter *painter, const QRectF &rect) override
 [4] More...
 
void scaleView (qreal scaleFactor)
 [6] More...
 
- Protected Member Functions inherited from QGraphicsView
 QGraphicsView (QGraphicsViewPrivate &, QWidget *parent=nullptr)
 
bool event (QEvent *event) override
 
bool viewportEvent (QEvent *event) override
 
void contextMenuEvent (QContextMenuEvent *event) override
 
void focusInEvent (QFocusEvent *event) override
 
bool focusNextPrevChild (bool next) override
 
void focusOutEvent (QFocusEvent *event) override
 
void keyPressEvent (QKeyEvent *event) override
 
void keyReleaseEvent (QKeyEvent *event) override
 
void mouseDoubleClickEvent (QMouseEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseMoveEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 
void resizeEvent (QResizeEvent *event) override
 
void scrollContentsBy (int dx, int dy) override
 
void showEvent (QShowEvent *event) override
 
void inputMethodEvent (QInputMethodEvent *event) override
 
virtual void drawForeground (QPainter *painter, const QRectF &rect)
 
virtual void drawItems (QPainter *painter, int numItems, QGraphicsItem *items[], const QStyleOptionGraphicsItem options[])
 

Additional Inherited Members

- Public Types inherited from QGraphicsView
enum  ViewportAnchor { NoAnchor , AnchorViewCenter , AnchorUnderMouse }
 
enum  CacheModeFlag { CacheNone = 0x0 , CacheBackground = 0x1 }
 
enum  DragMode { NoDrag , ScrollHandDrag , RubberBandDrag }
 
enum  ViewportUpdateMode {
  FullViewportUpdate , MinimalViewportUpdate , SmartViewportUpdate , NoViewportUpdate ,
  BoundingRectViewportUpdate
}
 
enum  OptimizationFlag { DontSavePainterState = 0x1 , DontAdjustForAntialiasing = 0x2 , IndirectPainting = 0x4 }
 
- Protected Slots inherited from QGraphicsView
void setupViewport (QWidget *widget) override
 
- Properties inherited from QGraphicsView
QBrush backgroundBrush
 the background brush of the scene. More...
 
QBrush foregroundBrush
 the foreground brush of the scene. More...
 
bool interactive
 whether the view allows scene interaction. More...
 
QRectF sceneRect
 the area of the scene visualized by this view. More...
 
Qt::Alignment alignment
 the alignment of the scene in the view when the whole scene is visible. More...
 
QPainter::RenderHints renderHints
 the default render hints for the view More...
 
DragMode dragMode
 the behavior for dragging the mouse over the scene while the left mouse button is pressed. More...
 
CacheMode cacheMode
 which parts of the view are cached More...
 
ViewportAnchor transformationAnchor
 how the view should position the scene during transformations. More...
 
ViewportAnchor resizeAnchor
 how the view should position the scene when the view is resized. More...
 
ViewportUpdateMode viewportUpdateMode
 how the viewport should update its contents. More...
 
OptimizationFlags optimizationFlags
 flags that can be used to tune QGraphicsView's performance. More...
 

Detailed Description

[0]

Definition at line 59 of file graphwidget.h.

Constructor & Destructor Documentation

◆ GraphWidget()

GraphWidget::GraphWidget ( QWidget parent = nullptr)

[0]

[0]

[1]

Definition at line 61 of file graphwidget.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ drawBackground()

void GraphWidget::drawBackground ( QPainter painter,
const QRectF rect 
)
overrideprotectedvirtual

[4]

[6]

Reimplemented from QGraphicsView.

Definition at line 199 of file graphwidget.cpp.

Here is the call graph for this function:

◆ itemMoved()

void GraphWidget::itemMoved ( )

[1]

[2]

Definition at line 122 of file graphwidget.cpp.

Here is the caller graph for this function:

◆ keyPressEvent()

void GraphWidget::keyPressEvent ( QKeyEvent event)
overrideprotected

[2]

[3]

Definition at line 130 of file graphwidget.cpp.

Here is the call graph for this function:

◆ scaleView()

void GraphWidget::scaleView ( qreal  scaleFactor)
protected

[6]

[7]

Definition at line 238 of file graphwidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shuffle

void GraphWidget::shuffle ( )
slot

[7]

Definition at line 248 of file graphwidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timerEvent()

void GraphWidget::timerEvent ( QTimerEvent event)
overrideprotected

[3]

[4]

Definition at line 162 of file graphwidget.cpp.

Here is the call graph for this function:

◆ zoomIn

void GraphWidget::zoomIn ( )
slot

Definition at line 257 of file graphwidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zoomOut

void GraphWidget::zoomOut ( )
slot

Definition at line 262 of file graphwidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: