163 lines
5.7 KiB
C++
163 lines
5.7 KiB
C++
#include "smallareasparamwidget.h"
|
||
#include "ui_smallareasparamwidget.h"
|
||
#include "deviceproxy.h"
|
||
#include "rs_settings.h"
|
||
#include "deviceinfo.h"
|
||
#include "IPG_laser.h"
|
||
|
||
SmallAreasParamWidget::SmallAreasParamWidget(QWidget *parent) :
|
||
QFrame(parent),
|
||
ui(new Ui::SmallAreasParamWidget)
|
||
{
|
||
ui->setupUi(this);
|
||
connect(DEV,SIGNAL(XAxisCtPosSGL(double)),this,SLOT(setXAxisCtPos(double)));
|
||
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
double XiaoVel = RS_SETTINGS->readNumDEntry("/XiaoVel");
|
||
double XiaoInternal = RS_SETTINGS->readNumDEntry("/XiaoInternal");
|
||
double GlobalPix = RS_SETTINGS->readNumDEntry("/GlobalPix");
|
||
double XiaoAccDec = RS_SETTINGS->readNumDEntry("/XiaoAccDec");
|
||
double XiaoOffset = RS_SETTINGS->readNumDEntry("/XiaoOffset");
|
||
double XLeftOffset = RS_SETTINGS->readNumDEntry("/XLeftOffset");
|
||
double XRightOffset = RS_SETTINGS->readNumDEntry("/XRightOffset");
|
||
int YOffset = RS_SETTINGS->readNumDEntry("/YOffset");
|
||
int YOffset_N = RS_SETTINGS->readNumDEntry("/YOffset_N");
|
||
int YTanslate = RS_SETTINGS->readNumDEntry("/YTanslate");
|
||
int StartPos = RS_SETTINGS->readNumDEntry("/StartPos");
|
||
int StartPosRight = RS_SETTINGS->readNumDEntry("/StartPosRight");
|
||
RS_SETTINGS->endGroup();
|
||
|
||
|
||
|
||
//ui->dsbFindCamera->setValue(FindCameraPos);
|
||
ui->dsbXiaoVel->setValue(XiaoVel);
|
||
ui->dsbXiaoInternal->setValue(XiaoInternal);
|
||
ui->dsbGloblaPix->setValue(GlobalPix);
|
||
ui->dsbXiaoAccDec->setValue(XiaoAccDec);
|
||
ui->dsbXiaoOffset->setValue(XiaoOffset);
|
||
ui->dsbXLeftOffset->setValue(XLeftOffset);
|
||
ui->dsbXRightOffset->setValue(XRightOffset);
|
||
ui->dsbYOffset->setValue(YOffset);
|
||
ui->dsbYOffset_N->setValue(YOffset_N);
|
||
ui->dsbYTanslate->setValue(YTanslate);
|
||
ui->dsbStartPos->setValue(StartPos);
|
||
ui->dsbStartPosRight->setValue(StartPosRight);
|
||
}
|
||
|
||
SmallAreasParamWidget::~SmallAreasParamWidget()
|
||
{
|
||
delete ui;
|
||
}
|
||
|
||
void SmallAreasParamWidget::on_dsbXiaoVel_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/XiaoVel", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("特定区域加工速度改变为:%1mm/s").arg(arg1));
|
||
}
|
||
|
||
|
||
void SmallAreasParamWidget::on_dsbXiaoInternal_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/XiaoInternal", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("特定区域加工间隔改变为:%1mm").arg(arg1));
|
||
}
|
||
|
||
void SmallAreasParamWidget::on_dsbGloblaPix_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/GlobalPix", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("全局相机像素改变为:%1").arg(arg1));
|
||
}
|
||
|
||
void SmallAreasParamWidget::on_dsbXiaoAccDec_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/XiaoAccDec", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("特定区域加工加减速距离改变为:%1mm").arg(arg1));
|
||
}
|
||
|
||
void SmallAreasParamWidget::on_dsbXiaoOffset_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/XiaoOffset", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("特定区域加工偏移改变为:%1mm").arg(arg1));
|
||
}
|
||
|
||
void SmallAreasParamWidget::on_pbRecord_clicked()
|
||
{
|
||
DEV->Record_xiao();
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/XiaoXAxis", XAxisCtPos);
|
||
RS_SETTINGS->endGroup();
|
||
ui->dsbRecord->setValue(XAxisCtPos);
|
||
}
|
||
void SmallAreasParamWidget::setXAxisCtPos(double value)
|
||
{
|
||
XAxisCtPos = value;
|
||
}
|
||
|
||
void SmallAreasParamWidget::on_dsbXLeftOffset_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/XLeftOffset", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("特定区域加工X轴负向偏移改为:%1mm").arg(arg1));
|
||
}
|
||
|
||
void SmallAreasParamWidget::on_dsbXRightOffset_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/XRightOffset", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("特定区域加工X轴正向偏移改为:%1mm").arg(arg1));
|
||
}
|
||
|
||
void SmallAreasParamWidget::on_dsbYOffset_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/YOffset", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("特定区域加工Y正向轴缩放条数改为:%1").arg(arg1));
|
||
}
|
||
|
||
void SmallAreasParamWidget::on_dsbYOffset_N_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/YOffset_N", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("特定区域加工Y负向轴缩放条数改为:%1").arg(arg1));
|
||
}
|
||
|
||
void SmallAreasParamWidget::on_dsbYTanslate_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/YTanslate", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("特定区域加工Y偏移改变为:%1").arg(arg1));
|
||
}
|
||
|
||
|
||
|
||
void SmallAreasParamWidget::on_dsbStartPos_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/StartPos", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
}
|
||
|
||
|
||
|
||
void SmallAreasParamWidget::on_dsbStartPosRight_valueChanged(double arg1)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/Rposition");
|
||
RS_SETTINGS->writeEntry("/StartPosRight", arg1);
|
||
RS_SETTINGS->endGroup();
|
||
}
|