test_sdk/gui/config/gtl_gui_config_hw_widget_da...

53 lines
1.2 KiB
C++
Raw Normal View History

#include "gtl_gui_config_hw_widget_dac.h"
#include "ui_gtl_gui_config_hw_widget_dac.h"
namespace gtl
{
namespace gui
{
namespace config
{
hw_widget_dac::hw_widget_dac(QString plugins_path, QWidget *parent)
: hw_widget(parent)
, ui(new Ui::config_hw_widget_dac)
, _hw(plugins_path)
{
ui->setupUi(this);
ui->type->addItems(_hw.devices());
}
hw_widget_dac::~hw_widget_dac()
{
delete ui;
}
void hw_widget_dac::set_type(QString type)
{
ui->type->setCurrentText(type);
}
QString hw_widget_dac::type() const
{
return ui->type->currentText();
}
hw::device *hw_widget_dac::create_device()
{
return _hw.create_device(ui->type->currentText());
}
QString hw_widget_dac::id()
{
return ui->id->text();
}
qreal hw_widget_dac::rate()
{
return ui->rate->value();
}
}
}
}