Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
maki::SelectorWidget Class Reference

A widget for selecting one value from a list of options. More...

#include <widget_factory.h>

Inheritance diagram for maki::SelectorWidget:
maki::TypedInputWidget< QComboBox > maki::InputWidget maki::EnumWidget

Signals

void valueChanged (const QString &value)
 Emitted when the selected value changes.

Public Member Functions

 SelectorWidget (const QString &label, WidgetAlignment alignment, QWidget *parent)
 Constructs a selector widget with an internally created combo box.
 SelectorWidget (const QString &label, QComboBox *comboBox, WidgetAlignment alignment, QWidget *parent)
 Constructs a selector widget using an existing combo box.
void addItem (const QString &name, const QVariant &value)
 Adds an item to the selector.

Detailed Description

A widget for selecting one value from a list of options.

Constructor & Destructor Documentation

◆ SelectorWidget() [1/2]

maki::SelectorWidget::SelectorWidget ( const QString & label,
WidgetAlignment alignment,
QWidget * parent )

Constructs a selector widget with an internally created combo box.

Parameters
labelThe label shown next to the widget.
parentThe parent widget.

◆ SelectorWidget() [2/2]

maki::SelectorWidget::SelectorWidget ( const QString & label,
QComboBox * comboBox,
WidgetAlignment alignment,
QWidget * parent )

Constructs a selector widget using an existing combo box.

Parameters
labelThe label shown next to the widget.
comboBoxThe combo box to use as the selector.
parentThe parent widget.

Member Function Documentation

◆ addItem()

void maki::SelectorWidget::addItem ( const QString & name,
const QVariant & value )

Adds an item to the selector.

Parameters
nameThe visible display name.
valueThe underlying value associated with the item.

◆ valueChanged

void maki::SelectorWidget::valueChanged ( const QString & value)
signal

Emitted when the selected value changes.

Parameters
valueThe new value.

The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/widgets/widget_factory.h
  • /__w/maki/maki/app/widgets/widget_factory.cpp