2025-04-09 05:58:05 +00:00
|
|
|
#include "degreeofcrystallinityform.h"
|
|
|
|
|
#include "ui_degreeofcrystallinityform.h"
|
|
|
|
|
|
|
|
|
|
DegreeOfCrystallinityForm::DegreeOfCrystallinityForm(QWidget *parent) :
|
|
|
|
|
QWidget(parent),
|
|
|
|
|
ui(new Ui::DegreeOfCrystallinityForm)
|
|
|
|
|
{
|
|
|
|
|
ui->setupUi(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DegreeOfCrystallinityForm::~DegreeOfCrystallinityForm()
|
|
|
|
|
{
|
|
|
|
|
delete ui;
|
|
|
|
|
}
|
2025-04-11 05:51:47 +00:00
|
|
|
|
|
|
|
|
void DegreeOfCrystallinityForm::on_pushButtonCalculate_clicked()
|
|
|
|
|
{
|
2025-04-11 09:17:37 +00:00
|
|
|
float enthalpy = ui->LineEditEnthalpyOfCrystallization->text().toFloat();
|
|
|
|
|
float enthalpyCold = ui->LineEditEnthalpyOfColdCrystallization->text().toFloat();
|
|
|
|
|
float enthalpyTheory = ui->LineEditTheoreticalEnthalpy->text().toFloat();
|
|
|
|
|
float Xc = (enthalpy - enthalpyCold) / enthalpyTheory / 100;
|
2025-04-11 05:51:47 +00:00
|
|
|
|
2025-04-11 09:17:37 +00:00
|
|
|
ui->xcLineEditDegreedOfCrystallinity->setText(QString::number(Xc,'f',3));
|
2025-04-11 05:51:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DegreeOfCrystallinityForm::on_pushButtonQuit_clicked()
|
|
|
|
|
{
|
2025-04-11 09:17:37 +00:00
|
|
|
ui->LineEditEnthalpyOfCrystallization->text().clear();
|
|
|
|
|
ui->LineEditEnthalpyOfColdCrystallization->text().clear();
|
|
|
|
|
ui->LineEditTheoreticalEnthalpy->text().clear();
|
|
|
|
|
ui->xcLineEditDegreedOfCrystallinity->text().clear();
|
2025-04-11 05:51:47 +00:00
|
|
|
|
2025-04-11 09:17:37 +00:00
|
|
|
hide();
|
2025-04-11 05:51:47 +00:00
|
|
|
}
|