refactor(*):03LaserCut_V00.00.01,Spark100项目发货前功能提取
This commit is contained in:
@@ -20,10 +20,11 @@ GeneralSetWidget::GeneralSetWidget(QWidget* parent):
|
||||
}
|
||||
|
||||
ui->cmbSetParam->addItems(doTextList);
|
||||
connect(ui->cmbSetParam,SIGNAL(currentTextChanged(const QString &)),this,SLOT(cmbSetParam_currentTextChanged(QString)));
|
||||
|
||||
connect(DEV,SIGNAL(show_Q_PP_SGL()),this,SLOT(show_Q_PP()));
|
||||
loadSet();
|
||||
//ui->pbLaserSet2->setVisible(false);
|
||||
|
||||
}
|
||||
|
||||
void GeneralSetWidget::loadSet()
|
||||
@@ -53,6 +54,10 @@ void GeneralSetWidget::loadSet()
|
||||
RS_SETTINGS->beginGroup("device/Rposition");
|
||||
double FindEdageOffset = RS_SETTINGS->readNumDEntry("/FindEdageOffset");
|
||||
RS_SETTINGS->endGroup();
|
||||
|
||||
RS_SETTINGS->beginGroup("device/Rposition");//From R
|
||||
double RCheckOffset = RS_SETTINGS->readNumDEntry("/RCheckOffset");
|
||||
RS_SETTINGS->endGroup();
|
||||
|
||||
RS_SETTINGS->beginGroup("device/Rposition");
|
||||
double PixelSize = RS_SETTINGS->readNumDEntry("/PixelSize");
|
||||
@@ -77,6 +82,127 @@ void GeneralSetWidget::loadSet()
|
||||
DEV->R_detection_po = RS_SETTINGS->readNumDEntry("/dsbPPO");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->dsbPP_O->setValue(DEV->R_detection_po);
|
||||
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
int valueE = RS_SETTINGS->readNumEntry("/PPEnable");
|
||||
RS_SETTINGS->endGroup();
|
||||
|
||||
if(valueE == 1)
|
||||
{
|
||||
ui->checkBox->setCheckState(Qt::Checked);
|
||||
//if (ui->chkAuto->checkState() == Qt::Checked)
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->checkBox->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
QString value = ui->cmbSetParam->currentText();
|
||||
if (value == "设置参数1")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP1");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG1");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM1");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE1");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (value == "设置参数2")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP2");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG2");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM2");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE2");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (value == "设置参数3")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP3");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG3");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM3");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE3");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (value == "设置参数4")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP4");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG4");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM4");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE4");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (value == "设置参数5")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP5");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG5");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM5");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE5");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (value == "设置参数6")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP6");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG6");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM6");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE6");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (value == "设置参数7")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP7");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG7");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM7");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE7");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (value == "设置参数8")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP8");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG8");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM8");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE8");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void GeneralSetWidget::on_leIP_IPChanged(QString value)
|
||||
@@ -110,65 +236,6 @@ void GeneralSetWidget::on_dsbZAAxisSafeVel_valueChanged(double value)
|
||||
RS_SETTINGS->endGroup();
|
||||
DEVICE_INFO->printDeviceSystemInfo(QString("Z轴回安全位置速度设置为:%1mm/s").arg(value));
|
||||
}
|
||||
void GeneralSetWidget::cmbSetParam_currentTextChanged(const QString &value)
|
||||
{
|
||||
if (IPGLASER->m_hComm == nullptr)
|
||||
{
|
||||
IPGLASER->OpenComm();
|
||||
}
|
||||
IPGLASER->LaserClose();
|
||||
IPGLASER->getIPGLaerPara("IPGLaser");
|
||||
if (IPGLASER->m_hComm == nullptr)
|
||||
{
|
||||
IPGLASER->OpenComm();
|
||||
}
|
||||
int ret;
|
||||
if (value == "设置参数1")
|
||||
{
|
||||
ret = IPGLASER->SetParam(1);
|
||||
}
|
||||
else if (value == "设置参数2")
|
||||
{
|
||||
ret = IPGLASER->SetParam(2);
|
||||
}
|
||||
else if (value == "设置参数3")
|
||||
{
|
||||
ret = IPGLASER->SetParam(3);
|
||||
}
|
||||
else if (value == "设置参数4")
|
||||
{
|
||||
ret = IPGLASER->SetParam(4);
|
||||
}
|
||||
else if (value == "设置参数5")
|
||||
{
|
||||
ret = IPGLASER->SetParam(5);
|
||||
}
|
||||
else if (value == "设置参数6")
|
||||
{
|
||||
ret = IPGLASER->SetParam(6);
|
||||
}
|
||||
else if (value == "设置参数7")
|
||||
{
|
||||
ret = IPGLASER->SetParam(7);
|
||||
}
|
||||
else if (value == "设置参数8")
|
||||
{
|
||||
ret = IPGLASER->SetParam(8);
|
||||
}
|
||||
if (ret != 0)
|
||||
{
|
||||
QMessageBox msg(this);
|
||||
DEVICE_INFO->printDeviceSalamInfo("参数设置错误!");
|
||||
msg.setWindowTitle("异常提示");
|
||||
msg.setText("参数设置错误!");
|
||||
msg.setIcon(QMessageBox::Critical);
|
||||
msg.exec();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void GeneralSetWidget::on_dsbPanFindHeight_valueChanged(double value)
|
||||
@@ -278,29 +345,29 @@ void GeneralSetWidget::on_dsbGlobalCameraOffset_valueChanged(double arg1)
|
||||
|
||||
|
||||
|
||||
void GeneralSetWidget::on_pbSetPP_clicked()
|
||||
{
|
||||
QString strPower;
|
||||
strPower = QString::number(ui->dsbSetPPValue->value(),'f',2);
|
||||
int ret = IPGLASER->SetSingleParam("32",strPower);
|
||||
if (ret != 0)
|
||||
{
|
||||
QMessageBox msg(this);
|
||||
DEVICE_INFO->printDeviceSalamInfo("参数设置错误!");
|
||||
msg.setWindowTitle("异常提示");
|
||||
msg.setText("参数设置错误!");
|
||||
msg.setIcon(QMessageBox::Critical);
|
||||
msg.exec();
|
||||
return;
|
||||
}
|
||||
QMessageBox msg(this);
|
||||
DEVICE_INFO->printDeviceSalamInfo("参数设置成功!");
|
||||
msg.setWindowTitle("提示");
|
||||
msg.setText("参数设置成功!");
|
||||
msg.setIcon(QMessageBox::Critical);
|
||||
msg.exec();
|
||||
return;
|
||||
}
|
||||
//void GeneralSetWidget::on_pbSetPP_clicked()
|
||||
//{
|
||||
// QString strPower;
|
||||
// strPower = QString::number(ui->dsbSetPPValue->value(),'f',2);
|
||||
// int ret = IPGLASER->SetSingleParam("32",strPower);
|
||||
// if (ret != 0)
|
||||
// {
|
||||
// QMessageBox msg(this);
|
||||
// DEVICE_INFO->printDeviceSalamInfo("参数设置错误!");
|
||||
// msg.setWindowTitle("异常提示");
|
||||
// msg.setText("参数设置错误!");
|
||||
// msg.setIcon(QMessageBox::Critical);
|
||||
// msg.exec();
|
||||
// return;
|
||||
// }
|
||||
// QMessageBox msg(this);
|
||||
// DEVICE_INFO->printDeviceSalamInfo("参数设置成功!");
|
||||
// msg.setWindowTitle("提示");
|
||||
// msg.setText("参数设置成功!");
|
||||
// msg.setIcon(QMessageBox::Critical);
|
||||
// msg.exec();
|
||||
// return;
|
||||
//}
|
||||
void GeneralSetWidget::show_Q_PP()
|
||||
{
|
||||
ui->dsbQ_T->setValue(DEV->R_detection_pt);
|
||||
@@ -360,3 +427,422 @@ void GeneralSetWidget::on_oneDot_clicked()
|
||||
ui->dsbR->setValue(single*1000);
|
||||
//ui->dsbR->setValue(DEV->TypeForTest);
|
||||
}
|
||||
|
||||
void GeneralSetWidget::on_lineEdit_textChanged(const QString &arg1)
|
||||
{
|
||||
QString value = ui->cmbSetParam->currentText();
|
||||
if (value == "设置参数1")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PP1",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数2")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PP2",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数3")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PP3",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数4")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PP4",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数5")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PP5",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数6")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PP6",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数7")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PP7",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数8")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PP8",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
|
||||
IPGLASER->UpdateIPGPara();
|
||||
if (value == "设置参数1") IPGLASER->SetParam(1);
|
||||
else if (value == "设置参数2") IPGLASER->SetParam(2);
|
||||
else if (value == "设置参数3") IPGLASER->SetParam(3);
|
||||
else if (value == "设置参数4") IPGLASER->SetParam(4);
|
||||
else if (value == "设置参数5") IPGLASER->SetParam(5);
|
||||
else if (value == "设置参数6") IPGLASER->SetParam(6);
|
||||
else if (value == "设置参数7") IPGLASER->SetParam(7);
|
||||
else if (value == "设置参数8") IPGLASER->SetParam(8);
|
||||
|
||||
}
|
||||
|
||||
void GeneralSetWidget::on_lineEdit_2_textChanged(const QString &arg1)
|
||||
{
|
||||
QString value = ui->cmbSetParam->currentText();
|
||||
if (value == "设置参数1")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PG1",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数2")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PG2",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数3")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PG3",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数4")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PG4",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数5")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PG5",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数6")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PG6",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数7")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PG7",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数8")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PG8",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
|
||||
IPGLASER->UpdateIPGPara();
|
||||
if (value == "设置参数1") IPGLASER->SetParam(1);
|
||||
else if (value == "设置参数2") IPGLASER->SetParam(2);
|
||||
else if (value == "设置参数3") IPGLASER->SetParam(3);
|
||||
else if (value == "设置参数4") IPGLASER->SetParam(4);
|
||||
else if (value == "设置参数5") IPGLASER->SetParam(5);
|
||||
else if (value == "设置参数6") IPGLASER->SetParam(6);
|
||||
else if (value == "设置参数7") IPGLASER->SetParam(7);
|
||||
else if (value == "设置参数8") IPGLASER->SetParam(8);
|
||||
|
||||
}
|
||||
|
||||
void GeneralSetWidget::on_lineEdit_3_textChanged(const QString &arg1)
|
||||
{
|
||||
QString value = ui->cmbSetParam->currentText();
|
||||
if (value == "设置参数1")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/AM1",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数2")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/AM2",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数3")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/AM3",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数4")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/AM4",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数5")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/AM5",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数6")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/AM6",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数7")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/AM7",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数8")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/AM8",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
|
||||
IPGLASER->UpdateIPGPara();
|
||||
if (value == "设置参数1") IPGLASER->SetParam(1);
|
||||
else if (value == "设置参数2") IPGLASER->SetParam(2);
|
||||
else if (value == "设置参数3") IPGLASER->SetParam(3);
|
||||
else if (value == "设置参数4") IPGLASER->SetParam(4);
|
||||
else if (value == "设置参数5") IPGLASER->SetParam(5);
|
||||
else if (value == "设置参数6") IPGLASER->SetParam(6);
|
||||
else if (value == "设置参数7") IPGLASER->SetParam(7);
|
||||
else if (value == "设置参数8") IPGLASER->SetParam(8);
|
||||
|
||||
}
|
||||
|
||||
void GeneralSetWidget::on_lineEdit_4_textChanged(const QString &arg1)
|
||||
{
|
||||
QString value = ui->cmbSetParam->currentText();
|
||||
if (value == "设置参数1")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/MODE1",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数2")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/MODE2",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数3")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/MODE3",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数4")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/MODE4",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数5")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/MODE5",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数6")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/MODE6",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数7")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/MODE7",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else if (value == "设置参数8")
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/MODE8",arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
|
||||
IPGLASER->UpdateIPGPara();
|
||||
if (value == "设置参数1") IPGLASER->SetParam(1);
|
||||
else if (value == "设置参数2") IPGLASER->SetParam(2);
|
||||
else if (value == "设置参数3") IPGLASER->SetParam(3);
|
||||
else if (value == "设置参数4") IPGLASER->SetParam(4);
|
||||
else if (value == "设置参数5") IPGLASER->SetParam(5);
|
||||
else if (value == "设置参数6") IPGLASER->SetParam(6);
|
||||
else if (value == "设置参数7") IPGLASER->SetParam(7);
|
||||
else if (value == "设置参数8") IPGLASER->SetParam(8);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void GeneralSetWidget::on_lineEdit_5_textChanged(const QString &arg1)
|
||||
{
|
||||
DEV->ingotNumber = arg1;
|
||||
}
|
||||
|
||||
|
||||
void GeneralSetWidget::on_checkBox_clicked()
|
||||
{
|
||||
bool flag;
|
||||
|
||||
flag = ui->checkBox->isChecked();
|
||||
if (flag)
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PPEnable",1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
else
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
RS_SETTINGS->writeEntry("/PPEnable",0);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void GeneralSetWidget::on_dsbR_check_valueChanged(double arg1)
|
||||
{
|
||||
RS_SETTINGS->beginGroup("device/Rposition");
|
||||
RS_SETTINGS->writeEntry("/RCheckOffset", arg1);
|
||||
RS_SETTINGS->endGroup();
|
||||
}
|
||||
|
||||
void GeneralSetWidget::on_cmbSetParam_currentTextChanged(const QString &arg1)
|
||||
{
|
||||
if (IPGLASER->m_hComm == nullptr)
|
||||
{
|
||||
IPGLASER->OpenComm();
|
||||
}
|
||||
IPGLASER->LaserClose();
|
||||
IPGLASER->getIPGLaerPara("IPGLaser");
|
||||
if (IPGLASER->m_hComm == nullptr)
|
||||
{
|
||||
IPGLASER->OpenComm();
|
||||
}
|
||||
int ret;
|
||||
if (arg1 == "设置参数1")
|
||||
{
|
||||
ret = IPGLASER->SetParam(1);
|
||||
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP1");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG1");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM1");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE1");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (arg1 == "设置参数2")
|
||||
{
|
||||
ret = IPGLASER->SetParam(2);
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP2");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG2");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM2");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE2");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (arg1 == "设置参数3")
|
||||
{
|
||||
ret = IPGLASER->SetParam(3);
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP3");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG3");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM3");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE3");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (arg1 == "设置参数4")
|
||||
{
|
||||
ret = IPGLASER->SetParam(4);
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP4");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG4");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM4");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE4");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (arg1 == "设置参数5")
|
||||
{
|
||||
ret = IPGLASER->SetParam(5);
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP5");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG5");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM5");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE5");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (arg1 == "设置参数6")
|
||||
{
|
||||
ret = IPGLASER->SetParam(6);
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP6");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG6");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM6");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE6");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (arg1 == "设置参数7")
|
||||
{
|
||||
ret = IPGLASER->SetParam(7);
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP7");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG7");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM7");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE7");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
else if (arg1 == "设置参数8")
|
||||
{
|
||||
ret = IPGLASER->SetParam(8);
|
||||
RS_SETTINGS->beginGroup("device/LaserCmb");
|
||||
QString value1 = RS_SETTINGS->readEntry("/PP8");
|
||||
QString value2 = RS_SETTINGS->readEntry("/PG8");
|
||||
QString value3 = RS_SETTINGS->readEntry("/AM8");
|
||||
QString value4 = RS_SETTINGS->readEntry("/MODE8");
|
||||
RS_SETTINGS->endGroup();
|
||||
ui->lineEdit->setText(value1);
|
||||
ui->lineEdit_2->setText(value2);
|
||||
ui->lineEdit_3->setText(value3);
|
||||
ui->lineEdit_4->setText(value4);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user