parent
8874a8e1d9
commit
27d7ca908e
@ -0,0 +1,14 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.14)
|
||||||
|
project(faceLightClient2)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3 -march=native -Wall")
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
include_directories(include)
|
||||||
|
link_directories(lib)
|
||||||
|
|
||||||
|
add_executable(faceLightClient2 main2.cpp)
|
||||||
|
target_link_libraries(faceLightClient2 libfaceLight_SDK_arm64.so)
|
||||||
|
|
||||||
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
|
Binary file not shown.
@ -0,0 +1,94 @@
|
|||||||
|
#ifndef FACELIGHTCONTROL_H
|
||||||
|
#define FACELIGHTCONTROL_H
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QProcess>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QTextEdit>
|
||||||
|
#include <QProgressBar>
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QSpinBox>
|
||||||
|
#include <QSlider>
|
||||||
|
#include <QGroupBox>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QFormLayout>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
namespace Ui {
|
||||||
|
class FaceLightControl;
|
||||||
|
}
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
class FaceLightControl : public QMainWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
FaceLightControl(QWidget *parent = nullptr);
|
||||||
|
~FaceLightControl();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
// 基础控制按钮
|
||||||
|
void on_setAllLeds_clicked();
|
||||||
|
void on_setSingleLed_clicked();
|
||||||
|
void on_startColorCycle_clicked();
|
||||||
|
void on_stopColorCycle_clicked();
|
||||||
|
void on_applyCustomPattern_clicked();
|
||||||
|
void on_turnOffAllLeds_clicked();
|
||||||
|
|
||||||
|
// SSH连接设置
|
||||||
|
void on_saveSshSettings_clicked();
|
||||||
|
void on_testConnection_clicked();
|
||||||
|
|
||||||
|
// 高级控制
|
||||||
|
void on_rgbAlternating_clicked();
|
||||||
|
void on_quickPresets_clicked();
|
||||||
|
|
||||||
|
// SSH进程处理
|
||||||
|
void onSshProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||||
|
void onSshProcessError(QProcess::ProcessError error);
|
||||||
|
|
||||||
|
// 颜色循环定时器
|
||||||
|
void onColorCycleTimer();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::FaceLightControl *ui;
|
||||||
|
QProcess *sshProcess;
|
||||||
|
QString currentCommand;
|
||||||
|
|
||||||
|
// SSH连接信息
|
||||||
|
QString m_sshHost;
|
||||||
|
QString m_sshUser;
|
||||||
|
QString m_sshPassword;
|
||||||
|
QString m_jumpHost;
|
||||||
|
QString m_jumpUser;
|
||||||
|
QString m_jumpPassword;
|
||||||
|
|
||||||
|
// 颜色循环控制
|
||||||
|
QTimer *colorCycleTimer;
|
||||||
|
QStringList cycleColors;
|
||||||
|
int currentColorIndex;
|
||||||
|
bool isCycling;
|
||||||
|
|
||||||
|
// 核心方法
|
||||||
|
void executeSSHCommand(const QString &command, const QString &description);
|
||||||
|
void updateSshSettings();
|
||||||
|
|
||||||
|
// UI设置和状态更新
|
||||||
|
void setupUI();
|
||||||
|
void updateStatus(const QString &message, bool isError = false);
|
||||||
|
void setupColorCycle();
|
||||||
|
|
||||||
|
// 命令构建方法
|
||||||
|
QString buildFaceLightCommand(const QString &mode, const QString &color = "",
|
||||||
|
int ledIndex = -1, int delay = 2000,
|
||||||
|
int times = -1, const QString &pattern = "");
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // FACELIGHTCONTROL_H
|
@ -0,0 +1,702 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>FaceLightControl</class>
|
||||||
|
<widget class="QMainWindow" name="FaceLightControl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1000</width>
|
||||||
|
<height>900</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>机器狗面部灯光控制系统</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QMainWindow {
|
||||||
|
background-color: rgb(24, 33, 45);
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton {
|
||||||
|
background-color: rgb(30, 44, 62);
|
||||||
|
color: rgb(220, 230, 240);
|
||||||
|
border: 2px solid rgba(0, 168, 255, 0.5);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 12px 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
min-height: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:hover {
|
||||||
|
background-color: rgb(50, 70, 95);
|
||||||
|
border: 2px solid rgba(0, 168, 255, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:pressed {
|
||||||
|
background-color: rgb(40, 60, 85);
|
||||||
|
border: 2px solid rgba(0, 168, 255, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel {
|
||||||
|
color: rgb(220, 230, 240);
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QComboBox, QSpinBox, QLineEdit {
|
||||||
|
background-color: rgb(30, 44, 62);
|
||||||
|
color: rgb(220, 230, 240);
|
||||||
|
border: 2px solid rgba(0, 168, 255, 0.5);
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTextEdit {
|
||||||
|
background-color: rgb(15, 22, 32);
|
||||||
|
color: rgb(220, 230, 240);
|
||||||
|
border: 2px solid rgba(0, 168, 255, 0.3);
|
||||||
|
border-radius: 5px;
|
||||||
|
font-family: "Courier New", monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QProgressBar {
|
||||||
|
border: 2px solid rgba(0, 168, 255, 0.5);
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgb(30, 44, 62);
|
||||||
|
color: rgb(220, 230, 240);
|
||||||
|
}
|
||||||
|
|
||||||
|
QProgressBar::chunk {
|
||||||
|
background-color: rgba(0, 168, 255, 0.8);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: rgb(0, 168, 255);
|
||||||
|
border: 2px solid rgba(0, 168, 255, 0.4);
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-top: 15px;
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox::title {
|
||||||
|
subcontrol-origin: margin;
|
||||||
|
subcontrol-position: top center;
|
||||||
|
padding: 0 15px;
|
||||||
|
background-color: rgb(24, 33, 45);
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>30</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="titleLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>💡 机器狗面部灯光控制系统</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QLabel {
|
||||||
|
color: rgb(0, 168, 255);
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 20px;
|
||||||
|
background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
|
||||||
|
stop:0 rgba(0, 168, 255, 0.1),
|
||||||
|
stop:1 rgba(0, 120, 180, 0.1));
|
||||||
|
border: 2px solid rgba(0, 168, 255, 0.3);
|
||||||
|
border-radius: 15px;
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="sshSettingsGroup">
|
||||||
|
<property name="title">
|
||||||
|
<string>🔗 SSH连接设置</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="sshLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="connectionLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="jumpHostGroup">
|
||||||
|
<property name="title">
|
||||||
|
<string>跳板机设置</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QGroupBox { font-size: 14px; color: rgb(180, 190, 200); }</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="jumpFormLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="jumpIpLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>跳板机IP:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditJumpIp">
|
||||||
|
<property name="text">
|
||||||
|
<string>192.168.12.1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="jumpUserLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>用户名:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditJumpUsername">
|
||||||
|
<property name="text">
|
||||||
|
<string>pi</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="jumpPasswordLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>密码:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditJumpPassword">
|
||||||
|
<property name="text">
|
||||||
|
<string>123</string>
|
||||||
|
</property>
|
||||||
|
<property name="echoMode">
|
||||||
|
<enum>QLineEdit::Password</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="targetHostGroup">
|
||||||
|
<property name="title">
|
||||||
|
<string>目标机器狗设置</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QGroupBox { font-size: 14px; color: rgb(180, 190, 200); }</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="targetFormLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="targetIpLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>机器狗IP:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditTargetIp">
|
||||||
|
<property name="text">
|
||||||
|
<string>192.168.123.13</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="targetUserLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>用户名:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditTargetUsername">
|
||||||
|
<property name="text">
|
||||||
|
<string>unitree</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="targetPasswordLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>密码:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="lineEditTargetPassword">
|
||||||
|
<property name="text">
|
||||||
|
<string>123</string>
|
||||||
|
</property>
|
||||||
|
<property name="echoMode">
|
||||||
|
<enum>QLineEdit::Password</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="sshButtonLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="saveSshSettings">
|
||||||
|
<property name="text">
|
||||||
|
<string>💾 保存设置</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="testConnection">
|
||||||
|
<property name="text">
|
||||||
|
<string>🔍 测试连接</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="connectionStatusLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>连接状态: 等待设置...</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(160, 170, 180); font-size: 12px;</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="mainControlLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="basicControlGroup">
|
||||||
|
<property name="title">
|
||||||
|
<string>🎨 基础控制</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="basicControlLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="colorFormLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="colorLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>颜色选择:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QComboBox" name="colorComboBox">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Red</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Green</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Blue</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Yellow</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>White</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Black</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="ledIndexLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>LED索引:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="ledIndexSpinBox">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="setAllLeds">
|
||||||
|
<property name="text">
|
||||||
|
<string>💡 设置所有LED</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
background-color: rgb(45, 125, 65);
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
QPushButton:hover { background-color: rgb(65, 145, 85); }
|
||||||
|
QPushButton:pressed { background-color: rgb(55, 135, 75); }</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="setSingleLed">
|
||||||
|
<property name="text">
|
||||||
|
<string>🔆 设置单个LED</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
background-color: rgb(85, 125, 165);
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
QPushButton:hover { background-color: rgb(105, 145, 185); }
|
||||||
|
QPushButton:pressed { background-color: rgb(95, 135, 175); }</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="turnOffAllLeds">
|
||||||
|
<property name="text">
|
||||||
|
<string>🌑 关闭所有LED</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
background-color: rgb(120, 60, 60);
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
QPushButton:hover { background-color: rgb(140, 80, 80); }
|
||||||
|
QPushButton:pressed { background-color: rgb(130, 70, 70); }</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="advancedControlGroup">
|
||||||
|
<property name="title">
|
||||||
|
<string>⚡ 高级控制</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="advancedControlLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="cycleLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>🔄 颜色循环设置:</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font-weight: bold; color: rgb(0, 168, 255);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<layout class="QFormLayout" name="cycleFormLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="cycleDelayLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>延时(ms):</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QSpinBox" name="cycleDelaySpinBox">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>10000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>1000</number>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> ms</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="cycleTimesLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>循环次数:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QSpinBox" name="cycleTimesSpinBox">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="specialValueText">
|
||||||
|
<string>无限循环</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="cycleButtonLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="startColorCycle">
|
||||||
|
<property name="text">
|
||||||
|
<string>▶️ 开始循环</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
background-color: rgb(45, 125, 65);
|
||||||
|
}
|
||||||
|
QPushButton:hover { background-color: rgb(65, 145, 85); }</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="stopColorCycle">
|
||||||
|
<property name="text">
|
||||||
|
<string>⏹️ 停止循环</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
background-color: rgb(165, 85, 45);
|
||||||
|
}
|
||||||
|
QPushButton:hover { background-color: rgb(185, 105, 65); }</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="patternLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>🎭 自定义图案:</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font-weight: bold; color: rgb(0, 168, 255);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="patternLineEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>例如: 0:red,3:green,6:blue</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="applyCustomPattern">
|
||||||
|
<property name="text">
|
||||||
|
<string>🎨 应用自定义图案</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="rgbAlternating">
|
||||||
|
<property name="text">
|
||||||
|
<string>🌈 RGB交替模式</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="presetGroup">
|
||||||
|
<property name="title">
|
||||||
|
<string>⚡ 快速预设</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="presetLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="preset1">
|
||||||
|
<property name="text">
|
||||||
|
<string>🔴 预设1: 红色</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
background-color: rgb(180, 60, 60);
|
||||||
|
}
|
||||||
|
QPushButton:hover { background-color: rgb(200, 80, 80); }</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="preset2">
|
||||||
|
<property name="text">
|
||||||
|
<string>🔵 预设2: 蓝色</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
background-color: rgb(60, 60, 180);
|
||||||
|
}
|
||||||
|
QPushButton:hover { background-color: rgb(80, 80, 200); }</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="preset3">
|
||||||
|
<property name="text">
|
||||||
|
<string>🟢 预设3: 绿色</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
background-color: rgb(60, 180, 60);
|
||||||
|
}
|
||||||
|
QPushButton:hover { background-color: rgb(80, 200, 80); }</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="preset4">
|
||||||
|
<property name="text">
|
||||||
|
<string>⚪ 预设4: 白色</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QPushButton {
|
||||||
|
background-color: rgb(140, 140, 140);
|
||||||
|
color: rgb(30, 30, 30);
|
||||||
|
}
|
||||||
|
QPushButton:hover { background-color: rgb(160, 160, 160); }</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<spacer name="presetSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QProgressBar" name="progressBar">
|
||||||
|
<property name="value">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="textVisible">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="logLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>📋 执行日志:</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font-size: 16px; font-weight: bold; color: rgb(0, 168, 255);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<widget class="QTextEdit" name="logTextEdit">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>200</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>1000</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
Loading…
Reference in new issue