51 lines
1.6 KiB
C++
51 lines
1.6 KiB
C++
#include "rstozerosetwidget.h"
|
||
#include "deviceproxy.h"
|
||
#include "rs_settings.h"
|
||
#include "deviceinfo.h"
|
||
|
||
RSToZeroSetWidget::RSToZeroSetWidget(QWidget* parent)
|
||
:QFrame(parent)
|
||
,ui(new Ui::RSToZeroSetWidget)
|
||
{
|
||
ui->setupUi(this);
|
||
loadSet();
|
||
}
|
||
|
||
void RSToZeroSetWidget::loadSet()
|
||
{
|
||
// 加载PTP位置设置
|
||
RS_SETTINGS->beginGroup("device/RSTZVel");
|
||
double Vel1 = RS_SETTINGS->readNumDEntry("/Vel1");
|
||
double Vel2 = RS_SETTINGS->readNumDEntry("/Vel2");
|
||
double Vel3 = RS_SETTINGS->readNumDEntry("/Vel3");
|
||
RS_SETTINGS->endGroup();
|
||
|
||
ui->dsbZAAxisToZero1Vel->setValue(Vel1);
|
||
ui->dsbZAAxisToZero2Vel->setValue(Vel2);
|
||
ui->dsbZAAxisToZero3Vel->setValue(Vel3);
|
||
}
|
||
|
||
void RSToZeroSetWidget::on_dsbZAAxisToZero1Vel_valueChanged(double value)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/RSTZVel");
|
||
RS_SETTINGS->writeEntry("/Vel1", value);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("Z轴回零速度1改变为:%1mm/s").arg(value));
|
||
}
|
||
|
||
void RSToZeroSetWidget::on_dsbZAAxisToZero2Vel_valueChanged(double value)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/RSTZVel");
|
||
RS_SETTINGS->writeEntry("/Vel2", value);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("Z轴回零速度2改变为:%1mm/s").arg(value));
|
||
}
|
||
|
||
void RSToZeroSetWidget::on_dsbZAAxisToZero3Vel_valueChanged(double value)
|
||
{
|
||
RS_SETTINGS->beginGroup("device/RSTZVel");
|
||
RS_SETTINGS->writeEntry("/Vel3", value);
|
||
RS_SETTINGS->endGroup();
|
||
//DEVICE_INFO->printDeviceSystemInfo(QString("Z轴回零速度3改变为:%1mm/s").arg(value));
|
||
}
|