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
openswmmvis::ui::TimeseriesEditChartView Class Reference

#include <timeserieseditchartview.h>

Inheritance diagram for openswmmvis::ui::TimeseriesEditChartView:
Collaboration diagram for openswmmvis::ui::TimeseriesEditChartView:

Public Types

enum class  EditMode {
  None ,
  EditPoints ,
  RotatePoints ,
  ScalePoints
}
 
- Public Types inherited from openswmmvis::ui::InteractiveChartView
enum class  Mode {
  Select = 0 ,
  Pan ,
  ZoomIn ,
  ZoomOut
}
 
enum class  AxisEdge {
  None = 0 ,
  XMinimum ,
  XMaximum ,
  YMinimum ,
  YMaximum
}
 

Public Slots

void zoomToExtent ()
 Fit the X and Y axes to the full extent of the provider's current points, with a small Y-padding. No-op if the provider is empty. Toolbar "Zoom to Extent" button + auto-called on bulk insert/remove (e.g. after loading an external file).
 

Signals

void selectionChanged (const QVector< int > &indices)
 Emitted after the selection set changes.
 
void editModeChanged (EditMode m)
 Emitted when the edit mode changes.
 
- Signals inherited from openswmmvis::ui::InteractiveChartView
void modeChanged (Mode m)
 Fired whenever the mode changes (toolbar reflection).
 
void chartContextMenuRequested (const QPoint &globalPos)
 Fired on right-click. Carries global screen position so the parent dialog can pop its own row-aware context menu.
 
void xRangeSelectionChanged (QDateTime lo, QDateTime hi)
 Slice AT.3 — Shift-drag X-range selection ended on this view. Carries selected [lo, hi] as QDateTimes. Passed to the StatsSummaryPanel to narrow stats. Empty (invalid, invalid) clears the selection.
 

Public Member Functions

 TimeseriesEditChartView (openswmmvis::timeseries::TimeseriesProvider *provider, QWidget *parent=nullptr)
 
 ~TimeseriesEditChartView () override
 
openswmmvis::timeseries::TimeseriesProviderprovider () const noexcept
 
void setProvider (openswmmvis::timeseries::TimeseriesProvider *p)
 Rebind the chart to a different provider (or null to clear). Disconnects from the old provider's signals, connects to the new one, and refreshes the series from the new provider's current state. Used by TimeseriesEditorDialog::createNew after the create-card promotes the dialog from CreateNew to Edit mode.
 
void setUndoStack (QUndoStack *stack)
 Bind the undo stack for committed edits. Null = apply directly.
 
QUndoStack * undoStack () const noexcept
 
void setAxisFormatController (ChartAxisFormatController *c)
 Bind the per-chart axis number-format controller so the context menu can offer "Chart Properties…". Not owned.
 
EditMode editMode () const noexcept
 
void setEditMode (EditMode m)
 
bool snapToTimeStep () const noexcept
 
void setSnapToTimeStep (bool on) noexcept
 
int snapStepSeconds () const noexcept
 Snap step in seconds (default 300 = 5 min).
 
void setSnapStepSeconds (int secs) noexcept
 
QVector< int > selectedIndices () const
 Currently-selected point indices, ascending.
 
void clearSelection ()
 
void setSelection (QVector< int > indices)
 
int hitTestPoint (const QPoint &viewportPx, int hitRadiusPx=6) const
 Public for tests — convert a viewport pixel to the nearest point index, or -1 if no point lies within hitRadiusPx.
 
- Public Member Functions inherited from openswmmvis::ui::InteractiveChartView
 InteractiveChartView (QChart *chart, QWidget *parent=nullptr)
 
 ~InteractiveChartView () override
 
Mode mode () const noexcept
 
void setMode (Mode m)
 
AxisEdge axisEdgeAt (const QPoint &viewportPx) const
 Returns the editable min/max axis label under viewportPx, or AxisEdge::None when the point is not in an endpoint-label gutter.
 
bool setAxisEdgeValue (AxisEdge edge, const QVariant &value)
 Programmatically set one visible axis edge. Numeric axes accept a numeric QVariant; date-time axes accept QDateTime.
 
void resetZoom ()
 Reset zoom to whatever the chart's initial zoom level was. Equivalent to chart()->zoomReset() plus a notify so parents that track range can resync.
 

Protected Member Functions

void mousePressEvent (QMouseEvent *e) override
 
void mouseMoveEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void contextMenuEvent (QContextMenuEvent *e) override
 
- Protected Member Functions inherited from openswmmvis::ui::InteractiveChartView
void mousePressEvent (QMouseEvent *e) override
 
void mouseMoveEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void wheelEvent (QWheelEvent *e) override
 
void keyPressEvent (QKeyEvent *e) override
 
void leaveEvent (QEvent *e) override
 

Member Enumeration Documentation

◆ EditMode

Enumerator
None 

Base modes only (Select / Pan / Zoom).

EditPoints 

Y-drag single + multi; rubber-band select; context insert/delete.

RotatePoints 

Stub (follow-up).

ScalePoints 

Stub (follow-up).

Constructor & Destructor Documentation

◆ TimeseriesEditChartView()

openswmmvis::ui::TimeseriesEditChartView::TimeseriesEditChartView ( openswmmvis::timeseries::TimeseriesProvider provider,
QWidget *  parent = nullptr 
)
explicit
Here is the call graph for this function:

◆ ~TimeseriesEditChartView()

openswmmvis::ui::TimeseriesEditChartView::~TimeseriesEditChartView ( )
overridedefault

Member Function Documentation

◆ clearSelection()

void openswmmvis::ui::TimeseriesEditChartView::clearSelection ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ contextMenuEvent()

void openswmmvis::ui::TimeseriesEditChartView::contextMenuEvent ( QContextMenuEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ editMode()

EditMode openswmmvis::ui::TimeseriesEditChartView::editMode ( ) const
inlinenoexcept

◆ editModeChanged

void openswmmvis::ui::TimeseriesEditChartView::editModeChanged ( EditMode  m)
signal

Emitted when the edit mode changes.

Here is the caller graph for this function:

◆ hitTestPoint()

int openswmmvis::ui::TimeseriesEditChartView::hitTestPoint ( const QPoint &  viewportPx,
int  hitRadiusPx = 6 
) const

Public for tests — convert a viewport pixel to the nearest point index, or -1 if no point lies within hitRadiusPx.

Here is the caller graph for this function:

◆ mouseMoveEvent()

void openswmmvis::ui::TimeseriesEditChartView::mouseMoveEvent ( QMouseEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ mousePressEvent()

void openswmmvis::ui::TimeseriesEditChartView::mousePressEvent ( QMouseEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ mouseReleaseEvent()

void openswmmvis::ui::TimeseriesEditChartView::mouseReleaseEvent ( QMouseEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ provider()

TimeseriesProvider * openswmmvis::ui::TimeseriesEditChartView::provider ( ) const
noexcept

◆ selectedIndices()

QVector< int > openswmmvis::ui::TimeseriesEditChartView::selectedIndices ( ) const
inline

Currently-selected point indices, ascending.

◆ selectionChanged

void openswmmvis::ui::TimeseriesEditChartView::selectionChanged ( const QVector< int > &  indices)
signal

Emitted after the selection set changes.

Here is the caller graph for this function:

◆ setAxisFormatController()

void openswmmvis::ui::TimeseriesEditChartView::setAxisFormatController ( ChartAxisFormatController c)
inline

Bind the per-chart axis number-format controller so the context menu can offer "Chart Properties…". Not owned.

◆ setEditMode()

void openswmmvis::ui::TimeseriesEditChartView::setEditMode ( EditMode  m)
Here is the call graph for this function:

◆ setProvider()

void openswmmvis::ui::TimeseriesEditChartView::setProvider ( openswmmvis::timeseries::TimeseriesProvider p)

Rebind the chart to a different provider (or null to clear). Disconnects from the old provider's signals, connects to the new one, and refreshes the series from the new provider's current state. Used by TimeseriesEditorDialog::createNew after the create-card promotes the dialog from CreateNew to Edit mode.

Here is the call graph for this function:

◆ setSelection()

void openswmmvis::ui::TimeseriesEditChartView::setSelection ( QVector< int >  indices)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSnapStepSeconds()

void openswmmvis::ui::TimeseriesEditChartView::setSnapStepSeconds ( int  secs)
inlinenoexcept

◆ setSnapToTimeStep()

void openswmmvis::ui::TimeseriesEditChartView::setSnapToTimeStep ( bool  on)
inlinenoexcept

◆ setUndoStack()

void openswmmvis::ui::TimeseriesEditChartView::setUndoStack ( QUndoStack *  stack)

Bind the undo stack for committed edits. Null = apply directly.

◆ snapStepSeconds()

int openswmmvis::ui::TimeseriesEditChartView::snapStepSeconds ( ) const
inlinenoexcept

Snap step in seconds (default 300 = 5 min).

◆ snapToTimeStep()

bool openswmmvis::ui::TimeseriesEditChartView::snapToTimeStep ( ) const
inlinenoexcept

◆ undoStack()

QUndoStack * openswmmvis::ui::TimeseriesEditChartView::undoStack ( ) const
inlinenoexcept

◆ zoomToExtent

void openswmmvis::ui::TimeseriesEditChartView::zoomToExtent ( )
slot

Fit the X and Y axes to the full extent of the provider's current points, with a small Y-padding. No-op if the provider is empty. Toolbar "Zoom to Extent" button + auto-called on bulk insert/remove (e.g. after loading an external file).

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: