#pragma once

#include "WidgetPage.h"

#include <QtWebEngineWidgets/QWebEngineView>
class InfoItem;
class EnvItem;

class WidgetPageHome : public WidgetPage
{
public:
    WidgetPageHome(QWidget* parent);
    void slotLoadFinished(bool bOK);

    QLabel labTitle_;

    QLabel labMapBkg_;

    std::shared_ptr<Panel> panelStation_;
    std::shared_ptr<InfoItem> infoNum2_;
    std::shared_ptr<InfoItem> infoNum1_;
    std::shared_ptr<InfoItem> infoNum3_;
    std::shared_ptr<InfoItem> infoNum4_;


    std::shared_ptr<Panel> panelSwap_;
    std::shared_ptr<ChartBarView> chartbar1_;

    std::shared_ptr<Panel> panel2_;
    std::shared_ptr<ChartBarView> chartbar2_;

    std::shared_ptr<Panel> panel3_;
    std::shared_ptr<ChartBarView> chartbar3_;


    std::shared_ptr<Panel> panelStat_;
    std::shared_ptr<LabelPairV> labSwapCount_;
    std::shared_ptr<LabelPairV> labSwapCountDay_;
    std::shared_ptr<LabelPairV> labElectCount_;
    std::shared_ptr<LabelPairV> labElectCountDay_;
    std::shared_ptr<LabelPairV> labCarbonCount_;
    std::shared_ptr<LabelPairV> labP1_;

    std::shared_ptr<Panel> panelEnv_;
    std::shared_ptr<Panel> panelPower_;

    QLabel labProgressCpu_;
    std::shared_ptr<ProgressView> progressCpu_;

    QLabel labProgressMem_;
    std::shared_ptr<ProgressView> progressMem_;

    QLabel labProgressDisk_;
    std::shared_ptr<ProgressView> progressDisk_;

    std::shared_ptr<EnvItem> envTemperature_;
    std::shared_ptr<EnvItem> envHumidity_;
    std::shared_ptr<EnvItem> envWind_;
    std::shared_ptr<EnvItem> envSolar_;

    std::shared_ptr<ChartLineView> chartline_;

    std::shared_ptr<QWebEngineView> wWebView = nullptr;
};