VisualizationGraphRenderingDelegate.h
45 lines
| 1.5 KiB
| text/x-c
|
CLexer
Alexandre Leroux
|
r480 | #ifndef SCIQLOP_VISUALIZATIONGRAPHRENDERINGDELEGATE_H | ||
#define SCIQLOP_VISUALIZATIONGRAPHRENDERINGDELEGATE_H | ||||
#include <Common/spimpl.h> | ||||
Alexandre Leroux
|
r916 | #include <Visualization/VisualizationDefs.h> | ||
class IDataSeries; | ||||
Alexandre Leroux
|
r480 | class QCustomPlot; | ||
class QMouseEvent; | ||||
Alexandre Leroux
|
r729 | class Unit; | ||
r1420 | class Variable2; | |||
Alexandre Leroux
|
r725 | class VisualizationGraphWidget; | ||
Alexandre Leroux
|
r480 | |||
r1420 | class VisualizationGraphRenderingDelegate | |||
{ | ||||
Alexandre Leroux
|
r480 | public: | ||
Alexandre Leroux
|
r725 | /// Ctor | ||
/// @param graphWidget the graph widget to which the delegate is associated | ||||
/// @remarks the graph widget must exist throughout the life cycle of the delegate | ||||
r1420 | explicit VisualizationGraphRenderingDelegate(VisualizationGraphWidget& graphWidget); | |||
Alexandre Leroux
|
r480 | |||
r1420 | void onMouseDoubleClick(QMouseEvent* event) noexcept; | |||
void updateTooltip(QMouseEvent* event) noexcept; | ||||
Alexandre Leroux
|
r1020 | /// Updates rendering when data of plot changed | ||
void onPlotUpdated() noexcept; | ||||
Alexandre Leroux
|
r481 | |||
Alexandre Leroux
|
r1283 | /// Sets units of the plot's axes according to the properties of the variable passed as | ||
/// parameter | ||||
r1420 | void setAxesUnits(Variable2& variable) noexcept; | |||
Alexandre Leroux
|
r916 | |||
Alexandre Leroux
|
r1283 | /// Sets graph properties of the plottables passed as parameter, from the variable that | ||
Alexandre Leroux
|
r919 | /// generated these | ||
r1420 | void setGraphProperties(Variable2& variable, PlottablesMap& plottables) noexcept; | |||
Alexandre Leroux
|
r1283 | |||
Alexandre Leroux
|
r729 | |||
Alexandre Leroux
|
r728 | /// Shows or hides graph overlay (name, close button, etc.) | ||
void showGraphOverlay(bool show) noexcept; | ||||
Alexandre Leroux
|
r480 | private: | ||
class VisualizationGraphRenderingDelegatePrivate; | ||||
spimpl::unique_impl_ptr<VisualizationGraphRenderingDelegatePrivate> impl; | ||||
}; | ||||
#endif // SCIQLOP_VISUALIZATIONGRAPHRENDERINGDELEGATE_H | ||||