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
LabeledPickerCombo Class Reference

#include <labeledcontrols.h>

Inheritance diagram for LabeledPickerCombo:
Collaboration diagram for LabeledPickerCombo:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LabeledPickerCombo()

LabeledPickerCombo::LabeledPickerCombo ( const QString &  labelText = {},
QWidget *  parent = nullptr 
)
explicit
Parameters
labelTextOptional 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).
Here is the call graph for this function:

Member Function Documentation

◆ button()

QToolButton * LabeledPickerCombo::button ( ) const
inline
Here is the caller graph for this function:

◆ combo()

QComboBox * LabeledPickerCombo::combo ( ) const
inline
Here is the caller graph for this function:

◆ currentText()

QString LabeledPickerCombo::currentText ( ) const
Here is the caller graph for this function:

◆ currentTextChanged

void LabeledPickerCombo::currentTextChanged ( const QString &  text)
signal

Mirror of the combo's currentTextChanged for caller convenience.

Here is the caller graph for this function:

◆ pickerClicked

void LabeledPickerCombo::pickerClicked ( )
signal

Fired when the user clicks the "..." button. Caller opens the matching creation dialog.

Here is the caller graph for this function:

◆ setCurrentText()

void LabeledPickerCombo::setCurrentText ( const QString &  v)

◆ setItems()

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).


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