#ifndef DP_GLOBALS_H
#define DP_GLOBALS_H

enum DataPanelType
{
    lineChart = 0, //折线图
    curveChart, //曲线图
    barChart, //柱状图
    dotChart, //点图
    pieChart, //饼图
    heatMap, //热力图
    dial, //仪表图
    table, //数据表
    map //地图
};

enum RealTimeDataType
{
    power = 0, //功率
    voltage, //电压
    current //电流
};

#include <QStandardItemModel>
struct configurationResults
{
    QStandardItemModel* m_pModel_dataType;
    QStandardItemModel* m_pModel_dataSource;
    QString dataServiceIP;
    int dataServicePort;

    configurationResults()
    {
        m_pModel_dataType = nullptr;
        m_pModel_dataSource = nullptr;

        dataServiceIP = "127.0.0.1";
        dataServicePort = 1987;
    }

    void setParent(QObject* parent)
    {
        m_pModel_dataType = new QStandardItemModel(parent);
        m_pModel_dataSource = new QStandardItemModel(parent);
    }
};

#define itemRole_tag 1
#define itemRole_stationID 2
#define itemRole_componentID 3
#define itemRole_pointID 4
#define itemRole_dataType 5

#endif
