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
attributepickermenu.h
Go to the documentation of this file.
1
16#ifndef OPENSWMMVIS_UI_WIDGETS_ATTRIBUTEPICKERMENU_H
17#define OPENSWMMVIS_UI_WIDGETS_ATTRIBUTEPICKERMENU_H
18
19#include "plot/irunlayer.h"
20#include "plot/plotattribute.h"
21
22#include <QPoint>
23#include <QString>
24#include <QStringList>
25#include <QVector>
26
27class QMenu;
28class QWidget;
29class QAction;
30
31namespace openswmmvis::ui {
32
34{
35public:
50 QWidget *parent = nullptr,
51 const QStringList &speciesNames =
52 QStringList());
53
61 static QVector<openswmmvis::plot::PlotAttribute> execForMeshKind(
63 const QPoint &globalPos,
64 const openswmmvis::plot::IRunLayer *availability,
65 const QString &unavailableTip = QString());
66
69 static QMenu *createForSystem(openswmmvis::plot::UnitSystem unitSystem,
70 QWidget *parent = nullptr);
71
78 static openswmmvis::plot::PlotAttribute attributeFrom(const QAction *action);
79
85 const QAction *action);
86};
87
88} // namespace openswmmvis::ui
89
90#endif // OPENSWMMVIS_UI_WIDGETS_ATTRIBUTEPICKERMENU_H
Abstract source backing one comparison-plot run.
Definition irunlayer.h:171
Definition attributepickermenu.h:34
static QVector< openswmmvis::plot::PlotAttribute > execForMeshKind(openswmmvis::plot::ObjectRef::Kind kind, const QPoint &globalPos, const openswmmvis::plot::IRunLayer *availability, const QString &unavailableTip=QString())
Pop a "Plot time series" context menu for a 2D mesh kind at globalPos and return the attributes the u...
Definition attributepickermenu.cpp:89
static QMenu * createForSystem(openswmmvis::plot::UnitSystem unitSystem, QWidget *parent=nullptr)
Build the system-attribute menu (14 entries). Each action's data() carries the PlotAttribute value.
Definition attributepickermenu.cpp:120
static QMenu * createForObjectKind(openswmmvis::plot::ObjectRef::Kind kind, openswmmvis::plot::UnitSystem unitSystem, QWidget *parent=nullptr, const QStringList &speciesNames=QStringList())
Build (and return) a menu of attributes valid for kind. Caller owns the returned menu (set its parent...
Definition attributepickermenu.cpp:40
static openswmmvis::plot::ResultDescriptor descriptorFrom(const QAction *action)
Y2b-2 (amendment D-Y4): extract what the picked action plots — a fixed attribute or a species BY NAME...
Definition attributepickermenu.cpp:137
static openswmmvis::plot::PlotAttribute attributeFrom(const QAction *action)
Extract the chosen PlotAttribute from a picked action. Returns PlotAttribute::Unknown for the "All at...
Definition attributepickermenu.cpp:127
Slice BL — abstract "data-source" that the ComparisonPlotModel reads timeseries from.
PlotAttribute
What a series plots. One row per attribute in the Nx2 grid.
Definition plotattribute.h:38
UnitSystem
Unit system carried per .out file. Sourced from swmm_output_get_flow_units: 0=CFS / 1=GPM / 2=MGD → U...
Definition plotattribute.h:32
Definition openswmmvislayer.h:43
Slice BL — canonical enumeration of plottable result attributes.
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
TokenKind kind
Definition queryparser.cpp:34
Kind
Definition irunlayer.h:39
One plottable result: a fixed attribute OR a species by name.
Definition resultdescriptor.h:39