mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
上传项目代码
This commit is contained in:
25
src/widgets/WidgetPage.cpp
Normal file
25
src/widgets/WidgetPage.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user