feat(layout): 导航菜单自动刷新

-点击导航菜单对应页面自动刷新
-设备布局示意,添加背景图片及显示修改
This commit is contained in:
lidg
2026-11-11 10:44:12 +08:00
parent 43e38f0aa8
commit 6e22fe5672
13 changed files with 268 additions and 154 deletions
+19
View File
@@ -161,6 +161,25 @@ void Widget::setupMainArea(QVBoxLayout *rootLayout)
rootLayout->addLayout(bodyLayout, 1);
connect(navList, &QListWidget::currentRowChanged, pageStack, &QStackedWidget::setCurrentIndex);
connect(pageStack, &QStackedWidget::currentChanged,
this, [this, orderPage, rackPage](int index) {
switch (index) {
case 1:
orderPage->refresh();
break;
case 2:
rackPage->refresh();
break;
case 4:
logPage->refresh();
break;
case 5:
qualityPage->refresh();
break;
default:
break;
}
});
connect(dashboardPage, &DashboardPage::systemStateChanged, this, [this](const QString &state) {
systemStateLabel->setText("系统:" + state);
});