#include "floatinformation.h"
#include "ui_floatinformation.h"

FloatInformation::FloatInformation(QWidget *parent) :
    QWidget(parent),
    m_ui(new Ui::FloatInformation)
{
    m_ui->setupUi(this);
}

FloatInformation::~FloatInformation()
{
    delete m_ui;
}

void FloatInformation::changeEvent(QEvent *e)
{
    QWidget::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        m_ui->retranslateUi(this);
        break;
    default:
        break;
    }
}
void FloatInformation::getFloatData(M3D::M3DML_Float_Block *block)
{
    block->data = m_ui->doubleSpinBox->value();
}
void FloatInformation::loadData(const M3D::M3DML_Layer *layer)
{
    m_ui->doubleSpinBox->setValue(layer->float_block->data);
}
