feat: Add water process in GUI.
This commit is contained in:
239
src/components/WaveWidget.cpp
Normal file
239
src/components/WaveWidget.cpp
Normal file
@@ -0,0 +1,239 @@
|
|||||||
|
#include "WaveWidget.h"
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QPainterPath>
|
||||||
|
#include <QTimer>
|
||||||
|
#include <qmath.h>
|
||||||
|
|
||||||
|
WaveWidget::WaveWidget(QWidget* parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
, mTimer(new QTimer(this))
|
||||||
|
, mWaveDirection()
|
||||||
|
, mValue(0)
|
||||||
|
, mYOffset(0)
|
||||||
|
, mScale(0)
|
||||||
|
, mMinValue(0)
|
||||||
|
, mMaxValue(100)
|
||||||
|
, mMinRadius(0)
|
||||||
|
, mText()
|
||||||
|
, mTextVisible(false)
|
||||||
|
, mRect()
|
||||||
|
{
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
WaveWidget::~WaveWidget()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaveWidget::resizeEvent(QResizeEvent* aEvent)
|
||||||
|
{
|
||||||
|
mMinRadius = qMin(width(), height()) / 2;
|
||||||
|
mRect = QRect(-mMinRadius, -mMinRadius, mMinRadius * 2 - 60, mMinRadius * 2);
|
||||||
|
QWidget::resizeEvent(aEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaveWidget::paintEvent(QPaintEvent* aEvent)
|
||||||
|
{
|
||||||
|
Q_UNUSED(aEvent);
|
||||||
|
mScale = (qreal)(qAbs(mValue - mMinValue)) / (qAbs(mMaxValue - mMinValue));
|
||||||
|
QPainter painter(this);
|
||||||
|
painter.setRenderHint(QPainter::Antialiasing,true);
|
||||||
|
//p.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
|
||||||
|
painter.translate(width() / 2, height() / 4);
|
||||||
|
drawBackground(&painter);
|
||||||
|
drawWater(&painter);
|
||||||
|
drawText(&painter);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaveWidget::drawBackground(QPainter* painter)
|
||||||
|
{
|
||||||
|
painter->save();
|
||||||
|
|
||||||
|
QPen pen;
|
||||||
|
pen.setWidth(3);
|
||||||
|
pen.setColor(Qt::gray);
|
||||||
|
pen.setStyle(Qt::SolidLine);
|
||||||
|
painter->setPen(pen);
|
||||||
|
//painter->setPen(Qt::NoPen);
|
||||||
|
//painter->setBrush(QColor(40, 40, 40));
|
||||||
|
painter->drawPie(mRect, 180*16, 180 * 16);
|
||||||
|
painter->restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaveWidget::drawText(QPainter* aPainter)
|
||||||
|
{
|
||||||
|
if (mTextVisible)
|
||||||
|
{
|
||||||
|
aPainter->save();
|
||||||
|
mText = QString("%1%").arg(mScale * 100,2,'f', 1);
|
||||||
|
//设置字体大小
|
||||||
|
//QFont font = painter->font();
|
||||||
|
//font.setPixelSize(30);
|
||||||
|
//painter->setFont(font);
|
||||||
|
//设置画笔
|
||||||
|
aPainter->setPen(QPen(Qt::white, 4));
|
||||||
|
//绘制文本
|
||||||
|
// QRect r(-d->minRadius, -d->minRadius, d->minRadius * 2, d->minRadius * 2);
|
||||||
|
aPainter->drawText(mRect, Qt::AlignCenter, mText);
|
||||||
|
|
||||||
|
aPainter->restore();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaveWidget::drawWater(QPainter* aPainter)
|
||||||
|
{
|
||||||
|
if (mValue == mMinValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (mValue >= 50)
|
||||||
|
{
|
||||||
|
aPainter->save();
|
||||||
|
//painter->setPen(Qt::NoPen);
|
||||||
|
QLinearGradient lineGrad(QPointF(0, 0), QPointF(0, mMinRadius * 2));
|
||||||
|
lineGrad.setColorAt(0,QColor(0,170,255,255));
|
||||||
|
lineGrad.setColorAt(1,QColor(0,0,0,255));
|
||||||
|
lineGrad.setSpread(QGradient::PadSpread);
|
||||||
|
aPainter->setBrush(lineGrad);
|
||||||
|
//painter->setBrush(QBrush(QColor(0,170,255, 230)));
|
||||||
|
aPainter->drawPie(mRect , 180*16, 180 * 16);
|
||||||
|
aPainter->restore();
|
||||||
|
}
|
||||||
|
else//画波浪
|
||||||
|
{
|
||||||
|
int side = qMin(width(), height());
|
||||||
|
int height = side/2 - mScale * side;
|
||||||
|
aPainter->save();
|
||||||
|
QPainterPath wavePath; //波浪区域
|
||||||
|
QPainterPath wavePath2; //波浪区域
|
||||||
|
|
||||||
|
//1.8 角速度
|
||||||
|
//4 振幅
|
||||||
|
//height y轴相对远点偏移
|
||||||
|
//d->yOffset x=0时的相位;反映在坐标系上则为图像的左右移动。
|
||||||
|
//x * M_PI / 180 把x当做角度,转成弧度
|
||||||
|
wavePath.moveTo(-mMinRadius, mMinRadius); //第一点坐标为(0,height);
|
||||||
|
for (int x = -mMinRadius; x <= mMinRadius; x++) //x从0~w的值而改变,从而得到正弦曲线
|
||||||
|
{
|
||||||
|
double waveY = 4 * qSin(0.9 * (x * M_PI / 180 + mYOffset)) + height;// waveY随着x的值改变而改变,从而得到正弦曲线
|
||||||
|
wavePath.lineTo(x, waveY); //从上一个绘制点画一条线到(x,waveY);
|
||||||
|
}
|
||||||
|
wavePath.lineTo(mMinRadius, mMinRadius); //右下角,坐标(width, height),移动到右下角结束点,整体形成一个闭合路径
|
||||||
|
|
||||||
|
wavePath2.moveTo(-mMinRadius, mMinRadius);//第一点坐标为(0,height);
|
||||||
|
for (int x = -mMinRadius; x <= mMinRadius; x++) //x从0~w的值而改变,从而得到正弦曲线
|
||||||
|
{
|
||||||
|
double waveY = 4 * qSin(0.9 * (x * M_PI / 180 + mYOffset + 2)) + height;// waveY随着x的值改变而改变,从而得到正弦曲线
|
||||||
|
wavePath2.lineTo(x, waveY); //从上一个绘制点画一条线到(x,waveY);
|
||||||
|
}
|
||||||
|
wavePath2.lineTo(mMinRadius, mMinRadius); //右下角,坐标(width, height),移动到右下角结束点,整体形成一个闭合路径
|
||||||
|
|
||||||
|
QPainterPath bigPath;
|
||||||
|
bigPath.addEllipse(mRect);
|
||||||
|
wavePath = bigPath.intersected(wavePath);
|
||||||
|
wavePath2 = bigPath.intersected(wavePath2);
|
||||||
|
|
||||||
|
aPainter->setPen(Qt::NoPen);
|
||||||
|
|
||||||
|
aPainter->setBrush(QBrush(QColor(100, 184, 255, 80)));
|
||||||
|
aPainter->drawPath(wavePath); //绘制路径
|
||||||
|
|
||||||
|
QLinearGradient lineGrad(QPointF(0, 0), QPointF(0, mMinRadius * 2));
|
||||||
|
lineGrad.setColorAt(0,QColor(0,170,255,255));
|
||||||
|
lineGrad.setColorAt(1,QColor(0,0,0,255));
|
||||||
|
lineGrad.setSpread(QGradient::PadSpread);
|
||||||
|
aPainter->setBrush(lineGrad);
|
||||||
|
//painter->setBrush(QBrush(QColor(0,170,255, 230)));
|
||||||
|
aPainter->drawPath(wavePath2); //绘制路径
|
||||||
|
aPainter->restore();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int WaveWidget::minimum() const
|
||||||
|
{
|
||||||
|
return mMinValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
int WaveWidget::maximum() const
|
||||||
|
{
|
||||||
|
return mMaxValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
int WaveWidget::value() const
|
||||||
|
{
|
||||||
|
return mValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString WaveWidget::text() const
|
||||||
|
{
|
||||||
|
return mText;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaveWidget::setTextVisible(bool aVisible)
|
||||||
|
{
|
||||||
|
mTextVisible = aVisible;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WaveWidget::isTextVisible() const
|
||||||
|
{
|
||||||
|
return mTextVisible;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaveWidget::reset()
|
||||||
|
{
|
||||||
|
mMinValue = 0;
|
||||||
|
mMaxValue = 100;
|
||||||
|
}
|
||||||
|
void WaveWidget::setRange(int aMinimum, int aMaximum)
|
||||||
|
{
|
||||||
|
mMinValue = aMinimum;
|
||||||
|
mMaxValue = aMaximum;
|
||||||
|
mValue = aMinimum;
|
||||||
|
}
|
||||||
|
void WaveWidget::setMinimum(int aMinimum)
|
||||||
|
{
|
||||||
|
mMinValue = aMinimum;
|
||||||
|
mValue = aMinimum;
|
||||||
|
}
|
||||||
|
void WaveWidget::setMaximum(int aMaximum)
|
||||||
|
{
|
||||||
|
mMaxValue = aMaximum;
|
||||||
|
}
|
||||||
|
void WaveWidget::setValue(int aValue)
|
||||||
|
{
|
||||||
|
if (aValue != mValue)
|
||||||
|
{
|
||||||
|
mValue = aValue;
|
||||||
|
emit valueChanged(aValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaveWidget::startCharge(int aValue, WaveDirection aDirection)
|
||||||
|
{
|
||||||
|
mValue = aValue;
|
||||||
|
mWaveDirection = aDirection;
|
||||||
|
connect(mTimer, &QTimer::timeout, this, &WaveWidget::updaterWater);
|
||||||
|
mTimer->start(30);
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaveWidget::stopCharge()
|
||||||
|
{
|
||||||
|
disconnect(mTimer, &QTimer::timeout, this, &WaveWidget::updaterWater);
|
||||||
|
mTimer->stop();
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaveWidget::updaterWater()
|
||||||
|
{
|
||||||
|
mYOffset += 0.3;//波浪偏移
|
||||||
|
mValue += mWaveDirection * 0.025;
|
||||||
|
if (mValue >= 51 || mValue <0)
|
||||||
|
{
|
||||||
|
mYOffset = 0;
|
||||||
|
//d->value=0;
|
||||||
|
disconnect(mTimer, &QTimer::timeout, this, &WaveWidget::updaterWater);
|
||||||
|
emit closeSwitch();
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
}
|
||||||
64
src/components/WaveWidget.h
Normal file
64
src/components/WaveWidget.h
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#ifndef WAVEWIDGET_H
|
||||||
|
#define WAVEWIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
enum WaveDirection
|
||||||
|
{
|
||||||
|
DownWaveDirection = -1, UpWaveDirection = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
class WaveWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit WaveWidget(QWidget* aParent = nullptr);
|
||||||
|
~WaveWidget() override;
|
||||||
|
int minimum() const;
|
||||||
|
int maximum() const;
|
||||||
|
|
||||||
|
int value() const;
|
||||||
|
|
||||||
|
virtual QString text() const;
|
||||||
|
void setTextVisible(bool aVisible);
|
||||||
|
bool isTextVisible() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void resizeEvent(QResizeEvent* aEvent) override;
|
||||||
|
void paintEvent(QPaintEvent* aEvent) override;
|
||||||
|
void drawBackground(QPainter* aPainter);
|
||||||
|
void drawText(QPainter* aPainter);
|
||||||
|
void drawWater(QPainter* aPainter);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void updaterWater();
|
||||||
|
|
||||||
|
void reset();
|
||||||
|
void setRange(int minimum, int maximum);
|
||||||
|
void setMinimum(int minimum);
|
||||||
|
void setMaximum(int maximum);
|
||||||
|
void setValue(int value);
|
||||||
|
|
||||||
|
|
||||||
|
void startCharge(int aValue, WaveDirection aDirection);
|
||||||
|
void stopCharge();
|
||||||
|
Q_SIGNALS:
|
||||||
|
void valueChanged(int aValue);
|
||||||
|
void closeSwitch();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QTimer* mTimer;
|
||||||
|
WaveDirection mWaveDirection;
|
||||||
|
qreal mValue;
|
||||||
|
qreal mYOffset;
|
||||||
|
qreal mScale;
|
||||||
|
int mMinValue;
|
||||||
|
int mMaxValue;
|
||||||
|
int mMinRadius;
|
||||||
|
QString mText;
|
||||||
|
bool mTextVisible;
|
||||||
|
QRect mRect;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WAVEWIDGET_H
|
||||||
103
src/components/ZFlashWidget.cpp
Normal file
103
src/components/ZFlashWidget.cpp
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
#include "ZFlashWidget.h"
|
||||||
|
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
|
#include "utilities/ScanProcessSequence.h"
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
const int ANIME_RECT_HEIGHT = 350;
|
||||||
|
const int ANIME_SPEED = 10;
|
||||||
|
const int RENFER_START_POINT = 640;
|
||||||
|
const int TOP_POINT_Y = 0;
|
||||||
|
const int BOTTOM_POINT_Y = 395;
|
||||||
|
}
|
||||||
|
|
||||||
|
ZFlashWidget::ZFlashWidget(QWidget* aParent)
|
||||||
|
: QWidget(aParent)
|
||||||
|
, mTimer(new QTimer(this))
|
||||||
|
, mRenderStartPoint(RENFER_START_POINT)
|
||||||
|
, mRenderEndPoint(mRenderStartPoint+ANIME_RECT_HEIGHT)
|
||||||
|
, mRenderDirectionUp(true)
|
||||||
|
, mRenderDirectionNumber(1)
|
||||||
|
, mStopGradientEnd(1)
|
||||||
|
, mMinRadius(0)
|
||||||
|
{
|
||||||
|
//setFixedSize(WIDGET_WIDTH,WIDGET_HEIGHT);
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZFlashWidget::resizeEvent(QResizeEvent* aEvent)
|
||||||
|
{
|
||||||
|
mMinRadius = qMin(width(), height()) / 2;
|
||||||
|
QWidget::resizeEvent(aEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZFlashWidget::paintEvent(QPaintEvent* aEvent)
|
||||||
|
{
|
||||||
|
Q_UNUSED(aEvent);
|
||||||
|
QPainter p(this);
|
||||||
|
|
||||||
|
p.translate(width() / 2, height() / 4);
|
||||||
|
QRect rect(-mMinRadius, -mMinRadius, mMinRadius * 2 - 60, mMinRadius * 2);
|
||||||
|
p.setRenderHint(QPainter::Antialiasing,true);
|
||||||
|
QLinearGradient lineGrad(QPointF(0, mRenderStartPoint), QPointF(0, mRenderEndPoint));
|
||||||
|
lineGrad.setColorAt(0,QColor(0,0,0,255));
|
||||||
|
lineGrad.setColorAt(0.1,QColor(0,170,255,255));
|
||||||
|
lineGrad.setColorAt(mStopGradientEnd,QColor(0,0,0,255));
|
||||||
|
lineGrad.setColorAt(1,QColor(0,0,0,255));
|
||||||
|
lineGrad.setSpread(QGradient::PadSpread);
|
||||||
|
p.setBrush(lineGrad);
|
||||||
|
|
||||||
|
QPen pen;
|
||||||
|
pen.setWidth(3);
|
||||||
|
pen.setColor(Qt::gray);
|
||||||
|
pen.setStyle(Qt::SolidLine);
|
||||||
|
p.setPen(pen);
|
||||||
|
p.drawPie(rect, 180*16, 180*16);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZFlashWidget::startFlash()
|
||||||
|
{
|
||||||
|
show();
|
||||||
|
connect(mTimer,&QTimer::timeout,this, &ZFlashWidget::updateFlash);
|
||||||
|
mTimer->start(20);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZFlashWidget::stopFlash()
|
||||||
|
{
|
||||||
|
mTimer->stop();
|
||||||
|
disconnect(mTimer,&QTimer::timeout,this, &ZFlashWidget::updateFlash);
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ZFlashWidget::updateFlash()
|
||||||
|
{
|
||||||
|
if(mRenderEndPoint <= TOP_POINT_Y && mRenderDirectionUp)
|
||||||
|
{
|
||||||
|
mRenderDirectionUp = false;
|
||||||
|
mRenderDirectionNumber *= -1;
|
||||||
|
mRenderStartPoint = mRenderDirectionNumber * ANIME_SPEED + TOP_POINT_Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(mRenderEndPoint >= BOTTOM_POINT_Y && !mRenderDirectionUp)
|
||||||
|
{
|
||||||
|
mRenderDirectionUp = true;
|
||||||
|
mRenderDirectionNumber *= -1;
|
||||||
|
mRenderStartPoint = BOTTOM_POINT_Y - ANIME_SPEED;
|
||||||
|
}
|
||||||
|
|
||||||
|
mRenderStartPoint -= mRenderDirectionNumber*ANIME_SPEED;
|
||||||
|
mRenderEndPoint = mRenderStartPoint + mRenderDirectionNumber*ANIME_RECT_HEIGHT;
|
||||||
|
this->update();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ZFlashWidget::quit()
|
||||||
|
{
|
||||||
|
disconnect(mTimer,&QTimer::timeout,this, &ZFlashWidget::updateFlash);
|
||||||
|
mTimer->stop();
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
|
||||||
38
src/components/ZFlashWidget.h
Normal file
38
src/components/ZFlashWidget.h
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#ifndef ZFLASHWIDGET_H
|
||||||
|
#define ZFLASHWIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
class QTimer;
|
||||||
|
|
||||||
|
class ZFlashWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
ZFlashWidget(QWidget* aParent);
|
||||||
|
void setBlinkPoint(int aZ);
|
||||||
|
void stopFlash();
|
||||||
|
void startFlash();
|
||||||
|
|
||||||
|
void quit();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent* aEvent) override;
|
||||||
|
void resizeEvent(QResizeEvent* aEvent) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void updateFlash();
|
||||||
|
void updateStopFlash();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QTimer* mTimer;
|
||||||
|
int mRenderStartPoint;
|
||||||
|
int mRenderEndPoint;
|
||||||
|
bool mRenderDirectionUp;
|
||||||
|
int mRenderDirectionNumber;
|
||||||
|
double mStopGradientEnd;
|
||||||
|
int mMinRadius;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ZFLASHWIDGET_H
|
||||||
@@ -40,7 +40,7 @@ namespace
|
|||||||
const unsigned int GET_TEMPERATURE_TIME = 60000;
|
const unsigned int GET_TEMPERATURE_TIME = 60000;
|
||||||
const int CHECK_RECON_CONNECTION_TIME = 30000;
|
const int CHECK_RECON_CONNECTION_TIME = 30000;
|
||||||
const int SHUT_DOWN_TIMEOUT = 180000;//3 minitues
|
const int SHUT_DOWN_TIMEOUT = 180000;//3 minitues
|
||||||
const int PUMP_TIMEOUT = 3000;//3 seconds
|
const int WATERPROCESS_TIMEOUT = 3000;//3 seconds
|
||||||
const int GETDMSVERSION_TIMEOUT = 5000;
|
const int GETDMSVERSION_TIMEOUT = 5000;
|
||||||
const int EFFECTIVE_POSITION_RADIUS = 125;
|
const int EFFECTIVE_POSITION_RADIUS = 125;
|
||||||
const int EFFECTIVE_POSITION_Z_START = 150;
|
const int EFFECTIVE_POSITION_Z_START = 150;
|
||||||
@@ -113,10 +113,10 @@ void DeviceManager::initDevice()
|
|||||||
//shutdown
|
//shutdown
|
||||||
connect(EventCenter::Default(), &EventCenter::RequestShutdown, this, &DeviceManager::shutdownDms);
|
connect(EventCenter::Default(), &EventCenter::RequestShutdown, this, &DeviceManager::shutdownDms);
|
||||||
//Drainage
|
//Drainage
|
||||||
connect(EventCenter::Default(), &EventCenter::RequestDrainage, this, [this](QObject* sender, QObject* detail)
|
connect(EventCenter::Default(), &EventCenter::RequestDrainage, this, &DeviceManager::startDrainage);
|
||||||
{
|
connect(EventCenter::Default(), &EventCenter::RequestWaterflood, this, &DeviceManager::startWaterflood);
|
||||||
controlDrainage(*(QString*)detail);
|
connect(EventCenter::Default(), &EventCenter::RequestWaterClean, this, &DeviceManager::startWaterClean);
|
||||||
});
|
connect(EventCenter::Default(), &EventCenter::RequestWaterModeExit, this, &DeviceManager::exitWaterProcess);
|
||||||
//AutoLocate
|
//AutoLocate
|
||||||
connect(EventCenter::Default(), &EventCenter::StartScanProcess, this, &DeviceManager::startScanProcess);
|
connect(EventCenter::Default(), &EventCenter::StartScanProcess, this, &DeviceManager::startScanProcess);
|
||||||
connect(EventCenter::Default(), &EventCenter::StopScanProcess, this, &DeviceManager::stopScanProcess);
|
connect(EventCenter::Default(), &EventCenter::StopScanProcess, this, &DeviceManager::stopScanProcess);
|
||||||
@@ -140,8 +140,30 @@ void DeviceManager::initDevice()
|
|||||||
mGetDeviceTemperatureAction = new DmsAsyncAction(USRV_SCAN, ACT_SCAN_TEMP, this, "responseGetDeviceTemperature(const QString&)", this);
|
mGetDeviceTemperatureAction = new DmsAsyncAction(USRV_SCAN, ACT_SCAN_TEMP, this, "responseGetDeviceTemperature(const QString&)", this);
|
||||||
mShutDownAction = new DmsAsyncAction(USRV_CONTROL, ACT_CTL_PWRDOWN, this, "responseShutDown(const QString&)", this);
|
mShutDownAction = new DmsAsyncAction(USRV_CONTROL, ACT_CTL_PWRDOWN, this, "responseShutDown(const QString&)", this);
|
||||||
mShutDownAction->setTimeoutInterval(SHUT_DOWN_TIMEOUT);
|
mShutDownAction->setTimeoutInterval(SHUT_DOWN_TIMEOUT);
|
||||||
mPumpControlAction = new DmsAsyncAction(USRV_CONTROL, ACT_CTL_PUMP, this, "responsePumpControl(const QString&)", this);
|
mDrainageControlAction = new DmsAsyncAction(USRV_CONTROL, ACT_CTL_WDRAIN, this, "responseDrainageControl(const QString&)", this);
|
||||||
mPumpControlAction->setTimeoutInterval(PUMP_TIMEOUT);
|
mDrainageControlAction->setTimeoutInterval(WATERPROCESS_TIMEOUT);
|
||||||
|
connect(mDrainageControlAction, &DmsAsyncAction::timeout, [this]()
|
||||||
|
{
|
||||||
|
this->processDrainageResult("{\"code\":-1}");
|
||||||
|
});
|
||||||
|
mWaterfloodAction = new DmsAsyncAction(USRV_CONTROL, ACT_CTL_WINJECT, this, "responseWaterflood(const QString&)", this);
|
||||||
|
mWaterfloodAction->setTimeoutInterval(WATERPROCESS_TIMEOUT);
|
||||||
|
connect(mWaterfloodAction, &DmsAsyncAction::timeout, [this]()
|
||||||
|
{
|
||||||
|
this->processWaterfloodResult("{\"code\":-1}");
|
||||||
|
});
|
||||||
|
mWaterCleanAction = new DmsAsyncAction(USRV_CONTROL, ACT_CTL_WCLEAN, this, "responseWaterclean(const QString&)", this);
|
||||||
|
mWaterCleanAction->setTimeoutInterval(WATERPROCESS_TIMEOUT);
|
||||||
|
connect(mWaterCleanAction, &DmsAsyncAction::timeout, [this]()
|
||||||
|
{
|
||||||
|
this->processWaterCleanResult("{\"code\":-1}");
|
||||||
|
});
|
||||||
|
mWaterProcessExitAction = new DmsAsyncAction(USRV_CONTROL, ACT_CTL_WEXIT, this, "responseWaterProcessExit", this);
|
||||||
|
mWaterProcessExitAction->setTimeoutInterval(WATERPROCESS_TIMEOUT);
|
||||||
|
connect(mWaterProcessExitAction, &DmsAsyncAction::timeout, [this]()
|
||||||
|
{
|
||||||
|
this->processWaterProcessExitResult("{\"code\":-1}");
|
||||||
|
});
|
||||||
mGetAutoLocatePositionAction = new DmsAsyncAction(USRV_CONTROL, ACT_CTL_MOTION_POSITION, this, "responseGetAutoLocatePosition(const QString&)", this);
|
mGetAutoLocatePositionAction = new DmsAsyncAction(USRV_CONTROL, ACT_CTL_MOTION_POSITION, this, "responseGetAutoLocatePosition(const QString&)", this);
|
||||||
mGetSoftwareVersionAction = new DmsAsyncAction(USRV_INFOCFG, ACT_IFCFG_VERINFO, this,"responseGetSoftwareVersion(const QString&)", this);
|
mGetSoftwareVersionAction = new DmsAsyncAction(USRV_INFOCFG, ACT_IFCFG_VERINFO, this,"responseGetSoftwareVersion(const QString&)", this);
|
||||||
mGetSoftwareVersionAction->setTimeoutInterval(GETDMSVERSION_TIMEOUT);
|
mGetSoftwareVersionAction->setTimeoutInterval(GETDMSVERSION_TIMEOUT);
|
||||||
@@ -150,10 +172,6 @@ void DeviceManager::initDevice()
|
|||||||
{
|
{
|
||||||
emit getDmsVersionResponsed("DMS Version Fetch Error");
|
emit getDmsVersionResponsed("DMS Version Fetch Error");
|
||||||
});
|
});
|
||||||
connect(mPumpControlAction, &DmsAsyncAction::timeout, [this]()
|
|
||||||
{
|
|
||||||
this->processPumpResult("{\"code\":-1}");
|
|
||||||
});
|
|
||||||
connect(mGetScanProgressAction, &DmsAsyncAction::timeout, this, &DeviceManager::scanTimeout);
|
connect(mGetScanProgressAction, &DmsAsyncAction::timeout, this, &DeviceManager::scanTimeout);
|
||||||
connect(mShutDownAction, &DmsAsyncAction::timeout, this, &DeviceManager::shutdownDmsFailed);
|
connect(mShutDownAction, &DmsAsyncAction::timeout, this, &DeviceManager::shutdownDmsFailed);
|
||||||
connect(mGetAutoLocatePositionAction, &DmsAsyncAction::timeout, [this]()
|
connect(mGetAutoLocatePositionAction, &DmsAsyncAction::timeout, [this]()
|
||||||
@@ -728,9 +746,24 @@ void DeviceManager::processReceiveDMSInfoResult(int aServerID, int aActionID, co
|
|||||||
case USRV_CONTROL:
|
case USRV_CONTROL:
|
||||||
switch(aActionID)
|
switch(aActionID)
|
||||||
{
|
{
|
||||||
case ACT_CTL_PUMP:
|
case ACT_CTL_WDRAIN:
|
||||||
emit responsePumpControl(aContents);
|
emit responseDrainageControl(aContents);
|
||||||
processPumpResult(aContents);
|
processDrainageResult(aContents);
|
||||||
|
break;
|
||||||
|
case ACT_CTL_WINJECT:
|
||||||
|
emit responseWaterflood(aContents);
|
||||||
|
processWaterfloodResult(aContents);
|
||||||
|
break;
|
||||||
|
case ACT_CTL_WCLEAN:
|
||||||
|
emit responseWaterclean(aContents);
|
||||||
|
processWaterCleanResult(aContents);
|
||||||
|
break;
|
||||||
|
case ACT_CTL_WEXIT:
|
||||||
|
emit responseWaterProcessExit(aContents);
|
||||||
|
processWaterProcessExitResult(aContents);
|
||||||
|
break;
|
||||||
|
case ACT_CTL_WRESPOSE:
|
||||||
|
processWaterProcessFinishedResult(aContents);
|
||||||
break;
|
break;
|
||||||
case ACT_CTL_PWRDOWN:
|
case ACT_CTL_PWRDOWN:
|
||||||
emit responseShutDown(aContents);
|
emit responseShutDown(aContents);
|
||||||
@@ -1125,31 +1158,109 @@ bool DeviceManager::getCEStatus()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceManager::controlDrainage(const QString& aCode)
|
void DeviceManager::startDrainage()
|
||||||
{
|
{
|
||||||
mPumpControlAction->setSendData(QString("{\"valve\":%1}").arg(aCode));
|
if(!mDrainageControlAction->execute())
|
||||||
if(!mPumpControlAction->execute())
|
|
||||||
{
|
{
|
||||||
emit startPumpControlResult(false);
|
emit startDrainageControlResult(false);
|
||||||
QString msg = tr("Open pump failed.");
|
QString msg = tr("Open pump failed.");
|
||||||
THROW_ERROR(msg);
|
THROW_ERROR(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceManager::processPumpResult(const QString& aResponse)
|
void DeviceManager::processDrainageResult(const QString& aResponse)
|
||||||
{
|
{
|
||||||
QJsonObject jsonObj = toJsonObject(aResponse);
|
QJsonObject jsonObj = toJsonObject(aResponse);
|
||||||
if(jsonObj["code"].toInt() == 0 )
|
if(jsonObj["code"].toInt() == 0 )
|
||||||
{
|
{
|
||||||
emit startPumpControlResult(true);
|
emit startDrainageControlResult(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
emit startPumpControlResult(false);
|
emit startDrainageControlResult(false);
|
||||||
QString msg = tr("Open pump failed.");
|
QString msg = tr("Open pump failed.");
|
||||||
THROW_ERROR(msg);
|
THROW_ERROR(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DeviceManager::startWaterflood()
|
||||||
|
{
|
||||||
|
if(!mWaterfloodAction->execute())
|
||||||
|
{
|
||||||
|
emit startWaterfloodResult(false);
|
||||||
|
QString msg = tr("Water injection failed.");
|
||||||
|
THROW_ERROR(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceManager::processWaterfloodResult(const QString &aResponse)
|
||||||
|
{
|
||||||
|
QJsonObject jsonObj = toJsonObject(aResponse);
|
||||||
|
if(jsonObj["code"].toInt() == 0 )
|
||||||
|
{
|
||||||
|
emit startWaterfloodResult(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
emit startWaterfloodResult(false);
|
||||||
|
QString msg = tr("Water injection failed.");
|
||||||
|
THROW_ERROR(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceManager::startWaterClean()
|
||||||
|
{
|
||||||
|
if(!mWaterCleanAction->execute())
|
||||||
|
{
|
||||||
|
emit startWaterCleanResult(false);
|
||||||
|
QString msg = tr("Cleaning failed.");
|
||||||
|
THROW_ERROR(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceManager::processWaterCleanResult(const QString &aResponse)
|
||||||
|
{
|
||||||
|
QJsonObject jsonObj = toJsonObject(aResponse);
|
||||||
|
if(jsonObj["code"].toInt() == 0 )
|
||||||
|
{
|
||||||
|
emit startWaterCleanResult(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
emit startWaterCleanResult(false);
|
||||||
|
QString msg = tr("Cleaning failed.");
|
||||||
|
THROW_ERROR(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceManager::exitWaterProcess()
|
||||||
|
{
|
||||||
|
if(!mWaterProcessExitAction->execute())
|
||||||
|
{
|
||||||
|
emit exitWaterProcessResult(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceManager::processWaterProcessExitResult(const QString &aResponse)
|
||||||
|
{
|
||||||
|
QJsonObject jsonObj = toJsonObject(aResponse);
|
||||||
|
if(jsonObj["code"].toInt() == 0 )
|
||||||
|
{
|
||||||
|
emit exitWaterProcessResult(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
emit exitWaterProcessResult(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeviceManager::processWaterProcessFinishedResult(const QString &aResponse)
|
||||||
|
{
|
||||||
|
QJsonObject jsonObj = toJsonObject(aResponse);
|
||||||
|
if(jsonObj["code"].toInt() == 0 )
|
||||||
|
{
|
||||||
|
emit waterProcessFinishedResult(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit waterProcessFinishedResult(false);
|
||||||
|
}
|
||||||
|
|
||||||
void DeviceManager::updateReconConnectionState(bool aIsConnected)
|
void DeviceManager::updateReconConnectionState(bool aIsConnected)
|
||||||
{
|
{
|
||||||
EventCenter::Default()->triggerEvent(ReconConnectionUpdated, nullptr, (QObject*)&aIsConnected);
|
EventCenter::Default()->triggerEvent(ReconConnectionUpdated, nullptr, (QObject*)&aIsConnected);
|
||||||
|
|||||||
@@ -104,7 +104,10 @@ private:
|
|||||||
bool getCEStatus();
|
bool getCEStatus();
|
||||||
bool startCEScan();
|
bool startCEScan();
|
||||||
void initEmptyScanMeasurementID();
|
void initEmptyScanMeasurementID();
|
||||||
void controlDrainage(const QString& aCode);
|
void startDrainage();
|
||||||
|
void startWaterflood();
|
||||||
|
void startWaterClean();
|
||||||
|
void exitWaterProcess();
|
||||||
void checkInitStatus();
|
void checkInitStatus();
|
||||||
bool startAutoLocate();
|
bool startAutoLocate();
|
||||||
void stopAutoLocate();
|
void stopAutoLocate();
|
||||||
@@ -120,7 +123,11 @@ private:
|
|||||||
void processPreviewData(const QString& aPreviewData);
|
void processPreviewData(const QString& aPreviewData);
|
||||||
void processDeviceTemperature(const QString& aResponseTemperature);
|
void processDeviceTemperature(const QString& aResponseTemperature);
|
||||||
void processShutDownDms(const QString& aResponse);
|
void processShutDownDms(const QString& aResponse);
|
||||||
void processPumpResult(const QString& aResponse);
|
void processDrainageResult(const QString& aResponse);
|
||||||
|
void processWaterfloodResult(const QString& aResponse);
|
||||||
|
void processWaterCleanResult(const QString& aResponse);
|
||||||
|
void processWaterProcessExitResult(const QString& aResponse);
|
||||||
|
void processWaterProcessFinishedResult(const QString& aResponse);
|
||||||
void processGetSoftwareVersion(const QString& aResponse);
|
void processGetSoftwareVersion(const QString& aResponse);
|
||||||
void processEmergencyButtonReset(const QString& aResponse);
|
void processEmergencyButtonReset(const QString& aResponse);
|
||||||
|
|
||||||
@@ -152,7 +159,10 @@ signals:
|
|||||||
void responsePreviewScan(const QString& aResponse);
|
void responsePreviewScan(const QString& aResponse);
|
||||||
void responseGetSoftwareVersion(const QString& aSoftwareVersion);
|
void responseGetSoftwareVersion(const QString& aSoftwareVersion);
|
||||||
void responseGetCEStatus(const QString& aProgress);
|
void responseGetCEStatus(const QString& aProgress);
|
||||||
void responsePumpControl(const QString& aResponse);
|
void responseDrainageControl(const QString& aResponse);
|
||||||
|
void responseWaterflood(const QString& aResponse);
|
||||||
|
void responseWaterclean(const QString& aResponse);
|
||||||
|
void responseWaterProcessExit(const QString& aResponse);
|
||||||
void responseSetSimulatorMode(const QString& aResponse);
|
void responseSetSimulatorMode(const QString& aResponse);
|
||||||
void responseSetHeartBeat(const QString& aResponese);
|
void responseSetHeartBeat(const QString& aResponese);
|
||||||
void responseShutDown(const QString& aResponse);
|
void responseShutDown(const QString& aResponse);
|
||||||
@@ -172,7 +182,11 @@ signals:
|
|||||||
void initializeFinished();
|
void initializeFinished();
|
||||||
void initializeProgress(const QString& aProgress);
|
void initializeProgress(const QString& aProgress);
|
||||||
void startPreviewScanResult(bool aIsSucessful);
|
void startPreviewScanResult(bool aIsSucessful);
|
||||||
void startPumpControlResult(bool aIsSucessful);
|
void startDrainageControlResult(bool aIsSucessful);
|
||||||
|
void startWaterfloodResult(bool aIsSucessful);
|
||||||
|
void startWaterCleanResult(bool aIsSucessful);
|
||||||
|
void exitWaterProcessResult(bool aIsSucessful);
|
||||||
|
void waterProcessFinishedResult(bool aIsSucessful);
|
||||||
void startAutoLocateResult(bool aIsSucessful);
|
void startAutoLocateResult(bool aIsSucessful);
|
||||||
void updateAutoLocatePosition(int aX, int aY, int aZ);
|
void updateAutoLocatePosition(int aX, int aY, int aZ);
|
||||||
void autolocatePositionEffective();
|
void autolocatePositionEffective();
|
||||||
@@ -222,7 +236,10 @@ private:
|
|||||||
DmsAsyncAction* mGetDeviceTemperatureAction = nullptr;
|
DmsAsyncAction* mGetDeviceTemperatureAction = nullptr;
|
||||||
DmsAsyncAction* mGetScanProgressAction = nullptr;
|
DmsAsyncAction* mGetScanProgressAction = nullptr;
|
||||||
DmsAsyncAction* mShutDownAction = nullptr;
|
DmsAsyncAction* mShutDownAction = nullptr;
|
||||||
DmsAsyncAction* mPumpControlAction = nullptr;
|
DmsAsyncAction* mDrainageControlAction = nullptr;
|
||||||
|
DmsAsyncAction* mWaterfloodAction = nullptr;
|
||||||
|
DmsAsyncAction* mWaterCleanAction = nullptr;
|
||||||
|
DmsAsyncAction* mWaterProcessExitAction = nullptr;
|
||||||
DmsAsyncAction* mGetAutoLocatePositionAction = nullptr;
|
DmsAsyncAction* mGetAutoLocatePositionAction = nullptr;
|
||||||
DmsAsyncAction* mGetSoftwareVersionAction = nullptr;
|
DmsAsyncAction* mGetSoftwareVersionAction = nullptr;
|
||||||
DmsAsyncAction* mEmergencyResetAction = nullptr;
|
DmsAsyncAction* mEmergencyResetAction = nullptr;
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ void DmsAsyncAction::sendTimeoutSignal()
|
|||||||
{
|
{
|
||||||
if(!mIsResponsed)
|
if(!mIsResponsed)
|
||||||
{
|
{
|
||||||
|
LOG_SYS_OPERATION(QString("GUI -> DMS : %1-%2, Time out.").arg(mServerId).arg(mActionId));
|
||||||
emit timeout();
|
emit timeout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,8 +93,17 @@ void InfoReceiveWorker::responsed(int aServerID, int aActionID)
|
|||||||
case USRV_CONTROL:
|
case USRV_CONTROL:
|
||||||
switch(aActionID)
|
switch(aActionID)
|
||||||
{
|
{
|
||||||
case ACT_CTL_PUMP:
|
case ACT_CTL_WDRAIN:
|
||||||
DeviceManager::Default()->mPumpControlAction->responsed();
|
DeviceManager::Default()->mDrainageControlAction->responsed();
|
||||||
|
break;
|
||||||
|
case ACT_CTL_WINJECT:
|
||||||
|
DeviceManager::Default()->mWaterfloodAction->responsed();
|
||||||
|
break;
|
||||||
|
case ACT_CTL_WCLEAN:
|
||||||
|
DeviceManager::Default()->mWaterCleanAction->responsed();
|
||||||
|
break;
|
||||||
|
case ACT_CTL_WEXIT:
|
||||||
|
DeviceManager::Default()->mWaterProcessExitAction->responsed();
|
||||||
break;
|
break;
|
||||||
case ACT_CTL_PWRDOWN:
|
case ACT_CTL_PWRDOWN:
|
||||||
DeviceManager::Default()->mShutDownAction->responsed();
|
DeviceManager::Default()->mShutDownAction->responsed();
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
|
|
||||||
//-------------------- 定义服务和动作 ---------------------------
|
//-------------------- 定义服务和动作 ---------------------------
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
USRV_NONE = 0,
|
USRV_NONE = 0,
|
||||||
USRV_SCAN, //扫查服务
|
USRV_SCAN, //扫查服务
|
||||||
USRV_XFR, //数据传输服务
|
USRV_XFR, //数据传输服务
|
||||||
@@ -17,7 +18,8 @@ enum{
|
|||||||
};
|
};
|
||||||
|
|
||||||
//扫查服务动作
|
//扫查服务动作
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
ACT_SCAN_NONE = 0,
|
ACT_SCAN_NONE = 0,
|
||||||
ACT_SCAN_RESP, //上报扫查状态(错误码,结束等)
|
ACT_SCAN_RESP, //上报扫查状态(错误码,结束等)
|
||||||
ACT_SCAN_PREVIEW, //预扫
|
ACT_SCAN_PREVIEW, //预扫
|
||||||
@@ -40,7 +42,8 @@ enum{
|
|||||||
};
|
};
|
||||||
|
|
||||||
//数据传输服务
|
//数据传输服务
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
ACT_XFR_NONE = 0,
|
ACT_XFR_NONE = 0,
|
||||||
ACT_XFR_RESP, //上报传输状态(错误码,结束等)
|
ACT_XFR_RESP, //上报传输状态(错误码,结束等)
|
||||||
ACT_XFR_START, //启动传输(含SRC和DST参数)
|
ACT_XFR_START, //启动传输(含SRC和DST参数)
|
||||||
@@ -52,7 +55,8 @@ enum{
|
|||||||
};
|
};
|
||||||
|
|
||||||
//信息与配置服务
|
//信息与配置服务
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
ACT_IFCFG_NONE = 0,
|
ACT_IFCFG_NONE = 0,
|
||||||
ACT_IFCFG_RESP, //默认的配置回复
|
ACT_IFCFG_RESP, //默认的配置回复
|
||||||
ACT_IFCFG_VERINFO, //GUI发给设备为请求数据,设备上报数据内容(软硬件版本,系统信息等一系列信息。)
|
ACT_IFCFG_VERINFO, //GUI发给设备为请求数据,设备上报数据内容(软硬件版本,系统信息等一系列信息。)
|
||||||
@@ -67,7 +71,8 @@ enum{
|
|||||||
//杂类控制和调试服务
|
//杂类控制和调试服务
|
||||||
//配置成不透传模式,则XX_RESP永远不会上传数据,有错误也是通过LOG发回来。
|
//配置成不透传模式,则XX_RESP永远不会上传数据,有错误也是通过LOG发回来。
|
||||||
//如果配置成透传,则所有结果都从XX_RESP再上报一次。XX_RESP的另外一个作用就是打包和判定是否需要上传。
|
//如果配置成透传,则所有结果都从XX_RESP再上报一次。XX_RESP的另外一个作用就是打包和判定是否需要上传。
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
ACT_CTL_NONE = 0,
|
ACT_CTL_NONE = 0,
|
||||||
ACT_CTL_MOTOR_CFG, //电机配置(0不透传,1透传)
|
ACT_CTL_MOTOR_CFG, //电机配置(0不透传,1透传)
|
||||||
ACT_CTL_MOTOR_CMD, //下发电机控制命令
|
ACT_CTL_MOTOR_CMD, //下发电机控制命令
|
||||||
@@ -91,13 +96,19 @@ enum{
|
|||||||
ACT_CTL_MOTION_STOP, //停止自动定位功能
|
ACT_CTL_MOTION_STOP, //停止自动定位功能
|
||||||
ACT_CTL_MOTION_POSITION, //查询自动定位状态(位置)
|
ACT_CTL_MOTION_POSITION, //查询自动定位状态(位置)
|
||||||
ACT_CTL_EMG_RESET, //复位急停按钮
|
ACT_CTL_EMG_RESET, //复位急停按钮
|
||||||
ACT_CTL_DRIVER, //驱动控制(加载卸载驱动)
|
ACT_CTL_WINJECT = 40, //注水
|
||||||
|
ACT_CTL_WDRAIN, //排水
|
||||||
|
ACT_CTL_WCLEAN, //清洁消毒
|
||||||
|
ACT_CTL_WRESPOSE, //动作结束反馈
|
||||||
|
ACT_CTL_WEXIT, //状态强制退出(都恢复到初始状态)
|
||||||
|
ACT_CTL_WSETERR, //模拟设置错误码
|
||||||
|
ACT_CTL_DRIVER = 100, //驱动控制(加载卸载驱动)
|
||||||
ACT_CTL_EXIT, //退出程序和守护进程
|
ACT_CTL_EXIT, //退出程序和守护进程
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//设备升级
|
//设备升级
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
ACT_FMW_NONE = 0,
|
ACT_FMW_NONE = 0,
|
||||||
ACT_FMW_RESP, //上报升级结果
|
ACT_FMW_RESP, //上报升级结果
|
||||||
ACT_FMW_CFG, //固件升级配置(json格式)
|
ACT_FMW_CFG, //固件升级配置(json格式)
|
||||||
@@ -106,7 +117,8 @@ enum{
|
|||||||
};
|
};
|
||||||
|
|
||||||
//日志和报警服务
|
//日志和报警服务
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
ACT_LOGALM_NONE = 0,
|
ACT_LOGALM_NONE = 0,
|
||||||
ACT_LOGALM_RPT, //ACT_LOGALM_RPT改成报警,即少数用户需要感知的消息在这里呈现。
|
ACT_LOGALM_RPT, //ACT_LOGALM_RPT改成报警,即少数用户需要感知的消息在这里呈现。
|
||||||
ACT_LOGALM_CFG, //日志配置(调整日志等级)
|
ACT_LOGALM_CFG, //日志配置(调整日志等级)
|
||||||
@@ -114,13 +126,15 @@ enum{
|
|||||||
};
|
};
|
||||||
|
|
||||||
//心跳服务
|
//心跳服务
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
ACT_HB_NONE = 0,
|
ACT_HB_NONE = 0,
|
||||||
ACT_HB_BEAT, //心跳包
|
ACT_HB_BEAT, //心跳包
|
||||||
};
|
};
|
||||||
|
|
||||||
//网络服务
|
//网络服务
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
ACT_NET_NONE = 0,
|
ACT_NET_NONE = 0,
|
||||||
ACT_NET_LOCAL, //向LocalSocket发送数据
|
ACT_NET_LOCAL, //向LocalSocket发送数据
|
||||||
ACT_NET_REMOTE, //想远程GUI发送数据
|
ACT_NET_REMOTE, //想远程GUI发送数据
|
||||||
@@ -132,7 +146,8 @@ enum{
|
|||||||
};
|
};
|
||||||
|
|
||||||
//调试诊断服务
|
//调试诊断服务
|
||||||
enum{
|
enum
|
||||||
|
{
|
||||||
ACT_DIG_NONE = 0,
|
ACT_DIG_NONE = 0,
|
||||||
ACT_DIG_SYNC, //同步状态(板卡以及其他)
|
ACT_DIG_SYNC, //同步状态(板卡以及其他)
|
||||||
ACT_DIG_STOP, //停止当前诊断操作
|
ACT_DIG_STOP, //停止当前诊断操作
|
||||||
|
|||||||
@@ -111,15 +111,16 @@ int WorkListManager::getPatientFromWorkList(QList<PatientInformation*>& aOutPati
|
|||||||
OFList<OFString> syntaxes;
|
OFList<OFString> syntaxes;
|
||||||
syntaxes.push_back(UID_LittleEndianImplicitTransferSyntax);
|
syntaxes.push_back(UID_LittleEndianImplicitTransferSyntax);
|
||||||
scu.setMaxReceivePDULength(ASC_DEFAULTMAXPDU);
|
scu.setMaxReceivePDULength(ASC_DEFAULTMAXPDU);
|
||||||
scu.setACSETimeout(30);
|
|
||||||
scu.setDIMSEBlockingMode(DIMSE_BLOCKING);
|
scu.setDIMSEBlockingMode(DIMSE_BLOCKING);
|
||||||
scu.setDIMSETimeout(0);
|
|
||||||
scu.setAETitle(serverInfo.localAE.toLatin1().data());
|
scu.setAETitle(serverInfo.localAE.toLatin1().data());
|
||||||
scu.setPeerHostName(ip.data());
|
scu.setPeerHostName(ip.data());
|
||||||
scu.setPeerPort(OFstatic_cast(Uint16, serverInfo.port.toInt()));
|
scu.setPeerPort(OFstatic_cast(Uint16, serverInfo.port.toInt()));
|
||||||
scu.setPeerAETitle(aeTitle.data());
|
scu.setPeerAETitle(aeTitle.data());
|
||||||
scu.setVerbosePCMode(OFFalse);
|
scu.setVerbosePCMode(OFFalse);
|
||||||
scu.addPresentationContext(UID_FINDModalityWorklistInformationModel, syntaxes); // UID_FINDStudyRootQueryRetrieveInformationModel
|
scu.addPresentationContext(UID_FINDModalityWorklistInformationModel, syntaxes); // UID_FINDStudyRootQueryRetrieveInformationModel
|
||||||
|
scu.setACSETimeout(5);
|
||||||
|
scu.setDIMSETimeout(5);
|
||||||
|
scu.setConnectionTimeout(5);
|
||||||
OFCondition cond = scu.initNetwork();
|
OFCondition cond = scu.initNetwork();
|
||||||
|
|
||||||
if (cond.bad())
|
if (cond.bad())
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ ADD_EVENT_VALUE(RequestContinueScan)\
|
|||||||
ADD_EVENT_VALUE(RequestFullScanStop)\
|
ADD_EVENT_VALUE(RequestFullScanStop)\
|
||||||
ADD_EVENT_VALUE(RequestPreviewStop)\
|
ADD_EVENT_VALUE(RequestPreviewStop)\
|
||||||
ADD_EVENT_VALUE(RequestDrainage)\
|
ADD_EVENT_VALUE(RequestDrainage)\
|
||||||
|
ADD_EVENT_VALUE(RequestWaterflood)\
|
||||||
|
ADD_EVENT_VALUE(RequestWaterClean)\
|
||||||
|
ADD_EVENT_VALUE(RequestWaterModeExit)\
|
||||||
ADD_EVENT_VALUE(ResponseDeviceTemperature)\
|
ADD_EVENT_VALUE(ResponseDeviceTemperature)\
|
||||||
ADD_EVENT_VALUE(ResponsePreview)\
|
ADD_EVENT_VALUE(ResponsePreview)\
|
||||||
ADD_EVENT_VALUE(ResponsePreviewData)\
|
ADD_EVENT_VALUE(ResponsePreviewData)\
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
#include "dicom/WorkListManager.h"
|
#include "dicom/WorkListManager.h"
|
||||||
#include "components/CoordinateXYWidget.h"
|
#include "components/CoordinateXYWidget.h"
|
||||||
#include "components/CoordinateZWidget.h"
|
#include "components/CoordinateZWidget.h"
|
||||||
|
#include "components/WaveWidget.h"
|
||||||
|
#include "components/ZFlashWidget.h"
|
||||||
#include "utilities/ScanProcessSequence.h"
|
#include "utilities/ScanProcessSequence.h"
|
||||||
#include "dicom/MPPSManager.h"
|
#include "dicom/MPPSManager.h"
|
||||||
|
|
||||||
@@ -34,6 +36,8 @@ const size_t PREVIEW_COL = 140;
|
|||||||
const float PIXEL_SPACING = 1.5f;
|
const float PIXEL_SPACING = 1.5f;
|
||||||
const float HALF_ROI_WIDTH = 100.0f;
|
const float HALF_ROI_WIDTH = 100.0f;
|
||||||
const unsigned int DRAINAGE_TIME = 180000; // 3 minitues
|
const unsigned int DRAINAGE_TIME = 180000; // 3 minitues
|
||||||
|
const unsigned int WATERFLOOD_TIME = 180000; // 3 minitues
|
||||||
|
const unsigned int WATERCLEAN_TIME = 180000; // 3 minitues
|
||||||
}
|
}
|
||||||
|
|
||||||
ScanFormWidget::ScanFormWidget(QWidget* parent)
|
ScanFormWidget::ScanFormWidget(QWidget* parent)
|
||||||
@@ -43,10 +47,19 @@ ScanFormWidget::ScanFormWidget(QWidget* parent)
|
|||||||
, mShutdownButton(new QToolButton(this))
|
, mShutdownButton(new QToolButton(this))
|
||||||
, mStartScanButton(new QToolButton(this))
|
, mStartScanButton(new QToolButton(this))
|
||||||
, mDrainageButton(new QToolButton(this))
|
, mDrainageButton(new QToolButton(this))
|
||||||
, mXYLabel(new CoordinateXYWidget(this))
|
, mWaterfloodButton(new QToolButton(this))
|
||||||
, mZLabel(new CoordinateZWidget(this))
|
, mCleanButton(new QToolButton(this))
|
||||||
|
//, mXYLabel(new CoordinateXYWidget(this))
|
||||||
|
, mZLabel(new ZFlashWidget(this))
|
||||||
|
, mWaveWidget(new WaveWidget(this))
|
||||||
, mScanProcessLabel(new QLabel(this))
|
, mScanProcessLabel(new QLabel(this))
|
||||||
, mDrainageTimer(new QTimer(this))
|
, mDrainageTimer(new QTimer(this))
|
||||||
|
, mWaterfloodTimer(new QTimer(this))
|
||||||
|
, mWaterCleanTimer(new QTimer(this))
|
||||||
|
, mFlashLayoutWidget(new QWidget(this))
|
||||||
|
, mWaterProcessMode()
|
||||||
|
, mWaterCleanStep()
|
||||||
|
, mIsWaterProcessing(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
auto commandlayout = new QHBoxLayout(ui->commandWidget);
|
auto commandlayout = new QHBoxLayout(ui->commandWidget);
|
||||||
@@ -59,7 +72,23 @@ ScanFormWidget::ScanFormWidget(QWidget* parent)
|
|||||||
mDrainageTimer->setSingleShot(true);
|
mDrainageTimer->setSingleShot(true);
|
||||||
connect(mDrainageTimer, &QTimer::timeout, this, [this]()
|
connect(mDrainageTimer, &QTimer::timeout, this, [this]()
|
||||||
{
|
{
|
||||||
mDrainageButton->click();
|
finishWaterPorcess(DrainageMode);
|
||||||
|
QString message = tr("Drainage time out");
|
||||||
|
EventCenter::Default()->triggerEvent(GUIEvents::GUIErrorRaise, nullptr, (QObject*)&message);
|
||||||
|
});
|
||||||
|
mWaterfloodTimer->setSingleShot(true);
|
||||||
|
connect(mWaterfloodTimer, &QTimer::timeout, this, [this]()
|
||||||
|
{
|
||||||
|
finishWaterPorcess(WaterFloodMode);
|
||||||
|
QString message = tr("Waterflood time out");
|
||||||
|
EventCenter::Default()->triggerEvent(GUIEvents::GUIErrorRaise, nullptr, (QObject*)&message);
|
||||||
|
});
|
||||||
|
mWaterCleanTimer->setSingleShot(true);
|
||||||
|
connect(mWaterCleanTimer, &QTimer::timeout, this, [this]()
|
||||||
|
{
|
||||||
|
finishWaterPorcess(WaterCleanMode);
|
||||||
|
QString message = tr("Clean time out");
|
||||||
|
EventCenter::Default()->triggerEvent(GUIEvents::GUIErrorRaise, nullptr, (QObject*)&message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,54 +110,202 @@ void ScanFormWidget::initCommandWidget(QHBoxLayout *layout)
|
|||||||
layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||||
addVerticalLine(layout);
|
addVerticalLine(layout);
|
||||||
|
|
||||||
|
mWaterfloodButton->setObjectName("btnWaterflood");
|
||||||
|
mWaterfloodButton->setCheckable(true);
|
||||||
|
mWaterfloodButton->setText(tr("Waterflood"));
|
||||||
|
layout->addWidget(mWaterfloodButton);
|
||||||
|
|
||||||
mDrainageButton->setObjectName("btnDrainage");
|
mDrainageButton->setObjectName("btnDrainage");
|
||||||
mDrainageButton->setCheckable(true);
|
mDrainageButton->setCheckable(true);
|
||||||
mDrainageButton->setText(tr("Drainage"));
|
mDrainageButton->setText(tr("Drainage"));
|
||||||
layout->addWidget(mDrainageButton);
|
layout->addWidget(mDrainageButton);
|
||||||
|
|
||||||
connect(mDrainageButton, &QToolButton::clicked, [=](bool aSatus)
|
mCleanButton->setObjectName("btnClean");
|
||||||
|
mCleanButton->setCheckable(true);
|
||||||
|
mCleanButton->setText(tr("Clean"));
|
||||||
|
layout->addWidget(mCleanButton);
|
||||||
|
|
||||||
|
connect(mWaterfloodButton, &QToolButton::clicked, [this](bool aStatus)
|
||||||
{
|
{
|
||||||
//Drainage
|
if(aStatus && DialogManager::Default()->requestAlertMessage(tr("Please confirm if water injection is required ?"), DialogButtonMode::OkAndCancel, tr("Confirm Water Injection")) == QDialog::Rejected)
|
||||||
if(aSatus && DialogManager::Default()->requestAlertMessage(tr("Make sure to open the drain valve ?"), DialogButtonMode::OkAndCancel, tr("Confirm Drainage")) == QDialog::Rejected)
|
|
||||||
{
|
{
|
||||||
mDrainageButton->setChecked(!aSatus);
|
mWaterfloodButton->setChecked(!aStatus);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mDrainageButton->setEnabled(false);
|
setWaterProcessModeEnable(false);
|
||||||
if(aSatus == true)
|
if(aStatus)
|
||||||
|
{
|
||||||
|
mWaterfloodButton->setText(tr("Waterflooding"));
|
||||||
|
EventCenter::Default()->triggerEvent(RequestWaterflood, nullptr, nullptr);
|
||||||
|
LOG_USER_OPERATION("Perform Waterflood");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EventCenter::Default()->triggerEvent(RequestWaterModeExit, nullptr, nullptr);
|
||||||
|
LOG_USER_OPERATION("Stop Waterflood");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(mDrainageButton, &QToolButton::clicked, [=](bool aStatus)
|
||||||
|
{
|
||||||
|
if(aStatus && DialogManager::Default()->requestAlertMessage(tr("Please confirm if drainage is required ?"), DialogButtonMode::OkAndCancel, tr("Confirm Drainage")) == QDialog::Rejected)
|
||||||
|
{
|
||||||
|
mDrainageButton->setChecked(!aStatus);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setWaterProcessModeEnable(false);
|
||||||
|
if(aStatus == true)
|
||||||
{
|
{
|
||||||
mDrainageTimer->start(DRAINAGE_TIME);
|
|
||||||
QString code = "1";
|
|
||||||
mDrainageButton->setText(tr("Drainaging"));
|
mDrainageButton->setText(tr("Drainaging"));
|
||||||
EventCenter::Default()->triggerEvent(RequestDrainage, nullptr, (QObject*)(&code));
|
EventCenter::Default()->triggerEvent(RequestDrainage, nullptr, nullptr);
|
||||||
LOG_USER_OPERATION("Perform Drainage");
|
LOG_USER_OPERATION("Perform Drainage");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mDrainageTimer->stop();
|
EventCenter::Default()->triggerEvent(RequestWaterModeExit, nullptr, nullptr);
|
||||||
QString code = "0";
|
|
||||||
mDrainageButton->setText(tr("Drainage"));
|
|
||||||
EventCenter::Default()->triggerEvent(RequestDrainage, nullptr, (QObject*)(&code));
|
|
||||||
LOG_USER_OPERATION("Stop Drainage");
|
LOG_USER_OPERATION("Stop Drainage");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(DeviceManager::Default(), &DeviceManager::startPumpControlResult, [this](bool aIsSucessful)
|
connect(mCleanButton, &QToolButton::clicked, [this](bool aStatus)
|
||||||
|
{
|
||||||
|
if(aStatus && DialogManager::Default()->requestAlertMessage(tr("Please confirm if cleaning and disinfection are required. ?"), DialogButtonMode::OkAndCancel, tr("Confirm cleaning")) == QDialog::Rejected)
|
||||||
|
{
|
||||||
|
mCleanButton->setChecked(!aStatus);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setWaterProcessModeEnable(false);
|
||||||
|
if(aStatus)
|
||||||
|
{
|
||||||
|
mWaterCleanStep = FirstWaterClean;
|
||||||
|
mCleanButton->setText(tr("Cleaning"));
|
||||||
|
EventCenter::Default()->triggerEvent(RequestWaterClean, nullptr, nullptr);
|
||||||
|
LOG_USER_OPERATION("Perform Cleaning in first step");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EventCenter::Default()->triggerEvent(RequestWaterModeExit, nullptr, nullptr);
|
||||||
|
LOG_USER_OPERATION("Stop Clean");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(DeviceManager::Default(), &DeviceManager::startDrainageControlResult, [this](bool aIsSucessful)
|
||||||
{
|
{
|
||||||
mDrainageButton->setEnabled(true);
|
|
||||||
if(!aIsSucessful)
|
if(!aIsSucessful)
|
||||||
{
|
{
|
||||||
mDrainageTimer->stop();
|
setWaterProcessModeEnable(true);
|
||||||
bool isChecked = mDrainageButton->isChecked();
|
mDrainageButton->setChecked(false);
|
||||||
mDrainageButton->setChecked(!isChecked);
|
|
||||||
if(isChecked)
|
|
||||||
{
|
|
||||||
mDrainageButton->setText(tr("Drainage"));
|
mDrainageButton->setText(tr("Drainage"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mDrainageButton->setText(tr("Drainaging"));
|
mIsWaterProcessing = true;
|
||||||
|
mDrainageButton->setEnabled(true);
|
||||||
|
mDrainageTimer->start(DRAINAGE_TIME);
|
||||||
|
mWaterProcessMode = DrainageMode;
|
||||||
|
mWaveWidget->startCharge(50, DownWaveDirection);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(DeviceManager::Default(), &DeviceManager::startWaterfloodResult, [this](bool aIsSucessful)
|
||||||
|
{
|
||||||
|
if(!aIsSucessful)
|
||||||
|
{
|
||||||
|
setWaterProcessModeEnable(true);
|
||||||
|
mWaterfloodButton->setChecked(false);
|
||||||
|
mWaterfloodButton->setText(tr("Drainage"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mIsWaterProcessing = true;
|
||||||
|
mWaterfloodButton->setEnabled(true);
|
||||||
|
mWaterfloodTimer->start(WATERFLOOD_TIME);
|
||||||
|
mWaterProcessMode = WaterFloodMode;
|
||||||
|
mWaveWidget->startCharge(0, UpWaveDirection);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(DeviceManager::Default(), &DeviceManager::startWaterCleanResult, [this](bool aIsSucessful)
|
||||||
|
{
|
||||||
|
if(!aIsSucessful)
|
||||||
|
{
|
||||||
|
setWaterProcessModeEnable(true);
|
||||||
|
mCleanButton->setChecked(false);
|
||||||
|
mCleanButton->setText(tr("Clean"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mIsWaterProcessing = true;
|
||||||
|
mCleanButton->setEnabled(true);
|
||||||
|
mWaterCleanTimer->start(WATERCLEAN_TIME);
|
||||||
|
mWaterProcessMode = WaterCleanMode;
|
||||||
|
mZLabel->startFlash();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(DeviceManager::Default(), &DeviceManager::exitWaterProcessResult, [this](bool aIsSucessful)
|
||||||
|
{
|
||||||
|
finishWaterPorcess(mWaterProcessMode);
|
||||||
|
if(!aIsSucessful)
|
||||||
|
{
|
||||||
|
QString waterProcessMode;
|
||||||
|
switch (mWaterProcessMode)
|
||||||
|
{
|
||||||
|
case WaterFloodMode:
|
||||||
|
waterProcessMode = tr("Waterflood");
|
||||||
|
break;
|
||||||
|
case DrainageMode:
|
||||||
|
waterProcessMode = tr("Drainage");
|
||||||
|
break;
|
||||||
|
case WaterCleanMode:
|
||||||
|
waterProcessMode = tr("Cleaning");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
QString message = waterProcessMode + tr(" exit failed.");
|
||||||
|
EventCenter::Default()->triggerEvent(GUIEvents::GUIErrorRaise, nullptr, (QObject*)&message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(DeviceManager::Default(), &DeviceManager::waterProcessFinishedResult, [this](bool aIsSucessful)
|
||||||
|
{
|
||||||
|
if(!mIsWaterProcessing)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
finishWaterPorcess(mWaterProcessMode);
|
||||||
|
QString message;
|
||||||
|
if(aIsSucessful)
|
||||||
|
{
|
||||||
|
switch (mWaterProcessMode)
|
||||||
|
{
|
||||||
|
case WaterFloodMode:
|
||||||
|
message = tr("Waterflood finished.");
|
||||||
|
DialogManager::Default()->requestAlertMessage(message, DialogButtonMode::OkOnly, tr("Confirm Water Injection"));
|
||||||
|
break;
|
||||||
|
case DrainageMode:
|
||||||
|
message = tr("Drainage finished. Please do the disinfection in next step.");
|
||||||
|
DialogManager::Default()->requestAlertMessage(message, DialogButtonMode::OkOnly, tr("Confirm Drainage"));
|
||||||
|
break;
|
||||||
|
case WaterCleanMode:
|
||||||
|
processWaterCleanResult();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (mWaterProcessMode)
|
||||||
|
{
|
||||||
|
case WaterFloodMode:
|
||||||
|
message = tr("Waterflood failed.");
|
||||||
|
break;
|
||||||
|
case DrainageMode:
|
||||||
|
message = tr("Drainage failed.");
|
||||||
|
break;
|
||||||
|
case WaterCleanMode:
|
||||||
|
message = tr("Clean failed.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
EventCenter::Default()->triggerEvent(GUIEvents::GUIErrorRaise, nullptr, (QObject*)&message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -161,9 +338,9 @@ void ScanFormWidget::initCommandWidget(QHBoxLayout *layout)
|
|||||||
{
|
{
|
||||||
if(aResult)
|
if(aResult)
|
||||||
{
|
{
|
||||||
mAccountButton->setEnabled(false);
|
// mAccountButton->setEnabled(false);
|
||||||
mDrainageButton->setEnabled(false);
|
// mDrainageButton->setEnabled(false);
|
||||||
mShutdownButton->setEnabled(false);
|
// mShutdownButton->setEnabled(false);
|
||||||
mScanProcessLabel->setText(getAutoLocateMessage());
|
mScanProcessLabel->setText(getAutoLocateMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,6 +379,69 @@ void ScanFormWidget::initCommandWidget(QHBoxLayout *layout)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScanFormWidget::setWaterProcessModeEnable(bool aIsEnable)
|
||||||
|
{
|
||||||
|
mWaterfloodButton->setEnabled(aIsEnable);
|
||||||
|
mCleanButton->setEnabled(aIsEnable);
|
||||||
|
mDrainageButton->setEnabled(aIsEnable);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScanFormWidget::processWaterCleanResult()
|
||||||
|
{
|
||||||
|
QString message;
|
||||||
|
switch (mWaterCleanStep)
|
||||||
|
{
|
||||||
|
case FirstWaterClean:
|
||||||
|
message = tr("Please click the confirm button for cleaning after disinfection.");
|
||||||
|
if(DialogManager::Default()->requestAlertMessage(message, DialogButtonMode::OkAndCancel, tr("Confirm cleaning")) == QDialog::Accepted)
|
||||||
|
{
|
||||||
|
startWaterCleanInSecondStep();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SecondWaterClean:
|
||||||
|
message = tr("cleanning finished.");
|
||||||
|
DialogManager::Default()->requestAlertMessage(message, DialogButtonMode::OkOnly, tr("Confirm cleaning"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScanFormWidget::startWaterCleanInSecondStep()
|
||||||
|
{
|
||||||
|
setWaterProcessModeEnable(false);
|
||||||
|
mWaterCleanStep = SecondWaterClean;
|
||||||
|
mCleanButton->setText(tr("Cleaning"));
|
||||||
|
mCleanButton->setChecked(true);
|
||||||
|
EventCenter::Default()->triggerEvent(RequestWaterClean, nullptr, nullptr);
|
||||||
|
LOG_USER_OPERATION("Perform Cleaning in second step");
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScanFormWidget::finishWaterPorcess(WaterProcessMode aMode)
|
||||||
|
{
|
||||||
|
mIsWaterProcessing = false;
|
||||||
|
setWaterProcessModeEnable(true);
|
||||||
|
switch (aMode)
|
||||||
|
{
|
||||||
|
case WaterFloodMode:
|
||||||
|
mWaterfloodTimer->stop();
|
||||||
|
mWaterfloodButton->setText(tr("Waterflood"));
|
||||||
|
mWaterfloodButton->setChecked(false);
|
||||||
|
mWaveWidget->stopCharge();
|
||||||
|
break;
|
||||||
|
case DrainageMode:
|
||||||
|
mDrainageTimer->stop();
|
||||||
|
mDrainageButton->setText(tr("Drainage"));
|
||||||
|
mDrainageButton->setChecked(false);
|
||||||
|
mWaveWidget->stopCharge();
|
||||||
|
break;
|
||||||
|
case WaterCleanMode:
|
||||||
|
mWaterCleanTimer->stop();
|
||||||
|
mCleanButton->setText(tr("Clean"));
|
||||||
|
mCleanButton->setChecked(false);
|
||||||
|
mZLabel->stopFlash();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ScanFormWidget::initScanContent()
|
void ScanFormWidget::initScanContent()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -224,18 +464,26 @@ void ScanFormWidget::initScanContent()
|
|||||||
|
|
||||||
|
|
||||||
QHBoxLayout* displayLayout = new QHBoxLayout(displayWidget);
|
QHBoxLayout* displayLayout = new QHBoxLayout(displayWidget);
|
||||||
QWidget* xyWidget = new QWidget(this);
|
// QWidget* xyWidget = new QWidget(this);
|
||||||
xyWidget->setObjectName("broadcastWidget");
|
// xyWidget->setObjectName("broadcastWidget");
|
||||||
QHBoxLayout* xyLayout = new QHBoxLayout(xyWidget);
|
// QHBoxLayout* xyLayout = new QHBoxLayout(xyWidget);
|
||||||
xyLayout->addWidget(mXYLabel);
|
// xyLayout->addWidget(mXYLabel);
|
||||||
displayLayout->addWidget(xyWidget);
|
// displayLayout->addWidget(xyWidget);
|
||||||
|
|
||||||
QWidget* zWidget = new QWidget(this);
|
// QWidget* zWidget = new QWidget(this);
|
||||||
zWidget->setObjectName("broadcastWidget");
|
// zWidget->setObjectName("broadcastWidget");
|
||||||
QHBoxLayout* zLayout = new QHBoxLayout(zWidget);
|
// QHBoxLayout* zLayout = new QHBoxLayout(zWidget);
|
||||||
zLayout->addWidget(mZLabel);
|
// zLayout->addWidget(mZLabel);
|
||||||
displayLayout->addWidget(zWidget);
|
// displayLayout->addWidget(zWidget);
|
||||||
|
// zWidget->hide();
|
||||||
|
|
||||||
|
mFlashLayoutWidget->setObjectName("broadcastWidget");
|
||||||
|
QHBoxLayout* flashLayout = new QHBoxLayout(mFlashLayoutWidget);
|
||||||
|
flashLayout->addWidget(mZLabel);
|
||||||
|
flashLayout->addWidget(mWaveWidget);
|
||||||
|
|
||||||
|
displayLayout->addWidget(mFlashLayoutWidget);
|
||||||
|
//mWaveWidget->startCharge();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -353,6 +601,8 @@ void ScanFormWidget::reloadLanguage()
|
|||||||
mStartScanButton->setText(tr("Start Scan"));
|
mStartScanButton->setText(tr("Start Scan"));
|
||||||
mScanProcessLabel->setText(tr("Please confirm checking patient information to start the process"));
|
mScanProcessLabel->setText(tr("Please confirm checking patient information to start the process"));
|
||||||
mDrainageButton->isChecked() ? mDrainageButton->setText(tr("Drainaging")) : mDrainageButton->setText(tr("Drainage"));
|
mDrainageButton->isChecked() ? mDrainageButton->setText(tr("Drainaging")) : mDrainageButton->setText(tr("Drainage"));
|
||||||
|
mWaterfloodButton->isChecked() ? mWaterfloodButton->setText(tr("Waterflooding")) : mWaterfloodButton->setText(tr("Waterflood"));
|
||||||
|
mCleanButton->isChecked() ? mCleanButton->setText(tr("Cleaning")) : mCleanButton->setText(tr("Clean"));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ScanFormWidget::getAutoLocateMessage()
|
QString ScanFormWidget::getAutoLocateMessage()
|
||||||
|
|||||||
@@ -11,8 +11,21 @@ class PatientInformation;
|
|||||||
class QToolButton;
|
class QToolButton;
|
||||||
class CoordinateXYWidget;
|
class CoordinateXYWidget;
|
||||||
class CoordinateZWidget;
|
class CoordinateZWidget;
|
||||||
|
class ZFlashWidget;
|
||||||
|
class WaveWidget;
|
||||||
|
|
||||||
class ScanFormWidget :public TabFormWidget {
|
enum WaterProcessMode
|
||||||
|
{
|
||||||
|
WaterFloodMode = 0, DrainageMode, WaterCleanMode
|
||||||
|
};
|
||||||
|
|
||||||
|
enum WaterCleanStep
|
||||||
|
{
|
||||||
|
FirstWaterClean = 0, SecondWaterClean
|
||||||
|
};
|
||||||
|
|
||||||
|
class ScanFormWidget :public TabFormWidget
|
||||||
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit ScanFormWidget(QWidget *parent = nullptr);
|
explicit ScanFormWidget(QWidget *parent = nullptr);
|
||||||
@@ -27,10 +40,19 @@ private:
|
|||||||
QToolButton* mShutdownButton;
|
QToolButton* mShutdownButton;
|
||||||
QToolButton* mStartScanButton;
|
QToolButton* mStartScanButton;
|
||||||
QToolButton* mDrainageButton;
|
QToolButton* mDrainageButton;
|
||||||
CoordinateXYWidget* mXYLabel;
|
QToolButton* mWaterfloodButton;
|
||||||
CoordinateZWidget* mZLabel;
|
QToolButton* mCleanButton;
|
||||||
|
//CoordinateXYWidget* mXYLabel;
|
||||||
|
ZFlashWidget* mZLabel;
|
||||||
|
WaveWidget* mWaveWidget;
|
||||||
QLabel* mScanProcessLabel;
|
QLabel* mScanProcessLabel;
|
||||||
QTimer* mDrainageTimer;
|
QTimer* mDrainageTimer;
|
||||||
|
QTimer* mWaterfloodTimer;
|
||||||
|
QTimer* mWaterCleanTimer;
|
||||||
|
QWidget* mFlashLayoutWidget;
|
||||||
|
WaterProcessMode mWaterProcessMode;
|
||||||
|
WaterCleanStep mWaterCleanStep;
|
||||||
|
bool mIsWaterProcessing;
|
||||||
|
|
||||||
void initCommandWidget(QHBoxLayout *layout);
|
void initCommandWidget(QHBoxLayout *layout);
|
||||||
void initScanContent();
|
void initScanContent();
|
||||||
@@ -39,11 +61,14 @@ private:
|
|||||||
void reloadLanguage();
|
void reloadLanguage();
|
||||||
void setScanProtocal(PatientInformation* aPatient, int aProtocal);
|
void setScanProtocal(PatientInformation* aPatient, int aProtocal);
|
||||||
QString getAutoLocateMessage();
|
QString getAutoLocateMessage();
|
||||||
|
void finishWaterPorcess(WaterProcessMode aMode);
|
||||||
|
void startWaterCleanInSecondStep();
|
||||||
|
void processWaterCleanResult();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void protocolChanged(int type);
|
void protocolChanged(int type);
|
||||||
void prepareStartFullScan();
|
void prepareStartFullScan();
|
||||||
|
void setWaterProcessModeEnable(bool aIsEnable = true);
|
||||||
void initEvents();
|
void initEvents();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
BIN
src/icons/sanitize.png
Normal file
BIN
src/icons/sanitize.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
BIN
src/icons/waterflood.png
Normal file
BIN
src/icons/waterflood.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
@@ -809,6 +809,17 @@ QToolButton#btnScan {
|
|||||||
|
|
||||||
QToolButton#btnDrainage {
|
QToolButton#btnDrainage {
|
||||||
qproperty-icon:url(":/icons/drainage.png");
|
qproperty-icon:url(":/icons/drainage.png");
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QToolButton#btnWaterflood {
|
||||||
|
qproperty-icon:url(":/icons/waterflood.png");
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QToolButton#btnClean {
|
||||||
|
qproperty-icon:url(":/icons/sanitize.png");
|
||||||
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------AdminSettingForm---------------------------------------------------*/
|
/*------AdminSettingForm---------------------------------------------------*/
|
||||||
|
|||||||
@@ -408,6 +408,14 @@ progress:99%</source>
|
|||||||
After lying down, click the confirm buttonto start scanning on the next side.</source>
|
After lying down, click the confirm buttonto start scanning on the next side.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Water injection failed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cleaning failed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>DialogManager</name>
|
<name>DialogManager</name>
|
||||||
@@ -1532,10 +1540,6 @@ The emergency button has been pushed. Please reset it before other operations.</
|
|||||||
<source>Confirm Drainage</source>
|
<source>Confirm Drainage</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Make sure to open the drain valve ?</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Account</source>
|
<source>Account</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@@ -1580,6 +1584,82 @@ The emergency button has been pushed. Please reset it before other operations.</
|
|||||||
<source>Waterflood</source>
|
<source>Waterflood</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Clean</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please confirm if water injection is required ?</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Confirm Water Injection</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please confirm if drainage is required ?</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please confirm if cleaning and disinfection are required. ?</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Confirm cleaning</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Waterflooding</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Cleaning</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Drainage time out</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Waterflood time out</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Clean time out</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Waterflood failed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Drainage failed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Clean failed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Waterflood finished.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Please click the confirm button for cleaning after disinfection.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>cleanning finished.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source> exit failed.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Drainage finished. Please do the disinfection in next step.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ScanSearchCriteriaForm</name>
|
<name>ScanSearchCriteriaForm</name>
|
||||||
|
|||||||
@@ -468,89 +468,89 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>DeviceManager</name>
|
<name>DeviceManager</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="167"/>
|
<location filename="../device/DeviceManager.cpp" line="185"/>
|
||||||
<location filename="../device/DeviceManager.cpp" line="812"/>
|
<location filename="../device/DeviceManager.cpp" line="845"/>
|
||||||
<location filename="../device/DeviceManager.cpp" line="820"/>
|
<location filename="../device/DeviceManager.cpp" line="853"/>
|
||||||
<location filename="../device/DeviceManager.cpp" line="1288"/>
|
<location filename="../device/DeviceManager.cpp" line="1399"/>
|
||||||
<source>DMS connection error</source>
|
<source>DMS connection error</source>
|
||||||
<translation type="unfinished">DMS失去连接</translation>
|
<translation type="unfinished">DMS失去连接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="363"/>
|
<location filename="../device/DeviceManager.cpp" line="381"/>
|
||||||
<location filename="../device/DeviceManager.cpp" line="372"/>
|
<location filename="../device/DeviceManager.cpp" line="390"/>
|
||||||
<source>progress:%1%</source>
|
<source>progress:%1%</source>
|
||||||
<translation type="unfinished">进度:%1%</translation>
|
<translation type="unfinished">进度:%1%</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="377"/>
|
<location filename="../device/DeviceManager.cpp" line="395"/>
|
||||||
<source>Patient can leave.
|
<source>Patient can leave.
|
||||||
progress:%1%</source>
|
progress:%1%</source>
|
||||||
<translation type="unfinished">检查对象可以起身
|
<translation type="unfinished">检查对象可以起身
|
||||||
进度:%1%</translation>
|
进度:%1%</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="384"/>
|
<location filename="../device/DeviceManager.cpp" line="402"/>
|
||||||
<source>Data quality assessment in progress
|
<source>Data quality assessment in progress
|
||||||
progress:99%</source>
|
progress:99%</source>
|
||||||
<translation type="unfinished">数据质量判断中
|
<translation type="unfinished">数据质量判断中
|
||||||
进度:99%</translation>
|
进度:99%</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="256"/>
|
<location filename="../device/DeviceManager.cpp" line="274"/>
|
||||||
<location filename="../device/DeviceManager.cpp" line="873"/>
|
<location filename="../device/DeviceManager.cpp" line="906"/>
|
||||||
<location filename="../device/DeviceManager.cpp" line="881"/>
|
<location filename="../device/DeviceManager.cpp" line="914"/>
|
||||||
<source>Initialize Failed.</source>
|
<source>Initialize Failed.</source>
|
||||||
<translation type="unfinished">初始化失败</translation>
|
<translation type="unfinished">初始化失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="223"/>
|
<location filename="../device/DeviceManager.cpp" line="241"/>
|
||||||
<source>Fail to connect to DB!Reboot device to try!</source>
|
<source>Fail to connect to DB!Reboot device to try!</source>
|
||||||
<translation type="unfinished">数据库连接失败,请重启设备后再试!</translation>
|
<translation type="unfinished">数据库连接失败,请重启设备后再试!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="322"/>
|
<location filename="../device/DeviceManager.cpp" line="340"/>
|
||||||
<source>Device is not ready, start scan operation failed!</source>
|
<source>Device is not ready, start scan operation failed!</source>
|
||||||
<translation type="unfinished">设备状态错误,无法开始检查流程</translation>
|
<translation type="unfinished">设备状态错误,无法开始检查流程</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="322"/>
|
<location filename="../device/DeviceManager.cpp" line="340"/>
|
||||||
<source>Device is not ready, start empty scan operation failed!</source>
|
<source>Device is not ready, start empty scan operation failed!</source>
|
||||||
<translation type="unfinished">设备状态错误,无法开始空水扫查</translation>
|
<translation type="unfinished">设备状态错误,无法开始空水扫查</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="441"/>
|
<location filename="../device/DeviceManager.cpp" line="459"/>
|
||||||
<source>Scan completed! Please prepare for the next scan.
|
<source>Scan completed! Please prepare for the next scan.
|
||||||
After lying down, click the confirm buttonto start scanning on the next side.</source>
|
After lying down, click the confirm buttonto start scanning on the next side.</source>
|
||||||
<translation type="unfinished">扫查结束,请准备下一侧扫查。
|
<translation type="unfinished">扫查结束,请准备下一侧扫查。
|
||||||
请在趴好后再点击确认按钮!</translation>
|
请在趴好后再点击确认按钮!</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="442"/>
|
<location filename="../device/DeviceManager.cpp" line="460"/>
|
||||||
<source>Scan completed!</source>
|
<source>Scan completed!</source>
|
||||||
<translation type="unfinished">扫查结束</translation>
|
<translation type="unfinished">扫查结束</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="763"/>
|
<location filename="../device/DeviceManager.cpp" line="796"/>
|
||||||
<source>Error: </source>
|
<source>Error: </source>
|
||||||
<translation type="unfinished">错误: </translation>
|
<translation type="unfinished">错误: </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="847"/>
|
<location filename="../device/DeviceManager.cpp" line="880"/>
|
||||||
<source>Start scan failed. Reason:time out.</source>
|
<source>Start scan failed. Reason:time out.</source>
|
||||||
<translation type="unfinished">扫查启动失败,原因:超时</translation>
|
<translation type="unfinished">扫查启动失败,原因:超时</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="858"/>
|
<location filename="../device/DeviceManager.cpp" line="891"/>
|
||||||
<source>Start scan failed. Reason:%1</source>
|
<source>Start scan failed. Reason:%1</source>
|
||||||
<translation type="unfinished">扫查启动失败,原因:%1</translation>
|
<translation type="unfinished">扫查启动失败,原因:%1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="883"/>
|
<location filename="../device/DeviceManager.cpp" line="916"/>
|
||||||
<source>Start CE Scan Failed.</source>
|
<source>Start CE Scan Failed.</source>
|
||||||
<translation type="unfinished">CE扫查启动失败</translation>
|
<translation type="unfinished">CE扫查启动失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="915"/>
|
<location filename="../device/DeviceManager.cpp" line="948"/>
|
||||||
<source>Shut down failed, please push emergency button to shutdown.</source>
|
<source>Shut down failed, please push emergency button to shutdown.</source>
|
||||||
<translation type="unfinished">关机失败,请按紧急按钮进行关机。</translation>
|
<translation type="unfinished">关机失败,请按紧急按钮进行关机。</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -559,43 +559,55 @@ After lying down, click the confirm buttonto start scanning on the next side.</s
|
|||||||
<translation type="obsolete">扫查数据上传失败</translation>
|
<translation type="obsolete">扫查数据上传失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="1003"/>
|
<location filename="../device/DeviceManager.cpp" line="1036"/>
|
||||||
<source>Create empty scan data failed</source>
|
<source>Create empty scan data failed</source>
|
||||||
<translation type="unfinished">空水数据新增失败</translation>
|
<translation type="unfinished">空水数据新增失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="1026"/>
|
<location filename="../device/DeviceManager.cpp" line="1059"/>
|
||||||
<source>Create scan data failed</source>
|
<source>Create scan data failed</source>
|
||||||
<translation type="unfinished">扫查数据新增失败</translation>
|
<translation type="unfinished">扫查数据新增失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="1092"/>
|
<location filename="../device/DeviceManager.cpp" line="1125"/>
|
||||||
<source>Recon disconnected.</source>
|
<source>Recon disconnected.</source>
|
||||||
<translation type="unfinished">重建服务器已断开连接</translation>
|
<translation type="unfinished">重建服务器已断开连接</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="1134"/>
|
<location filename="../device/DeviceManager.cpp" line="1166"/>
|
||||||
<location filename="../device/DeviceManager.cpp" line="1149"/>
|
<location filename="../device/DeviceManager.cpp" line="1181"/>
|
||||||
<source>Open pump failed.</source>
|
<source>Open pump failed.</source>
|
||||||
<translation type="unfinished">排水阀打开失败</translation>
|
<translation type="unfinished">排水阀打开失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="1166"/>
|
<location filename="../device/DeviceManager.cpp" line="1190"/>
|
||||||
|
<location filename="../device/DeviceManager.cpp" line="1205"/>
|
||||||
|
<source>Water injection failed.</source>
|
||||||
|
<translation type="unfinished">注水启动失败</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../device/DeviceManager.cpp" line="1214"/>
|
||||||
|
<location filename="../device/DeviceManager.cpp" line="1229"/>
|
||||||
|
<source>Cleaning failed.</source>
|
||||||
|
<translation type="unfinished">清洁启动失败</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../device/DeviceManager.cpp" line="1277"/>
|
||||||
<source>Recon error, can't start scan process</source>
|
<source>Recon error, can't start scan process</source>
|
||||||
<translation type="unfinished">重建服务器错误,无法开始检查流程</translation>
|
<translation type="unfinished">重建服务器错误,无法开始检查流程</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="1262"/>
|
<location filename="../device/DeviceManager.cpp" line="1373"/>
|
||||||
<source>Start auto locate failed</source>
|
<source>Start auto locate failed</source>
|
||||||
<translation type="unfinished">自动化定位启动失败</translation>
|
<translation type="unfinished">自动化定位启动失败</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="1282"/>
|
<location filename="../device/DeviceManager.cpp" line="1393"/>
|
||||||
<source>The data quality is low, please restart the data scan.</source>
|
<source>The data quality is low, please restart the data scan.</source>
|
||||||
<translation type="unfinished">扫查数据质量较低,请重新开始检查流程</translation>
|
<translation type="unfinished">扫查数据质量较低,请重新开始检查流程</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../device/DeviceManager.cpp" line="1310"/>
|
<location filename="../device/DeviceManager.cpp" line="1421"/>
|
||||||
<source>Device reset failed, please contact maintenance person</source>
|
<source>Device reset failed, please contact maintenance person</source>
|
||||||
<translation type="unfinished">设备复位失败,请联系维修人员</translation>
|
<translation type="unfinished">设备复位失败,请联系维修人员</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2363,22 +2375,39 @@ The emergency button has been pushed. Please reset it before other operations.</
|
|||||||
<translation type="obsolete">空扫</translation>
|
<translation type="obsolete">空扫</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="92"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="120"/>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="116"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="198"/>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="132"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="216"/>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="361"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="258"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="432"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="603"/>
|
||||||
<source>Drainage</source>
|
<source>Drainage</source>
|
||||||
<translation type="unfinished">排水</translation>
|
<translation type="unfinished">排水</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="70"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="98"/>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="357"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="599"/>
|
||||||
<source>Account</source>
|
<source>Account</source>
|
||||||
<translation type="unfinished">账户</translation>
|
<translation type="unfinished">账户</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="74"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="76"/>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="358"/>
|
<source>Drainage time out</source>
|
||||||
|
<translation type="unfinished">排水运行超时</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="83"/>
|
||||||
|
<source>Waterflood time out</source>
|
||||||
|
<translation type="unfinished">注水运行超时</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="90"/>
|
||||||
|
<source>Clean time out</source>
|
||||||
|
<translation type="unfinished">清洁运行超时</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="102"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="600"/>
|
||||||
<source>ShutDown</source>
|
<source>ShutDown</source>
|
||||||
<translation type="unfinished">关机</translation>
|
<translation type="unfinished">关机</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -2387,67 +2416,155 @@ The emergency button has been pushed. Please reset it before other operations.</
|
|||||||
<translation type="obsolete">录入检查对象</translation>
|
<translation type="obsolete">录入检查对象</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="78"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="106"/>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="359"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="601"/>
|
||||||
<source>Start Scan</source>
|
<source>Start Scan</source>
|
||||||
<translation type="unfinished">开始检查流程</translation>
|
<translation type="unfinished">开始检查流程</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="87"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="115"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="255"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="426"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="604"/>
|
||||||
<source>Waterflood</source>
|
<source>Waterflood</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished">注水</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="98"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="125"/>
|
||||||
<source>Make sure to open the drain valve ?</source>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="234"/>
|
||||||
<translation type="unfinished">请确认是否打开排水阀?</translation>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="438"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="605"/>
|
||||||
|
<source>Clean</source>
|
||||||
|
<translation type="unfinished">清洁</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="98"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="130"/>
|
||||||
|
<source>Please confirm if water injection is required ?</source>
|
||||||
|
<translation type="unfinished">请确认是否进行注水?</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="130"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="283"/>
|
||||||
|
<source>Confirm Water Injection</source>
|
||||||
|
<translation type="unfinished">注水确认</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="138"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="604"/>
|
||||||
|
<source>Waterflooding</source>
|
||||||
|
<translation type="unfinished">注水中</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="151"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="287"/>
|
||||||
<source>Confirm Drainage</source>
|
<source>Confirm Drainage</source>
|
||||||
<translation type="unfinished">排水确认</translation>
|
<translation type="unfinished">排水确认</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="108"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="151"/>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="136"/>
|
<source>Please confirm if drainage is required ?</source>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="361"/>
|
<translation type="unfinished">请确认是否进行排水?</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="159"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="603"/>
|
||||||
<source>Drainaging</source>
|
<source>Drainaging</source>
|
||||||
<translation type="unfinished">排水中</translation>
|
<translation type="unfinished">排水中</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="145"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="172"/>
|
||||||
|
<source>Please confirm if cleaning and disinfection are required. ?</source>
|
||||||
|
<translation type="unfinished">请确认是否进行清洁消毒?</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="172"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="396"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="403"/>
|
||||||
|
<source>Confirm cleaning</source>
|
||||||
|
<translation type="unfinished">清洁确认</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="181"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="261"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="412"/>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="605"/>
|
||||||
|
<source>Cleaning</source>
|
||||||
|
<translation type="unfinished">清洁中</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="264"/>
|
||||||
|
<source> exit failed.</source>
|
||||||
|
<translation type="unfinished">退出失败</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="282"/>
|
||||||
|
<source>Waterflood finished.</source>
|
||||||
|
<translation type="unfinished">注水完成</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="395"/>
|
||||||
|
<source>Please click the confirm button for cleaning after disinfection.</source>
|
||||||
|
<translation type="unfinished">请消毒完成后,再点击确认按钮进行清洁</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="299"/>
|
||||||
|
<source>Waterflood failed.</source>
|
||||||
|
<translation type="unfinished">注水失败</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="286"/>
|
||||||
|
<source>Drainage finished. Please do the disinfection in next step.</source>
|
||||||
|
<translation type="unfinished">排水完成,请下一步进行清洁消毒</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="302"/>
|
||||||
|
<source>Drainage failed.</source>
|
||||||
|
<translation type="unfinished">排水失败</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="305"/>
|
||||||
|
<source>Clean failed.</source>
|
||||||
|
<translation type="unfinished">清洁失败</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="316"/>
|
||||||
<source>Shut down now ?</source>
|
<source>Shut down now ?</source>
|
||||||
<translation type="unfinished">是否需要进行设备关机操作,请确认?</translation>
|
<translation type="unfinished">是否需要进行设备关机操作,请确认?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="145"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="316"/>
|
||||||
<source>Shut Down</source>
|
<source>Shut Down</source>
|
||||||
<translation type="unfinished">关机</translation>
|
<translation type="unfinished">关机</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="194"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="365"/>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="225"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="459"/>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="360"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="602"/>
|
||||||
<source>Please confirm checking patient information to start the process</source>
|
<source>Please confirm checking patient information to start the process</source>
|
||||||
<translation type="unfinished">请确定检查对象信息开始流程</translation>
|
<translation type="unfinished">请确定检查对象信息开始流程</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="199"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="370"/>
|
||||||
<source>Data scanning, please keep the current position and don't move.</source>
|
<source>Data scanning, please keep the current position and don't move.</source>
|
||||||
<translation type="unfinished">数据扫查中,请检查对象保持当前姿势,不要移动</translation>
|
<translation type="unfinished">数据扫查中,请检查对象保持当前姿势,不要移动</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="204"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="375"/>
|
||||||
<source>Data exporting, patient can leave the holder</source>
|
<source>Data exporting, patient can leave the holder</source>
|
||||||
<translation type="unfinished">数据导出中,检查对象可以离开检查仓</translation>
|
<translation type="unfinished">数据导出中,检查对象可以离开检查仓</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="370"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="402"/>
|
||||||
|
<source>cleanning finished.</source>
|
||||||
|
<translation type="unfinished">清洁完成</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="614"/>
|
||||||
<source>Left side scan initiated, auto positioning in progress.</source>
|
<source>Left side scan initiated, auto positioning in progress.</source>
|
||||||
<translation type="unfinished">左侧扫查启动,自动定位中</translation>
|
<translation type="unfinished">左侧扫查启动,自动定位中</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../forms/scan/ScanFormWidget.cpp" line="372"/>
|
<location filename="../forms/scan/ScanFormWidget.cpp" line="616"/>
|
||||||
<source>Right side scan initiated, auto positioning in progress.</source>
|
<source>Right side scan initiated, auto positioning in progress.</source>
|
||||||
<translation type="unfinished">右侧扫查启动,自动定位中</translation>
|
<translation type="unfinished">右侧扫查启动,自动定位中</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
Reference in New Issue
Block a user