forked from ccsens_hardware/qt_qcp_show
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
47 lines
1.2 KiB
#include "mainwidget.h"
|
|
#include "ui_mainwidget.h"
|
|
#include <QtCore>
|
|
#include "httpservice.h"
|
|
|
|
MainWidget::MainWidget(QWidget *parent) :
|
|
QWidget(parent),
|
|
ui(new Ui::MainWidget)
|
|
{
|
|
ui->setupUi(this);
|
|
}
|
|
|
|
MainWidget::~MainWidget()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void MainWidget::onWsConnectedStatusChanged(int status)
|
|
{
|
|
qDebug() << "MainWidget::onWsConnectedStatusChanged " << status;
|
|
}
|
|
|
|
void MainWidget::onNewPatientMergencyInfo(QString firstAidId, QString name, QString content, quint64 realCountDownInSeconds)
|
|
{
|
|
qDebug() << "MainWidget::onNewPatientMergencyInfo " << firstAidId << name << content << realCountDownInSeconds;
|
|
}
|
|
|
|
void MainWidget::onPatientMergencyStatusChanged(QString firstAidId,QString time, QString status)
|
|
{
|
|
//TODO firstAidId == null 选择倒计时最小的急救
|
|
|
|
qDebug() << "MainWidget::onPatientMergencyStatusChanged " << firstAidId << time << status;
|
|
|
|
if(status == 0){
|
|
return;
|
|
}
|
|
|
|
//发送信号,该信号与httpservice的updatestatus请求绑定
|
|
emit statusChanged(firstAidId,status);
|
|
|
|
//处理状态改变
|
|
if(status == 1){ //进行中(拍了一下按键)
|
|
|
|
}else if(status == 2){//服务环节结束
|
|
|
|
}
|
|
}
|
|
|