![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <timeserieseditchartview.h>
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::TimeseriesProvider * | provider () 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 |
|
strong |
|
explicit |
|
overridedefault |
| void openswmmvis::ui::TimeseriesEditChartView::clearSelection | ( | ) |
|
overrideprotected |
|
inlinenoexcept |
|
signal |
Emitted when the edit mode changes.
| 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.
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
noexcept |
|
inline |
Currently-selected point indices, ascending.
|
signal |
Emitted after the selection set changes.
|
inline |
Bind the per-chart axis number-format controller so the context menu can offer "Chart Properties…". Not owned.
| void openswmmvis::ui::TimeseriesEditChartView::setEditMode | ( | EditMode | m | ) |
| 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.
| void openswmmvis::ui::TimeseriesEditChartView::setSelection | ( | QVector< int > | indices | ) |
|
inlinenoexcept |
|
inlinenoexcept |
| void openswmmvis::ui::TimeseriesEditChartView::setUndoStack | ( | QUndoStack * | stack | ) |
Bind the undo stack for committed edits. Null = apply directly.
|
inlinenoexcept |
Snap step in seconds (default 300 = 5 min).
|
inlinenoexcept |
|
inlinenoexcept |
|
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).