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

#include <transectchartview.h>

Inheritance diagram for openswmmvis::ui::TransectChartView:
Collaboration diagram for openswmmvis::ui::TransectChartView:

Public Types

enum  LabelFormatMode {
  Decimals = 0 ,
  SignificantFigures = 1
}
 Axis label number mode (mirrors plot::NumberFormatMode). More...
 
enum  AxisNumberFormat {
  Integer = 0 ,
  Decimals1 = 1 ,
  Decimals2 = 2 ,
  Decimals3 = 3 ,
  Decimals4 = 4 ,
  Decimals6 = 5 ,
  SigFigs3 = 6 ,
  SigFigs4 = 7 ,
  SigFigs6 = 8
}
 
enum class  Mode {
  Select = 0 ,
  Pan ,
  EditPoints ,
  InsertVertex ,
  DeleteVertex
}
 

Signals

void modeChanged (Mode m)
 
void contextMenuRequestedAt (const QPoint &globalPos)
 
void overbankColorChanged (const QColor &)
 
void channelColorChanged (const QColor &)
 
void groundFillColorChanged (const QColor &)
 
void handleSizeChanged (int)
 
void handlesVisibleChanged (bool)
 
void xLabelFormatModeChanged (TransectChartView::LabelFormatMode)
 
void xLabelPrecisionChanged (int)
 
void xLabelFormatChanged (const QString &)
 
void yLabelFormatModeChanged (TransectChartView::LabelFormatMode)
 
void yLabelPrecisionChanged (int)
 
void yLabelFormatChanged (const QString &)
 
void stationDragFinished (int index, double oldStation, double oldElevation, double newStation, double newElevation)
 Emitted on left-button release after an EditPoints drag. Carries the original (pre-drag) and final (post-drag) station/ elevation. The dialog pushes a MoveStationPointCommand from this signal so a single Cmd-Z reverts the drag.
 
void handleClicked (int index, Qt::KeyboardModifiers mods)
 Left-click on a handle in Select/EditPoints mode. The dialog uses this to drive the table's selection model (multi-select via Shift/Ctrl). idx == -1 means click on empty chart space (deselect).
 
void insertVertexRequested (double station, double elevation)
 Left-click on empty space in InsertVertex mode (or Shift+click on empty space in EditPoints mode). station/elevation are in the provider's raw units (already inverse-transformed from display).
 
void deleteVertexRequested (int index)
 Left-click on a handle in DeleteVertex mode.
 

Public Member Functions

Q_INVOKABLE QString displayLabelFor (const QString &property) const
 
 TransectChartView (QWidget *parent=nullptr)
 
 ~TransectChartView () override
 
void setProvider (openswmmvis::transect::TransectProvider *p)
 
openswmmvis::transect::TransectProviderprovider () const noexcept
 
Mode mode () const noexcept
 
void setMode (Mode m)
 
void zoomToExtent ()
 
void resetZoom ()
 
QColor overbankColor () const noexcept
 
QColor channelColor () const noexcept
 
QColor groundFillColor () const noexcept
 
int handleSize () const noexcept
 
bool handlesVisible () const noexcept
 
void setOverbankColor (const QColor &c)
 
void setChannelColor (const QColor &c)
 
void setGroundFillColor (const QColor &c)
 
void setHandleSize (int px)
 
void setHandlesVisible (bool on)
 
AxisNumberFormat xAxisNumberFormat () const
 
AxisNumberFormat yAxisNumberFormat () const
 
LabelFormatMode xLabelFormatMode () const noexcept
 
int xLabelPrecision () const noexcept
 
QString xLabelFormat () const
 
LabelFormatMode yLabelFormatMode () const noexcept
 
int yLabelPrecision () const noexcept
 
QString yLabelFormat () const
 
void setXAxisNumberFormat (TransectChartView::AxisNumberFormat f)
 
void setYAxisNumberFormat (TransectChartView::AxisNumberFormat f)
 
void setXLabelFormatMode (LabelFormatMode m)
 
void setXLabelPrecision (int n)
 
void setXLabelFormat (const QString &spec)
 
void setYLabelFormatMode (LabelFormatMode m)
 
void setYLabelPrecision (int n)
 
void setYLabelFormat (const QString &spec)
 
void setSelectedIndices (const QVector< int > &indices)
 Highlight the given station indices on the chart. Pass an empty vector to clear. Implemented as a second scatter overlay so the base handle series stays one-colour.
 
QVector< int > selectedIndices () const noexcept
 
QLineSeries * leftOverbankLine () const noexcept
 
QLineSeries * rightOverbankLine () const noexcept
 
QLineSeries * overbankLine () const noexcept
 Backward-compat alias for tests — returns the LEFT overbank.
 
QLineSeries * channelLine () const noexcept
 
QScatterSeries * handles () const noexcept
 
QAreaSeries * groundFill () const noexcept
 
QChart * chart () const noexcept
 

Protected Member Functions

void mousePressEvent (QMouseEvent *e) override
 
void mouseMoveEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void wheelEvent (QWheelEvent *e) override
 
void contextMenuEvent (QContextMenuEvent *e) override
 
void keyPressEvent (QKeyEvent *e) override
 

Properties

QColor overbankColor
 
QColor channelColor
 
QColor groundFillColor
 
int handleSize
 
bool handlesVisible
 
TransectChartView::AxisNumberFormat xAxisNumberFormat
 
QString xLabelFormat
 
TransectChartView::AxisNumberFormat yAxisNumberFormat
 
QString yLabelFormat
 

Member Enumeration Documentation

◆ AxisNumberFormat

Combined number format offered as ONE dropdown, replacing a mode enum plus a free integer count. Mirrors openswmmvis::plot:: AxisNumberFormatPreset value-for-value; QPropertyModel needs the enumerator list on the declaring class and labels each row with the enumerator name. numberformat.h owns the mapping to mode + digits.

Enumerator
Integer 
Decimals1 
Decimals2 
Decimals3 
Decimals4 
Decimals6 
SigFigs3 
SigFigs4 
SigFigs6 

◆ LabelFormatMode

Axis label number mode (mirrors plot::NumberFormatMode).

Enumerator
Decimals 
SignificantFigures 

◆ Mode

Enumerator
Select 

Default — middle-button pan + wheel zoom only.

Pan 

Left-button drag pans.

EditPoints 

Left-button drag on a handle moves a station.

InsertVertex 

Left-button click inserts a station at click point.

DeleteVertex 

Left-button click on a handle removes it.

Constructor & Destructor Documentation

◆ TransectChartView()

openswmmvis::ui::TransectChartView::TransectChartView ( QWidget *  parent = nullptr)
explicit
Here is the call graph for this function:

◆ ~TransectChartView()

openswmmvis::ui::TransectChartView::~TransectChartView ( )
overridedefault

Member Function Documentation

◆ channelColor()

QColor openswmmvis::ui::TransectChartView::channelColor ( ) const
inlinenoexcept

◆ channelColorChanged

void openswmmvis::ui::TransectChartView::channelColorChanged ( const QColor &  )
signal
Here is the caller graph for this function:

◆ channelLine()

QLineSeries * openswmmvis::ui::TransectChartView::channelLine ( ) const
inlinenoexcept

◆ chart()

QChart * openswmmvis::ui::TransectChartView::chart ( ) const
noexcept

◆ contextMenuEvent()

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

◆ contextMenuRequestedAt

void openswmmvis::ui::TransectChartView::contextMenuRequestedAt ( const QPoint &  globalPos)
signal
Here is the caller graph for this function:

◆ deleteVertexRequested

void openswmmvis::ui::TransectChartView::deleteVertexRequested ( int  index)
signal

Left-click on a handle in DeleteVertex mode.

Here is the caller graph for this function:

◆ displayLabelFor()

QString openswmmvis::ui::TransectChartView::displayLabelFor ( const QString &  property) const

◆ groundFill()

QAreaSeries * openswmmvis::ui::TransectChartView::groundFill ( ) const
inlinenoexcept

◆ groundFillColor()

QColor openswmmvis::ui::TransectChartView::groundFillColor ( ) const
inlinenoexcept

◆ groundFillColorChanged

void openswmmvis::ui::TransectChartView::groundFillColorChanged ( const QColor &  )
signal
Here is the caller graph for this function:

◆ handleClicked

void openswmmvis::ui::TransectChartView::handleClicked ( int  index,
Qt::KeyboardModifiers  mods 
)
signal

Left-click on a handle in Select/EditPoints mode. The dialog uses this to drive the table's selection model (multi-select via Shift/Ctrl). idx == -1 means click on empty chart space (deselect).

Here is the caller graph for this function:

◆ handles()

QScatterSeries * openswmmvis::ui::TransectChartView::handles ( ) const
inlinenoexcept

◆ handleSize()

int openswmmvis::ui::TransectChartView::handleSize ( ) const
inlinenoexcept

◆ handleSizeChanged

void openswmmvis::ui::TransectChartView::handleSizeChanged ( int  )
signal
Here is the caller graph for this function:

◆ handlesVisible()

bool openswmmvis::ui::TransectChartView::handlesVisible ( ) const
inlinenoexcept

◆ handlesVisibleChanged

void openswmmvis::ui::TransectChartView::handlesVisibleChanged ( bool  )
signal
Here is the caller graph for this function:

◆ insertVertexRequested

void openswmmvis::ui::TransectChartView::insertVertexRequested ( double  station,
double  elevation 
)
signal

Left-click on empty space in InsertVertex mode (or Shift+click on empty space in EditPoints mode). station/elevation are in the provider's raw units (already inverse-transformed from display).

Here is the caller graph for this function:

◆ keyPressEvent()

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

◆ leftOverbankLine()

QLineSeries * openswmmvis::ui::TransectChartView::leftOverbankLine ( ) const
inlinenoexcept

◆ mode()

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

◆ modeChanged

void openswmmvis::ui::TransectChartView::modeChanged ( Mode  m)
signal
Here is the caller graph for this function:

◆ mouseMoveEvent()

void openswmmvis::ui::TransectChartView::mouseMoveEvent ( QMouseEvent *  e)
overrideprotected

◆ mousePressEvent()

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

◆ mouseReleaseEvent()

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

◆ overbankColor()

QColor openswmmvis::ui::TransectChartView::overbankColor ( ) const
inlinenoexcept

◆ overbankColorChanged

void openswmmvis::ui::TransectChartView::overbankColorChanged ( const QColor &  )
signal
Here is the caller graph for this function:

◆ overbankLine()

QLineSeries * openswmmvis::ui::TransectChartView::overbankLine ( ) const
inlinenoexcept

Backward-compat alias for tests — returns the LEFT overbank.

◆ provider()

TransectProvider * openswmmvis::ui::TransectChartView::provider ( ) const
noexcept

◆ resetZoom()

void openswmmvis::ui::TransectChartView::resetZoom ( )

◆ rightOverbankLine()

QLineSeries * openswmmvis::ui::TransectChartView::rightOverbankLine ( ) const
inlinenoexcept

◆ selectedIndices()

QVector< int > openswmmvis::ui::TransectChartView::selectedIndices ( ) const
inlinenoexcept

◆ setChannelColor()

void openswmmvis::ui::TransectChartView::setChannelColor ( const QColor &  c)
Here is the call graph for this function:

◆ setGroundFillColor()

void openswmmvis::ui::TransectChartView::setGroundFillColor ( const QColor &  c)
Here is the call graph for this function:

◆ setHandleSize()

void openswmmvis::ui::TransectChartView::setHandleSize ( int  px)
Here is the call graph for this function:

◆ setHandlesVisible()

void openswmmvis::ui::TransectChartView::setHandlesVisible ( bool  on)
Here is the call graph for this function:

◆ setMode()

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

◆ setOverbankColor()

void openswmmvis::ui::TransectChartView::setOverbankColor ( const QColor &  c)
Here is the call graph for this function:

◆ setProvider()

void openswmmvis::ui::TransectChartView::setProvider ( openswmmvis::transect::TransectProvider p)
Here is the call graph for this function:

◆ setSelectedIndices()

void openswmmvis::ui::TransectChartView::setSelectedIndices ( const QVector< int > &  indices)

Highlight the given station indices on the chart. Pass an empty vector to clear. Implemented as a second scatter overlay so the base handle series stays one-colour.

◆ setXAxisNumberFormat()

void openswmmvis::ui::TransectChartView::setXAxisNumberFormat ( TransectChartView::AxisNumberFormat  f)
Here is the call graph for this function:

◆ setXLabelFormat()

void openswmmvis::ui::TransectChartView::setXLabelFormat ( const QString &  spec)
Here is the call graph for this function:

◆ setXLabelFormatMode()

void openswmmvis::ui::TransectChartView::setXLabelFormatMode ( LabelFormatMode  m)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setXLabelPrecision()

void openswmmvis::ui::TransectChartView::setXLabelPrecision ( int  n)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setYAxisNumberFormat()

void openswmmvis::ui::TransectChartView::setYAxisNumberFormat ( TransectChartView::AxisNumberFormat  f)
Here is the call graph for this function:

◆ setYLabelFormat()

void openswmmvis::ui::TransectChartView::setYLabelFormat ( const QString &  spec)
Here is the call graph for this function:

◆ setYLabelFormatMode()

void openswmmvis::ui::TransectChartView::setYLabelFormatMode ( LabelFormatMode  m)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setYLabelPrecision()

void openswmmvis::ui::TransectChartView::setYLabelPrecision ( int  n)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stationDragFinished

void openswmmvis::ui::TransectChartView::stationDragFinished ( int  index,
double  oldStation,
double  oldElevation,
double  newStation,
double  newElevation 
)
signal

Emitted on left-button release after an EditPoints drag. Carries the original (pre-drag) and final (post-drag) station/ elevation. The dialog pushes a MoveStationPointCommand from this signal so a single Cmd-Z reverts the drag.

Here is the caller graph for this function:

◆ wheelEvent()

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

◆ xAxisNumberFormat()

TransectChartView::AxisNumberFormat openswmmvis::ui::TransectChartView::xAxisNumberFormat ( ) const

Combined format per axis, derived from the mode + digit count that remain the internal representation.

Here is the call graph for this function:

◆ xLabelFormat()

QString openswmmvis::ui::TransectChartView::xLabelFormat ( ) const
inline

◆ xLabelFormatChanged

void openswmmvis::ui::TransectChartView::xLabelFormatChanged ( const QString &  )
signal
Here is the caller graph for this function:

◆ xLabelFormatMode()

LabelFormatMode openswmmvis::ui::TransectChartView::xLabelFormatMode ( ) const
inlinenoexcept

◆ xLabelFormatModeChanged

void openswmmvis::ui::TransectChartView::xLabelFormatModeChanged ( TransectChartView::LabelFormatMode  )
signal
Here is the caller graph for this function:

◆ xLabelPrecision()

int openswmmvis::ui::TransectChartView::xLabelPrecision ( ) const
inlinenoexcept

◆ xLabelPrecisionChanged

void openswmmvis::ui::TransectChartView::xLabelPrecisionChanged ( int  )
signal
Here is the caller graph for this function:

◆ yAxisNumberFormat()

TransectChartView::AxisNumberFormat openswmmvis::ui::TransectChartView::yAxisNumberFormat ( ) const
Here is the call graph for this function:

◆ yLabelFormat()

QString openswmmvis::ui::TransectChartView::yLabelFormat ( ) const
inline

◆ yLabelFormatChanged

void openswmmvis::ui::TransectChartView::yLabelFormatChanged ( const QString &  )
signal
Here is the caller graph for this function:

◆ yLabelFormatMode()

LabelFormatMode openswmmvis::ui::TransectChartView::yLabelFormatMode ( ) const
inlinenoexcept

◆ yLabelFormatModeChanged

void openswmmvis::ui::TransectChartView::yLabelFormatModeChanged ( TransectChartView::LabelFormatMode  )
signal
Here is the caller graph for this function:

◆ yLabelPrecision()

int openswmmvis::ui::TransectChartView::yLabelPrecision ( ) const
inlinenoexcept

◆ yLabelPrecisionChanged

void openswmmvis::ui::TransectChartView::yLabelPrecisionChanged ( int  )
signal
Here is the caller graph for this function:

◆ zoomToExtent()

void openswmmvis::ui::TransectChartView::zoomToExtent ( )

Property Documentation

◆ channelColor

QColor openswmmvis::ui::TransectChartView::channelColor
readwrite

◆ groundFillColor

QColor openswmmvis::ui::TransectChartView::groundFillColor
readwrite

◆ handleSize

int openswmmvis::ui::TransectChartView::handleSize
readwrite

◆ handlesVisible

bool openswmmvis::ui::TransectChartView::handlesVisible
readwrite

◆ overbankColor

QColor openswmmvis::ui::TransectChartView::overbankColor
readwrite

◆ xAxisNumberFormat

TransectChartView::AxisNumberFormat openswmmvis::ui::TransectChartView::xAxisNumberFormat
readwrite

◆ xLabelFormat

QString openswmmvis::ui::TransectChartView::xLabelFormat
readwrite

◆ yAxisNumberFormat

TransectChartView::AxisNumberFormat openswmmvis::ui::TransectChartView::yAxisNumberFormat
readwrite

◆ yLabelFormat

QString openswmmvis::ui::TransectChartView::yLabelFormat
readwrite

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