fast::OptionsWidget class

A widget for selecting one of several options.

Base classes

class Widget
Abstract base class of widgets.

Public types

enum Type { DROPDOWN = 0, BUTTONS }

Constructors, destructors, conversion operators

OptionsWidget(const std::vector<std::string>& options, const std::string& name = "", Type type = DROPDOWN, const std::string& placeholder = "", int selected = -1, std::function<void(int, std::string)> callback = nullptr, QWidget* parent = nullptr)
OptionsWidget(const std::vector<std::string>& options, const std::string& name = "", Type type = DROPDOWN, const std::string& placeholder = "", int selected = -1, OptionsWidgetCallback* callback = nullptr, QWidget* parent = nullptr)

Public functions

void setSelected(int index)
void setSelected(std::string value)
auto getSelected() -> int
auto getOption(int index) const -> std::string