#include "global.h"

MessageDialogBtn g_msgDlgBtn = btn_Null;

QHash<int, QColor> g_globalColor;
QHash<int, QString> g_timeUnit;

void initializeGlobalVariable()
{
    //颜色
    g_globalColor.insert(0, QColor(153, 50, 204)); //深兰花紫
    g_globalColor.insert(1, QColor(127, 255, 170)); //绿玉\碧绿色
    g_globalColor.insert(2, QColor(0, 206, 209)); //深绿宝石
    g_globalColor.insert(3, QColor(46, 139, 87)); //海洋绿
    g_globalColor.insert(4, QColor(225, 215, 0)); //金色
    g_globalColor.insert(5, QColor(255, 165, 0)); //橙色
    g_globalColor.insert(6, QColor(144, 238, 144)); //浅绿色
    g_globalColor.insert(7, QColor(218, 112, 214)); //兰花的紫色
    g_globalColor.insert(8, QColor(70, 130, 180)); //钢蓝
    g_globalColor.insert(9, QColor(218, 165, 32)); //秋麒麟
    g_globalColor.insert(10, QColor(240, 128, 128)); //淡珊瑚色
    g_globalColor.insert(11, QColor(70, 130, 180)); //钢蓝
    //时间单位
    g_timeUnit.insert(TU_Year, QString::fromWCharArray(L"365d"));
    g_timeUnit.insert(TU_Month, QString::fromWCharArray(L"30d"));
    g_timeUnit.insert(TU_Day, QString::fromWCharArray(L"1d"));
    g_timeUnit.insert(TU_Hour, QString::fromWCharArray(L"1h"));
    g_timeUnit.insert(TU_Minute_30, QString::fromWCharArray(L"30m"));
    g_timeUnit.insert(TU_Minute_20, QString::fromWCharArray(L"20m"));
    g_timeUnit.insert(TU_Minute_15, QString::fromWCharArray(L"15m"));
    g_timeUnit.insert(TU_Minute_10, QString::fromWCharArray(L"10m"));
    g_timeUnit.insert(TU_Minute_5, QString::fromWCharArray(L"5m"));
    g_timeUnit.insert(TU_Minute_3, QString::fromWCharArray(L"3m"));
    g_timeUnit.insert(TU_Minute_1, QString::fromWCharArray(L"1m"));
    g_timeUnit.insert(TU_Second_30, QString::fromWCharArray(L"30s"));
    g_timeUnit.insert(TU_Second_10, QString::fromWCharArray(L"10s"));
    g_timeUnit.insert(TU_Second_1, QString::fromWCharArray(L"1s"));
    g_timeUnit.insert(TU_MSecond_500, QString::fromWCharArray(L"500ms"));
    g_timeUnit.insert(TU_MSecond_100, QString::fromWCharArray(L"100ms"));
    g_timeUnit.insert(TU_MSecond_50, QString::fromWCharArray(L"50ms"));
    g_timeUnit.insert(TU_MSecond_10, QString::fromWCharArray(L"10ms"));
}
