![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <labeledcontrols.h>
Signals | |
| void | pickerClicked () |
| void | currentTextChanged (const QString &text) |
Public Member Functions | |
| LabeledPickerCombo (const QString &labelText={}, QWidget *parent=nullptr) | |
| void | setItems (const QStringList &items, const QString &selected={}) |
| QString | currentText () const |
| void | setCurrentText (const QString &v) |
| QComboBox * | combo () const |
| QToolButton * | button () const |
Data-object picker: QComboBox listing existing instances of a SWMM data object (time series, pattern, unit-hydrograph group, ...) plus a small "..." button beside it. Caller fills the combo via setItems() and connects pickerClicked to whatever creation flow (typically NewDataObjectDialog::getNew(...) + SWMMModelLayer::createDataObject(...)) is appropriate for that data kind. After creation the caller calls setItems again with the refreshed list and setCurrentText(spec.name).
Used 7× in NodeCompoundEditDialog (DB.4): Inflows TS, Inflows Pattern, DWF Monthly/Daily/Hourly/Weekend, RDII UH.
|
explicit |
| labelText | Optional label text; pass an empty string to embed the picker in a form layout that already supplies its own label (no left-pane label column then). |
|
inline |
|
inline |
| QString LabeledPickerCombo::currentText | ( | ) | const |
|
signal |
Mirror of the combo's currentTextChanged for caller convenience.
|
signal |
Fired when the user clicks the "..." button. Caller opens the matching creation dialog.
| void LabeledPickerCombo::setCurrentText | ( | const QString & | v | ) |
| void LabeledPickerCombo::setItems | ( | const QStringList & | items, |
| const QString & | selected = {} |
||
| ) |
Replace the combo's items with items, optionally selecting the entry matching selected. An empty items list yields an empty combo (with the single "(none)" placeholder still selectable).