|
|
|
@ -61,7 +61,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|
|
|
|
, m_enemyStatsDialog(nullptr)
|
|
|
|
|
, m_visionProcess(nullptr)
|
|
|
|
|
// , m_droneControlDialog(nullptr)
|
|
|
|
|
// , m_robotDogControlDialog(nullptr)
|
|
|
|
|
, m_robotDogControlDialog(nullptr)
|
|
|
|
|
{
|
|
|
|
|
m_ui->setupUi(this);
|
|
|
|
|
|
|
|
|
@ -71,7 +71,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|
|
|
|
|
|
|
|
|
// 初始化现代样式管理器
|
|
|
|
|
initializeModernStyles();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化默认数据
|
|
|
|
|
m_robotList.append(qMakePair(QString("Alice"), QString("192.168.0.1")));
|
|
|
|
|
m_robotList.append(qMakePair(QString("Bob"), QString("192.168.0.2")));
|
|
|
|
@ -91,10 +91,10 @@ MainWindow::~MainWindow()
|
|
|
|
|
// delete m_droneControlDialog;
|
|
|
|
|
// m_droneControlDialog = nullptr;
|
|
|
|
|
// }
|
|
|
|
|
// if (m_robotDogControlDialog) {
|
|
|
|
|
// delete m_robotDogControlDialog;
|
|
|
|
|
// m_robotDogControlDialog = nullptr;
|
|
|
|
|
// }
|
|
|
|
|
if (m_robotDogControlDialog) {
|
|
|
|
|
delete m_robotDogControlDialog;
|
|
|
|
|
m_robotDogControlDialog = nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 停止并清理视觉识别进程
|
|
|
|
|
if (m_visionProcess) {
|
|
|
|
@ -1207,7 +1207,7 @@ void MainWindow::onEnemyStatsRequested()
|
|
|
|
|
// 连接敌情数据更新信号
|
|
|
|
|
connect(m_enemyStatsDialog, &EnemyStatsDialog::enemyDataUpdated,
|
|
|
|
|
[this](int totalCount, int highThreatCount) {
|
|
|
|
|
SystemLogger::getInstance()->logInfo(
|
|
|
|
|
SystemLogger::getInstance()->logInfo(
|
|
|
|
|
QString("敌情数据更新:总数 %1,高威胁 %2")
|
|
|
|
|
.arg(totalCount).arg(highThreatCount)
|
|
|
|
|
);
|
|
|
|
@ -1382,17 +1382,23 @@ void MainWindow::onRobotDogControlRequested()
|
|
|
|
|
{
|
|
|
|
|
SystemLogger::getInstance()->logInfo("机器狗控制请求");
|
|
|
|
|
|
|
|
|
|
// 暂时使用简单的消息框来测试功能
|
|
|
|
|
QMessageBox::information(this, "机器狗控制",
|
|
|
|
|
"机器狗控制界面功能正在开发中...\n"
|
|
|
|
|
"将包含以下功能:\n"
|
|
|
|
|
"• 运动控制(前进、后退、转向)\n"
|
|
|
|
|
"• 姿态控制(站立、趴下、跳跃)\n"
|
|
|
|
|
"• 地图建构和导航\n"
|
|
|
|
|
"• 视觉识别和跟踪\n"
|
|
|
|
|
"• 设备状态监控");
|
|
|
|
|
// 创建机器狗控制对话框(如果还没有创建)
|
|
|
|
|
if (!m_robotDogControlDialog) {
|
|
|
|
|
m_robotDogControlDialog = new RobotDogControlDialog(this);
|
|
|
|
|
|
|
|
|
|
// 连接信号(如果需要的话)
|
|
|
|
|
// connect(m_robotDogControlDialog, &RobotDogControlDialog::someSignal,
|
|
|
|
|
// this, &MainWindow::someSlot);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 显示对话框
|
|
|
|
|
m_robotDogControlDialog->show();
|
|
|
|
|
m_robotDogControlDialog->raise();
|
|
|
|
|
m_robotDogControlDialog->activateWindow();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::startVisionWebService()
|
|
|
|
|
{
|
|
|
|
|
SystemLogger::getInstance()->logInfo("启动视觉识别系统Web服务");
|
|
|
|
|