The example shows how to embed QCustomPlot in the QGraphicsScene to plot
complex graphics on top of QCustomPlot and how to adapt coordinates of
QCustomPlot to the local coordinate system of QGraphicsScene.
Users can adjust the size of the region-of-interest rectangle and click on Set toROI button to make viewport axes range matching the rectangle.
Region of interest coordinates, as well as axes range and zoom level, are displayed in the QTreeView on the right. Values changed through the tree are propagated back to the plot.
Application model contains four items.
RegionOfInterestItemcontains coordinates of theroirectangle.Data2DItemcontains 2D histogram to show (data points and data axes definition).ColorMapItemcontains link toData2DItemand additional presentation properties (i.e. gradient).ColorMapViewportdefines viewport axes, color bar on the right and is intended to showColorMapItem.
RegionOfInterestViewrepresentsRegionOfInterestItemonQGraphicsScene.RegionOfInterestControllerestablishes communication between item and view.
