489 lines
19 KiB
C++
489 lines
19 KiB
C++
#include "trainingparamsetting.h"
|
||
#include "ui_trainingparamsetting.h"
|
||
#include "mainwindowpagecontrol.h"
|
||
#include "icemodule.h"
|
||
#include "ccommunicateapi.h"
|
||
#include "paramtipsdialog.h"
|
||
#include "languagemanager.h"
|
||
#include <QDebug>
|
||
#include "currentuserdata.h"
|
||
|
||
TrainingParamSetting::TrainingParamSetting(QWidget *parent) :
|
||
QWidget(parent),
|
||
ui(new Ui::TrainingParamSetting),
|
||
m_IsImportPrescription(0),
|
||
m_saveParamInWidget(0),
|
||
m_trainType(0)
|
||
|
||
{
|
||
ui->setupUi(this);
|
||
m_userID = CurrentUserData::getInstace()->getCurrentPatientMsg().ID;
|
||
initWidget();
|
||
}
|
||
|
||
TrainingParamSetting::~TrainingParamSetting()
|
||
{
|
||
delete ui;
|
||
}
|
||
|
||
ST_BicycleParam TrainingParamSetting::get_st_bicycleParam()
|
||
{
|
||
ST_BicycleParam st_bicycleParam;
|
||
|
||
st_bicycleParam.trainTime = ui->trainTime1_ComboBox->currentText().toUInt();
|
||
//训练阻力
|
||
st_bicycleParam.resistance = ui->resistance1_ComboBox->currentText().toInt();
|
||
//训练速度
|
||
st_bicycleParam.speed = ui->speed1_ComboBox->currentText().toInt();
|
||
|
||
//转向:1为正向,0为逆向
|
||
if(ui->CW1_Button->isChecked())
|
||
st_bicycleParam.direction = 1;
|
||
else if(ui->ACW1_Button->isChecked())
|
||
st_bicycleParam.direction = 0;
|
||
//痉挛保护
|
||
// if(ui->spasmACW2_RadioButton->isChecked())
|
||
// st_bicycleParam.spasmType = 0;
|
||
|
||
if(ui->spasmClose1_Button->isChecked())
|
||
st_bicycleParam.spasmSwitch = 1; //保护是1
|
||
else
|
||
m_st_bicycleParam.spasmSwitch = 0; //不保护是0
|
||
|
||
//痉挛等级
|
||
if(ui->spasmLow1_Button->isChecked())
|
||
st_bicycleParam.spasmLevel = 1;
|
||
else if(ui->spasmMidd1_Button->isChecked())
|
||
st_bicycleParam.spasmLevel = 2;
|
||
else if(ui->spasmHigh1_Button->isChecked())
|
||
st_bicycleParam.spasmLevel = 3;
|
||
return st_bicycleParam;
|
||
}
|
||
|
||
void TrainingParamSetting::setTrainType(bool type)
|
||
{
|
||
m_trainType = type;
|
||
}
|
||
|
||
void TrainingParamSetting::showEvent(QShowEvent *event)
|
||
{
|
||
Q_UNUSED(event) //过滤掉同一个用户的多次参数初始化,界面不保存数据
|
||
if( m_saveParamInWidget != 1 && m_IsImportPrescription != 1 /*m_userID != CurrentUserData::getInstace()->getCurrentPatientMsg().ID ||*/ ) //过滤掉导入处方事件,第二次进入页面
|
||
{//第二次进入要保存:(改用户、游戏结束会跟新)√ 点击返回不更新、不到界面报要保存;
|
||
|
||
ui->spasmClose1_Button->setChecked(true); //保护打开
|
||
//时间
|
||
ui->trainTime1_ComboBox->setCurrentIndex(19);
|
||
//阻力
|
||
ui->resistance1_ComboBox->setCurrentIndex(4);
|
||
//速度
|
||
ui->speed1_ComboBox->setCurrentIndex(8);
|
||
|
||
ui->spasmLow1_Button->setChecked(true);
|
||
|
||
ui->CW1_Button->setChecked(true);
|
||
|
||
m_userID = CurrentUserData::getInstace()->getCurrentPatientMsg().ID;
|
||
|
||
}
|
||
else
|
||
{
|
||
|
||
m_IsImportPrescription = 0; //重新初始化
|
||
}
|
||
}
|
||
|
||
void TrainingParamSetting::changeEvent(QEvent *event)
|
||
{
|
||
switch (event->type())
|
||
{
|
||
case QEvent::LanguageChange:
|
||
{
|
||
E_LANGUAGE language = LanguageManager::getInstance()->getCurrentLanguage();
|
||
switch(language)
|
||
{
|
||
case Chinese_E:
|
||
{
|
||
// ui->trainPart_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_part.png);");
|
||
// ui->trainMode_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_mode.png);");
|
||
// ui->trainTime_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_time.png);");
|
||
// ui->resistance_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_force.png);");
|
||
// ui->speed_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_speed.png);");
|
||
// ui->turn_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_turn.png);");
|
||
// ui->spasmProtect_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/spasm_control.png);");
|
||
// ui->spasmLevel_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/spasm_level.png);");
|
||
// ui->game_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_game.png);");
|
||
|
||
ui->trainTimeIcon_label->move(70,50);
|
||
ui->trainTime_label->move(140,40);
|
||
|
||
ui->trainResistanceIcon_label->move(80,50);
|
||
ui->trainResistance_label->move(150,40);
|
||
|
||
ui->trainSpeedIcon_label->move(90,40);
|
||
ui->trainSpeed_label->move(160,30);
|
||
|
||
//X移动50
|
||
ui->spasmProtectIcon_label->move(50,80);
|
||
ui->spasmProtect_label->move(120,70);
|
||
|
||
ui->spasmProtect_label->setStyleSheet("width: 168px;height: 42px;font-size: 42px;font-weight: 500;color: #033333;line-height: 63px;");
|
||
ui->trainResistance_label->setStyleSheet("width: 168px;height: 42px;font-size: 42px;font-weight: 500;color: #033333;line-height: 63px;");
|
||
|
||
|
||
}
|
||
break;
|
||
case English_E:
|
||
{
|
||
// ui->trainPart_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_part_E.png);");
|
||
// ui->trainMode_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_mode_E.png);");
|
||
// ui->trainTime_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_time_E.png);");
|
||
// ui->resistance_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_force_E.png);");
|
||
// ui->speed_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_speed_E.png);");
|
||
// ui->turn_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_turn_E.png);");
|
||
// ui->spasmProtect_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/spasm_control_E.png);");
|
||
// ui->spasmLevel_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/spasm_level_E.png);");
|
||
// ui->game_GroupBox->setStyleSheet("border-image: url(:/DependFile/Source/trainPage/train_game_E.png);");
|
||
//X移动30
|
||
|
||
ui->trainTimeIcon_label->move(50,50);
|
||
ui->trainTime_label->move(120,40);
|
||
ui->trainResistanceIcon_label->move(5,50);
|
||
ui->trainResistance_label->move(55,40);
|
||
ui->trainSpeedIcon_label->move(40,50);
|
||
ui->trainSpeed_label->move(110,40);
|
||
|
||
//X移动50
|
||
ui->spasmProtectIcon_label->move(5,80);
|
||
ui->spasmProtect_label->move(55,70);
|
||
ui->spasmProtect_label->setStyleSheet("width: 168px;height: 42px;font-size: 32px;font-weight: 500;color: #033333;line-height: 63px;");
|
||
ui->trainResistance_label->setStyleSheet("width: 168px;height: 42px;font-size: 36px;font-weight: 500;color: #033333;line-height: 63px;");
|
||
|
||
}
|
||
break;
|
||
|
||
}
|
||
ui->retranslateUi(this);
|
||
}
|
||
break;
|
||
|
||
default:
|
||
QWidget::changeEvent(event);
|
||
break;
|
||
}
|
||
}
|
||
|
||
void TrainingParamSetting::initWidget()
|
||
{
|
||
|
||
/*
|
||
ui->resistance1_ComboBox->setView(new QListView);
|
||
ui->speed1_ComboBox->setView(new QListView);
|
||
ui->trainTime1_ComboBox->setView(new QListView);
|
||
*/
|
||
// ui->CW1_Button->setChecked(true); //优先选择正向
|
||
// ui->spasmMidd1_Button->setChecked(true); //中等痉挛
|
||
ui->spasmClose1_Button->setChecked(true); //保护打开
|
||
|
||
//时间
|
||
// ui->trainTime1_ComboBox->setView(new QListView);
|
||
for(int i = 1;i <= 120;i++)
|
||
{
|
||
ui->trainTime1_ComboBox->addItem(QString::number(i));
|
||
|
||
}
|
||
ui->trainTime1_ComboBox->setCurrentIndex(19);
|
||
//阻力
|
||
for(int i = 1;i <= 20;i++)
|
||
{
|
||
ui->resistance1_ComboBox->addItem(QString::number(i));
|
||
|
||
}
|
||
ui->resistance1_ComboBox->setCurrentIndex(4);
|
||
//速度,因为训练速度小于2会出现空
|
||
for(int i = 2;i <= 55; i++)
|
||
{
|
||
ui->speed1_ComboBox->addItem(QString::number(i));
|
||
}
|
||
//预设定值上肢不超10,下肢不超15
|
||
ui->speed1_ComboBox->setCurrentIndex(8);
|
||
|
||
//设置初始化按钮样式
|
||
// ui->CW1_Button->setStyleSheet("width: 140px;\nheight: 70px;\nbackground: #05A6EC;\nbox-shadow: 0px 3px 6px 0px rgba(12,49,153,0.59);\nborder-radius: 8px;\nborder: 2px solid #05A6EC;\n\nfont-size: 34px;\n\nfont-weight: 500;\ncolor: #FFFFFF;\nline-height: 51px;\nline-height: 51px;\ntext-shadow: 0px 3px 6px rgba(12,49,153,0.59), 0px 1px 2px #076D99;\n-webkit-background-clip: text;\n-webkit-text-fill-color: transparent;");
|
||
//ui->ACW1_Button->setStyleSheet("width: 140px;\nheight: 70px;\nbackground: linear-gradient(180deg, #EEFEFF 0%, #FCFEFF 100%);\nborder-radius: 8px;\nborder: 2px solid #B3D7E7;\n\nfont-size: 30px;\n\nfont-weight: 400;\ncolor: #333333;\nline-height: 45px;");
|
||
}
|
||
|
||
void TrainingParamSetting::slotBicycleParamChanged(ST_BicycleParam st_bicycleParam)
|
||
{
|
||
qDebug() <<"slotBicycleParamChanged";
|
||
|
||
if(st_bicycleParam.direction == 0)
|
||
ui->ACW1_Button->setChecked(true); //不默认则逆向,0表示逆向
|
||
|
||
if(st_bicycleParam.spasmLevel == 1)
|
||
ui->spasmLow1_Button->setChecked(true);
|
||
else if(st_bicycleParam.spasmLevel == 2)
|
||
ui->spasmMidd1_Button->setChecked(true);
|
||
else if(st_bicycleParam.spasmLevel == 3)
|
||
ui->spasmHigh1_Button->setChecked(true);
|
||
|
||
if(st_bicycleParam.spasmSwitch == 0)
|
||
ui->spasmClose1_Button->setChecked(false); //不默认则关闭,0代表关闭
|
||
else if(st_bicycleParam.spasmSwitch == 1)
|
||
ui->spasmClose1_Button->setChecked(true);
|
||
|
||
m_IsImportPrescription = 1;
|
||
//时间、速度、阻力
|
||
ui->trainTime1_ComboBox->setCurrentIndex(st_bicycleParam.trainTime-1);
|
||
ui->resistance1_ComboBox->setCurrentIndex(st_bicycleParam.resistance-1); //从1开始
|
||
if(st_bicycleParam.speed < 2) st_bicycleParam.speed = 2;//避免速度为1出现空的
|
||
ui->speed1_ComboBox->setCurrentIndex(st_bicycleParam.speed -2); //从2开始
|
||
|
||
m_saveParamInWidget = true;
|
||
|
||
}
|
||
|
||
void TrainingParamSetting::slotResetParam() //已经到了训练管理界面
|
||
{
|
||
ui->spasmClose1_Button->setChecked(true); //保护打开
|
||
//时间
|
||
ui->trainTime1_ComboBox->setCurrentIndex(19);
|
||
//阻力
|
||
ui->resistance1_ComboBox->setCurrentIndex(4);
|
||
//速度
|
||
ui->speed1_ComboBox->setCurrentIndex(8);
|
||
|
||
ui->spasmLow1_Button->setChecked(true);
|
||
|
||
ui->CW1_Button->setChecked(true);
|
||
|
||
m_saveParamInWidget = false;
|
||
}
|
||
|
||
//1.点击确定保存参数
|
||
void TrainingParamSetting::on_confirm_Btn_clicked()
|
||
{
|
||
m_saveParamInWidget = true;
|
||
//收集参数
|
||
|
||
//训练时间
|
||
m_st_bicycleParam.trainTime = ui->trainTime1_ComboBox->currentText().toUInt();
|
||
//训练阻力
|
||
m_st_bicycleParam.resistance = ui->resistance1_ComboBox->currentText().toInt();
|
||
//训练速度
|
||
m_st_bicycleParam.speed = ui->speed1_ComboBox->currentText().toInt();
|
||
|
||
//转向:1为正向,0为逆向
|
||
if(ui->CW1_Button->isChecked())
|
||
m_st_bicycleParam.direction = 1;
|
||
else if(ui->ACW1_Button->isChecked())
|
||
m_st_bicycleParam.direction = 0;
|
||
//痉挛保护
|
||
// if(ui->spasmACW2_RadioButton->isChecked())
|
||
// st_bicycleParam.spasmType = 0;
|
||
|
||
if(ui->spasmClose1_Button->isChecked())
|
||
m_st_bicycleParam.spasmSwitch = 1; //保护是1
|
||
else
|
||
m_st_bicycleParam.spasmSwitch = 0; //不保护是0
|
||
|
||
//痉挛等级
|
||
if(ui->spasmLow1_Button->isChecked())
|
||
m_st_bicycleParam.spasmLevel = 1;
|
||
else if(ui->spasmMidd1_Button->isChecked())
|
||
m_st_bicycleParam.spasmLevel = 2;
|
||
else if(ui->spasmHigh1_Button->isChecked())
|
||
m_st_bicycleParam.spasmLevel = 3;
|
||
|
||
emit signalTrainParamChanged(m_st_bicycleParam);
|
||
//if()
|
||
if(m_trainType == 0)
|
||
MainWindowPageControl::getInstance()->setCurrentPage(BicycleParamSet_E);
|
||
else if(m_trainType == 1)
|
||
MainWindowPageControl::getInstance()->setCurrentPage(FesBicycleParamSet_E);
|
||
}
|
||
|
||
//转向:点击正向
|
||
|
||
void TrainingParamSetting::on_CW1_Button_toggled(bool checked)
|
||
{
|
||
if(checked)
|
||
{
|
||
ui->CW1_Button->setStyleSheet("background: #05A6EC;color: #FFFFFF;font-size: 34px;font-weight: 500;line-height: 51px;text-shadow: 0px 3px 6px rgba(12,49,153,0.59), 0px 1px 2px #076D99;border: 2px solid #05A6EC;");
|
||
|
||
}
|
||
else
|
||
{
|
||
ui->CW1_Button->setStyleSheet("background: linear-gradient(180deg, #EEFEFF 0%, #FCFEFF 100%);font-size: 30px;font-weight: 500;border: 2px solid #B3D7E7;");
|
||
}
|
||
}
|
||
|
||
//转向:点击逆向
|
||
void TrainingParamSetting::on_ACW1_Button_toggled(bool checked)
|
||
{
|
||
if(checked)
|
||
{
|
||
ui->ACW1_Button->setStyleSheet("background: #05A6EC;color: #FFFFFF;font-size: 34px;font-weight: 500;line-height: 51px;text-shadow: 0px 3px 6px rgba(12,49,153,0.59), 0px 1px 2px #076D99;border: 2px solid #05A6EC;");
|
||
|
||
}
|
||
else
|
||
{
|
||
ui->ACW1_Button->setStyleSheet("background: linear-gradient(180deg, #EEFEFF 0%, #FCFEFF 100%);font-size: 30px;font-weight: 500;border: 2px solid #B3D7E7;");
|
||
}
|
||
}
|
||
|
||
//痉挛等级:高
|
||
void TrainingParamSetting::on_spasmHigh1_Button_toggled(bool checked)
|
||
{
|
||
if(checked)
|
||
{
|
||
ui->spasmHigh1_Button->setStyleSheet("background: #05A6EC;color: #FFFFFF;font-size: 34px;font-weight: 500;line-height: 51px;text-shadow: 0px 3px 6px rgba(12,49,153,0.59), 0px 1px 2px #076D99;border: 2px solid #05A6EC;");
|
||
}
|
||
else
|
||
{
|
||
ui->spasmHigh1_Button->setStyleSheet("background: linear-gradient(180deg, #EEFEFF 0%, #FCFEFF 100%);font-size: 30px;font-weight: 500;border: 2px solid #B3D7E7;");
|
||
}
|
||
}
|
||
|
||
//痉挛等级:中
|
||
void TrainingParamSetting::on_spasmMidd1_Button_toggled(bool checked)
|
||
{
|
||
if(checked)
|
||
{
|
||
ui->spasmMidd1_Button->setStyleSheet("background: #05A6EC;color: #FFFFFF;font-size: 34px;font-weight: 500;line-height: 51px;text-shadow: 0px 3px 6px rgba(12,49,153,0.59), 0px 1px 2px #076D99;border: 2px solid #05A6EC;");
|
||
}
|
||
else
|
||
{
|
||
ui->spasmMidd1_Button->setStyleSheet("background: linear-gradient(180deg, #EEFEFF 0%, #FCFEFF 100%);font-size: 30px;font-weight: 500;border: 2px solid #B3D7E7;");
|
||
}
|
||
}
|
||
|
||
//痉挛等级:低
|
||
void TrainingParamSetting::on_spasmLow1_Button_toggled(bool checked)
|
||
{
|
||
if(checked)
|
||
{
|
||
ui->spasmLow1_Button->setStyleSheet("background: #05A6EC;color: #FFFFFF;font-size: 34px;font-weight: 500;line-height: 51px;text-shadow: 0px 3px 6px rgba(12,49,153,0.59), 0px 1px 2px #076D99;border: 2px solid #05A6EC;");
|
||
}
|
||
else
|
||
{
|
||
ui->spasmLow1_Button->setStyleSheet("background: linear-gradient(180deg, #EEFEFF 0%, #FCFEFF 100%);font-size: 30px;font-weight: 500;border: 2px solid #B3D7E7;");
|
||
}
|
||
}
|
||
|
||
//痉挛保护:开关
|
||
void TrainingParamSetting::on_spasmClose1_Button_toggled(bool checked)
|
||
{
|
||
if(checked)
|
||
//if(m_turnState)//当前选择状态,就变为不选择
|
||
{
|
||
ui->spasmClose1_Button->setStyleSheet("border-image:url(:/DependFile/Source/trainPage/protect_on.png);");
|
||
|
||
|
||
ui->spasmMidd1_Button->setCheckable(true);
|
||
ui->spasmMidd1_Button->setChecked(true);
|
||
ui->spasmMidd1_Button->setStyleSheet("background: #05A6EC;color: #FFFFFF;font-size: 34px;font-weight: 500;line-height: 51px;text-shadow: 0px 3px 6px rgba(12,49,153,0.59), 0px 1px 2px #076D99;border: 2px solid #05A6EC;");
|
||
|
||
|
||
ui->spasmLow1_Button->setCheckable(true);
|
||
ui->spasmLow1_Button->setStyleSheet("background: linear-gradient(180deg, #EEFEFF 0%, #FCFEFF 100%);font-size: 30px;font-weight: 500;border: 2px solid #B3D7E7;");
|
||
|
||
ui->spasmHigh1_Button->setCheckable(true);
|
||
ui->spasmHigh1_Button->setStyleSheet("background: linear-gradient(180deg, #EEFEFF 0%, #FCFEFF 100%);font-size: 30px;font-weight: 500;border: 2px solid #B3D7E7;");
|
||
|
||
}
|
||
else
|
||
{
|
||
ui->spasmClose1_Button->setStyleSheet("border-image:url(:/DependFile/Source/trainPage/protect_off.png);");
|
||
|
||
ui->spasmMidd1_Button->setCheckable(false);
|
||
ui->spasmMidd1_Button->setStyleSheet("background: #E0E0E0;width: 30px;height: 30px;font-size: 30px;font-family: SourceHanSansCN-Regular, SourceHanSansCN;font-weight: 400;color: #B2B2B2;line-height: 45px;-webkit-background-clip: text;-webkit-text-fill-color: transparent;");
|
||
|
||
ui->spasmLow1_Button->setCheckable(false);
|
||
ui->spasmLow1_Button->setStyleSheet("background: #E0E0E0;width: 30px;height: 30px;font-size: 30px;font-family: SourceHanSansCN-Regular, SourceHanSansCN;font-weight: 400;color: #B2B2B2;line-height: 45px;-webkit-background-clip: text;-webkit-text-fill-color: transparent;");
|
||
|
||
ui->spasmHigh1_Button->setCheckable(false);
|
||
ui->spasmHigh1_Button->setStyleSheet("background: #E0E0E0;width: 30px;height: 30px;font-size: 30px;font-family: SourceHanSansCN-Regular, SourceHanSansCN;font-weight: 400;color: #B2B2B2;line-height: 45px;-webkit-background-clip: text;-webkit-text-fill-color: transparent;");
|
||
|
||
}
|
||
}
|
||
/*
|
||
void TrainingParamSetting::on_spasmClose1_Button_clicked()
|
||
{
|
||
if(ui->spasmClose1_Button->isChecked())
|
||
//if(m_turnState)//当前选择状态,就变为不选择
|
||
{
|
||
ui->spasmClose1_Button->setStyleSheet("border-image:url(:/DependFile/Source/trainPage/protect_off.png);");
|
||
|
||
}
|
||
else
|
||
{
|
||
ui->spasmClose1_Button->setStyleSheet("border-image:url(:/DependFile/Source/trainPage/protect_on.png);");
|
||
|
||
}
|
||
// m_turnState = ! m_turnState;
|
||
}
|
||
*/
|
||
|
||
//点击上升高度
|
||
/*
|
||
void TrainingParamSetting::on_upSpeedPlus_Btn_clicked()
|
||
{
|
||
if(!IceModule::getInstance()->getEmergencyState())
|
||
CCommunicateAPI::getInstance()->sendRealTimeParam(TUIGAN_UPDOWN,1);
|
||
}
|
||
|
||
//点击下降高度
|
||
void TrainingParamSetting::on_upSpeedMinus_Btn_clicked()
|
||
{
|
||
if(!IceModule::getInstance()->getEmergencyState())
|
||
CCommunicateAPI::getInstance()->sendRealTimeParam(TUIGAN_UPDOWN,2);
|
||
}
|
||
*/
|
||
|
||
//单肢速度设置:需要修改
|
||
|
||
void TrainingParamSetting::on_speed1_ComboBox_currentTextChanged(const QString &arg1)
|
||
{
|
||
int speed = arg1.toInt();
|
||
if(speed > 30)
|
||
{
|
||
ParamTipsDialog tipDialog;
|
||
tipDialog.setParamTipsMsg(tr("设定速度已超30r/min,确认使用该速度训练吗?"));
|
||
tipDialog.exec();
|
||
if(0 == tipDialog.getResult())
|
||
{
|
||
ui->speed1_ComboBox->setCurrentIndex(28);
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
|
||
//按住按钮升高
|
||
void TrainingParamSetting::on_upSpeedPlus_Btn_pressed()
|
||
{
|
||
if(!IceModule::getInstance()->getEmergencyState())
|
||
CCommunicateAPI::getInstance()->sendRealTimeParam(TUIGAN_UPDOWN,1);
|
||
qDebug() <<"发送时间:"<< QDateTime::currentDateTime();
|
||
|
||
}
|
||
|
||
//按住按钮降低
|
||
void TrainingParamSetting::on_upSpeedMinus_Btn_pressed()
|
||
{
|
||
|
||
if(!IceModule::getInstance()->getEmergencyState())
|
||
CCommunicateAPI::getInstance()->sendRealTimeParam(TUIGAN_UPDOWN,2);
|
||
qDebug() <<"发送时间:"<< QDateTime::currentDateTime();
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|