#include "global.h"

Global::Global()
{
    _mode = Global::Mode::Analysis;
    _deviceConnectStatus = Global::DeviceConnectionStatus::Disconnected;
}

Global *Global::instance()
{
    static Global ins;
    return &ins;
}

void Global::setMode(const Global::Mode mode)
{
    if(mode != _mode){
        _mode = mode;
        emit sigModeModify(mode);
    }
}

#if 0
void Global::setDeviceConnectionStatus(const Global::DeviceConnectionStatus status)
{
    if(status != _deviceConnectStatus){
        _deviceConnectStatus = status;
        emit sigDeviceConnnectionStatusModify(status);
    }
}
#endif
