|
|
|
@ -290,81 +290,66 @@ void RightFunctionPanel::setupIntelligenceModule()
|
|
|
|
|
m_intelligenceCard = new ModuleCard("📡 情报传输", "📡", this);
|
|
|
|
|
m_intelligenceCard->setObjectName("ModuleCard");
|
|
|
|
|
m_intelligenceCard->setProperty("data-module", "intelligence");
|
|
|
|
|
|
|
|
|
|
// 情报传达说明 - 统一样式
|
|
|
|
|
QLabel *descLabel = new QLabel("🎯 远程控制系统");
|
|
|
|
|
descLabel->setObjectName("intelligence-description");
|
|
|
|
|
descLabel->setAlignment(Qt::AlignCenter);
|
|
|
|
|
descLabel->setStyleSheet(
|
|
|
|
|
"color: #2196F3; "
|
|
|
|
|
"font-size: 14px; "
|
|
|
|
|
"font-weight: bold; "
|
|
|
|
|
"padding: 10px; "
|
|
|
|
|
"margin-bottom: 8px;"
|
|
|
|
|
);
|
|
|
|
|
m_intelligenceCard->addContent(descLabel);
|
|
|
|
|
|
|
|
|
|
// 按钮布局容器 - 增加间距
|
|
|
|
|
|
|
|
|
|
// 按钮布局容器 - 优化间距和布局
|
|
|
|
|
QWidget *buttonWidget = new QWidget();
|
|
|
|
|
QVBoxLayout *buttonLayout = new QVBoxLayout(buttonWidget);
|
|
|
|
|
buttonLayout->setSpacing(20); // 12px → 20px 增强分离感
|
|
|
|
|
buttonLayout->setContentsMargins(8, 12, 8, 12); // 增加容器边距
|
|
|
|
|
buttonLayout->setSpacing(16); // 设置合理的按钮间距
|
|
|
|
|
buttonLayout->setContentsMargins(12, 16, 12, 16); // 优化容器边距
|
|
|
|
|
|
|
|
|
|
// 主要功能:音频控制按钮 - 提升优先级
|
|
|
|
|
// 音频控制按钮 - 优化尺寸
|
|
|
|
|
m_voiceCallBtn = new QPushButton("🔊 音频控制模块");
|
|
|
|
|
m_voiceCallBtn->setObjectName("FunctionBtn");
|
|
|
|
|
m_voiceCallBtn->setProperty("class", "primary-large");
|
|
|
|
|
m_voiceCallBtn->setMinimumHeight(65); // 55px → 65px 突出主要功能
|
|
|
|
|
m_voiceCallBtn->setMinimumHeight(55); // 统一按钮高度
|
|
|
|
|
m_voiceCallBtn->setMaximumHeight(55); // 限制最大高度,防止拉伸
|
|
|
|
|
m_voiceCallBtn->setStyleSheet(
|
|
|
|
|
"QPushButton {"
|
|
|
|
|
" background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,"
|
|
|
|
|
" stop:0 #2196F3, stop:1 #1976D2);" // 统一蓝色主题
|
|
|
|
|
" color: white;"
|
|
|
|
|
" font-size: 17px;" // 16px → 17px 提升可读性
|
|
|
|
|
" font-size: 16px;"
|
|
|
|
|
" font-weight: bold;"
|
|
|
|
|
" border: 2px solid #2196F3;"
|
|
|
|
|
" border-radius: 8px;"
|
|
|
|
|
" padding: 16px;" // 12px → 16px 统一内边距
|
|
|
|
|
" padding: 12px 16px;"
|
|
|
|
|
"}"
|
|
|
|
|
"QPushButton:hover {"
|
|
|
|
|
" background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,"
|
|
|
|
|
" stop:0 #1976D2, stop:1 #1565C0);"
|
|
|
|
|
" border-color: #1976D2;"
|
|
|
|
|
" transform: translateY(-1px);" // 添加微妙的悬停效果
|
|
|
|
|
"}"
|
|
|
|
|
"QPushButton:pressed {"
|
|
|
|
|
" background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,"
|
|
|
|
|
" stop:0 #1565C0, stop:1 #0D47A1);"
|
|
|
|
|
" transform: translateY(0px);"
|
|
|
|
|
"}"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// 辅助功能:面部灯光控制按钮 - 降低优先级
|
|
|
|
|
// 灯光控制按钮 - 优化尺寸
|
|
|
|
|
m_faceLightBtn = new QPushButton("💡 灯光控制模块");
|
|
|
|
|
m_faceLightBtn->setObjectName("FunctionBtn");
|
|
|
|
|
m_faceLightBtn->setProperty("class", "secondary-medium"); // primary-large → secondary-medium
|
|
|
|
|
m_faceLightBtn->setMinimumHeight(50); // 55px → 50px 体现次要地位
|
|
|
|
|
m_faceLightBtn->setProperty("class", "secondary-medium");
|
|
|
|
|
m_faceLightBtn->setMinimumHeight(55); // 统一按钮高度
|
|
|
|
|
m_faceLightBtn->setMaximumHeight(55); // 限制最大高度,防止拉伸
|
|
|
|
|
m_faceLightBtn->setStyleSheet(
|
|
|
|
|
"QPushButton {"
|
|
|
|
|
" background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,"
|
|
|
|
|
" stop:0 #607D8B, stop:1 #455A64);" // 橙红色 → 中性灰蓝色
|
|
|
|
|
" color: white;"
|
|
|
|
|
" font-size: 15px;" // 16px → 15px 体现层次差异
|
|
|
|
|
" font-size: 16px;"
|
|
|
|
|
" font-weight: bold;"
|
|
|
|
|
" border: 2px solid #607D8B;"
|
|
|
|
|
" border-radius: 8px;"
|
|
|
|
|
" padding: 16px;" // 统一内边距
|
|
|
|
|
" padding: 12px 16px;"
|
|
|
|
|
"}"
|
|
|
|
|
"QPushButton:hover {"
|
|
|
|
|
" background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,"
|
|
|
|
|
" stop:0 #546E7A, stop:1 #37474F);"
|
|
|
|
|
" border-color: #546E7A;"
|
|
|
|
|
" transform: translateY(-1px);"
|
|
|
|
|
"}"
|
|
|
|
|
"QPushButton:pressed {"
|
|
|
|
|
" background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,"
|
|
|
|
|
" stop:0 #37474F, stop:1 #263238);"
|
|
|
|
|
" transform: translateY(0px);"
|
|
|
|
|
"}"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
@ -374,19 +359,6 @@ void RightFunctionPanel::setupIntelligenceModule()
|
|
|
|
|
buttonLayout->addWidget(m_voiceCallBtn);
|
|
|
|
|
buttonLayout->addWidget(m_faceLightBtn);
|
|
|
|
|
m_intelligenceCard->addContent(buttonWidget);
|
|
|
|
|
|
|
|
|
|
// 功能介绍 - 统一样式和间距
|
|
|
|
|
QLabel *featureLabel = new QLabel("• SSH双跳连接\n• 音频播放控制\n• 面部灯光控制\n• 实时状态监控");
|
|
|
|
|
featureLabel->setObjectName("feature-list");
|
|
|
|
|
featureLabel->setAlignment(Qt::AlignLeft);
|
|
|
|
|
featureLabel->setStyleSheet(
|
|
|
|
|
"color: #90A4AE; " // #b0b0b0 → #90A4AE 与主题更协调
|
|
|
|
|
"font-size: 12px; "
|
|
|
|
|
"padding: 12px 10px; " // 增加上下边距
|
|
|
|
|
"line-height: 1.5; " // 提升行高可读性
|
|
|
|
|
"margin-top: 8px;"
|
|
|
|
|
);
|
|
|
|
|
m_intelligenceCard->addContent(featureLabel);
|
|
|
|
|
|
|
|
|
|
m_mainLayout->addWidget(m_intelligenceCard);
|
|
|
|
|
}
|
|
|
|
|