代码拉取完成,页面将自动刷新
#include "calibDialog.h"
#include "ui_calibDialog.h"
CalibDialog::CalibDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::CalibDialog)
{
ui->setupUi(this);
connect(ui->lineEditLength, SIGNAL(textChanged(const QString &)), this, SLOT(compute(const QString &)));
connect(ui->pushButtonApply, SIGNAL(clicked()), this, SLOT(accept()));
}
void CalibDialog::setNameLength(QString name, double pixels)
{
ui->labelLensName->setText(name);
m_lenth_pixels = pixels;
ui->lineEditPixels->setText(QString("%1").arg(m_lenth_pixels));
}
CalibDialog::~CalibDialog()
{
delete ui;
}
void CalibDialog::compute(const QString &text)
{
m_length_um = text.toDouble();
um_per_pixel = m_length_um / m_lenth_pixels;
ui->lineEditRes->setText(QString("%1").arg(um_per_pixel));
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。