#include "degreeofcureform.h"
#include "ui_degreeofcureform.h"

DegreeOfCureForm::DegreeOfCureForm(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::DegreeOfCureForm)
{
    ui->setupUi(this);

    setWindowTitle("固化度");
}

DegreeOfCureForm::~DegreeOfCureForm()
{
    delete ui;
}

void DegreeOfCureForm::on_pushButtonCalculate_clicked()
{
    float precure = ui->LineEditPrecure->text().toFloat();
    float afterCuring = ui->jGLineEditAfterCuring->text().toFloat();

    float degree = (precure - afterCuring)/afterCuring * 100;

    ui->LineEditDegreeOfCure->setText(QString::number(degree,'f',3));
}

void DegreeOfCureForm::on_pushButtonQuit_clicked()
{
    hide();
}
