From 18ec0257d7d72118db24caac705630332906ca7b Mon Sep 17 00:00:00 2001 From: zzh <838331105@qq.com> Date: Mon, 20 Oct 2025 17:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lightstripmanager.cpp | 40 ++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/lightstripmanager.cpp b/src/lightstripmanager.cpp index 8433f06..34a3769 100644 --- a/src/lightstripmanager.cpp +++ b/src/lightstripmanager.cpp @@ -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(