43 lines
877 B
C
43 lines
877 B
C
|
|
#ifndef USCTSTATEMANAGER_H
|
|||
|
|
#define USCTSTATEMANAGER_H
|
|||
|
|
|
|||
|
|
#include <QObject>
|
|||
|
|
#include <QMap>
|
|||
|
|
|
|||
|
|
enum UsctState
|
|||
|
|
{
|
|||
|
|
DmsState = 0, //Dms是否有致命错误,false代表存在致命错误
|
|||
|
|
DmsConnectionState,
|
|||
|
|
ReconState, //Recon是否有致命错误,false代表存在致命错误
|
|||
|
|
ReconMppsState,
|
|||
|
|
ReconPacsState,
|
|||
|
|
ReconConnectionState,
|
|||
|
|
ReconEmptyScanState,
|
|||
|
|
ReconDBState
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
class UsctStateManager : public QObject
|
|||
|
|
{
|
|||
|
|
Q_OBJECT
|
|||
|
|
public:
|
|||
|
|
static UsctStateManager* getInstance();
|
|||
|
|
|
|||
|
|
bool getUsctState();
|
|||
|
|
void setState(int aStateCode, bool aState);
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
QString getStateErrorMessage(int aStateCode);
|
|||
|
|
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
UsctStateManager(QObject* aParent = nullptr);
|
|||
|
|
UsctStateManager(const UsctStateManager&);
|
|||
|
|
UsctStateManager& operator=(const UsctStateManager&);
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
QMap<int, bool> mState;
|
|||
|
|
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
#endif // USCTSTATEMANAGER_H
|