更改布局

This commit is contained in:
zzh 2025-10-20 17:10:42 +08:00
parent 61a27c6882
commit 18ec0257d7

View File

@ -492,6 +492,7 @@ void LightStripManager::setupLightControlArea()
connect(sendLightSelectedBtn, &QPushButton::clicked, this, &LightStripManager::onSendLightSelectedClicked);
row2Layout->addWidget(sendLightSelectedBtn);
/*
sendLightAllBtn = new QPushButton("点亮全部");
sendLightAllBtn->setMinimumHeight(40);
sendLightAllBtn->setMinimumWidth(120);
@ -508,24 +509,7 @@ void LightStripManager::setupLightControlArea()
);
connect(sendLightAllBtn, &QPushButton::clicked, this, &LightStripManager::onSendLightAllClicked);
row2Layout->addWidget(sendLightAllBtn);
// 新增:分组点亮按钮
groupLightBtn = new QPushButton("分组点亮");
groupLightBtn->setMinimumHeight(40);
groupLightBtn->setMinimumWidth(120);
groupLightBtn->setStyleSheet(
"QPushButton { "
" background-color: #9C27B0; "
" color: white; "
" font-weight: bold; "
" padding: 10px 20px; "
" border-radius: 6px; "
" font-size: 14px; "
"} "
"QPushButton:hover { background-color: #7B1FA2; }"
);
connect(groupLightBtn, &QPushButton::clicked, this, &LightStripManager::onGroupLightClicked);
row2Layout->addWidget(groupLightBtn);
*/
lightControlLayout->addLayout(row2Layout);
@ -1325,7 +1309,7 @@ void LightStripManager::updateControlButtons()
deleteSelectedBtn->setEnabled(selectedCount > 0);
sendLightSelectedBtn->setEnabled(selectedCount > 0);
sendLightAllBtn->setEnabled(totalCount > 0);
//sendLightAllBtn->setEnabled(totalCount > 0);
clearAllBtn->setEnabled(totalCount > 0);
selectAllBtn->setEnabled(totalCount > 0);
deselectAllBtn->setEnabled(selectedCount > 0);
@ -1948,6 +1932,24 @@ void LightStripManager::setupIdentityBindingArea()
row2Layout->addWidget(bindIdentityAllBtn);
row2Layout->addStretch();
// 新增:分组点亮按钮
groupLightBtn = new QPushButton("分组绑定点亮");
groupLightBtn->setMinimumHeight(40);
groupLightBtn->setMinimumWidth(120);
groupLightBtn->setStyleSheet(
"QPushButton { "
" background-color: #9C27B0; "
" color: white; "
" font-weight: bold; "
" padding: 10px 20px; "
" border-radius: 6px; "
" font-size: 14px; "
"} "
"QPushButton:hover { background-color: #7B1FA2; }"
);
connect(groupLightBtn, &QPushButton::clicked, this, &LightStripManager::onGroupLightClicked);
row2Layout->addWidget(groupLightBtn);
bindingStatusLabel = new QLabel("状态: 就绪");
bindingStatusLabel->setStyleSheet(