#include "View.hpp" #include #include #include #include W_OBJECT_IMPL(Hardware::Settings::View) namespace Hardware { namespace Settings { View::View() { m_widg = new score::FormWidget{tr("Hardware")}; auto lay = m_widg->layout(); { m_device = new QComboBox{m_widg}; m_device->addItem("None"); m_device->addItem("Launchpad_Pro_Standalone"); m_device->addItem("Launchpad_Pro_Live"); connect(m_device, &QComboBox::currentTextChanged, this, &View::deviceChanged); lay->addRow(m_device); } } void View::setDevice(const QString& device) { int idx = m_device->findText(device); if (idx != m_device->currentIndex()) m_device->setCurrentIndex(idx); } QWidget* View::getWidget() { return m_widg; } } }