feat: Improve the prompt message for alarm dialog.
This commit is contained in:
53
src/utilities/AlarmHelper.cpp
Normal file
53
src/utilities/AlarmHelper.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
#include "AlarmHelper.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
QString AlarmHelper::getAlarmString(const QString aCode)
|
||||
{
|
||||
int code = aCode.toInt();
|
||||
return getAlarmString(code);
|
||||
}
|
||||
|
||||
QString AlarmHelper::getAlarmString(int aCode)
|
||||
{
|
||||
switch (aCode)
|
||||
{
|
||||
case DMSL_F401:
|
||||
case DMSL_F402:
|
||||
case DMSL_F403:
|
||||
case DMSL_F404:
|
||||
case DMSL_F405:
|
||||
case DMSL_F406:
|
||||
case DMSL_F407:
|
||||
case DMSL_F408:
|
||||
case DMSL_F409:
|
||||
case DMSL_F410:
|
||||
case DMSL_F411:
|
||||
case DMSL_F412:
|
||||
case DMSL_F413:
|
||||
case DMSL_F414:
|
||||
case DMSL_F415:
|
||||
case DMSL_F416:
|
||||
case DMSL_F417:
|
||||
case DMSL_F418:
|
||||
case DMSL_F419:
|
||||
case DMSL_F420:
|
||||
case DMSL_F421:
|
||||
case DMSL_F422:
|
||||
case DMSL_F423:
|
||||
case DMSL_F491:
|
||||
case DMSL_F493:
|
||||
case DMSL_F496:
|
||||
case DMSL_F497:
|
||||
case DMSL_F498:
|
||||
case DMSL_F499:
|
||||
return QObject::tr("\nHardware error, please contact maintenance staff.");
|
||||
case DMSL_F495:
|
||||
return QObject::tr("\nDevice busy, please try again later.");
|
||||
case DMSL_F492:
|
||||
case DMSL_F494:
|
||||
return QObject::tr("\nThe emergency button has been pushed. Please reset it before other operations.");
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user