mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
25 lines
604 B
C++
25 lines
604 B
C++
|
|
#include "WidgetPage.h"
|
|||
|
|
|
|||
|
|
#include "pages/WidgetPageHome.h"
|
|||
|
|
#include "pages/WidgetPageOverview.h"
|
|||
|
|
#include "pages/WidgetPageRunning.h"
|
|||
|
|
#include "pages/WidgetPageWeb.h"
|
|||
|
|
|
|||
|
|
std::shared_ptr<WidgetPage> WidgetPage::create(QWidget* parent, std::string name)
|
|||
|
|
{
|
|||
|
|
std::shared_ptr<WidgetPage> w = nullptr;
|
|||
|
|
if (name == "系统总览")
|
|||
|
|
{
|
|||
|
|
w = std::make_shared<WidgetPageOverview>(parent);
|
|||
|
|
}
|
|||
|
|
else if (name == "运行监控")
|
|||
|
|
{
|
|||
|
|
w = std::make_shared<WidgetPageRunning>(parent);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
w = std::make_shared<WidgetPageWeb>(parent, name);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return w;
|
|||
|
|
}
|