score-addon-hardware/Hardware/Settings/View.cpp

46 lines
762 B
C++

#include "View.hpp"
#include <score/widgets/FormWidget.hpp>
#include <QFormLayout>
#include <QComboBox>
#include <wobjectimpl.h>
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)
{
// TODO : implement me
}
QWidget* View::getWidget()
{
return m_widg;
}
}
}