SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
curveeditchartview.h File Reference

Interactive Qt Charts view for editing a CurveProvider on the plot. More...

#include "ui/widgets/interactivechartview.h"
#include <QPoint>
#include <QPointer>
#include <QVector>
Include dependency graph for curveeditchartview.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::ui::CurveEditChartView
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::curve
 
namespace  openswmmvis::ui
 

Detailed Description

Interactive Qt Charts view for editing a CurveProvider on the plot.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Mirrors TimeseriesEditChartView (Slice BQ Phase 6.7.3.5): a thin subclass of InteractiveChartView that adds an orthogonal EditMode axis on top of the base Select/Pan/Zoom modes:

  • None — base Select/Pan/Zoom behaviour only.
  • EditPoints — hit-test on scatter; drag X+Y to move the vertex (axis locks configurable via setLockX/setLockY); Shift-drag rubber-band selects multiple; drag a selected point to translate the selection.

MVC contract (per [[feedback_mvc_synchronized_uis]]): the chart view is one of N views on the bound CurveProvider. Live in-flight drag mutates the provider via setPointAt per frame so the table view (and any other subscriber) re-renders in sync. On drag completion the view rewinds the provider to its pre-drag state and pushes a single BulkSetCurvePointsCommand so Cmd-Z reverts the drag in one step.

The chart, axes, and line/scatter series remain owned by the parent dialog — the view's role is overlay state (selection-highlight scatter) and mouse-event interpretation. This keeps the existing chart-construction code in CurveEditorDialog::buildUi_ untouched.