8#include <QGraphicsTextItem>
18 : QGraphicsView(parent)
38 return static_cast<int>((
_scene->itemsBoundingRect()).height());
43 return static_cast<int>((
_scene->itemsBoundingRect()).width());
54 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
55 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
107 QRectF viewRect =
_scene->itemsBoundingRect();
108 _scene->setSceneRect(viewRect);
112 fitInView(sceneInView, Qt::IgnoreAspectRatio);
A List of data points and all the necessary meta-information to draw a graph.
A scene graph for a 2D Diagram including coordinate axes with labels and ticks for one or more plotte...
QSize minimumSizeHint() const override
void resizeEvent(QResizeEvent *event) override
Resizes the scene.
int getWidth()
Returns the width of the bounding rectangle of all objects within the scene.
void addGraph(DiagramList *list)
Adds a new graph to the scene.
QSize sizeHint() const override
DiagramView(QWidget *parent=nullptr)
int getHeight()
Returns the height of the bounding rectangle of all objects within the scene.