38 using namespace score;
42 m_layout->insertRow(0, makeLabel(tr(
"Value"),
this), m_valueSBox);
43 m_layout->insertRow(1, makeLabel(tr(
"Domain"),
this), m_domainEdit);
45 connect(m_unit, &State::UnitWidget::unitChanged,
this, [
this](
const State::Unit& u) {
46 auto dom = ossia::get_unit_default_domain(u.get());
48 if(
auto p = dom.v.target<ossia::domain_base<float>>())
50 m_domainEdit->set_domain(dom);
54 m_valueSBox->setValue(0);
55 m_domainEdit->set_domain(
61 auto settings = getCommonSettings();
62 settings.value = T(m_valueSBox->value());
63 settings.domain = m_domainEdit->domain();
77 setCommonSettings(settings);
78 m_valueSBox->setValue(State::convert::value<T>(settings.value));
79 m_domainEdit->set_domain(settings.domain);
82 void setCanEditProperties(
bool b)
override
84 AddressSettingsWidget::setCanEditProperties(b);
85 m_domainEdit->setEnabled(b);