2 Star 4 Fork 2

liyuanbhu/JHPhoto_BASIC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
calibDialog.cpp 811 Bytes
一键复制 编辑 原始数据 按行查看 历史
liyuanbhu 提交于 2019-11-17 21:33 . 修改了几个bug
#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));
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liyuanbhu/JHPhoto_BASIC.git
git@gitee.com:liyuanbhu/JHPhoto_BASIC.git
liyuanbhu
JHPhoto_BASIC
JHPhoto_BASIC
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385