11/25
This commit is contained in:
43
ZBD_IIIDL_S_Project/Src/PopDialog/Prescriptiondialog.cpp
Normal file
43
ZBD_IIIDL_S_Project/Src/PopDialog/Prescriptiondialog.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "Prescriptiondialog.h"
|
||||
#include "ui_Prescriptiondialog.h"
|
||||
#include <QPainter>
|
||||
|
||||
PrescriptionDialog::PrescriptionDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::PrescriptionDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
}
|
||||
|
||||
PrescriptionDialog::~PrescriptionDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void PrescriptionDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void PrescriptionDialog::changeEvent(QEvent *event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void PrescriptionDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
31
ZBD_IIIDL_S_Project/Src/PopDialog/Prescriptiondialog.h
Normal file
31
ZBD_IIIDL_S_Project/Src/PopDialog/Prescriptiondialog.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef PRESCRIPTIONDIALOG_H
|
||||
#define PRESCRIPTIONDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class PrescriptionDialog;
|
||||
}
|
||||
|
||||
class PrescriptionDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
public:
|
||||
explicit PrescriptionDialog(QWidget *parent = nullptr);
|
||||
~PrescriptionDialog();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
|
||||
private slots:
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
private:
|
||||
Ui::PrescriptionDialog *ui;
|
||||
};
|
||||
|
||||
#endif // PRESCRIPTIONDIALOG_H
|
||||
108
ZBD_IIIDL_S_Project/Src/PopDialog/Prescriptiondialog.ui
Normal file
108
ZBD_IIIDL_S_Project/Src/PopDialog/Prescriptiondialog.ui
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PrescriptionDialog</class>
|
||||
<widget class="QDialog" name="PrescriptionDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>-10</x>
|
||||
<y>190</y>
|
||||
<width>811</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>25</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>未查询到您上一次训练处方!</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>380</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
166
ZBD_IIIDL_S_Project/Src/PopDialog/advanceddialog.cpp
Normal file
166
ZBD_IIIDL_S_Project/Src/PopDialog/advanceddialog.cpp
Normal file
@@ -0,0 +1,166 @@
|
||||
#include "advanceddialog.h"
|
||||
#include "ui_advanceddialog.h"
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
#include <QListView>
|
||||
AdvancedDialog::AdvancedDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::AdvancedDialog),
|
||||
fesSwitchFlag(true),
|
||||
isSkipPassive(true)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true); //设置透明
|
||||
|
||||
st_advanceParam.isFesOn = fesSwitchFlag;
|
||||
st_advanceParam.isSkipPassive = isSkipPassive;
|
||||
|
||||
initWidgetData();
|
||||
}
|
||||
|
||||
AdvancedDialog::~AdvancedDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void AdvancedDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
st_advanceParam.isFesOn = fesSwitchFlag;
|
||||
st_advanceParam.isSkipPassive = isSkipPassive;
|
||||
//预热阶段
|
||||
st_advanceParam.preheatContinueTime = ui->preheatContinueTime_ComboBox->currentText().toInt();
|
||||
st_advanceParam.preheatAContinueTime = ui->preheatAContinueTime_ComboBox->currentText().toInt();
|
||||
st_advanceParam.preheatCompensate = ui->preheatCompensate_ComboBox->currentText().toInt();
|
||||
st_advanceParam.preheatMaxPower = ui->preheatMaxPower_ComboBox->currentText().toInt();
|
||||
st_advanceParam.transitionalFesRise = ui->transitionalFesRise_ComboBox->currentText().toInt();
|
||||
//积极治疗阶段
|
||||
st_advanceParam.positiveFChiXuTime = ui->positiveFChiXuTime_ComboBox->currentText().toInt();
|
||||
st_advanceParam.positiveFControlSpeed = ui->positiveFControlSpeed_ComboBox->currentText().toInt();
|
||||
st_advanceParam.positiveBChiXuTime = ui->positiveBChiXuTime_ComboBox->currentText().toInt();
|
||||
st_advanceParam.positiveBSpeedCompensate = ui->positiveBSpeedCompensate_ComboBox->currentText().toInt();
|
||||
st_advanceParam.positiveBresistance = ui->positiveBresistance_ComboBox->currentText().toInt();
|
||||
st_advanceParam.timeLimit = ui->timeLimit_ComboBox->currentText().toInt();
|
||||
st_advanceParam.speedLimit = ui->speedLimit_ComboBox->currentText().toInt();
|
||||
//消极阶段
|
||||
st_advanceParam.negativeSpeedCompensate = ui->negativeSpeedCompensate_ComboBox->currentText().toInt();
|
||||
st_advanceParam.tiredContinueTime = ui->tiredContinueTime_ComboBox->currentText().toInt();
|
||||
st_advanceParam.tiredSpeedCompensate = ui->tiredSpeedCompensate_ComboBox->currentText().toInt();
|
||||
|
||||
this->close();
|
||||
}
|
||||
|
||||
void AdvancedDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void AdvancedDialog::on_skipPassive_Btn_clicked()
|
||||
{
|
||||
if(ui->skipPassive_Btn->styleSheet() == "border-image: url(:/DependFile/Source/gamePage/switchOn.png);")
|
||||
{
|
||||
isSkipPassive = false;
|
||||
ui->skipPassive_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOff.png);");
|
||||
}
|
||||
else if(ui->skipPassive_Btn->styleSheet() == "border-image: url(:/DependFile/Source/gamePage/switchOff.png);")
|
||||
{
|
||||
isSkipPassive = true;
|
||||
ui->skipPassive_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOn.png);");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AdvancedDialog::on_preheatFesSwitch_Btn_clicked()
|
||||
{
|
||||
if(ui->preheatFesSwitch_Btn->styleSheet() == "border-image: url(:/DependFile/Source/gamePage/switchOn.png);")
|
||||
{
|
||||
fesSwitchFlag = false;
|
||||
ui->preheatFesSwitch_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOff.png);");
|
||||
}
|
||||
else if(ui->preheatFesSwitch_Btn->styleSheet() == "border-image: url(:/DependFile/Source/gamePage/switchOff.png);")
|
||||
{
|
||||
fesSwitchFlag = true;
|
||||
ui->preheatFesSwitch_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOn.png);");
|
||||
}
|
||||
}
|
||||
|
||||
void AdvancedDialog::initWidgetData()
|
||||
{
|
||||
//预热阶段
|
||||
//加速时间/加速持续时间
|
||||
for(int i = 0;i <= 60;i++)
|
||||
{
|
||||
ui->preheatContinueTime_ComboBox->addItem(QString::number(i));
|
||||
ui->preheatAContinueTime_ComboBox->addItem(QString::number(i));
|
||||
}
|
||||
//转速补偿
|
||||
for(int i = -30;i <= 30;i++ )
|
||||
ui->preheatCompensate_ComboBox->addItem(QString::number(i));
|
||||
//最大电量
|
||||
for(int i =0;i <=50 ;i++)
|
||||
ui->preheatMaxPower_ComboBox->addItem(QString::number(i));
|
||||
//电刺激上升幅度
|
||||
for(int i = 0;i <= 100; i++)
|
||||
ui->transitionalFesRise_ComboBox->addItem(QString::number(i));
|
||||
|
||||
//积极阶段
|
||||
for(int i = 0; i <= 120; i++)
|
||||
ui->positiveFChiXuTime_ComboBox->addItem(QString::number(i));
|
||||
for(int i = 5;i <= 60;i++)
|
||||
ui->positiveFControlSpeed_ComboBox->addItem(QString::number(i));
|
||||
for(int i = 0; i <= 120; i++)
|
||||
ui->positiveBChiXuTime_ComboBox->addItem(QString::number(i));
|
||||
for(int i = -30;i <= 30; i++)
|
||||
ui->positiveBSpeedCompensate_ComboBox->addItem(QString::number(i));
|
||||
for(int i = -20;i <= 20;i++)
|
||||
ui->positiveBresistance_ComboBox->addItem(QString::number(i));
|
||||
for(int i = 0;i <= 240;i++)
|
||||
ui->timeLimit_ComboBox->addItem(QString::number(i));
|
||||
for(int i = 1;i <= 50;i++ )
|
||||
ui->speedLimit_ComboBox->addItem(QString::number(i*(-1)));
|
||||
|
||||
//消极阶段
|
||||
for(int i = -30;i <= 30;i++)
|
||||
ui->negativeSpeedCompensate_ComboBox->addItem(QString::number(i));
|
||||
for(int i = 0;i <= 30;i ++)
|
||||
ui->tiredContinueTime_ComboBox->addItem(QString::number(i));
|
||||
for(int i = 0;i <= 30;i++)
|
||||
ui->tiredSpeedCompensate_ComboBox->addItem(QString::number(i*(-1)));
|
||||
|
||||
foreach (QObject* obj, ui->groupBox->children()) {
|
||||
if(obj->objectName().contains("ComboBox"))
|
||||
{
|
||||
QComboBox *combox = static_cast<QComboBox*>(obj);
|
||||
combox->setView(new QListView);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (QObject* obj, ui->groupBox_2->children()) {
|
||||
if(obj->objectName().contains("ComboBox"))
|
||||
{
|
||||
QComboBox *combox = static_cast<QComboBox*>(obj);
|
||||
combox->setView(new QListView);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (QObject* obj, ui->groupBox_3->children()) {
|
||||
if(obj->objectName().contains("ComboBox"))
|
||||
{
|
||||
QComboBox *combox = static_cast<QComboBox*>(obj);
|
||||
combox->setView(new QListView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ST_AdvancedParam AdvancedDialog::getValue()
|
||||
{
|
||||
return st_advanceParam;
|
||||
}
|
||||
|
||||
void AdvancedDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
42
ZBD_IIIDL_S_Project/Src/PopDialog/advanceddialog.h
Normal file
42
ZBD_IIIDL_S_Project/Src/PopDialog/advanceddialog.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef ADVANCEDDIALOG_H
|
||||
#define ADVANCEDDIALOG_H
|
||||
#include "dataformate.h"
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class AdvancedDialog;
|
||||
}
|
||||
|
||||
class AdvancedDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AdvancedDialog(QWidget *parent = nullptr);
|
||||
~AdvancedDialog();
|
||||
|
||||
ST_AdvancedParam getValue();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
private slots:
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_skipPassive_Btn_clicked();
|
||||
|
||||
void on_preheatFesSwitch_Btn_clicked();
|
||||
|
||||
private:
|
||||
//给控件添加数据
|
||||
void initWidgetData();
|
||||
|
||||
private:
|
||||
Ui::AdvancedDialog *ui;
|
||||
bool fesSwitchFlag; //是否启动电刺激
|
||||
bool isSkipPassive; //是否跳过此阶段
|
||||
ST_AdvancedParam st_advanceParam;
|
||||
};
|
||||
|
||||
#endif // ADVANCEDDIALOG_H
|
||||
1291
ZBD_IIIDL_S_Project/Src/PopDialog/advanceddialog.ui
Normal file
1291
ZBD_IIIDL_S_Project/Src/PopDialog/advanceddialog.ui
Normal file
File diff suppressed because it is too large
Load Diff
510
ZBD_IIIDL_S_Project/Src/PopDialog/channeldialog.cpp
Normal file
510
ZBD_IIIDL_S_Project/Src/PopDialog/channeldialog.cpp
Normal file
@@ -0,0 +1,510 @@
|
||||
#include "channeldialog.h"
|
||||
#include "ui_channeldialog.h"
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
#include <QTimer>
|
||||
#include <QMessageBox>
|
||||
#include "fescontroldialog.h"
|
||||
#include "icemodule.h"
|
||||
#include <QDateTime>
|
||||
|
||||
ChannelDialog::ChannelDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ChannelDialog),
|
||||
m_buttonGroup(nullptr)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true); //设置透明
|
||||
|
||||
initWidget();
|
||||
|
||||
st_MuscleParam.connectState = true;
|
||||
for(int i=0; i<8; i++)
|
||||
maxCurrentData[i] = 0;
|
||||
|
||||
st_AnalogSetting.breakTime = 0;
|
||||
st_AnalogSetting.fallingTime = 10;
|
||||
st_AnalogSetting.holdingTime = 100;
|
||||
st_AnalogSetting.risingTime = 10;
|
||||
st_AnalogSetting.frequency = 50; //0~100Hz
|
||||
st_AnalogSetting.pulseWidth = 100; //0~500us
|
||||
st_AnalogSetting.samplerate = SamplingRate4K;
|
||||
st_AnalogSetting.workmode = WorkModeStimulate;
|
||||
|
||||
//限制最大和最小电流滑块
|
||||
QObject::connect(ui->minCurrent_Slider, &QSlider::valueChanged, [this](int value) {
|
||||
if (value > ui->maxCurrent_Slider->value()) {
|
||||
ui->minCurrent_Slider->setValue(ui->maxCurrent_Slider->value());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ChannelDialog::~ChannelDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ChannelDialog::initWidget()
|
||||
{
|
||||
//设置按钮互斥,配合样式表
|
||||
m_buttonGroup = new QButtonGroup;
|
||||
// m_buttonGroup->setExclusive(true);
|
||||
m_buttonGroup->addButton(ui->gongErL_Btn,1);
|
||||
m_buttonGroup->addButton(ui->gongSanL_Btn,2);
|
||||
m_buttonGroup->addButton(ui->qianSanJiaoL_Btn,3);
|
||||
m_buttonGroup->addButton(ui->houSanJiaoL_Btn,4);
|
||||
m_buttonGroup->addButton(ui->quWanL_Btn,5);
|
||||
m_buttonGroup->addButton(ui->shenWanL_Btn,6);
|
||||
m_buttonGroup->addButton(ui->jianJiaL_Btn,7);
|
||||
m_buttonGroup->addButton(ui->gangShangL_Btn,8);
|
||||
m_buttonGroup->addButton(ui->guoShengL_Btn,9);
|
||||
m_buttonGroup->addButton(ui->tunDaL_Btn,10);
|
||||
m_buttonGroup->addButton(ui->jingQianL_Btn,11);
|
||||
m_buttonGroup->addButton(ui->feiChangL_Btn,12);
|
||||
m_buttonGroup->addButton(ui->fuJiL_Btn,13);
|
||||
m_buttonGroup->addButton(ui->shuJiL_Btn,14);
|
||||
m_buttonGroup->addButton(ui->guSiTouL_Btn,15);
|
||||
|
||||
|
||||
m_buttonGroup->addButton(ui->gongErR_Btn,16);
|
||||
m_buttonGroup->addButton(ui->gongSanR_Btn,17);
|
||||
m_buttonGroup->addButton(ui->qianSanJiaoR_Btn,18);
|
||||
m_buttonGroup->addButton(ui->houSanJiaoR_Btn,19);
|
||||
m_buttonGroup->addButton(ui->quWanR_Btn,20);
|
||||
m_buttonGroup->addButton(ui->shenWanR_Btn,21);
|
||||
m_buttonGroup->addButton(ui->jianJiaR_Btn,22);
|
||||
m_buttonGroup->addButton(ui->gangShangR_Btn,23);
|
||||
m_buttonGroup->addButton(ui->guoShengR_Btn,24);
|
||||
m_buttonGroup->addButton(ui->tunDaR_Btn,25);
|
||||
m_buttonGroup->addButton(ui->jingQianR_Btn,26);
|
||||
m_buttonGroup->addButton(ui->feiChangR_Btn,27);
|
||||
m_buttonGroup->addButton(ui->fuJiR_Btn,28);
|
||||
m_buttonGroup->addButton(ui->shuJiR_Btn,29);
|
||||
m_buttonGroup->addButton(ui->guSiTouR_Btn,30);
|
||||
|
||||
foreach(QAbstractButton *button,m_buttonGroup->buttons())
|
||||
button->setCheckable(true);
|
||||
|
||||
connect(m_buttonGroup,SIGNAL(buttonClicked(int)),this,SLOT(slotButtonClicked(int)));
|
||||
connect(m_buttonGroup,SIGNAL(buttonClicked(QAbstractButton *)),this,SLOT(slotButtonClicked(QAbstractButton*)));
|
||||
|
||||
ui->maxCurrent_Slider->setRange(0,100);
|
||||
}
|
||||
|
||||
void ChannelDialog::setTitle(int title)
|
||||
{
|
||||
QString strTitle;
|
||||
switch(title)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
strTitle = QString(tr("通道A%1").arg(title%2 ? 1:2));
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
strTitle = QString(tr("通道B%1").arg(title%2 ? 1:2));
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
strTitle = QString(tr("通道C%1").arg(title%2 ? 1:2));
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
strTitle = QString(tr("通道D%1").arg(title%2 ? 1:2));
|
||||
break;
|
||||
}
|
||||
ui->channelName_Label->setText(strTitle);
|
||||
m_currentChannel = title;
|
||||
|
||||
m_deviceNo = m_currentChannel/2 + (m_currentChannel%2?1:0);
|
||||
m_deviceChannel = m_currentChannel%2 ? 1:2;
|
||||
/********电刺激操作流程*********/
|
||||
|
||||
|
||||
}
|
||||
|
||||
ST_MuscleParam ChannelDialog::getValue()
|
||||
{
|
||||
return st_MuscleParam;
|
||||
}
|
||||
|
||||
void ChannelDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
st_MuscleParam.plus = ui->plus_Label->text().toInt();
|
||||
st_MuscleParam.minCurrent = ui->minCurrent_Label->text().toInt();
|
||||
st_MuscleParam.frequency = ui->frequent_Label->text().toInt();
|
||||
st_MuscleParam.maxCurrent = ui->maxCurrent_Label->text().toInt();
|
||||
|
||||
|
||||
if(st_MuscleParam.muscleName == "")
|
||||
{
|
||||
QMessageBox::warning(NULL,"Warning",tr("未选择肌肉!"));
|
||||
return;
|
||||
}
|
||||
|
||||
//关闭预设电流开关
|
||||
if(st_MuscleParam.connectState)
|
||||
{
|
||||
FesControlDialog::getInstance()->setPreCurrentState(m_deviceNo,m_deviceChannel,false);
|
||||
|
||||
int index = (m_deviceNo-1)*2 + m_deviceChannel-1;
|
||||
maxCurrentData[index] = st_MuscleParam.maxCurrent;
|
||||
qDebug() << "index:"<<index;
|
||||
IceModule::getInstance()->setMaxCurrentValue(index,st_MuscleParam.maxCurrent);
|
||||
|
||||
}
|
||||
FesControlDialog::getInstance()->setMuscleDeviceStateByNo(m_deviceNo,true);; //添加已经更改肌肉的设备
|
||||
this->hide();
|
||||
}
|
||||
|
||||
void ChannelDialog::slotButtonClicked(int id)
|
||||
{
|
||||
st_MuscleParam.muscleId = id;
|
||||
}
|
||||
|
||||
void ChannelDialog::slotButtonClicked(QAbstractButton *button)
|
||||
{
|
||||
st_MuscleParam.muscleName = button->text();
|
||||
ui->muscle_Label->setText(st_MuscleParam.muscleName);
|
||||
|
||||
QString muscleName = button->objectName();
|
||||
int index = muscleName.indexOf("_");
|
||||
|
||||
QPixmap pixmap;
|
||||
QString fileName("./DependFile/Image/leftMuscle/");
|
||||
fileName.append(muscleName.leftRef(index-1));
|
||||
fileName.append(".png");
|
||||
pixmap.load(fileName );
|
||||
|
||||
ui->muscleImage_Label->setPixmap(pixmap);
|
||||
}
|
||||
|
||||
void ChannelDialog::on_frequentMinus_Btn_clicked()
|
||||
{
|
||||
int value = ui->frequent_Slider->value();
|
||||
--value;
|
||||
ui->frequent_Slider->setValue(value);
|
||||
|
||||
//FesControlDialog::getInstance()->setPreFrequency(m_deviceNo,m_deviceChannel, value);
|
||||
|
||||
//FesControlDialog::getInstance()->setPreCurrentState(m_deviceNo,m_deviceChannel,true);
|
||||
|
||||
}
|
||||
|
||||
void ChannelDialog::on_frequentPlus_Btn_clicked()
|
||||
{
|
||||
int value = ui->frequent_Slider->value();
|
||||
++value;
|
||||
ui->frequent_Slider->setValue(value);
|
||||
//FesControlDialog::getInstance()->setPreCurrentState(m_deviceNo,m_deviceChannel,true);
|
||||
|
||||
//FesControlDialog::getInstance()->setPreFrequency(m_deviceNo,m_deviceChannel, value);
|
||||
|
||||
}
|
||||
|
||||
//频率
|
||||
void ChannelDialog::on_frequent_Slider_valueChanged(int value)
|
||||
{
|
||||
ui->frequent_Label->setText(QString::number(value));
|
||||
st_AnalogSetting.frequency = value;
|
||||
//qDebug() <<m_deviceNo << m_deviceChannel;
|
||||
|
||||
}
|
||||
|
||||
//脉宽
|
||||
void ChannelDialog::on_plus_Slider_valueChanged(int value)
|
||||
{
|
||||
ui->plus_Label->setText(QString::number(value));
|
||||
st_AnalogSetting.pulseWidth = value;
|
||||
}
|
||||
|
||||
//最小电流
|
||||
void ChannelDialog::on_minCurrent_Slider_valueChanged(int value)
|
||||
{
|
||||
ui->minCurrent_Label->setText(QString::number(value));
|
||||
|
||||
static int times = 0;
|
||||
if(st_MuscleParam.connectState)
|
||||
{
|
||||
times++;
|
||||
if(times > 20) //100ms
|
||||
{
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
times = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//最大电流
|
||||
void ChannelDialog::on_maxCurrent_Slider_valueChanged(int value)
|
||||
{
|
||||
ui->maxCurrent_Label->setText(QString::number(value));
|
||||
ui->minCurrent_Slider->setRange(0,99);
|
||||
ui->minCurrent_Slider->setPageStep(value);
|
||||
|
||||
//ui->minCurrent_Slider->setMaximum(value);
|
||||
static int times = 0;
|
||||
if(st_MuscleParam.connectState)
|
||||
{
|
||||
times++;
|
||||
if(times > 20) //100ms
|
||||
{
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
times = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ChannelDialog::on_PWMMinus_Btn_clicked()
|
||||
{
|
||||
int value = ui->plus_Slider->value();
|
||||
value -= 10;
|
||||
ui->plus_Slider->setValue(value);
|
||||
//FesControlDialog::getInstance()->setPrePulseWidth(m_deviceNo,m_deviceChannel,value);
|
||||
|
||||
}
|
||||
|
||||
void ChannelDialog::on_PWMPlus_Btn_clicked()
|
||||
{
|
||||
int value = ui->plus_Slider->value();
|
||||
value += 10;
|
||||
ui->plus_Slider->setValue(value);
|
||||
//FesControlDialog::getInstance()->setPrePulseWidth(m_deviceNo,m_deviceChannel,value);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ChannelDialog::on_minCurrentMinus_Btn_clicked()
|
||||
{
|
||||
int value = ui->minCurrent_Slider->value();
|
||||
--value;
|
||||
ui->minCurrent_Slider->setValue(value);
|
||||
//测试使用2024.9.30
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
}
|
||||
|
||||
void ChannelDialog::on_minCurrentPlus_Btn_clicked()
|
||||
{
|
||||
int value = ui->minCurrent_Slider->value();
|
||||
++value;
|
||||
ui->minCurrent_Slider->setValue(value);
|
||||
//测试使用2024.9.30
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
}
|
||||
|
||||
|
||||
void ChannelDialog::on_maxCurrentMinus_Btn_clicked()
|
||||
{
|
||||
int value = ui->maxCurrent_Slider->value();
|
||||
--value;
|
||||
ui->maxCurrent_Slider->setValue(value);
|
||||
//测试使用2024.9.30
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
}
|
||||
|
||||
void ChannelDialog::on_maxCurrentPlus_Btn_clicked()
|
||||
{
|
||||
int value = ui->maxCurrent_Slider->value();
|
||||
++value;
|
||||
ui->maxCurrent_Slider->setValue(value);
|
||||
//测试使用2024.9.30
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
}
|
||||
|
||||
//通道开关
|
||||
void ChannelDialog::on_switch_Btn_clicked()
|
||||
{
|
||||
if(ui->switch_Btn->styleSheet() == "border-image: url(:/DependFile/Source/gamePage/switchOn.png);")
|
||||
{
|
||||
ui->switch_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOff.png);");
|
||||
st_MuscleParam.connectState = false;
|
||||
//FesControlDialog::getInstance()->setPreCurrentState(,,false);
|
||||
}
|
||||
else if(ui->switch_Btn->styleSheet() == "border-image: url(:/DependFile/Source/gamePage/switchOff.png);")
|
||||
{
|
||||
st_MuscleParam.connectState = true;
|
||||
ui->switch_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOn.png);");
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelDialog::setMuscleState(QList<bool> muscleStateList)
|
||||
{
|
||||
//为了防止肌肉重复选择
|
||||
// for(int i = 0;i < muscleStateList.size();i++)
|
||||
// {
|
||||
// if(muscleStateList.at(i))
|
||||
// {
|
||||
// m_buttonGroup->button(i+1)->setChecked(true);
|
||||
// slotButtonClicked(i+1);
|
||||
// slotButtonClicked(m_buttonGroup->button(i+1));
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
//已选择的肌肉设置为不可用
|
||||
// foreach(QAbstractButton *button,m_buttonGroup->buttons())
|
||||
// {
|
||||
// QPushButton* pushButton = dynamic_cast<QPushButton*>(button);
|
||||
// int id = m_buttonGroup->id(button);
|
||||
// pushButton->setEnabled(muscleStateList.at(id-1));
|
||||
// }
|
||||
// for(int i = 0;i < m_buttonGroup->buttons().count();++i)
|
||||
// {
|
||||
// m_buttonGroup->buttons().at(i)->setEnabled(muscleStateList.at(i));
|
||||
// }
|
||||
}
|
||||
|
||||
void ChannelDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void ChannelDialog::showEvent(QShowEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
ui->minCurrent_Slider->setRange(0,ui->maxCurrent_Slider->value());
|
||||
ui->maxCurrent_Label->setText(QString::number(0));
|
||||
//打开预设电流开关
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreCurrentState(m_deviceNo,m_deviceChannel,true);
|
||||
}
|
||||
|
||||
void ChannelDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
#if 0
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
|
||||
ui->retranslateUi(this);
|
||||
QTimer::singleShot(300,this,[this](){
|
||||
initWidget();
|
||||
});
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ChannelDialog::setFrequentRange(int min,int max)
|
||||
{
|
||||
ui->frequent_Slider->setRange(min,max);
|
||||
|
||||
}
|
||||
void ChannelDialog::setPlusRange(int min,int max)
|
||||
{
|
||||
ui->plus_Slider->setRange(min,max);
|
||||
|
||||
}
|
||||
void ChannelDialog::setMinCurrentRange(int min,int max)
|
||||
{
|
||||
ui->minCurrent_Slider->setRange(min,max);
|
||||
ui->minCurrent_Label->setText("0");
|
||||
}
|
||||
void ChannelDialog::setMaxCurrentRange(int min,int max)
|
||||
{
|
||||
ui->maxCurrent_Slider->setRange(min,max);
|
||||
ui->maxCurrent_Label->setText("0");
|
||||
}
|
||||
|
||||
void ChannelDialog::setFrequentValue(int value)
|
||||
{
|
||||
ui->frequent_Slider->setValue(value);
|
||||
}
|
||||
void ChannelDialog::setPlusValue(int value)
|
||||
{
|
||||
ui->plus_Slider->setValue(value);
|
||||
}
|
||||
void ChannelDialog::setMinCurrentValue(int value)
|
||||
{
|
||||
ui->minCurrent_Slider->setValue(value);
|
||||
ui->minCurrent_Label->setText(QString::number(value));
|
||||
}
|
||||
void ChannelDialog::setMaxCurrentValue(int value)
|
||||
{
|
||||
ui->maxCurrent_Slider->setValue(value);
|
||||
}
|
||||
|
||||
void ChannelDialog::setMuscleId(int id)
|
||||
{
|
||||
if(id > 0 && id < 31)
|
||||
{
|
||||
m_buttonGroup->button(id)->setChecked(true);
|
||||
m_buttonGroup->button(id)->click();
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelDialog::setChannleDialogState(bool isRunning)
|
||||
{
|
||||
ui->groupBox->setEnabled(!isRunning);
|
||||
ui->groupBox_3->setEnabled(!isRunning);
|
||||
ui->groupBox_4->setEnabled(!isRunning);
|
||||
ui->groupBox_5->setEnabled(!isRunning);
|
||||
}
|
||||
|
||||
int *ChannelDialog::getMaxCurrentData()
|
||||
{
|
||||
return maxCurrentData;
|
||||
}
|
||||
|
||||
void ChannelDialog::setMuscleConnectState(bool flag)
|
||||
{
|
||||
if(!flag)
|
||||
{
|
||||
ui->switch_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOff.png);");
|
||||
st_MuscleParam.connectState = false;
|
||||
//FesControlDialog::getInstance()->setPreCurrentState(,,false);
|
||||
}
|
||||
else if(flag)
|
||||
{
|
||||
st_MuscleParam.connectState = true;
|
||||
ui->switch_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOn.png);");
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelDialog::on_frequent_Slider_sliderReleased()
|
||||
{
|
||||
int value = ui->frequent_Label->text().toInt();
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreFrequency(m_deviceNo,m_deviceChannel, value);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ChannelDialog::on_plus_Slider_sliderReleased()
|
||||
{
|
||||
int value = ui->plus_Label->text().toInt();
|
||||
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPrePulseWidth(m_deviceNo,m_deviceChannel,value);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ChannelDialog::on_minCurrent_Slider_sliderReleased()
|
||||
{
|
||||
int value = ui->minCurrent_Label->text().toInt();
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
qDebug()<<"最小电流"<<value;
|
||||
}
|
||||
|
||||
|
||||
void ChannelDialog::on_maxCurrent_Slider_sliderReleased()
|
||||
{
|
||||
int value = ui->maxCurrent_Label->text().toInt();
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
qDebug()<<"最大电流"<<value;
|
||||
}
|
||||
|
||||
107
ZBD_IIIDL_S_Project/Src/PopDialog/channeldialog.h
Normal file
107
ZBD_IIIDL_S_Project/Src/PopDialog/channeldialog.h
Normal file
@@ -0,0 +1,107 @@
|
||||
#ifndef CHANNELDIALOG_H
|
||||
#define CHANNELDIALOG_H
|
||||
/*********
|
||||
* Fes参数界面下方刺激盒中按钮弹出的对话框
|
||||
* ****/
|
||||
#include <QDialog>
|
||||
#include <QButtonGroup>
|
||||
#include "dataformate.h"
|
||||
#include "commonStruct.h"
|
||||
namespace Ui {
|
||||
class ChannelDialog;
|
||||
}
|
||||
|
||||
class ChannelDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ChannelDialog(QWidget *parent = nullptr);
|
||||
~ChannelDialog();
|
||||
void initWidget();
|
||||
|
||||
void setTitle(int title);
|
||||
|
||||
ST_MuscleParam getValue();
|
||||
|
||||
void setMuscleState(QList<bool>);
|
||||
|
||||
void setFrequentRange(int min,int max);
|
||||
void setPlusRange(int min,int max);
|
||||
void setMinCurrentRange(int min,int max);
|
||||
void setMaxCurrentRange(int min,int max);
|
||||
|
||||
void setFrequentValue(int value);
|
||||
void setPlusValue(int value);
|
||||
void setMinCurrentValue(int value);
|
||||
void setMaxCurrentValue(int value);
|
||||
|
||||
void setMuscleId(int id);
|
||||
|
||||
//是否运行
|
||||
void setChannleDialogState(bool isRunning);
|
||||
|
||||
int* getMaxCurrentData(); //获取八个通道最大电流值
|
||||
|
||||
void setMuscleConnectState(bool flag); // 判断是否打开开关
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
void showEvent(QShowEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
|
||||
private slots:
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
void on_frequentMinus_Btn_clicked();
|
||||
|
||||
void on_frequentPlus_Btn_clicked();
|
||||
|
||||
void on_frequent_Slider_valueChanged(int value);
|
||||
|
||||
void on_PWMMinus_Btn_clicked();
|
||||
|
||||
void on_PWMPlus_Btn_clicked();
|
||||
|
||||
void on_plus_Slider_valueChanged(int value);
|
||||
|
||||
void on_minCurrentMinus_Btn_clicked();
|
||||
|
||||
void on_minCurrentPlus_Btn_clicked();
|
||||
|
||||
void on_minCurrent_Slider_valueChanged(int value);
|
||||
|
||||
void on_maxCurrentMinus_Btn_clicked();
|
||||
|
||||
void on_maxCurrentPlus_Btn_clicked();
|
||||
|
||||
void on_maxCurrent_Slider_valueChanged(int value);
|
||||
|
||||
void on_switch_Btn_clicked();
|
||||
|
||||
void slotButtonClicked(int);
|
||||
|
||||
void slotButtonClicked(QAbstractButton*);
|
||||
|
||||
void on_frequent_Slider_sliderReleased();
|
||||
|
||||
void on_plus_Slider_sliderReleased();
|
||||
|
||||
void on_minCurrent_Slider_sliderReleased();
|
||||
|
||||
void on_maxCurrent_Slider_sliderReleased();
|
||||
|
||||
private:
|
||||
Ui::ChannelDialog *ui;
|
||||
QButtonGroup *m_buttonGroup;
|
||||
ST_MuscleParam st_MuscleParam;
|
||||
int m_currentChannel; //当前通道
|
||||
AnalogSetting st_AnalogSetting;
|
||||
int m_deviceNo; //当前设备号 1,2,3,4
|
||||
int m_deviceChannel;//当前设备通道 1,2
|
||||
int maxCurrentData[8]; //最大电流
|
||||
};
|
||||
|
||||
#endif // CHANNELDIALOG_H
|
||||
1601
ZBD_IIIDL_S_Project/Src/PopDialog/channeldialog.ui
Normal file
1601
ZBD_IIIDL_S_Project/Src/PopDialog/channeldialog.ui
Normal file
File diff suppressed because it is too large
Load Diff
425
ZBD_IIIDL_S_Project/Src/PopDialog/channelonlydialog.cpp
Normal file
425
ZBD_IIIDL_S_Project/Src/PopDialog/channelonlydialog.cpp
Normal file
@@ -0,0 +1,425 @@
|
||||
#include "channelonlydialog.h"
|
||||
#include "ui_channelonlydialog.h"
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
#include <QTimer>
|
||||
#include <QMessageBox>
|
||||
#include "fescontroldialog.h"
|
||||
#include "icemodule.h"
|
||||
#include <QDateTime>
|
||||
|
||||
ChannelOnlyDialog::ChannelOnlyDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ChannelOnlyDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true); //设置透明
|
||||
|
||||
|
||||
initWidget();
|
||||
|
||||
st_MuscleParam.connectState = true;
|
||||
for(int i=0; i<8; i++)
|
||||
maxCurrentData[i] = 0;
|
||||
|
||||
st_AnalogSetting.breakTime = 0;
|
||||
st_AnalogSetting.fallingTime = 10;
|
||||
st_AnalogSetting.holdingTime = 100;
|
||||
st_AnalogSetting.risingTime = 10;
|
||||
st_AnalogSetting.frequency = 50; //0~100Hz
|
||||
st_AnalogSetting.pulseWidth = 100; //0~500us
|
||||
st_AnalogSetting.samplerate = SamplingRate4K;
|
||||
st_AnalogSetting.workmode = WorkModeStimulate;
|
||||
|
||||
//限制最大和最小电流滑块
|
||||
QObject::connect(ui->minCurrent_Slider, &QSlider::valueChanged, [this](int value) {
|
||||
if (value > ui->maxCurrent_Slider->value()) {
|
||||
ui->minCurrent_Slider->setValue(ui->maxCurrent_Slider->value());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ChannelOnlyDialog::~ChannelOnlyDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::initWidget()
|
||||
{
|
||||
ui->maxCurrent_Slider->setRange(0,100);
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setTitle(int title)
|
||||
{
|
||||
QString strTitle;
|
||||
switch(title)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
strTitle = QString(tr("通道A%1").arg(title%2 ? 1:2));
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
strTitle = QString(tr("通道B%1").arg(title%2 ? 1:2));
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
strTitle = QString(tr("通道C%1").arg(title%2 ? 1:2));
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
strTitle = QString(tr("通道D%1").arg(title%2 ? 1:2));
|
||||
break;
|
||||
}
|
||||
ui->channelName_Label->setText(strTitle);
|
||||
m_currentChannel = title;
|
||||
|
||||
m_deviceNo = m_currentChannel/2 + (m_currentChannel%2?1:0);
|
||||
m_deviceChannel = m_currentChannel%2 ? 1:2;
|
||||
/********电刺激操作流程*********/
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setMuscleConnectState(bool flag)
|
||||
{
|
||||
if(!flag)
|
||||
{
|
||||
ui->switch_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOff.png);");
|
||||
st_MuscleParam.connectState = false;
|
||||
//FesControlDialog::getInstance()->setPreCurrentState(,,false);
|
||||
}
|
||||
else if(flag)
|
||||
{
|
||||
st_MuscleParam.connectState = true;
|
||||
ui->switch_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOn.png);");
|
||||
}
|
||||
}
|
||||
|
||||
ST_MuscleParam ChannelOnlyDialog::getValue()
|
||||
{
|
||||
return st_MuscleParam;
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setFrequentRange(int min, int max)
|
||||
{
|
||||
ui->frequent_Slider->setRange(min,max);
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setPlusRange(int min, int max)
|
||||
{
|
||||
ui->plus_Slider->setRange(min,max);
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setMinCurrentRange(int min, int max)
|
||||
{
|
||||
ui->minCurrent_Slider->setRange(min,max);
|
||||
ui->minCurrent_Label->setText("0");
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setMaxCurrentRange(int min, int max)
|
||||
{
|
||||
ui->maxCurrent_Slider->setRange(min,max);
|
||||
ui->maxCurrent_Label->setText("0");
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setFrequentValue(int value)
|
||||
{
|
||||
ui->frequent_Slider->setValue(value);
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setPlusValue(int value)
|
||||
{
|
||||
ui->plus_Slider->setValue(value);
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setMinCurrentValue(int value)
|
||||
{
|
||||
ui->minCurrent_Slider->setValue(value);
|
||||
ui->minCurrent_Label->setText(QString::number(value));
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setMaxCurrentValue(int value)
|
||||
{
|
||||
ui->maxCurrent_Slider->setValue(value);
|
||||
}
|
||||
|
||||
int *ChannelOnlyDialog::getMaxCurrentData()
|
||||
{
|
||||
return maxCurrentData;
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::setMuscleState(QList<bool>)
|
||||
{
|
||||
//为了防止肌肉重复选择
|
||||
// for(int i = 0;i < muscleStateList.size();i++)
|
||||
// {
|
||||
// if(muscleStateList.at(i))
|
||||
// {
|
||||
// m_buttonGroup->button(i+1)->setChecked(true);
|
||||
// slotButtonClicked(i+1);
|
||||
// slotButtonClicked(m_buttonGroup->button(i+1));
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
//已选择的肌肉设置为不可用
|
||||
// foreach(QAbstractButton *button,m_buttonGroup->buttons())
|
||||
// {
|
||||
// QPushButton* pushButton = dynamic_cast<QPushButton*>(button);
|
||||
// int id = m_buttonGroup->id(button);
|
||||
// pushButton->setEnabled(muscleStateList.at(id-1));
|
||||
// }
|
||||
// for(int i = 0;i < m_buttonGroup->buttons().count();++i)
|
||||
// {
|
||||
// m_buttonGroup->buttons().at(i)->setEnabled(muscleStateList.at(i));
|
||||
// }
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
st_MuscleParam.plus = ui->plus_Label->text().toInt();
|
||||
st_MuscleParam.minCurrent = ui->minCurrent_Label->text().toInt();
|
||||
st_MuscleParam.frequency = ui->frequent_Label->text().toInt();
|
||||
st_MuscleParam.maxCurrent = ui->maxCurrent_Label->text().toInt();
|
||||
|
||||
//st_MuscleParam.muscleName == "";//设置肌肉名称
|
||||
//关闭预设电流开关
|
||||
if(st_MuscleParam.connectState)
|
||||
{
|
||||
FesControlDialog::getInstance()->setPreCurrentState(m_deviceNo,m_deviceChannel,false);
|
||||
|
||||
int index = (m_deviceNo-1)*2 + m_deviceChannel-1;
|
||||
maxCurrentData[index] = st_MuscleParam.maxCurrent;
|
||||
qDebug() << "index:"<<index;
|
||||
IceModule::getInstance()->setMaxCurrentValue(index,st_MuscleParam.maxCurrent);
|
||||
|
||||
}
|
||||
// FesControlDialog::getInstance()->setMuscleDeviceStateByNo(m_deviceNo,true);; //添加已经更改肌肉的设备
|
||||
FesControlDialog::getInstance()->setMuscleDeviceStateByNo(m_deviceNo,true);; //添加已经更改肌肉的设备
|
||||
this->hide();
|
||||
//qDebug() <<"Hello";
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_frequentMinus_Btn_clicked()
|
||||
{
|
||||
int value = ui->frequent_Slider->value();
|
||||
--value;
|
||||
ui->frequent_Slider->setValue(value);
|
||||
|
||||
//FesControlDialog::getInstance()->setPreFrequency(m_deviceNo,m_deviceChannel, value);
|
||||
|
||||
//FesControlDialog::getInstance()->setPreCurrentState(m_deviceNo,m_deviceChannel,true);
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_frequentPlus_Btn_clicked()
|
||||
{
|
||||
int value = ui->frequent_Slider->value();
|
||||
++value;
|
||||
ui->frequent_Slider->setValue(value);
|
||||
//FesControlDialog::getInstance()->setPreCurrentState(m_deviceNo,m_deviceChannel,true);
|
||||
|
||||
//FesControlDialog::getInstance()->setPreFrequency(m_deviceNo,m_deviceChannel, value);
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_frequent_Slider_valueChanged(int value)
|
||||
{
|
||||
ui->frequent_Label->setText(QString::number(value));
|
||||
st_AnalogSetting.frequency = value;
|
||||
//qDebug() <<m_deviceNo << m_deviceChannel;
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_plus_Slider_valueChanged(int value)
|
||||
{
|
||||
ui->plus_Label->setText(QString::number(value));
|
||||
st_AnalogSetting.pulseWidth = value;
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_minCurrent_Slider_valueChanged(int value)
|
||||
{
|
||||
ui->minCurrent_Label->setText(QString::number(value));
|
||||
|
||||
static int times = 0;
|
||||
if(st_MuscleParam.connectState)
|
||||
{
|
||||
times++;
|
||||
if(times > 20) //100ms
|
||||
{
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
times = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_maxCurrent_Slider_valueChanged(int value)
|
||||
{
|
||||
|
||||
ui->maxCurrent_Label->setText(QString::number(value));
|
||||
ui->minCurrent_Slider->setRange(0,99);
|
||||
ui->minCurrent_Slider->setPageStep(value);
|
||||
|
||||
//ui->minCurrent_Slider->setMaximum(value);
|
||||
static int times = 0;
|
||||
if(st_MuscleParam.connectState)
|
||||
{
|
||||
times++;
|
||||
if(times > 20) //100ms
|
||||
{
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
times = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_PWMMinus_Btn_clicked()
|
||||
{
|
||||
int value = ui->plus_Slider->value();
|
||||
value -= 10;
|
||||
ui->plus_Slider->setValue(value);
|
||||
//FesControlDialog::getInstance()->setPrePulseWidth(m_deviceNo,m_deviceChannel,value);
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_PWMPlus_Btn_clicked()
|
||||
{
|
||||
int value = ui->plus_Slider->value();
|
||||
value += 10;
|
||||
ui->plus_Slider->setValue(value);
|
||||
//FesControlDialog::getInstance()->setPrePulseWidth(m_deviceNo,m_deviceChannel,value);
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_minCurrentMinus_Btn_clicked()
|
||||
{
|
||||
int value = ui->minCurrent_Slider->value();
|
||||
--value;
|
||||
ui->minCurrent_Slider->setValue(value);
|
||||
//测试使用2024.9.30
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_minCurrentPlus_Btn_clicked()
|
||||
{
|
||||
int value = ui->minCurrent_Slider->value();
|
||||
++value;
|
||||
ui->minCurrent_Slider->setValue(value);
|
||||
//测试使用2024.9.30
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_maxCurrentMinus_Btn_clicked()
|
||||
{
|
||||
int value = ui->maxCurrent_Slider->value();
|
||||
--value;
|
||||
ui->maxCurrent_Slider->setValue(value);
|
||||
//测试使用2024.9.30
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_maxCurrentPlus_Btn_clicked()
|
||||
{
|
||||
int value = ui->maxCurrent_Slider->value();
|
||||
++value;
|
||||
ui->maxCurrent_Slider->setValue(value);
|
||||
//测试使用2024.9.30
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_switch_Btn_clicked()
|
||||
{
|
||||
if(ui->switch_Btn->styleSheet() == "border-image: url(:/DependFile/Source/gamePage/switchOn.png);")
|
||||
{
|
||||
ui->switch_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOff.png);");
|
||||
st_MuscleParam.connectState = false;
|
||||
//FesControlDialog::getInstance()->setPreCurrentState(,,false);
|
||||
}
|
||||
else if(ui->switch_Btn->styleSheet() == "border-image: url(:/DependFile/Source/gamePage/switchOff.png);")
|
||||
{
|
||||
st_MuscleParam.connectState = true;
|
||||
ui->switch_Btn->setStyleSheet("border-image: url(:/DependFile/Source/gamePage/switchOn.png);");
|
||||
}
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_frequent_Slider_sliderReleased()
|
||||
{
|
||||
int value = ui->frequent_Label->text().toInt();
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreFrequency(m_deviceNo,m_deviceChannel, value);
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_plus_Slider_sliderReleased()
|
||||
{
|
||||
int value = ui->plus_Label->text().toInt();
|
||||
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPrePulseWidth(m_deviceNo,m_deviceChannel,value);
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_minCurrent_Slider_sliderReleased()
|
||||
{
|
||||
int value = ui->minCurrent_Label->text().toInt();
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
qDebug()<<"最小电流"<<value;
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::on_maxCurrent_Slider_sliderReleased()
|
||||
{
|
||||
int value = ui->maxCurrent_Label->text().toInt();
|
||||
FesControlDialog::getInstance()->setPreCurrent(m_deviceNo,m_deviceChannel,value);
|
||||
qDebug()<<"最大电流"<<value;
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::showEvent(QShowEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
ui->minCurrent_Slider->setRange(0,ui->maxCurrent_Slider->value());
|
||||
ui->maxCurrent_Label->setText(QString::number(0));
|
||||
//打开预设电流开关
|
||||
if(st_MuscleParam.connectState)
|
||||
FesControlDialog::getInstance()->setPreCurrentState(m_deviceNo,m_deviceChannel,true);
|
||||
|
||||
}
|
||||
|
||||
void ChannelOnlyDialog::chcangeEvent(QEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
#if 0
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
|
||||
ui->retranslateUi(this);
|
||||
QTimer::singleShot(300,this,[this](){
|
||||
initWidget();
|
||||
});
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
97
ZBD_IIIDL_S_Project/Src/PopDialog/channelonlydialog.h
Normal file
97
ZBD_IIIDL_S_Project/Src/PopDialog/channelonlydialog.h
Normal file
@@ -0,0 +1,97 @@
|
||||
#ifndef CHANNELONLYDIALOG_H
|
||||
#define CHANNELONLYDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QButtonGroup>
|
||||
#include "dataformate.h"
|
||||
#include "commonStruct.h"
|
||||
|
||||
namespace Ui {
|
||||
class ChannelOnlyDialog;
|
||||
}
|
||||
|
||||
class ChannelOnlyDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ChannelOnlyDialog(QWidget *parent = nullptr);
|
||||
~ChannelOnlyDialog();
|
||||
|
||||
void initWidget();
|
||||
|
||||
void setTitle(int title);
|
||||
|
||||
void setMuscleConnectState(bool flag); // 判断是否打开开关
|
||||
|
||||
ST_MuscleParam getValue();
|
||||
|
||||
void setFrequentRange(int min,int max);
|
||||
void setPlusRange(int min,int max);
|
||||
void setMinCurrentRange(int min,int max);
|
||||
void setMaxCurrentRange(int min,int max);
|
||||
|
||||
void setFrequentValue(int value);
|
||||
void setPlusValue(int value);
|
||||
void setMinCurrentValue(int value);
|
||||
void setMaxCurrentValue(int value);
|
||||
|
||||
int* getMaxCurrentData(); //获取八个通道最大电流值
|
||||
|
||||
void setMuscleState(QList<bool>);
|
||||
|
||||
private slots:
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
void on_frequentMinus_Btn_clicked();
|
||||
|
||||
void on_frequentPlus_Btn_clicked();
|
||||
|
||||
void on_frequent_Slider_valueChanged(int value);
|
||||
|
||||
void on_plus_Slider_valueChanged(int value);
|
||||
|
||||
void on_minCurrent_Slider_valueChanged(int value);
|
||||
|
||||
void on_maxCurrent_Slider_valueChanged(int value);
|
||||
|
||||
void on_PWMMinus_Btn_clicked();
|
||||
|
||||
void on_PWMPlus_Btn_clicked();
|
||||
|
||||
void on_minCurrentMinus_Btn_clicked();
|
||||
|
||||
void on_minCurrentPlus_Btn_clicked();
|
||||
|
||||
void on_maxCurrentMinus_Btn_clicked();
|
||||
|
||||
void on_maxCurrentPlus_Btn_clicked();
|
||||
|
||||
void on_switch_Btn_clicked();
|
||||
|
||||
void on_frequent_Slider_sliderReleased();
|
||||
|
||||
void on_plus_Slider_sliderReleased();
|
||||
|
||||
void on_minCurrent_Slider_sliderReleased();
|
||||
|
||||
void on_maxCurrent_Slider_sliderReleased();
|
||||
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
void showEvent(QShowEvent *event);
|
||||
|
||||
virtual void chcangeEvent(QEvent* event);
|
||||
private:
|
||||
Ui::ChannelOnlyDialog *ui;
|
||||
ST_MuscleParam st_MuscleParam;
|
||||
int m_currentChannel; //当前通道
|
||||
AnalogSetting st_AnalogSetting;
|
||||
int m_deviceNo; //当前设备号 1,2,3,4
|
||||
int m_deviceChannel;//当前设备通道 1,2
|
||||
int maxCurrentData[8]; //最大电流
|
||||
};
|
||||
|
||||
#endif // CHANNELONLYDIALOG_H
|
||||
662
ZBD_IIIDL_S_Project/Src/PopDialog/channelonlydialog.ui
Normal file
662
ZBD_IIIDL_S_Project/Src/PopDialog/channelonlydialog.ui
Normal file
@@ -0,0 +1,662 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ChannelOnlyDialog</class>
|
||||
<widget class="QDialog" name="ChannelOnlyDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>176</x>
|
||||
<y>50</y>
|
||||
<width>1568</width>
|
||||
<height>962</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox_8{background: #FFFFFF;border-radius: 8px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>908</y>
|
||||
<width>1568</width>
|
||||
<height>54</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: #05A6EC;
|
||||
border-radius: 8px;
|
||||
color:white;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>900</x>
|
||||
<y>493</y>
|
||||
<width>360</width>
|
||||
<height>313</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox_6{background: #E4F4FC;
|
||||
border-radius: 4px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="maxCurrent_Label1">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>79</x>
|
||||
<y>19</y>
|
||||
<width>151</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>最大电流</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>40</y>
|
||||
<width>51</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>mA</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="maxCurrent_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>84</y>
|
||||
<width>240</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>25</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: #FFFFFF;
|
||||
border-radius: 30px;
|
||||
border: 1px solid #05A6EC;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="maxCurrentMinus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>160</y>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/minus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="maxCurrentPlus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>160</y>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/plus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSlider" name="maxCurrent_Slider">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<width>300</width>
|
||||
<height>43</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>900</x>
|
||||
<y>140</y>
|
||||
<width>360</width>
|
||||
<height>313</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox_4{background: #E4F4FC;
|
||||
border-radius: 4px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="plus_Label1">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>125</x>
|
||||
<y>19</y>
|
||||
<width>91</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>脉宽</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>40</y>
|
||||
<width>61</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>us</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="plus_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>84</y>
|
||||
<width>240</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>25</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: #FFFFFF;
|
||||
border-radius: 30px;
|
||||
border: 1px solid #05A6EC;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="PWMMinus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>160</y>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/minus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="PWMPlus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>160</y>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/plus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSlider" name="plus_Slider">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<width>300</width>
|
||||
<height>43</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>495</y>
|
||||
<width>360</width>
|
||||
<height>313</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox_5{background: #E4F4FC;
|
||||
border-radius: 4px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="minCurrent_Label1">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>89</x>
|
||||
<y>19</y>
|
||||
<width>141</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>最小电流</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>40</y>
|
||||
<width>51</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>微软雅黑</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>mA</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="minCurrent_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>84</y>
|
||||
<width>240</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>25</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: #FFFFFF;
|
||||
border-radius: 30px;
|
||||
border: 1px solid #05A6EC;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="minCurrentMinus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>160</y>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/minus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="minCurrentPlus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>160</y>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/plus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSlider" name="minCurrent_Slider">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<width>300</width>
|
||||
<height>43</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>140</y>
|
||||
<width>360</width>
|
||||
<height>313</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox_3{background: #E4F4FC;
|
||||
border-radius: 4px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>125</x>
|
||||
<y>19</y>
|
||||
<width>91</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>频率</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>40</y>
|
||||
<width>51</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hz</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="frequent_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>84</y>
|
||||
<width>240</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>25</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: #FFFFFF;
|
||||
border-radius: 30px;
|
||||
border: 1px solid #05A6EC;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="frequentMinus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>160</y>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/minus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="frequentPlus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>160</y>
|
||||
<width>60</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/plus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSlider" name="frequent_Slider">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>240</y>
|
||||
<width>300</width>
|
||||
<height>43</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="channelName_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>660</x>
|
||||
<y>14</y>
|
||||
<width>241</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="switch_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1440</x>
|
||||
<y>20</y>
|
||||
<width>67</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/switchOn.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
14
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachine.cpp
Normal file
14
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachine.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "clickmachine.h"
|
||||
#include "ui_clickmachine.h"
|
||||
|
||||
ClickMachine::ClickMachine(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::ClickMachine)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
ClickMachine::~ClickMachine()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
22
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachine.h
Normal file
22
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachine.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef CLICKMACHINE_H
|
||||
#define CLICKMACHINE_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class ClickMachine;
|
||||
}
|
||||
|
||||
class ClickMachine : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ClickMachine(QWidget *parent = nullptr);
|
||||
~ClickMachine();
|
||||
|
||||
private:
|
||||
Ui::ClickMachine *ui;
|
||||
};
|
||||
|
||||
#endif // CLICKMACHINE_H
|
||||
23
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachine.ui
Normal file
23
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachine.ui
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ClickMachine</class>
|
||||
<widget class="QWidget" name="ClickMachine">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
14
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachinedialog.cpp
Normal file
14
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachinedialog.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "clickmachinedialog.h"
|
||||
#include "ui_clickmachinedialog.h"
|
||||
|
||||
ClickMachineDialog::ClickMachineDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ClickMachineDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
ClickMachineDialog::~ClickMachineDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
22
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachinedialog.h
Normal file
22
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachinedialog.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef CLICKMACHINEDIALOG_H
|
||||
#define CLICKMACHINEDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class ClickMachineDialog;
|
||||
}
|
||||
|
||||
class ClickMachineDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ClickMachineDialog(QWidget *parent = nullptr);
|
||||
~ClickMachineDialog();
|
||||
|
||||
private:
|
||||
Ui::ClickMachineDialog *ui;
|
||||
};
|
||||
|
||||
#endif // CLICKMACHINEDIALOG_H
|
||||
155
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachinedialog.ui
Normal file
155
ZBD_IIIDL_S_Project/Src/PopDialog/clickmachinedialog.ui
Normal file
@@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ClickMachineDialog</class>
|
||||
<widget class="QDialog" name="ClickMachineDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>70</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="tips_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>180</y>
|
||||
<width>301</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>一键上机,设备将运行,请注意安全</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>320</y>
|
||||
<width>251</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>结束</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="image_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>110</y>
|
||||
<width>71</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/dialog/spasm.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>320</y>
|
||||
<width>251</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>下一步</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
59
ZBD_IIIDL_S_Project/Src/PopDialog/deletereportdialog.cpp
Normal file
59
ZBD_IIIDL_S_Project/Src/PopDialog/deletereportdialog.cpp
Normal file
@@ -0,0 +1,59 @@
|
||||
#include "deletereportdialog.h"
|
||||
#include "ui_deletereportdialog.h"
|
||||
#include <QPainter>
|
||||
|
||||
DeleteReportDialog::DeleteReportDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DeleteReportDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true); //设置透明
|
||||
|
||||
}
|
||||
|
||||
DeleteReportDialog::~DeleteReportDialog()
|
||||
{
|
||||
delete ui;
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool DeleteReportDialog::isDeletedUser()
|
||||
{
|
||||
return m_isdeleted;
|
||||
}
|
||||
|
||||
void DeleteReportDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
m_isdeleted = false;
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void DeleteReportDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
m_isdeleted = true;
|
||||
this->close();
|
||||
}
|
||||
|
||||
void DeleteReportDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void DeleteReportDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
34
ZBD_IIIDL_S_Project/Src/PopDialog/deletereportdialog.h
Normal file
34
ZBD_IIIDL_S_Project/Src/PopDialog/deletereportdialog.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef DELETEREPORTDIALOG_H
|
||||
#define DELETEREPORTDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class DeleteReportDialog;
|
||||
}
|
||||
|
||||
class DeleteReportDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DeleteReportDialog(QWidget *parent = nullptr);
|
||||
~DeleteReportDialog();
|
||||
bool isDeletedUser();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
private:
|
||||
|
||||
bool m_isdeleted;
|
||||
private:
|
||||
Ui::DeleteReportDialog *ui;
|
||||
};
|
||||
|
||||
#endif // DELETEREPORTDIALOG_H
|
||||
157
ZBD_IIIDL_S_Project/Src/PopDialog/deletereportdialog.ui
Normal file
157
ZBD_IIIDL_S_Project/Src/PopDialog/deletereportdialog.ui
Normal file
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DeleteReportDialog</class>
|
||||
<widget class="QDialog" name="DeleteReportDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>241</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>190</y>
|
||||
<width>641</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>25</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认是否删除报告</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>290</y>
|
||||
<width>541</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>18</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#000000 ;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>删除后无法恢复</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>232</x>
|
||||
<y>493</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>452</x>
|
||||
<y>493</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
56
ZBD_IIIDL_S_Project/Src/PopDialog/deleteuserdialog.cpp
Normal file
56
ZBD_IIIDL_S_Project/Src/PopDialog/deleteuserdialog.cpp
Normal file
@@ -0,0 +1,56 @@
|
||||
#include "deleteuserdialog.h"
|
||||
#include "ui_deleteuserdialog.h"
|
||||
#include <QPainter>
|
||||
#include <QPaintEvent>
|
||||
DeleteUserDialog::DeleteUserDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DeleteUserDialog),
|
||||
m_isdeleted(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true); //设置透明
|
||||
}
|
||||
|
||||
DeleteUserDialog::~DeleteUserDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool DeleteUserDialog::isDeletedUser()
|
||||
{
|
||||
return m_isdeleted;
|
||||
}
|
||||
|
||||
void DeleteUserDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
m_isdeleted = false;
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void DeleteUserDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
m_isdeleted = true;
|
||||
this->close();
|
||||
}
|
||||
|
||||
void DeleteUserDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void DeleteUserDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
34
ZBD_IIIDL_S_Project/Src/PopDialog/deleteuserdialog.h
Normal file
34
ZBD_IIIDL_S_Project/Src/PopDialog/deleteuserdialog.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef DELETEUSERDIALOG_H
|
||||
#define DELETEUSERDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class DeleteUserDialog;
|
||||
}
|
||||
|
||||
class DeleteUserDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DeleteUserDialog(QWidget *parent = nullptr);
|
||||
~DeleteUserDialog();
|
||||
|
||||
bool isDeletedUser();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
private:
|
||||
Ui::DeleteUserDialog *ui;
|
||||
bool m_isdeleted;
|
||||
};
|
||||
|
||||
#endif // DELETEUSERDIALOG_H
|
||||
157
ZBD_IIIDL_S_Project/Src/PopDialog/deleteuserdialog.ui
Normal file
157
ZBD_IIIDL_S_Project/Src/PopDialog/deleteuserdialog.ui
Normal file
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DeleteUserDialog</class>
|
||||
<widget class="QDialog" name="DeleteUserDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>241</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>190</y>
|
||||
<width>601</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>25</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认是否删除用户</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
<y>290</y>
|
||||
<width>551</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>18</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#000000 ;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>删除后无法恢复</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>232</x>
|
||||
<y>493</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>452</x>
|
||||
<y>493</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
77
ZBD_IIIDL_S_Project/Src/PopDialog/emergencystopdialog.cpp
Normal file
77
ZBD_IIIDL_S_Project/Src/PopDialog/emergencystopdialog.cpp
Normal file
@@ -0,0 +1,77 @@
|
||||
#include "emergencystopdialog.h"
|
||||
#include "ui_emergencystopdialog.h"
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
EmergencyStopDialog::EmergencyStopDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::EmergencyStopDialog),
|
||||
bells("./DependFile/Music/emergency.wav")
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true); //设置透明
|
||||
|
||||
//设置报警音无线循环
|
||||
bells.setLoops(-1);
|
||||
}
|
||||
|
||||
EmergencyStopDialog::~EmergencyStopDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void EmergencyStopDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void EmergencyStopDialog::showEvent(QShowEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
playBell();
|
||||
}
|
||||
|
||||
void EmergencyStopDialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
stopPlayBell();
|
||||
}
|
||||
|
||||
void EmergencyStopDialog::on_emergency_Btn_clicked()
|
||||
{
|
||||
static int closeTime;
|
||||
closeTime++;
|
||||
if(closeTime > 30)
|
||||
{
|
||||
closeTime = 0;
|
||||
this->close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//痉挛报警音控制
|
||||
void EmergencyStopDialog::playBell()
|
||||
{
|
||||
bells.play();
|
||||
}
|
||||
//停止报警音
|
||||
void EmergencyStopDialog::stopPlayBell()
|
||||
{
|
||||
if(bells.loopsRemaining())
|
||||
bells.stop();
|
||||
}
|
||||
|
||||
void EmergencyStopDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
38
ZBD_IIIDL_S_Project/Src/PopDialog/emergencystopdialog.h
Normal file
38
ZBD_IIIDL_S_Project/Src/PopDialog/emergencystopdialog.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef EMERGENCYSTOPDIALOG_H
|
||||
#define EMERGENCYSTOPDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QSound>
|
||||
namespace Ui {
|
||||
class EmergencyStopDialog;
|
||||
}
|
||||
|
||||
class EmergencyStopDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit EmergencyStopDialog(QWidget *parent = nullptr);
|
||||
~EmergencyStopDialog();
|
||||
|
||||
//痉挛报警音控制
|
||||
void playBell();
|
||||
//停止报警音
|
||||
void stopPlayBell();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
void showEvent(QShowEvent *event);
|
||||
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_emergency_Btn_clicked();
|
||||
|
||||
private:
|
||||
Ui::EmergencyStopDialog *ui;
|
||||
QSound bells; //铃声对象
|
||||
};
|
||||
|
||||
#endif // EMERGENCYSTOPDIALOG_H
|
||||
109
ZBD_IIIDL_S_Project/Src/PopDialog/emergencystopdialog.ui
Normal file
109
ZBD_IIIDL_S_Project/Src/PopDialog/emergencystopdialog.ui
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>EmergencyStopDialog</class>
|
||||
<widget class="QDialog" name="EmergencyStopDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>710</x>
|
||||
<y>340</y>
|
||||
<width>500</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>70</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>260</y>
|
||||
<width>151</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>急停</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="emergency_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>218</x>
|
||||
<y>170</y>
|
||||
<width>70</width>
|
||||
<height>70</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/dialog/emergency.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRepeatDelay">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
30
ZBD_IIIDL_S_Project/Src/PopDialog/fesboxtipsdialog.cpp
Normal file
30
ZBD_IIIDL_S_Project/Src/PopDialog/fesboxtipsdialog.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "fesboxtipsdialog.h"
|
||||
#include "ui_fesboxtipsdialog.h"
|
||||
#include <QPainter>
|
||||
FesBoxTipsDialog::FesBoxTipsDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::FesBoxTipsDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
}
|
||||
|
||||
FesBoxTipsDialog::~FesBoxTipsDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void FesBoxTipsDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void FesBoxTipsDialog::on_pushButton_clicked()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
28
ZBD_IIIDL_S_Project/Src/PopDialog/fesboxtipsdialog.h
Normal file
28
ZBD_IIIDL_S_Project/Src/PopDialog/fesboxtipsdialog.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef FESBOXTIPSDIALOG_H
|
||||
#define FESBOXTIPSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class FesBoxTipsDialog;
|
||||
}
|
||||
|
||||
class FesBoxTipsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FesBoxTipsDialog(QWidget *parent = nullptr);
|
||||
~FesBoxTipsDialog();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
private slots:
|
||||
|
||||
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::FesBoxTipsDialog *ui;
|
||||
};
|
||||
|
||||
#endif // FESBOXTIPSDIALOG_H
|
||||
135
ZBD_IIIDL_S_Project/Src/PopDialog/fesboxtipsdialog.ui
Normal file
135
ZBD_IIIDL_S_Project/Src/PopDialog/fesboxtipsdialog.ui
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FesBoxTipsDialog</class>
|
||||
<widget class="QDialog" name="FesBoxTipsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 8px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/dialog/header3.png);
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>534</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/dialog/bottomButton.png);
|
||||
color:white;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>200</y>
|
||||
<width>421</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>20</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#333333;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>电刺激盒未启用</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>280</y>
|
||||
<width>511</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgba(0,0,0,0.45);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>在“设置-系统设置”中启用电刺激盒</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
28
ZBD_IIIDL_S_Project/Src/PopDialog/festipsdialog.cpp
Normal file
28
ZBD_IIIDL_S_Project/Src/PopDialog/festipsdialog.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "festipsdialog.h"
|
||||
#include "ui_festipsdialog.h"
|
||||
#include <QPainter>
|
||||
FesTipsDialog::FesTipsDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::FesTipsDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
}
|
||||
|
||||
FesTipsDialog::~FesTipsDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FesTipsDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
void FesTipsDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
26
ZBD_IIIDL_S_Project/Src/PopDialog/festipsdialog.h
Normal file
26
ZBD_IIIDL_S_Project/Src/PopDialog/festipsdialog.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef FESTIPSDIALOG_H
|
||||
#define FESTIPSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class FesTipsDialog;
|
||||
}
|
||||
|
||||
class FesTipsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FesTipsDialog(QWidget *parent = nullptr);
|
||||
~FesTipsDialog();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
private slots:
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
private:
|
||||
Ui::FesTipsDialog *ui;
|
||||
};
|
||||
|
||||
#endif // FESTIPSDIALOG_H
|
||||
130
ZBD_IIIDL_S_Project/Src/PopDialog/festipsdialog.ui
Normal file
130
ZBD_IIIDL_S_Project/Src/PopDialog/festipsdialog.ui
Normal file
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FesTipsDialog</class>
|
||||
<widget class="QDialog" name="FesTipsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>710</x>
|
||||
<y>340</y>
|
||||
<width>500</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>501</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>130</y>
|
||||
<width>301</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>请检查极片脱落</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="userMessage_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>210</y>
|
||||
<width>371</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>请贴好继续</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>186</x>
|
||||
<y>300</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
91
ZBD_IIIDL_S_Project/Src/PopDialog/festotalparamdialog.cpp
Normal file
91
ZBD_IIIDL_S_Project/Src/PopDialog/festotalparamdialog.cpp
Normal file
@@ -0,0 +1,91 @@
|
||||
#include "festotalparamdialog.h"
|
||||
#include "ui_festotalparamdialog.h"
|
||||
#include <QPainter>
|
||||
FesTotalParamDialog::FesTotalParamDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::FesTotalParamDialog),
|
||||
m_value(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true); //设置透明
|
||||
|
||||
}
|
||||
|
||||
FesTotalParamDialog::~FesTotalParamDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FesTotalParamDialog::setTitleAndUnit(QString title, QString unit)
|
||||
{
|
||||
ui->title_Label->setText(title);
|
||||
ui->unit_Label->setText(unit);
|
||||
}
|
||||
|
||||
int FesTotalParamDialog::getValue()
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
void FesTotalParamDialog::setValue(int value)
|
||||
{
|
||||
ui->slider->setValue(value);
|
||||
m_value = value;
|
||||
}
|
||||
|
||||
void FesTotalParamDialog::setRange(int min, int max)
|
||||
{
|
||||
ui->slider->setRange(min,max);
|
||||
}
|
||||
|
||||
void FesTotalParamDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
void FesTotalParamDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
m_value = ui->value_Label->text().toInt();
|
||||
this->close();
|
||||
}
|
||||
|
||||
void FesTotalParamDialog::on_minus_Btn_clicked()
|
||||
{
|
||||
int value = ui->slider->value();
|
||||
--value;
|
||||
ui->slider->setValue(value);
|
||||
}
|
||||
|
||||
void FesTotalParamDialog::on_plus_Btn_clicked()
|
||||
{
|
||||
int value = ui->slider->value();
|
||||
++value;
|
||||
ui->slider->setValue(value);
|
||||
}
|
||||
|
||||
void FesTotalParamDialog::on_slider_valueChanged(int value)
|
||||
{
|
||||
ui->value_Label->setText(QString::number(value));
|
||||
}
|
||||
|
||||
void FesTotalParamDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
|
||||
void FesTotalParamDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
46
ZBD_IIIDL_S_Project/Src/PopDialog/festotalparamdialog.h
Normal file
46
ZBD_IIIDL_S_Project/Src/PopDialog/festotalparamdialog.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#ifndef FESTOTALPARAMDIALOG_H
|
||||
#define FESTOTALPARAMDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class FesTotalParamDialog;
|
||||
}
|
||||
|
||||
class FesTotalParamDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FesTotalParamDialog(QWidget *parent = nullptr);
|
||||
~FesTotalParamDialog();
|
||||
|
||||
void setTitleAndUnit(QString title,QString unit);
|
||||
|
||||
int getValue();
|
||||
|
||||
void setValue(int value);
|
||||
|
||||
void setRange(int min,int max);
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
void on_minus_Btn_clicked();
|
||||
|
||||
void on_plus_Btn_clicked();
|
||||
|
||||
void on_slider_valueChanged(int value);
|
||||
|
||||
private:
|
||||
Ui::FesTotalParamDialog *ui;
|
||||
|
||||
int m_value;
|
||||
};
|
||||
|
||||
#endif // FESTOTALPARAMDIALOG_H
|
||||
230
ZBD_IIIDL_S_Project/Src/PopDialog/festotalparamdialog.ui
Normal file
230
ZBD_IIIDL_S_Project/Src/PopDialog/festotalparamdialog.ui
Normal file
@@ -0,0 +1,230 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FesTotalParamDialog</class>
|
||||
<widget class="QDialog" name="FesTotalParamDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QSlider" name="slider">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>340</y>
|
||||
<width>400</width>
|
||||
<height>43</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="title_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>455</x>
|
||||
<y>513</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>235</x>
|
||||
<y>513</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>205</y>
|
||||
<width>360</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox_2{background: #FFFFFF;
|
||||
border: 1px solid #05A6EC;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QPushButton" name="plus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>299</x>
|
||||
<y>1</y>
|
||||
<width>60</width>
|
||||
<height>58</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/plus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRepeatInterval">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="minus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1</x>
|
||||
<y>1</y>
|
||||
<width>60</width>
|
||||
<height>58</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/minus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRepeatInterval">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="value_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>3</y>
|
||||
<width>131</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>20</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>100</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="unit_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>4</y>
|
||||
<width>91</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>18</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>mA</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,97 @@
|
||||
#include "horizontaltoverticaldialog.h"
|
||||
#include "ui_horizontaltoverticaldialog.h"
|
||||
#include <QPainter>
|
||||
#include "dataformate.h"
|
||||
#include "languagemanager.h"
|
||||
|
||||
HorizontalToVerticalDialog::HorizontalToVerticalDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::HorizontalToVerticalDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
}
|
||||
|
||||
HorizontalToVerticalDialog::~HorizontalToVerticalDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
bool HorizontalToVerticalDialog::getConfirmState()
|
||||
{
|
||||
return isConfirmed;
|
||||
}
|
||||
|
||||
void HorizontalToVerticalDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
isConfirmed = false;
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void HorizontalToVerticalDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
isConfirmed = true;
|
||||
this->close();
|
||||
}
|
||||
|
||||
void HorizontalToVerticalDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
|
||||
|
||||
void HorizontalToVerticalDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
{
|
||||
E_LANGUAGE language = LanguageManager::getInstance()->getCurrentLanguage();
|
||||
switch(language)
|
||||
{
|
||||
case Chinese_E:
|
||||
ui->leftText_label->setVisible(true);
|
||||
ui->middleText_label->setVisible(true);
|
||||
ui->rightText_label->setVisible(true);
|
||||
ui->English1_label->setVisible(false);
|
||||
ui->english2_label->setVisible(false);
|
||||
|
||||
ui->tip_label->setText("提示");
|
||||
ui->confirm_Btn->setText("确认");
|
||||
ui->cancel_Btn->setText("取消");
|
||||
break;
|
||||
case English_E:
|
||||
ui->leftText_label->setVisible(false);
|
||||
ui->middleText_label->setVisible(false);
|
||||
ui->rightText_label->setVisible(false);
|
||||
ui->English1_label->setVisible(true);
|
||||
ui->English1_label->move(80,420);
|
||||
ui->english2_label->setVisible(true);
|
||||
ui->english2_label->move(120,460);
|
||||
ui->tip_label->setText("Tips");
|
||||
ui->confirm_Btn->setText("Confirm");
|
||||
ui->cancel_Btn->setText("Cancel");
|
||||
break;
|
||||
}
|
||||
ui->retranslateUi(this);
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
//避免刚开始中文时,有英文
|
||||
E_LANGUAGE language = LanguageManager::getInstance()->getCurrentLanguage();
|
||||
if(language == Chinese_E)
|
||||
{
|
||||
ui->English1_label->setVisible(false);
|
||||
ui->english2_label->setVisible(false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef HORIZONTALTOVERTICALDIALOG_H
|
||||
#define HORIZONTALTOVERTICALDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class HorizontalToVerticalDialog;
|
||||
}
|
||||
|
||||
class HorizontalToVerticalDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit HorizontalToVerticalDialog(QWidget *parent = nullptr);
|
||||
~HorizontalToVerticalDialog();
|
||||
|
||||
bool getConfirmState();
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
bool isConfirmed;
|
||||
|
||||
private:
|
||||
Ui::HorizontalToVerticalDialog *ui;
|
||||
};
|
||||
|
||||
#endif // HORIZONTALTOVERTICALDIALOG_H
|
||||
268
ZBD_IIIDL_S_Project/Src/PopDialog/horizontaltoverticaldialog.ui
Normal file
268
ZBD_IIIDL_S_Project/Src/PopDialog/horizontaltoverticaldialog.ui
Normal file
@@ -0,0 +1,268 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>HorizontalToVerticalDialog</class>
|
||||
<widget class="QDialog" name="HorizontalToVerticalDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 8px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: #DDECFC;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius:8px</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="tip_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
<y>10</y>
|
||||
<width>91</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>-1</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 44px;
|
||||
height: 22px;
|
||||
font-size: 22px;
|
||||
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: 33px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>100</y>
|
||||
<width>396</width>
|
||||
<height>271</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-image: url(:/DependFile/Source/trainDisplayPage/horizontalToVertical.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>404</x>
|
||||
<y>540</y>
|
||||
<width>401</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/rightBtn.png);
|
||||
color:white;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>540</y>
|
||||
<width>401</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/leftBtn.png);
|
||||
color:white;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="leftText_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>420</y>
|
||||
<width>341</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 308px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
|
||||
font-weight: 400;
|
||||
color: #8C8C8C;
|
||||
line-height: 42px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>请将上肢训练部分由水平</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="rightText_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>450</x>
|
||||
<y>420</y>
|
||||
<width>341</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 308px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
|
||||
font-weight: 400;
|
||||
color: #8C8C8C;
|
||||
line-height: 42px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>旋转至垂直进行训练</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="middleText_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>420</y>
|
||||
<width>61</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 308px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
|
||||
font-weight: 400;
|
||||
|
||||
color: #0D9DDB;
|
||||
line-height: 42px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>逆向</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="English1_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>460</y>
|
||||
<width>621</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 308px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
|
||||
font-weight: 400;
|
||||
color: #8C8C8C;
|
||||
line-height: 42px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Please rotate the upper limb training part</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="english2_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>490</y>
|
||||
<width>601</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 308px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
|
||||
font-weight: 400;
|
||||
color: #8C8C8C;
|
||||
line-height: 42px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>from horizontal to vertical for training</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
104
ZBD_IIIDL_S_Project/Src/PopDialog/machinestartdialog.cpp
Normal file
104
ZBD_IIIDL_S_Project/Src/PopDialog/machinestartdialog.cpp
Normal file
@@ -0,0 +1,104 @@
|
||||
#include "machinestartdialog.h"
|
||||
#include "ui_machinestartdialog.h"
|
||||
#include "ccommunicateapi.h"
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
MachineStartDialog::MachineStartDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::MachineStartDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
this->setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
}
|
||||
|
||||
MachineStartDialog::~MachineStartDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MachineStartDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
m_result = 0;
|
||||
CCommunicateAPI::getInstance()->sendRealTimeParam(YIJIAN_SHANGJI,0);
|
||||
this->close();
|
||||
}
|
||||
|
||||
int MachineStartDialog::getResult()
|
||||
{
|
||||
return m_result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MachineStartDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void MachineStartDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MachineStartDialog::on_confirm_Btn_pressed()
|
||||
{
|
||||
int tempCmd = 1; //1调节脚
|
||||
|
||||
|
||||
|
||||
CCommunicateAPI::getInstance()->sendRealTimeParam(YIJIAN_SHANGJI,tempCmd);
|
||||
// 毫秒级别,qDebug()<<QDateTime::currentTime();
|
||||
// 案例及时毫秒一次,按钮连续触发属性
|
||||
}
|
||||
|
||||
|
||||
void MachineStartDialog::on_UpLimbOnClick_Btn_pressed()
|
||||
{
|
||||
int tempCmd = 2; //单上肢发送2,调节手
|
||||
CCommunicateAPI::getInstance()->sendRealTimeParam(YIJIAN_SHANGJI,tempCmd);
|
||||
|
||||
}
|
||||
|
||||
void MachineStartDialog::showEvent(QShowEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
|
||||
ui->cancel_Btn->move(170,410);
|
||||
ui->UpLimbOnClick_Btn->setVisible(true); //单上肢
|
||||
ui->UpLimbOnClick_Btn->move(350,410); //单上肢
|
||||
ui->confirm_Btn->setVisible(true); //单下肢
|
||||
ui->confirm_Btn->move(540,410); //单下肢
|
||||
|
||||
#ifdef ONLYUPLIMP
|
||||
|
||||
ui->cancel_Btn->move(210,410);
|
||||
ui->UpLimbOnClick_Btn->move(470,410); //单上肢
|
||||
ui->confirm_Btn->setVisible(false); //单下肢
|
||||
ui->UpLimbOnClick_Btn->setVisible(true);
|
||||
#endif
|
||||
|
||||
//单下肢
|
||||
#ifdef ONLYDOWNLIMP
|
||||
ui->cancel_Btn->move(210,410);
|
||||
ui->confirm_Btn->move(470,410); //单下肢
|
||||
ui->UpLimbOnClick_Btn->setVisible(false); //单上肢
|
||||
ui->confirm_Btn->setVisible(true); //单下肢
|
||||
#endif
|
||||
}
|
||||
|
||||
40
ZBD_IIIDL_S_Project/Src/PopDialog/machinestartdialog.h
Normal file
40
ZBD_IIIDL_S_Project/Src/PopDialog/machinestartdialog.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef MACHINESTARTDIALOG_H
|
||||
#define MACHINESTARTDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class MachineStartDialog;
|
||||
}
|
||||
|
||||
class MachineStartDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MachineStartDialog(QWidget *parent = nullptr);
|
||||
~MachineStartDialog();
|
||||
|
||||
int getResult();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
|
||||
void showEvent(QShowEvent *event);
|
||||
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
// void on_confirm_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_pressed();
|
||||
|
||||
void on_UpLimbOnClick_Btn_pressed();
|
||||
|
||||
private:
|
||||
Ui::MachineStartDialog *ui;
|
||||
int m_result;
|
||||
};
|
||||
|
||||
#endif // MACHINESTARTDIALOG_H
|
||||
162
ZBD_IIIDL_S_Project/Src/PopDialog/machinestartdialog.ui
Normal file
162
ZBD_IIIDL_S_Project/Src/PopDialog/machinestartdialog.ui
Normal file
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MachineStartDialog</class>
|
||||
<widget class="QDialog" name="MachineStartDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>560</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/dialog/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>220</y>
|
||||
<width>641</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>22</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>是否开始一键上机</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>410</y>
|
||||
<width>151</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>结束上机</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>540</x>
|
||||
<y>410</y>
|
||||
<width>151</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>下肢开始</string>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="UpLimbOnClick_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>350</x>
|
||||
<y>410</y>
|
||||
<width>151</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>上肢开始</string>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
37
ZBD_IIIDL_S_Project/Src/PopDialog/maiboxueyangdialog.cpp
Normal file
37
ZBD_IIIDL_S_Project/Src/PopDialog/maiboxueyangdialog.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "maiboxueyangdialog.h"
|
||||
#include "ui_maiboxueyangdialog.h"
|
||||
|
||||
MaiBoXueyangDialog::MaiBoXueyangDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::MaiBoXueyangDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
m_ble = new BLE();
|
||||
}
|
||||
|
||||
MaiBoXueyangDialog::~MaiBoXueyangDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MaiBoXueyangDialog::on_serach_Btn_clicked()
|
||||
{
|
||||
connect(m_ble,&BLE::signal_scanFinished,[=]{
|
||||
auto list = m_ble->getDevices();
|
||||
if(list.isEmpty())
|
||||
return ;
|
||||
ui->listWidget->clear();
|
||||
for(auto s : list){
|
||||
ui->listWidget->addItem(s.address().toString());
|
||||
}
|
||||
});
|
||||
|
||||
if(!m_ble->getScanning())
|
||||
m_ble->startScanDevices();
|
||||
}
|
||||
|
||||
void MaiBoXueyangDialog::on_connect_Btn_clicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
30
ZBD_IIIDL_S_Project/Src/PopDialog/maiboxueyangdialog.h
Normal file
30
ZBD_IIIDL_S_Project/Src/PopDialog/maiboxueyangdialog.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef MAIBOXUEYANGDIALOG_H
|
||||
#define MAIBOXUEYANGDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "ble.h"
|
||||
namespace Ui {
|
||||
class MaiBoXueyangDialog;
|
||||
}
|
||||
|
||||
class MaiBoXueyangDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MaiBoXueyangDialog(QWidget *parent = nullptr);
|
||||
~MaiBoXueyangDialog();
|
||||
signals:
|
||||
void signalConnectStateChanged(bool);
|
||||
private slots:
|
||||
void on_serach_Btn_clicked();
|
||||
|
||||
void on_connect_Btn_clicked();
|
||||
|
||||
private:
|
||||
Ui::MaiBoXueyangDialog *ui;
|
||||
|
||||
BLE * m_ble;
|
||||
};
|
||||
|
||||
#endif // MAIBOXUEYANGDIALOG_H
|
||||
114
ZBD_IIIDL_S_Project/Src/PopDialog/maiboxueyangdialog.ui
Normal file
114
ZBD_IIIDL_S_Project/Src/PopDialog/maiboxueyangdialog.ui
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MaiBoXueyangDialog</class>
|
||||
<widget class="QDialog" name="MaiBoXueyangDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>539</width>
|
||||
<height>442</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>541</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background:#DDECFC;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>脉搏血氧</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>90</y>
|
||||
<width>361</width>
|
||||
<height>321</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QListWidget" name="listWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>341</width>
|
||||
<height>301</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="serach_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>90</y>
|
||||
<width>93</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>搜索</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="connect_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>150</y>
|
||||
<width>93</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>连接</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
60
ZBD_IIIDL_S_Project/Src/PopDialog/paramtipsdialog.cpp
Normal file
60
ZBD_IIIDL_S_Project/Src/PopDialog/paramtipsdialog.cpp
Normal file
@@ -0,0 +1,60 @@
|
||||
#include "paramtipsdialog.h"
|
||||
#include "ui_paramtipsdialog.h"
|
||||
#include <QPainter>
|
||||
ParamTipsDialog::ParamTipsDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::ParamTipsDialog)
|
||||
,m_result(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
}
|
||||
|
||||
ParamTipsDialog::~ParamTipsDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
int ParamTipsDialog::getResult()
|
||||
{
|
||||
return m_result;
|
||||
}
|
||||
|
||||
void ParamTipsDialog::setParamTipsMsg(QString msg)
|
||||
{
|
||||
ui->tipMsg_Label->setText(msg);
|
||||
}
|
||||
|
||||
void ParamTipsDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
m_result = 0;
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void ParamTipsDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
m_result = 1;
|
||||
this->close();
|
||||
}
|
||||
|
||||
void ParamTipsDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void ParamTipsDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
32
ZBD_IIIDL_S_Project/Src/PopDialog/paramtipsdialog.h
Normal file
32
ZBD_IIIDL_S_Project/Src/PopDialog/paramtipsdialog.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef PARAMTIPSDIALOG_H
|
||||
#define PARAMTIPSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class ParamTipsDialog;
|
||||
}
|
||||
|
||||
class ParamTipsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ParamTipsDialog(QWidget *parent = nullptr);
|
||||
~ParamTipsDialog();
|
||||
int getResult();
|
||||
void setParamTipsMsg(QString msg);
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private:
|
||||
Ui::ParamTipsDialog *ui;
|
||||
int m_result;
|
||||
};
|
||||
|
||||
#endif // PARAMTIPSDIALOG_H
|
||||
131
ZBD_IIIDL_S_Project/Src/PopDialog/paramtipsdialog.ui
Normal file
131
ZBD_IIIDL_S_Project/Src/PopDialog/paramtipsdialog.ui
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ParamTipsDialog</class>
|
||||
<widget class="QDialog" name="ParamTipsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>710</x>
|
||||
<y>340</y>
|
||||
<width>500</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>70</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="tipMsg_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>130</y>
|
||||
<width>331</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>300</y>
|
||||
<width>90</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>310</x>
|
||||
<y>300</y>
|
||||
<width>90</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
43
ZBD_IIIDL_S_Project/Src/PopDialog/passworddialog.cpp
Normal file
43
ZBD_IIIDL_S_Project/Src/PopDialog/passworddialog.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "passworddialog.h"
|
||||
#include "ui_passworddialog.h"
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
PasswordDialog::PasswordDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::PasswordDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
|
||||
}
|
||||
|
||||
PasswordDialog::~PasswordDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void PasswordDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void PasswordDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
void PasswordDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
28
ZBD_IIIDL_S_Project/Src/PopDialog/passworddialog.h
Normal file
28
ZBD_IIIDL_S_Project/Src/PopDialog/passworddialog.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef PASSWORDDIALOG_H
|
||||
#define PASSWORDDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class PasswordDialog;
|
||||
}
|
||||
|
||||
class PasswordDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PasswordDialog(QWidget *parent = nullptr);
|
||||
~PasswordDialog();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
private:
|
||||
Ui::PasswordDialog *ui;
|
||||
};
|
||||
|
||||
#endif // PASSWORDDIALOG_H
|
||||
136
ZBD_IIIDL_S_Project/Src/PopDialog/passworddialog.ui
Normal file
136
ZBD_IIIDL_S_Project/Src/PopDialog/passworddialog.ui
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PasswordDialog</class>
|
||||
<widget class="QDialog" name="PasswordDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>190</y>
|
||||
<width>581</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>25</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>忘记密码请联系管理员</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>290</y>
|
||||
<width>601</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>18</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#000000 ;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>电话 +86</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>342</x>
|
||||
<y>493</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
14
ZBD_IIIDL_S_Project/Src/PopDialog/precsriptiondialog.cpp
Normal file
14
ZBD_IIIDL_S_Project/Src/PopDialog/precsriptiondialog.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "Precsriptiondialog.h"
|
||||
#include "ui_Precsriptiondialog.h"
|
||||
|
||||
PrecsriptionDialog::PrecsriptionDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::PrecsriptionDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
PrecsriptionDialog::~PrecsriptionDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
22
ZBD_IIIDL_S_Project/Src/PopDialog/precsriptiondialog.h
Normal file
22
ZBD_IIIDL_S_Project/Src/PopDialog/precsriptiondialog.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef PRECSRIPTIONDIALOG_H
|
||||
#define PRECSRIPTIONDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class PrecsriptionDialog;
|
||||
}
|
||||
|
||||
class PrecsriptionDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PrecsriptionDialog(QWidget *parent = nullptr);
|
||||
~PrecsriptionDialog();
|
||||
|
||||
private:
|
||||
Ui::PrecsriptionDialog *ui;
|
||||
};
|
||||
|
||||
#endif // PRECSRIPTIONDIALOG_H
|
||||
108
ZBD_IIIDL_S_Project/Src/PopDialog/precsriptiondialog.ui
Normal file
108
ZBD_IIIDL_S_Project/Src/PopDialog/precsriptiondialog.ui
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>precsriptionDialog</class>
|
||||
<widget class="QDialog" name="precsriptionDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>420</x>
|
||||
<y>310</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>230</y>
|
||||
<width>701</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>25</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>当前为游客状态,请登录获取训练处方!</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>360</x>
|
||||
<y>430</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
90
ZBD_IIIDL_S_Project/Src/PopDialog/protectgamestart.cpp
Normal file
90
ZBD_IIIDL_S_Project/Src/PopDialog/protectgamestart.cpp
Normal file
@@ -0,0 +1,90 @@
|
||||
#include "protectgamestart.h"
|
||||
#include "ui_protectgamestart.h"
|
||||
#include <QPainter>
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include <QMovie>
|
||||
|
||||
ProtectGameStart::ProtectGameStart(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::ProtectGameStart)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
this->setWindowFlags(this->windowFlags() | Qt::WindowStaysOnTopHint);
|
||||
initGif();
|
||||
}
|
||||
|
||||
ProtectGameStart::~ProtectGameStart()
|
||||
{
|
||||
if(m_movie)
|
||||
delete m_movie;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ProtectGameStart::initGif()
|
||||
{
|
||||
QString gifPath("./DependFile/Source/dialog/waiting.gif");
|
||||
m_movie = new QMovie();
|
||||
m_movie->setScaledSize(ui->gif_Label->size());
|
||||
m_movie->setFileName(gifPath);
|
||||
ui->gif_Label->setMovie(m_movie);
|
||||
}
|
||||
|
||||
void ProtectGameStart::showEvent(QShowEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
m_movie->start();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
bool ProtectGameStart::setDownPicture(QPixmap downPicture)
|
||||
{
|
||||
|
||||
//ui->downPictureLabel->setPixmap(downPicture);
|
||||
QPainter myPainter = QPainter(this);
|
||||
myPainter.drawPixmap(0,100,downPicture);
|
||||
}
|
||||
*/
|
||||
|
||||
void ProtectGameStart::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
|
||||
/*
|
||||
QString dirPath = QApplication::applicationDirPath() + "/DependFile/Source/trainDisplayPage";
|
||||
QDir resultDir(dirPath);
|
||||
if(!resultDir.exists())
|
||||
qDebug()<<"加载下图片失败";
|
||||
QPixmap downPicture,upPicture;
|
||||
downPicture.load(dirPath + "/downPicture.png");
|
||||
upPicture.load(dirPath + "/upPicture.png");
|
||||
qDebug()<<dirPath + "/downPicture.png"<<"\n"<< upPicture.load(dirPath + "/upPicture.png");
|
||||
|
||||
QPainter myUpPainter = QPainter(this);
|
||||
myUpPainter.drawPixmap(0,0,upPicture);
|
||||
|
||||
QPainter myPainter = QPainter(this);
|
||||
myPainter.drawPixmap(0,100,downPicture);
|
||||
//ui->upPictureLabel->setPixmap(upPicture);
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
void ProtectGameStart::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
31
ZBD_IIIDL_S_Project/Src/PopDialog/protectgamestart.h
Normal file
31
ZBD_IIIDL_S_Project/Src/PopDialog/protectgamestart.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef PROTECTGAMESTART_H
|
||||
#define PROTECTGAMESTART_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class ProtectGameStart;
|
||||
}
|
||||
|
||||
class ProtectGameStart : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ProtectGameStart(QWidget *parent = nullptr);
|
||||
~ProtectGameStart();
|
||||
virtual void showEvent(QShowEvent* event);
|
||||
virtual void changeEvent(QEvent* event);
|
||||
//bool setDownPicture(QPixmap downPicture);
|
||||
void initGif();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
Ui::ProtectGameStart *ui;
|
||||
QMovie *m_movie;
|
||||
};
|
||||
|
||||
#endif // PROTECTGAMESTART_H
|
||||
88
ZBD_IIIDL_S_Project/Src/PopDialog/protectgamestart.ui
Normal file
88
ZBD_IIIDL_S_Project/Src/PopDialog/protectgamestart.ui
Normal file
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ProtectGameStart</class>
|
||||
<widget class="QWidget" name="ProtectGameStart">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="downPictureGroupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">
|
||||
#downPictureGroupBox{border-image: url(:/DependFile/Source/dialog/waiting.png);border:none;}
|
||||
</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="text_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>400</x>
|
||||
<y>360</y>
|
||||
<width>551</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="gif_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>810</x>
|
||||
<y>320</y>
|
||||
<width>300</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="text_Label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>760</x>
|
||||
<y>650</y>
|
||||
<width>400</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>30</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: #0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>加载中...</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
59
ZBD_IIIDL_S_Project/Src/PopDialog/quitbyspeeddialog.cpp
Normal file
59
ZBD_IIIDL_S_Project/Src/PopDialog/quitbyspeeddialog.cpp
Normal file
@@ -0,0 +1,59 @@
|
||||
#include "quitbyspeeddialog.h"
|
||||
#include "ui_quitbyspeeddialog.h"
|
||||
#include <QPainter>
|
||||
#include <QTimer>
|
||||
|
||||
QuitBySpeedDialog::QuitBySpeedDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::QuitBySpeedDialog),
|
||||
m_downTimer(NULL),
|
||||
m_downTimeNum(5)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
m_downTimer = new QTimer();
|
||||
m_downTimer->setInterval(1000);
|
||||
connect(m_downTimer,SIGNAL(timeout()),this,SLOT(slotDownTimer()));
|
||||
|
||||
}
|
||||
|
||||
QuitBySpeedDialog::~QuitBySpeedDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void QuitBySpeedDialog::startTimer()
|
||||
{
|
||||
m_downTimeNum = 5;
|
||||
|
||||
m_downTimer->start();
|
||||
ui->downTime_Label->setText(QString::number(m_downTimeNum));
|
||||
this->show();
|
||||
}
|
||||
|
||||
void QuitBySpeedDialog::stopTimer()
|
||||
{
|
||||
m_downTimer->stop();
|
||||
this->close();
|
||||
|
||||
}
|
||||
|
||||
void QuitBySpeedDialog::slotDownTimer()
|
||||
{
|
||||
ui->downTime_Label->setText(QString::number(m_downTimeNum));
|
||||
|
||||
if(m_downTimeNum == 0)
|
||||
{
|
||||
this->close();
|
||||
emit signalClosed();
|
||||
}
|
||||
m_downTimeNum--;
|
||||
}
|
||||
|
||||
void QuitBySpeedDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
33
ZBD_IIIDL_S_Project/Src/PopDialog/quitbyspeeddialog.h
Normal file
33
ZBD_IIIDL_S_Project/Src/PopDialog/quitbyspeeddialog.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef QUITBYSPEEDDIALOG_H
|
||||
#define QUITBYSPEEDDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
class QTimer;
|
||||
namespace Ui {
|
||||
class QuitBySpeedDialog;
|
||||
}
|
||||
|
||||
class QuitBySpeedDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QuitBySpeedDialog(QWidget *parent = nullptr);
|
||||
~QuitBySpeedDialog();
|
||||
|
||||
void startTimer();
|
||||
void stopTimer();
|
||||
signals:
|
||||
void signalClosed();
|
||||
private slots:
|
||||
void slotDownTimer();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
private:
|
||||
Ui::QuitBySpeedDialog *ui;
|
||||
QTimer *m_downTimer;
|
||||
int m_downTimeNum;
|
||||
};
|
||||
|
||||
#endif // QUITBYSPEEDDIALOG_H
|
||||
173
ZBD_IIIDL_S_Project/Src/PopDialog/quitbyspeeddialog.ui
Normal file
173
ZBD_IIIDL_S_Project/Src/PopDialog/quitbyspeeddialog.ui
Normal file
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QuitBySpeedDialog</class>
|
||||
<widget class="QDialog" name="QuitBySpeedDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 8px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: #DDECFC;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius:8px</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>311</x>
|
||||
<y>7</y>
|
||||
<width>211</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>20</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>180</y>
|
||||
<width>581</width>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>22</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>速度已超99r/min,设备将在5s内停止</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="downTime_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>330</x>
|
||||
<y>340</y>
|
||||
<width>131</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>40</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgba(0,0,0,0.45);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>5</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>537</y>
|
||||
<width>401</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/leftBtn.png);
|
||||
color:white;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>404</x>
|
||||
<y>537</y>
|
||||
<width>401</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/rightBtn.png);
|
||||
color:white;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
55
ZBD_IIIDL_S_Project/Src/PopDialog/quitgamedialog.cpp
Normal file
55
ZBD_IIIDL_S_Project/Src/PopDialog/quitgamedialog.cpp
Normal file
@@ -0,0 +1,55 @@
|
||||
#include "quitgamedialog.h"
|
||||
#include "ui_quitgamedialog.h"
|
||||
#include <QPainter>
|
||||
QuitGameDialog::QuitGameDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::QuitGameDialog),
|
||||
m_result(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
}
|
||||
|
||||
QuitGameDialog::~QuitGameDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
int QuitGameDialog::getResult()
|
||||
{
|
||||
return m_result;
|
||||
}
|
||||
|
||||
void QuitGameDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
m_result = 0;
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void QuitGameDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
m_result = 1;
|
||||
this->close();
|
||||
}
|
||||
|
||||
void QuitGameDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void QuitGameDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
33
ZBD_IIIDL_S_Project/Src/PopDialog/quitgamedialog.h
Normal file
33
ZBD_IIIDL_S_Project/Src/PopDialog/quitgamedialog.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef QUITGAMEDIALOG_H
|
||||
#define QUITGAMEDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class QuitGameDialog;
|
||||
}
|
||||
|
||||
class QuitGameDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QuitGameDialog(QWidget *parent = nullptr);
|
||||
~QuitGameDialog();
|
||||
|
||||
int getResult();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
private:
|
||||
Ui::QuitGameDialog *ui;
|
||||
int m_result;
|
||||
};
|
||||
|
||||
#endif // QUITGAMEDIALOG_H
|
||||
141
ZBD_IIIDL_S_Project/Src/PopDialog/quitgamedialog.ui
Normal file
141
ZBD_IIIDL_S_Project/Src/PopDialog/quitgamedialog.ui
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QuitGameDialog</class>
|
||||
<widget class="QDialog" name="QuitGameDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<y>450</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>450</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>240</y>
|
||||
<width>761</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>-1</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 600px;
|
||||
height: 26px;
|
||||
font-size: 40px;
|
||||
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 26px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>游戏正在运行中,确认退出吗?</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
69
ZBD_IIIDL_S_Project/Src/PopDialog/selectuserdialog.cpp
Normal file
69
ZBD_IIIDL_S_Project/Src/PopDialog/selectuserdialog.cpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "selectuserdialog.h"
|
||||
#include "ui_selectuserdialog.h"
|
||||
#include <QPainter>
|
||||
#include "SoundController.h"
|
||||
|
||||
SelectUserDialog::SelectUserDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::SelectUserDialog),
|
||||
isSelectedUser(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
|
||||
}
|
||||
|
||||
SelectUserDialog::~SelectUserDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SelectUserDialog::setUserMsg(const ST_PatientMsg& userMsg)
|
||||
{
|
||||
QString userMessage;
|
||||
QString sex;
|
||||
if(0 == userMsg.sex)
|
||||
sex = tr("男");
|
||||
else if(1 == userMsg.sex)
|
||||
sex = tr("女");
|
||||
userMessage = userMsg.name + " " + sex + " " + QString::number(userMsg.ID);
|
||||
ui->userMessage_Label->setText(userMessage);
|
||||
}
|
||||
|
||||
bool SelectUserDialog::isSelectUser()
|
||||
{
|
||||
return isSelectedUser;
|
||||
}
|
||||
|
||||
void SelectUserDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
isSelectedUser = false;
|
||||
this->close();
|
||||
}
|
||||
|
||||
void SelectUserDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
isSelectedUser = true;
|
||||
this->close();
|
||||
}
|
||||
|
||||
void SelectUserDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void SelectUserDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
36
ZBD_IIIDL_S_Project/Src/PopDialog/selectuserdialog.h
Normal file
36
ZBD_IIIDL_S_Project/Src/PopDialog/selectuserdialog.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef SELECTUSERDIALOG_H
|
||||
#define SELECTUSERDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "dbforrmate.h"
|
||||
namespace Ui {
|
||||
class SelectUserDialog;
|
||||
}
|
||||
|
||||
class SelectUserDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SelectUserDialog(QWidget *parent = nullptr);
|
||||
~SelectUserDialog();
|
||||
|
||||
void setUserMsg(const ST_PatientMsg&);
|
||||
|
||||
bool isSelectUser();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
private:
|
||||
Ui::SelectUserDialog *ui;
|
||||
bool isSelectedUser;
|
||||
|
||||
};
|
||||
|
||||
#endif // SELECTUSERDIALOG_H
|
||||
160
ZBD_IIIDL_S_Project/Src/PopDialog/selectuserdialog.ui
Normal file
160
ZBD_IIIDL_S_Project/Src/PopDialog/selectuserdialog.ui
Normal file
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SelectUserDialog</class>
|
||||
<widget class="QDialog" name="SelectUserDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/dialog/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>210</y>
|
||||
<width>621</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>22</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认选择当前用户?</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="userMessage_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>300</y>
|
||||
<width>561</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#666666;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>张三 男 12465431266</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>232</x>
|
||||
<y>490</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>452</x>
|
||||
<y>490</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
58
ZBD_IIIDL_S_Project/Src/PopDialog/shutdeondialog.cpp
Normal file
58
ZBD_IIIDL_S_Project/Src/PopDialog/shutdeondialog.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
#include "shutdeondialog.h"
|
||||
#include "ui_shutdeondialog.h"
|
||||
#include <QEvent>
|
||||
#include <QPainter>
|
||||
|
||||
ShutdeonDialog::ShutdeonDialog(QDialog *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::ShutdeonDialog)
|
||||
,m_result(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
}
|
||||
|
||||
ShutdeonDialog::~ShutdeonDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
int ShutdeonDialog::getResult()
|
||||
{
|
||||
return m_result;
|
||||
}
|
||||
|
||||
void ShutdeonDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void ShutdeonDialog::changeEvent(QEvent *event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ShutdeonDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
m_result = 0;
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void ShutdeonDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
m_result = 1;
|
||||
this->close();
|
||||
}
|
||||
|
||||
33
ZBD_IIIDL_S_Project/Src/PopDialog/shutdeondialog.h
Normal file
33
ZBD_IIIDL_S_Project/Src/PopDialog/shutdeondialog.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef SHUTDEONDIALOG_H
|
||||
#define SHUTDEONDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class ShutdeonDialog;
|
||||
}
|
||||
|
||||
class ShutdeonDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ShutdeonDialog(QDialog *parent = nullptr);
|
||||
~ShutdeonDialog();
|
||||
int getResult();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
private:
|
||||
Ui::ShutdeonDialog *ui;
|
||||
int m_result;
|
||||
};
|
||||
|
||||
#endif // SHUTDEONDIALOG_H
|
||||
135
ZBD_IIIDL_S_Project/Src/PopDialog/shutdeondialog.ui
Normal file
135
ZBD_IIIDL_S_Project/Src/PopDialog/shutdeondialog.ui
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ShutdeonDialog</class>
|
||||
<widget class="QWidget" name="ShutdeonDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<y>450</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>450</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>240</y>
|
||||
<width>761</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 600px;
|
||||
height: 26px;
|
||||
font-size: 40px;
|
||||
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 26px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>是否关机?</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
59
ZBD_IIIDL_S_Project/Src/PopDialog/soundcontroller.cpp
Normal file
59
ZBD_IIIDL_S_Project/Src/PopDialog/soundcontroller.cpp
Normal file
@@ -0,0 +1,59 @@
|
||||
#include "SoundController.h"
|
||||
#include <mmdeviceapi.h>
|
||||
#include <endpointvolume.h>
|
||||
#include <QDebug>
|
||||
|
||||
SoundController::SoundController(QObject *parent) : QObject(parent)
|
||||
{
|
||||
HRESULT hr = CoInitialize(NULL);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to initialize COM";
|
||||
return;
|
||||
}
|
||||
|
||||
hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), (void**)&deviceEnumerator);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to create the device enumerator";
|
||||
CoUninitialize();
|
||||
return;
|
||||
}
|
||||
|
||||
hr = deviceEnumerator->GetDefaultAudioEndpoint(eRender, eMultimedia, &device);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to get the default audio endpoint";
|
||||
deviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
return;
|
||||
}
|
||||
|
||||
hr = device->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_ALL, NULL, (void**)&endpointVolume);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to activate the endpoint volume interface";
|
||||
device->Release();
|
||||
deviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int SoundController::getSystemVolume()
|
||||
{
|
||||
float fVolume;
|
||||
HRESULT hr = endpointVolume->GetMasterVolumeLevelScalar(&fVolume);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to get the current volume";
|
||||
return -1;
|
||||
}
|
||||
return static_cast<int>(fVolume * 100);
|
||||
}
|
||||
|
||||
bool SoundController::setSystemVolume(int volume)
|
||||
{
|
||||
float fVolume = static_cast<float>(volume) / 100.0f;
|
||||
HRESULT hr = endpointVolume->SetMasterVolumeLevelScalar(fVolume, NULL);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to set the volume";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
24
ZBD_IIIDL_S_Project/Src/PopDialog/soundcontroller.h
Normal file
24
ZBD_IIIDL_S_Project/Src/PopDialog/soundcontroller.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef SOUNDCONTROLLER_H
|
||||
#define SOUNDCONTROLLER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSlider>
|
||||
#include <mmdeviceapi.h>
|
||||
#include <endpointvolume.h>
|
||||
|
||||
class SoundController : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit SoundController(QObject *parent = nullptr);
|
||||
|
||||
int getSystemVolume();
|
||||
bool setSystemVolume(int volume);
|
||||
|
||||
private:
|
||||
IMMDeviceEnumerator *deviceEnumerator = NULL;
|
||||
IMMDevice *device = NULL;
|
||||
IAudioEndpointVolume *endpointVolume = NULL;
|
||||
};
|
||||
|
||||
#endif // SOUNDCONTROLLER_H
|
||||
340
ZBD_IIIDL_S_Project/Src/PopDialog/sounddialog.cpp
Normal file
340
ZBD_IIIDL_S_Project/Src/PopDialog/sounddialog.cpp
Normal file
@@ -0,0 +1,340 @@
|
||||
#include "sounddialog.h"
|
||||
#include "ui_sounddialog.h"
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
int SoundDialog::m_value = 0;
|
||||
|
||||
#include <QPainter>
|
||||
SoundDialog::SoundDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::SoundDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true); //设置透明
|
||||
ui->cancel_Btn->setVisible(false);
|
||||
|
||||
this->setRange(0,100);
|
||||
soundController = new SoundController(this);
|
||||
|
||||
}
|
||||
|
||||
SoundDialog::~SoundDialog()
|
||||
{
|
||||
delete ui;
|
||||
// if(m_player) delete m_player;
|
||||
// if(m_audioOutput) delete m_audioOutput;
|
||||
}
|
||||
|
||||
|
||||
void SoundDialog::setTitleAndUnit(QString title, QString unit)
|
||||
{
|
||||
ui->title_Label->setText(title);
|
||||
//ui->unit_Label->setText(unit);
|
||||
}
|
||||
|
||||
int SoundDialog::getValue()
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
void SoundDialog::setValue(int value)
|
||||
{
|
||||
ui->slider->setValue(value);
|
||||
ui->value_Label->setText(QString::number(value));
|
||||
// qDebug()<<"设置滑块和方块数字:"<<value;
|
||||
// m_value = value;
|
||||
qDebug() << ui->slider->value();
|
||||
}
|
||||
|
||||
void SoundDialog::setRange(int min, int max)
|
||||
{
|
||||
ui->slider->setRange(min,max);
|
||||
}
|
||||
|
||||
void SoundDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
void SoundDialog::on_slider_sliderMoved(int position)
|
||||
{
|
||||
//qDebug() <<"mode的值:"<<position;
|
||||
ui->value_Label->setText(QString::number(position));
|
||||
SetSystemVolume(position);
|
||||
}
|
||||
|
||||
void SoundDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
m_value = ui->value_Label->text().toInt();
|
||||
if(m_value == 0)
|
||||
SetSystemVolume(-2);//设置禁音
|
||||
else
|
||||
{
|
||||
SetSystemVolume(-1); //取消禁音
|
||||
SetSystemVolume(m_value -1);
|
||||
}
|
||||
this->close();
|
||||
}
|
||||
|
||||
void SoundDialog::on_minus_Btn_clicked()
|
||||
{
|
||||
int value = ui->slider->value();
|
||||
--value;
|
||||
if(value < 0) return;
|
||||
ui->slider->setValue(value);
|
||||
ui->value_Label->setText(QString::number(value));
|
||||
SetSystemVolume(value);
|
||||
// m_player->setVolume(value);
|
||||
|
||||
// qDebug()<<m_value;
|
||||
}
|
||||
|
||||
void SoundDialog::on_plus_Btn_clicked()
|
||||
{
|
||||
int value = ui->slider->value();
|
||||
++value;
|
||||
if(value > 100) return;
|
||||
ui->slider->setValue(value);
|
||||
ui->value_Label->setText(QString::number(value));
|
||||
SetSystemVolume(value);
|
||||
// m_player->setVolume(value);
|
||||
|
||||
// qDebug()<<m_value;
|
||||
}
|
||||
|
||||
void SoundDialog::on_slider_valueChanged(int value)
|
||||
{
|
||||
//ui->value_Label->setText(QString::number(value));
|
||||
//SetSystemVolume(value);
|
||||
//SetSystemVolume2(value);
|
||||
//soundController->setSystemVolume(value);
|
||||
|
||||
// m_player->setVolume(value);
|
||||
|
||||
//qDebug()<<"m_value"<<m_value;
|
||||
}
|
||||
|
||||
void SoundDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
|
||||
void SoundDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
qDebug()<<"m_value、当前音量"<<m_value<<GetCurrentVolume();
|
||||
|
||||
m_value = (GetCurrentVolume()<=1)?m_value:GetCurrentVolume();
|
||||
|
||||
this->setValue(m_value);
|
||||
|
||||
// testFunction();
|
||||
}
|
||||
|
||||
|
||||
void SoundDialog::SetSystemVolume(int value)
|
||||
{
|
||||
|
||||
HRESULT hr;
|
||||
IMMDeviceEnumerator* pDeviceEnumerator=0;
|
||||
IMMDevice* pDevice=0;
|
||||
IAudioEndpointVolume* pAudioEndpointVolume=0;
|
||||
IAudioClient* pAudioClient=0;
|
||||
hr = CoCreateInstance(__uuidof(MMDeviceEnumerator),NULL,CLSCTX_ALL,__uuidof(IMMDeviceEnumerator),(void**)&pDeviceEnumerator);
|
||||
|
||||
hr = pDeviceEnumerator->GetDefaultAudioEndpoint(eRender,eMultimedia,&pDevice);
|
||||
|
||||
hr = pDevice->Activate(__uuidof(IAudioEndpointVolume),CLSCTX_ALL,NULL,(void**)&pAudioEndpointVolume);
|
||||
|
||||
hr = pDevice->Activate(__uuidof(IAudioClient),CLSCTX_ALL,NULL,(void**)&pAudioClient);
|
||||
|
||||
if(value == -1)
|
||||
pAudioEndpointVolume->SetMute(FALSE,NULL); /*取消静音*/
|
||||
else if(value == -2)
|
||||
pAudioEndpointVolume->SetMute(TRUE,NULL); /*静音*/
|
||||
else{
|
||||
value = (value > 100) ? 100 : (value < 0) ? 0: value; /*将音量限制在0-100内*/
|
||||
float fVolume;
|
||||
fVolume = value/100.0f;
|
||||
hr = pAudioEndpointVolume->SetMasterVolumeLevelScalar(fVolume,&GUID_NULL);
|
||||
}
|
||||
pAudioClient->Release();
|
||||
pAudioEndpointVolume->Release();
|
||||
pDevice->Release();
|
||||
pDeviceEnumerator->Release();
|
||||
}
|
||||
|
||||
int SoundDialog::GetCurrentVolume()
|
||||
{
|
||||
|
||||
HRESULT hr;
|
||||
IMMDeviceEnumerator* pDeviceEnumerator=0;
|
||||
IMMDevice* pDevice=0;
|
||||
IAudioEndpointVolume* pAudioEndpointVolume=0;
|
||||
IAudioClient* pAudioClient=0;
|
||||
|
||||
hr = CoCreateInstance(__uuidof(MMDeviceEnumerator),NULL,CLSCTX_ALL,__uuidof(IMMDeviceEnumerator),(void**)&pDeviceEnumerator);
|
||||
|
||||
hr = pDeviceEnumerator->GetDefaultAudioEndpoint(eRender,eMultimedia,&pDevice);
|
||||
|
||||
hr = pDevice->Activate(__uuidof(IAudioEndpointVolume),CLSCTX_ALL,NULL,(void**)&pAudioEndpointVolume);
|
||||
|
||||
hr = pDevice->Activate(__uuidof(IAudioClient),CLSCTX_ALL,NULL,(void**)&pAudioClient);
|
||||
|
||||
float fVolume;
|
||||
|
||||
hr = pAudioEndpointVolume->GetMasterVolumeLevelScalar(&fVolume);
|
||||
|
||||
|
||||
pAudioClient->Release();
|
||||
pAudioEndpointVolume->Release();
|
||||
pDevice->Release();
|
||||
pDeviceEnumerator->Release();
|
||||
|
||||
int intVolume = fVolume*100+1;
|
||||
if(intVolume>100)
|
||||
{
|
||||
intVolume =100;
|
||||
}
|
||||
return intVolume;
|
||||
}
|
||||
|
||||
|
||||
int SoundDialog::GetSystemVolume2() {
|
||||
HRESULT hr;
|
||||
int volume = 0;
|
||||
IMMDeviceEnumerator *deviceEnumerator = NULL;
|
||||
IMMDevice *device = NULL;
|
||||
IAudioEndpointVolume *endpointVolume = NULL;
|
||||
|
||||
// Initialize COM.
|
||||
hr = CoInitialize(NULL);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to initialize COM";
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Create the device enumerator.
|
||||
hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), (void**)&deviceEnumerator);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to create the device enumerator";
|
||||
CoUninitialize();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Get the default audio endpoint.
|
||||
hr = deviceEnumerator->GetDefaultAudioEndpoint(eRender, eMultimedia, &device);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to get the default audio endpoint";
|
||||
deviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Activate the endpoint volume interface.
|
||||
hr = device->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_ALL, NULL, (void**)&endpointVolume);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to activate the endpoint volume interface";
|
||||
device->Release();
|
||||
deviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Get the current volume.
|
||||
float fVolume;
|
||||
hr = endpointVolume->GetMasterVolumeLevelScalar(&fVolume);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to get the current volume";
|
||||
endpointVolume->Release();
|
||||
device->Release();
|
||||
deviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Convert to an integer percentage.
|
||||
volume = static_cast<int>(fVolume * 100);
|
||||
|
||||
// Clean up.
|
||||
endpointVolume->Release();
|
||||
device->Release();
|
||||
deviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
|
||||
return volume;
|
||||
}
|
||||
|
||||
bool SoundDialog::SetSystemVolume2(int volume) {
|
||||
HRESULT hr;
|
||||
IMMDeviceEnumerator *deviceEnumerator = NULL;
|
||||
IMMDevice *device = NULL;
|
||||
IAudioEndpointVolume *endpointVolume = NULL;
|
||||
|
||||
// Initialize COM.
|
||||
hr = CoInitialize(NULL);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to initialize COM";
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create the device enumerator.
|
||||
hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), (void**)&deviceEnumerator);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to create the device enumerator";
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get the default audio endpoint.
|
||||
hr = deviceEnumerator->GetDefaultAudioEndpoint(eRender, eMultimedia, &device);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to get the default audio endpoint";
|
||||
deviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Activate the endpoint volume interface.
|
||||
hr = device->Activate(__uuidof(IAudioEndpointVolume), CLSCTX_ALL, NULL, (void**)&endpointVolume);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to activate the endpoint volume interface";
|
||||
device->Release();
|
||||
deviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set the master volume level scalar.
|
||||
float fVolume = static_cast<float>(volume) / 100.0f;
|
||||
hr = endpointVolume->SetMasterVolumeLevelScalar(fVolume, NULL);
|
||||
if (FAILED(hr)) {
|
||||
qDebug() << "Failed to set the volume";
|
||||
endpointVolume->Release();
|
||||
device->Release();
|
||||
deviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Clean up.
|
||||
endpointVolume->Release();
|
||||
device->Release();
|
||||
deviceEnumerator->Release();
|
||||
CoUninitialize();
|
||||
|
||||
return true;
|
||||
}
|
||||
87
ZBD_IIIDL_S_Project/Src/PopDialog/sounddialog.h
Normal file
87
ZBD_IIIDL_S_Project/Src/PopDialog/sounddialog.h
Normal file
@@ -0,0 +1,87 @@
|
||||
#ifndef SOUNDDIALOG_H
|
||||
#define SOUNDDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QMediaPlayer>
|
||||
#include <QAudioOutput>
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmdeviceapi.h>
|
||||
#include <endpointvolume.h>
|
||||
#include <audioclient.h>
|
||||
#include "SoundController.h"
|
||||
|
||||
namespace Ui {
|
||||
class SoundDialog;
|
||||
}
|
||||
|
||||
class SoundDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SoundDialog(QWidget *parent = nullptr);
|
||||
~SoundDialog();
|
||||
|
||||
void setTitleAndUnit(QString title,QString unit);
|
||||
|
||||
int getValue();
|
||||
|
||||
void setValue(int value);
|
||||
|
||||
void setRange(int min,int max);
|
||||
|
||||
|
||||
// void testFunction();
|
||||
|
||||
//void SetWindowsSound(int new_volume);
|
||||
|
||||
// void GetWindowsSound();
|
||||
|
||||
void SetSystemVolume(int); /*设置系统音量*/
|
||||
|
||||
int GetCurrentVolume(); /*获取系统当前的音量*/
|
||||
|
||||
int GetSystemVolume2();
|
||||
|
||||
bool SetSystemVolume2(int volume);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
// virtual void showeEnvent(QEvent* event);
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_slider_sliderMoved(int position);
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
void on_minus_Btn_clicked();
|
||||
|
||||
void on_plus_Btn_clicked();
|
||||
|
||||
void on_slider_valueChanged(int value);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
static int m_value;
|
||||
|
||||
private:
|
||||
Ui::SoundDialog *ui;
|
||||
SoundController *soundController = NULL;
|
||||
|
||||
};
|
||||
|
||||
#endif // SOUNDDIALOG_H
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
208
ZBD_IIIDL_S_Project/Src/PopDialog/sounddialog.ui
Normal file
208
ZBD_IIIDL_S_Project/Src/PopDialog/sounddialog.ui
Normal file
@@ -0,0 +1,208 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SoundDialog</class>
|
||||
<widget class="QDialog" name="SoundDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QSlider" name="slider">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>340</y>
|
||||
<width>400</width>
|
||||
<height>43</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="title_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示:音量调节</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>440</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>235</x>
|
||||
<y>513</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>205</y>
|
||||
<width>360</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox_2{background: #FFFFFF;
|
||||
border: 1px solid #05A6EC;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QPushButton" name="plus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>299</x>
|
||||
<y>1</y>
|
||||
<width>60</width>
|
||||
<height>58</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/plus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRepeatInterval">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="minus_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1</x>
|
||||
<y>1</y>
|
||||
<width>60</width>
|
||||
<height>58</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/minus.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRepeat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRepeatInterval">
|
||||
<number>50</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="value_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>3</y>
|
||||
<width>131</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>20</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>100</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
93
ZBD_IIIDL_S_Project/Src/PopDialog/spasmtipsdialog.cpp
Normal file
93
ZBD_IIIDL_S_Project/Src/PopDialog/spasmtipsdialog.cpp
Normal file
@@ -0,0 +1,93 @@
|
||||
#include "spasmtipsdialog.h"
|
||||
#include "ui_spasmtipsdialog.h"
|
||||
#include <QPainter>
|
||||
#include "ccommunicateapi.h"
|
||||
SpasmTipsDialog::SpasmTipsDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::SpasmTipsDialog),
|
||||
bells("./DependFile/Music/spasmTips.wav")
|
||||
// gamePauseFlag(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
|
||||
//设置报警音无线循环
|
||||
bells.setLoops(-1);
|
||||
}
|
||||
|
||||
SpasmTipsDialog::~SpasmTipsDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SpasmTipsDialog::setSpasmDialogVisible(bool isVisable, int times)
|
||||
{
|
||||
Q_UNUSED(isVisable)
|
||||
QString tipsMsg;
|
||||
//gamePauseFlag = true;
|
||||
|
||||
switch(times)
|
||||
{
|
||||
case 1:
|
||||
tipsMsg = tr("请注意发生1次痉挛!");
|
||||
break;
|
||||
case 2:
|
||||
tipsMsg = tr("请注意发生2次痉挛!");
|
||||
break;
|
||||
case 3:
|
||||
tipsMsg = tr("请注意发生3次痉挛,训练将停止!");
|
||||
break;
|
||||
}
|
||||
playBell();
|
||||
ui->tips_Label->setText(tipsMsg);
|
||||
this->exec();
|
||||
}
|
||||
|
||||
void SpasmTipsDialog::setSpasmCompletedDirection(int8_t direction)
|
||||
{
|
||||
m_direction = direction;
|
||||
}
|
||||
|
||||
void SpasmTipsDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
void SpasmTipsDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
stopPlayBell();
|
||||
CCommunicateAPI::getInstance()->sendRealTimeParam(SPASM_CONFIRM,m_direction);
|
||||
// gamePauseFlag = false;
|
||||
this->close();
|
||||
}
|
||||
|
||||
//痉挛报警音控制
|
||||
void SpasmTipsDialog::playBell()
|
||||
{
|
||||
bells.play();
|
||||
}
|
||||
//停止报警音
|
||||
void SpasmTipsDialog::stopPlayBell()
|
||||
{
|
||||
if(bells.loopsRemaining())
|
||||
bells.stop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void SpasmTipsDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
48
ZBD_IIIDL_S_Project/Src/PopDialog/spasmtipsdialog.h
Normal file
48
ZBD_IIIDL_S_Project/Src/PopDialog/spasmtipsdialog.h
Normal file
@@ -0,0 +1,48 @@
|
||||
#ifndef SPASMTIPSDIALOG_H
|
||||
#define SPASMTIPSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QSound>
|
||||
namespace Ui {
|
||||
class SpasmTipsDialog;
|
||||
}
|
||||
|
||||
class SpasmTipsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SpasmTipsDialog(QWidget *parent = nullptr);
|
||||
~SpasmTipsDialog();
|
||||
/*****痉挛弹窗以及痉挛次数显示****
|
||||
* 参数@bool isVisable是否显示该弹窗
|
||||
* 参数@int times痉挛次数
|
||||
* ******/
|
||||
void setSpasmDialogVisible(bool isVisable,int times);
|
||||
|
||||
/****设置痉挛后方向***
|
||||
* @int8_t direction方向 0-逆向 1-正向
|
||||
* ****/
|
||||
void setSpasmCompletedDirection(int8_t direction);
|
||||
|
||||
//痉挛报警音控制
|
||||
void playBell();
|
||||
//停止报警音
|
||||
void stopPlayBell();
|
||||
|
||||
//bool returnGamePauseFlag();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
private:
|
||||
Ui::SpasmTipsDialog *ui;
|
||||
int8_t m_direction; //0-逆向 1-正向
|
||||
QSound bells; //铃声对象
|
||||
// bool gamePauseFlag;
|
||||
};
|
||||
|
||||
#endif // SPASMTIPSDIALOG_H
|
||||
130
ZBD_IIIDL_S_Project/Src/PopDialog/spasmtipsdialog.ui
Normal file
130
ZBD_IIIDL_S_Project/Src/PopDialog/spasmtipsdialog.ui
Normal file
@@ -0,0 +1,130 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SpasmTipsDialog</class>
|
||||
<widget class="QDialog" name="SpasmTipsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>710</x>
|
||||
<y>340</y>
|
||||
<width>500</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 32px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>70</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/gamePage/dialog.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="tips_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>190</y>
|
||||
<width>301</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>18</pointsize>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>290</y>
|
||||
<width>120</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-radius: 4px;
|
||||
border: 1px solid #0D9DDB;
|
||||
color:#0D9DDB;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="image_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>110</y>
|
||||
<width>71</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/dialog/spasm.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
66
ZBD_IIIDL_S_Project/Src/PopDialog/torquedialog.cpp
Normal file
66
ZBD_IIIDL_S_Project/Src/PopDialog/torquedialog.cpp
Normal file
@@ -0,0 +1,66 @@
|
||||
#include "torquedialog.h"
|
||||
#include "ui_torquedialog.h"
|
||||
#include <QPainter>
|
||||
#include <QDir>
|
||||
#include <QSettings>
|
||||
|
||||
TorqueDialog::TorqueDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::TorqueDialog),
|
||||
isConfirmed(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
ui->originalPasswordTips_Label->setVisible(false);
|
||||
//this->setWindowFlags(Qt::Dialog);
|
||||
|
||||
}
|
||||
|
||||
TorqueDialog::~TorqueDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool TorqueDialog::getConfirmState()
|
||||
{
|
||||
return isConfirmed;
|
||||
}
|
||||
|
||||
void TorqueDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
isConfirmed = false;
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void TorqueDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
QString originalPassword = ui->originalPassword_LineEdit->text();
|
||||
QString dirPath = "./DependFile/conf/";
|
||||
QDir confdir(dirPath);
|
||||
if(!confdir.exists())
|
||||
confdir.mkdir(dirPath);
|
||||
QString confFile(dirPath + "IDconf.ini");
|
||||
QSettings iniSetting(confFile, QSettings::IniFormat);
|
||||
QString password = iniSetting.value("password").toString();
|
||||
this->setWindowModality(Qt::WindowModal);
|
||||
//CalibrateDlg dlg(this);
|
||||
|
||||
if(password != originalPassword)
|
||||
{
|
||||
ui->originalPasswordTips_Label->setText(tr("密码输入错误"));
|
||||
ui->originalPasswordTips_Label->setVisible(true);
|
||||
return ;
|
||||
}
|
||||
else
|
||||
isConfirmed = true;
|
||||
this->close();
|
||||
}
|
||||
|
||||
void TorqueDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
30
ZBD_IIIDL_S_Project/Src/PopDialog/torquedialog.h
Normal file
30
ZBD_IIIDL_S_Project/Src/PopDialog/torquedialog.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef TORQUEDIALOG_H
|
||||
#define TORQUEDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class TorqueDialog;
|
||||
}
|
||||
|
||||
class TorqueDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TorqueDialog(QWidget *parent = nullptr);
|
||||
~TorqueDialog();
|
||||
|
||||
bool getConfirmState();
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
private:
|
||||
Ui::TorqueDialog *ui;
|
||||
bool isConfirmed;
|
||||
};
|
||||
|
||||
#endif // TORQUEDIALOG_H
|
||||
253
ZBD_IIIDL_S_Project/Src/PopDialog/torquedialog.ui
Normal file
253
ZBD_IIIDL_S_Project/Src/PopDialog/torquedialog.ui
Normal file
@@ -0,0 +1,253 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TorqueDialog</class>
|
||||
<widget class="QDialog" name="TorqueDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 8px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: #DDECFC;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius:8px</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>341</x>
|
||||
<y>7</y>
|
||||
<width>131</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>537</y>
|
||||
<width>401</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/leftBtn.png);
|
||||
color:white;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>404</x>
|
||||
<y>537</y>
|
||||
<width>401</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/rightBtn.png);
|
||||
color:white;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_9">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>410</y>
|
||||
<width>401</width>
|
||||
<height>70</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox_9{border-radius: 4px;
|
||||
border: 1px solid #979797;background:white;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="originalPassword_LineEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>5</y>
|
||||
<width>331</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border:none;</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>请输入密码</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>190</y>
|
||||
<width>801</width>
|
||||
<height>91</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>20</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>输出扭矩应在医师指导下更改</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>410</y>
|
||||
<width>201</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> 密 码:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>300</y>
|
||||
<width>491</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: rgba(0,0,0,0.45);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>更改扭矩可能造成风险</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="originalPasswordTips_Label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>610</x>
|
||||
<y>430</y>
|
||||
<width>191</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color:#F47E4B;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>密码输入错误</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
101
ZBD_IIIDL_S_Project/Src/PopDialog/verticaltohorizondialog.cpp
Normal file
101
ZBD_IIIDL_S_Project/Src/PopDialog/verticaltohorizondialog.cpp
Normal file
@@ -0,0 +1,101 @@
|
||||
#include "verticaltohorizondialog.h"
|
||||
#include "ui_verticaltohorizondialog.h"
|
||||
#include <QPainter>
|
||||
#include "dataformate.h"
|
||||
#include "languagemanager.h"
|
||||
|
||||
VerticalToHorizonDialog::VerticalToHorizonDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::VerticalToHorizonDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(Qt::FramelessWindowHint); //设置无边框
|
||||
setAttribute(Qt::WA_TranslucentBackground,true);
|
||||
}
|
||||
|
||||
VerticalToHorizonDialog::~VerticalToHorizonDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool VerticalToHorizonDialog::getConfirmState()
|
||||
{
|
||||
return isConfirmed;
|
||||
}
|
||||
|
||||
void VerticalToHorizonDialog::on_cancel_Btn_clicked()
|
||||
{
|
||||
isConfirmed = false;
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void VerticalToHorizonDialog::on_confirm_Btn_clicked()
|
||||
{
|
||||
isConfirmed = true;
|
||||
this->close();
|
||||
}
|
||||
|
||||
void VerticalToHorizonDialog::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(),QColor(0,0,0,100));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void VerticalToHorizonDialog::changeEvent(QEvent* event)
|
||||
{
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::LanguageChange:
|
||||
{
|
||||
E_LANGUAGE language = LanguageManager::getInstance()->getCurrentLanguage();
|
||||
switch(language)
|
||||
{
|
||||
case Chinese_E:
|
||||
ui->leftText_label->setVisible(true);
|
||||
ui->middleText_label->setVisible(true);
|
||||
ui->rightText_label->setVisible(true);
|
||||
ui->English1_label->setVisible(false);
|
||||
ui->english2_label->setVisible(false);
|
||||
ui->tip_label->setText("Tips");
|
||||
ui->confirm_Btn->setText("Confirm");
|
||||
ui->cancel_Btn->setText("Cancel");
|
||||
|
||||
break;
|
||||
case English_E:
|
||||
ui->leftText_label->setVisible(false);
|
||||
ui->middleText_label->setVisible(false);
|
||||
ui->rightText_label->setVisible(false);
|
||||
ui->English1_label->setVisible(true);
|
||||
ui->English1_label->move(80,420);
|
||||
ui->english2_label->setVisible(true);
|
||||
ui->english2_label->move(120,460);
|
||||
ui->tip_label->setText("提示");
|
||||
ui->confirm_Btn->setText("确认");
|
||||
ui->cancel_Btn->setText("取消");
|
||||
break;
|
||||
}
|
||||
ui->retranslateUi(this);
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
QWidget::changeEvent(event);
|
||||
break;
|
||||
}
|
||||
//避免刚开始中文时,有英文
|
||||
E_LANGUAGE language = LanguageManager::getInstance()->getCurrentLanguage();
|
||||
if(language == Chinese_E)
|
||||
{
|
||||
ui->English1_label->setVisible(false);
|
||||
ui->english2_label->setVisible(false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
34
ZBD_IIIDL_S_Project/Src/PopDialog/verticaltohorizondialog.h
Normal file
34
ZBD_IIIDL_S_Project/Src/PopDialog/verticaltohorizondialog.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef VERTICALTOHORIZONDIALOG_H
|
||||
#define VERTICALTOHORIZONDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class VerticalToHorizonDialog;
|
||||
}
|
||||
|
||||
class VerticalToHorizonDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit VerticalToHorizonDialog(QWidget *parent = nullptr);
|
||||
~VerticalToHorizonDialog();
|
||||
|
||||
bool getConfirmState();
|
||||
|
||||
virtual void changeEvent(QEvent* event);
|
||||
private slots:
|
||||
void on_cancel_Btn_clicked();
|
||||
|
||||
void on_confirm_Btn_clicked();
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
bool isConfirmed;
|
||||
|
||||
private:
|
||||
Ui::VerticalToHorizonDialog *ui;
|
||||
};
|
||||
|
||||
#endif // VERTICALTOHORIZONDIALOG_H
|
||||
268
ZBD_IIIDL_S_Project/Src/PopDialog/verticaltohorizondialog.ui
Normal file
268
ZBD_IIIDL_S_Project/Src/PopDialog/verticaltohorizondialog.ui
Normal file
@@ -0,0 +1,268 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>VerticalToHorizonDialog</class>
|
||||
<widget class="QDialog" name="VerticalToHorizonDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>558</x>
|
||||
<y>240</y>
|
||||
<width>804</width>
|
||||
<height>598</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#groupBox{background: #FFFFFF;
|
||||
border-radius: 8px;}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>64</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: #DDECFC;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius:8px</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QLabel" name="tip_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>10</y>
|
||||
<width>91</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>-1</pointsize>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 44px;
|
||||
height: 22px;
|
||||
font-size: 22px;
|
||||
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: 33px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提示</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>110</y>
|
||||
<width>396</width>
|
||||
<height>271</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-image: url(:/DependFile/Source/trainDisplayPage/VerticalToHorizontal.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="middleText_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>390</x>
|
||||
<y>430</y>
|
||||
<width>61</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 308px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
|
||||
font-weight: 400;
|
||||
|
||||
color: #0D9DDB;
|
||||
line-height: 42px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>正向</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="rightText_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>460</x>
|
||||
<y>430</y>
|
||||
<width>341</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 308px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
|
||||
font-weight: 400;
|
||||
color: #8C8C8C;
|
||||
line-height: 42px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>旋转至水平进行训练</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="leftText_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>430</y>
|
||||
<width>341</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 308px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
|
||||
font-weight: 400;
|
||||
color: #8C8C8C;
|
||||
line-height: 42px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>请将上肢训练部分由垂直</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="confirm_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>404</x>
|
||||
<y>540</y>
|
||||
<width>401</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/rightBtn.png);
|
||||
color:white;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>确认</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="cancel_Btn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>540</y>
|
||||
<width>401</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>黑体</family>
|
||||
<pointsize>15</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/DependFile/Source/channel/leftBtn.png);
|
||||
color:white;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="english2_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>500</y>
|
||||
<width>601</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 308px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
|
||||
font-weight: 400;
|
||||
color: #8C8C8C;
|
||||
line-height: 42px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>from horizontal to vertical for training</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="English1_label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>470</y>
|
||||
<width>621</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">width: 308px;
|
||||
height: 28px;
|
||||
font-size: 28px;
|
||||
|
||||
font-weight: 400;
|
||||
color: #8C8C8C;
|
||||
line-height: 42px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Please rotate the upper limb training part</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user