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
patterneditchartview.h File Reference

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

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

Go to the source code of this file.

Classes

class  openswmmvis::ui::PatternEditChartView
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::pattern
 
namespace  openswmmvis::ui
 

Detailed Description

Interactive Qt Charts view for editing a PatternProvider 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 CurveEditChartView but with pattern-shape semantics:

  • Vertical drag → change the factor at the picked slot (Y-only; X is categorical so the slot index is fixed during a Y-drag).
  • Horizontal drag → reorder slots: dragging a vertex across an adjacent slot's centre triggers a swap (provider-mediated, atomic, undoable). Multi-step horizontal drags chain swaps so the picked slot can travel several positions in one gesture.

EditMode toggles which axis is active during a left-button drag:

  • None — base Select/Pan/Zoom only.
  • EditPoints — vertical drag = factor edit; horizontal drag = swap.

MVC contract: all mutations route through PatternProvider. The chart view, factor-table view, and any property pane subscribe to the provider's factorChanged / factorsChanged signals so each frame of a drag is mirrored everywhere. Drag completion pushes a single QUndoCommand so a Cmd-Z reverts the whole gesture.