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::InteractiveChartView Class Reference

#include <interactivechartview.h>

Inheritance diagram for openswmmvis::ui::InteractiveChartView:
Collaboration diagram for openswmmvis::ui::InteractiveChartView:

Public Types

enum class  Mode {
  Select = 0 ,
  Pan ,
  ZoomIn ,
  ZoomOut
}
 
enum class  AxisEdge {
  None = 0 ,
  XMinimum ,
  XMaximum ,
  YMinimum ,
  YMaximum
}
 

Signals

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

 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 wheelEvent (QWheelEvent *e) override
 
void keyPressEvent (QKeyEvent *e) override
 
void leaveEvent (QEvent *e) override
 

Member Enumeration Documentation

◆ AxisEdge

Enumerator
None 
XMinimum 
XMaximum 
YMinimum 
YMaximum 

◆ Mode

Enumerator
Select 

Default: events pass through; arrow cursor.

Pan 

Left-button drag → chart->scroll(-dx, dy); hand cursor.

ZoomIn 

Click = 2× in around cursor; drag-rect = zoom-to-rect.

ZoomOut 

Click = 0.5× out around cursor; drag-rect = inverse zoom.

Constructor & Destructor Documentation

◆ InteractiveChartView()

openswmmvis::ui::InteractiveChartView::InteractiveChartView ( QChart *  chart,
QWidget *  parent = nullptr 
)
explicit

◆ ~InteractiveChartView()

openswmmvis::ui::InteractiveChartView::~InteractiveChartView ( )
overridedefault

Member Function Documentation

◆ axisEdgeAt()

InteractiveChartView::AxisEdge openswmmvis::ui::InteractiveChartView::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.

Here is the caller graph for this function:

◆ chartContextMenuRequested

void openswmmvis::ui::InteractiveChartView::chartContextMenuRequested ( const QPoint &  globalPos)
signal

Fired on right-click. Carries global screen position so the parent dialog can pop its own row-aware context menu.

Here is the caller graph for this function:

◆ keyPressEvent()

void openswmmvis::ui::InteractiveChartView::keyPressEvent ( QKeyEvent *  e)
overrideprotected
Here is the call graph for this function:

◆ leaveEvent()

void openswmmvis::ui::InteractiveChartView::leaveEvent ( QEvent *  e)
overrideprotected

◆ mode()

Mode openswmmvis::ui::InteractiveChartView::mode ( ) const
inlinenoexcept

◆ modeChanged

void openswmmvis::ui::InteractiveChartView::modeChanged ( Mode  m)
signal

Fired whenever the mode changes (toolbar reflection).

Here is the caller graph for this function:

◆ mouseMoveEvent()

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

◆ mousePressEvent()

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

◆ mouseReleaseEvent()

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

◆ resetZoom()

void openswmmvis::ui::InteractiveChartView::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.

◆ setAxisEdgeValue()

bool openswmmvis::ui::InteractiveChartView::setAxisEdgeValue ( AxisEdge  edge,
const QVariant &  value 
)

Programmatically set one visible axis edge. Numeric axes accept a numeric QVariant; date-time axes accept QDateTime.

◆ setMode()

void openswmmvis::ui::InteractiveChartView::setMode ( Mode  m)
Here is the call graph for this function:

◆ wheelEvent()

void openswmmvis::ui::InteractiveChartView::wheelEvent ( QWheelEvent *  e)
overrideprotected

◆ xRangeSelectionChanged

void openswmmvis::ui::InteractiveChartView::xRangeSelectionChanged ( QDateTime  lo,
QDateTime  hi 
)
signal

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.

Here is the caller graph for this function:

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