24 const double scene_origin_x{0.0};
25 const double scene_origin_y{0.0};
26 const QRectF default_scene_rect{QPointF{scene_origin_x, scene_origin_y}, QSizeF{800, 600}};
34 setItemIndexMethod(QGraphicsScene::NoIndex);
35 setSceneRect(default_scene_rect);
66 setSceneRect(scene_origin_x, scene_origin_y, newSize.width(), newSize.height());
Widget to show scientific figure with multiple 1D graphs.
void setItem(GraphViewportItem *viewport_item)
std::unique_ptr< SceneAdapterInterface > createSceneAdapter() const
2D viewport specialized for showing multiple GraphItem's.
Interface to convert coordinates of "scene" to coordinates of "widget".
ModelView::GraphCanvas * graphCanvas() const
Set te graph canvas item.
~GraphicsScene() override
The destructor.
void setItem(ModelView::GraphViewportItem *viewport_item)
Set te graph canvas item.
ModelView::CustomPlotProxyWidget * plot_proxy
void update_size(const QSize &newSize)
Adjust size of scene and color map proxy.
GraphicsScene(QObject *parent=nullptr)
The contructor.
ModelView::GraphCanvas * graph_canvas
std::unique_ptr< ModelView::SceneAdapterInterface > scene_adapter
ModelView::SceneAdapterInterface * sceneAdapter() const
Return the pointer of the scene adapter on request.
void setContext()
Initialise the GraphicsScene with its elements.
void createPlotProxy(ModelView::GraphCanvas *plot_canvas)
Create the Proxy item.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.