![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Slice AT.2 — QChartView subclass with Select / Pan / ZoomIn / ZoomOut modes mirroring ProfilePlotDialog's QActionGroup pattern. More...
#include <QChartView>#include <QDateTime>#include <QPoint>#include <QRect>#include <QTimer>Go to the source code of this file.
Classes | |
| class | openswmmvis::ui::InteractiveChartView |
Namespaces | |
| namespace | openswmmvis |
| namespace | openswmmvis::ui |
Slice AT.2 — QChartView subclass with Select / Pan / ZoomIn / ZoomOut modes mirroring ProfilePlotDialog's QActionGroup pattern.
ComparisonPlotDialog uses Qt Charts for its chart rows. Qt Charts ships with a default rubber-band-zoom hook (setRubberBand) but the semantics are too narrow for our needs:
InteractiveChartView handles all four modes uniformly via overridden mouse events that drive QChart::scroll(dx, dy), QChart::zoomIn(rect), and QChart::zoomReset(). Wheel scroll is mode-agnostic — always zooms about the cursor.
The widget emits chartContextMenuRequested(globalPos) instead of popping its own menu so the dialog can build a row-aware context menu (Copy as Image / Reset Zoom / Hide Cursor / Remove Row / Options …).