
#ifndef TOOLS_H
#define TOOLS_H

#include <QIcon>
#include <QString>

QIcon getDevIcon(QString states){
    if (states == QString("正常运行")){
        return QIcon(":/Static/fanNormal.png");
    }else if (states == QString("通讯中断")){
        return QIcon(":/Static/fanfanInterrupted.png");
    }else if (states == QString("待机等风")){
        return QIcon(":/Static/fanStandby.png");
    }else if (states == QString("停机维护")){
        return QIcon(":/Static/fanHutdown.png");
    }else if (states == QString("故障停机")){
        return QIcon(":/Static/fanError.png");
    }else if (states == QString("启动")){
        return QIcon(":/Static/fanRun.png");
    }else{
        return QIcon(":/Static/fanNormal.png");
    }
}

#endif // TOOLS_H
