Merge branch 'main' of https://bdgit.educoder.net/pp3xivymc/Software_Architecture
commit
7aaeacd571
@ -0,0 +1,467 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>JT-101 战场探索系统</title>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||||
|
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
|
||||||
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
colors: {
|
||||||
|
primary: '#0a2463',
|
||||||
|
secondary: '#1e3a8a',
|
||||||
|
accent: '#ff7d00',
|
||||||
|
success: '#3dd598',
|
||||||
|
warning: '#ffbe0b',
|
||||||
|
danger: '#e63946',
|
||||||
|
dark: '#051937',
|
||||||
|
'dark-light': '#112140'
|
||||||
|
},
|
||||||
|
fontFamily: {
|
||||||
|
sans: ['Inter', 'system-ui', 'sans-serif'],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style type="text/tailwindcss">
|
||||||
|
@layer utilities {
|
||||||
|
.content-auto {
|
||||||
|
content-visibility: auto;
|
||||||
|
}
|
||||||
|
.scrollbar-thin {
|
||||||
|
scrollbar-width: thin;
|
||||||
|
}
|
||||||
|
.scrollbar-thin::-webkit-scrollbar {
|
||||||
|
width: 4px;
|
||||||
|
}
|
||||||
|
.scrollbar-thin::-webkit-scrollbar-thumb {
|
||||||
|
background-color: rgba(156, 163, 175, 0.5);
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
.device-card {
|
||||||
|
@apply bg-dark-light rounded-lg p-3 mb-2 transition-all duration-300 hover:bg-secondary/50 border border-gray-700/50;
|
||||||
|
}
|
||||||
|
.status-indicator {
|
||||||
|
@apply w-2 h-2 rounded-full inline-block mr-2;
|
||||||
|
}
|
||||||
|
.btn-primary {
|
||||||
|
@apply bg-accent hover:bg-accent/80 text-white font-medium py-2 px-4 rounded transition-all duration-300;
|
||||||
|
}
|
||||||
|
.tab-active {
|
||||||
|
@apply border-b-2 border-accent text-white;
|
||||||
|
}
|
||||||
|
.tab-inactive {
|
||||||
|
@apply border-b-2 border-transparent text-gray-400 hover:text-gray-300;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="bg-dark text-gray-200 h-screen flex flex-col overflow-hidden">
|
||||||
|
<!-- 顶部导航栏 -->
|
||||||
|
<header class="bg-primary/80 backdrop-blur-sm border-b border-gray-700/50 px-4 py-2 flex justify-between items-center">
|
||||||
|
<div class="flex items-center space-x-4">
|
||||||
|
<button class="text-gray-300 hover:text-white transition-colors">
|
||||||
|
<i class="fa fa-bars text-xl"></i>
|
||||||
|
</button>
|
||||||
|
<h1 class="text-xl font-bold text-white">JT-101 战场探索系统</h1>
|
||||||
|
<div class="hidden md:flex space-x-6 ml-8">
|
||||||
|
<button class="text-sm hover:text-white transition-colors">任务</button>
|
||||||
|
<button class="text-sm hover:text-white transition-colors">设置</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center space-x-4">
|
||||||
|
<button class="bg-dark-light hover:bg-secondary text-sm py-1 px-3 rounded flex items-center transition-colors">
|
||||||
|
<i class="fa fa-power-off mr-2"></i>电源
|
||||||
|
</button>
|
||||||
|
<button class="bg-dark-light hover:bg-secondary text-sm py-1 px-3 rounded flex items-center transition-colors">
|
||||||
|
<i class="fa fa-refresh mr-2"></i>同步
|
||||||
|
</button>
|
||||||
|
<button class="bg-dark-light hover:bg-secondary text-sm py-1 px-3 rounded flex items-center transition-colors relative">
|
||||||
|
<i class="fa fa-bell mr-2"></i>警报
|
||||||
|
<span class="absolute -top-1 -right-1 bg-danger text-white text-xs rounded-full w-4 h-4 flex items-center justify-center">1</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="hidden md:flex items-center space-x-2 ml-6">
|
||||||
|
<button class="bg-dark-light hover:bg-secondary text-sm py-1 px-3 rounded transition-colors">标准视图</button>
|
||||||
|
<button class="bg-dark-light hover:bg-secondary text-sm py-1 px-3 rounded transition-colors">全屏视图</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-4 flex items-center">
|
||||||
|
<span class="text-success flex items-center text-sm">
|
||||||
|
<i class="fa fa-circle mr-1 text-xs"></i>系统正常运行中
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header> <!-- 主内容区 -->
|
||||||
|
<main class="flex flex-1 overflow-hidden">
|
||||||
|
<!-- 左侧设备管理面板 -->
|
||||||
|
<aside class="w-64 bg-dark-light border-r border-gray-700/50 flex flex-col">
|
||||||
|
<div class="p-3 border-b border-gray-700/50">
|
||||||
|
<h2 class="font-bold text-lg mb-2">设备管理</h2>
|
||||||
|
<button class="w-full btn-primary flex items-center justify-center">
|
||||||
|
<i class="fa fa-plus mr-2"></i>添加设备
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex-1 overflow-y-auto p-2 scrollbar-thin">
|
||||||
|
<!-- 无人机设备 -->
|
||||||
|
<div class="device-card">
|
||||||
|
<div class="flex items-start">
|
||||||
|
<div class="text-blue-400 mr-3 mt-1">
|
||||||
|
<i class="fa fa-plane text-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<h3 class="font-medium text-white">侦察机-01</h3>
|
||||||
|
<span class="text-xs bg-success/20 text-success px-2 py-0.5 rounded-full">在线</span>
|
||||||
|
</div>
|
||||||
|
<p class="text-xs text-gray-400 mt-1">IP: 192.168.1.101</p>
|
||||||
|
<p class="text-xs text-gray-400">N39.90, E116.40</p>
|
||||||
|
<div class="mt-2 flex items-center">
|
||||||
|
<span class="text-xs text-gray-400 mr-2">信号:</span>
|
||||||
|
<div class="w-full bg-gray-700 rounded-full h-1.5">
|
||||||
|
<div class="bg-success h-1.5 rounded-full" style="width: 90%"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 机器狗设备 -->
|
||||||
|
<div class="device-card">
|
||||||
|
<div class="flex items-start">
|
||||||
|
<div class="text-green-400 mr-3 mt-1">
|
||||||
|
<i class="fa fa-paw text-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<h3 class="font-medium text-white">探测狗-02</h3>
|
||||||
|
<span class="text-xs bg-warning/20 text-warning px-2 py-0.5 rounded-full">信号弱</span>
|
||||||
|
</div>
|
||||||
|
<p class="text-xs text-gray-400 mt-1">IP: 192.168.1.102</p>
|
||||||
|
<p class="text-xs text-gray-400">N39.91, E116.41</p>
|
||||||
|
<div class="mt-2 flex items-center">
|
||||||
|
<span class="text-xs text-gray-400 mr-2">信号:</span>
|
||||||
|
<div class="w-full bg-gray-700 rounded-full h-1.5">
|
||||||
|
<div class="bg-warning h-1.5 rounded-full" style="width: 40%"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 离线设备 -->
|
||||||
|
<div class="device-card opacity-70">
|
||||||
|
<div class="flex items-start">
|
||||||
|
<div class="text-gray-400 mr-3 mt-1">
|
||||||
|
<i class="fa fa-plane text-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<h3 class="font-medium text-gray-400">侦察机-03</h3>
|
||||||
|
<span class="text-xs bg-gray-700 text-gray-400 px-2 py-0.5 rounded-full">离线</span>
|
||||||
|
</div>
|
||||||
|
<p class="text-xs text-gray-500 mt-1">IP: 192.168.1.103</p>
|
||||||
|
<p class="text-xs text-gray-500">N39.92, E116.39</p>
|
||||||
|
<div class="mt-2 flex items-center">
|
||||||
|
<span class="text-xs text-gray-500 mr-2">信号:</span>
|
||||||
|
<div class="w-full bg-gray-700 rounded-full h-1.5">
|
||||||
|
<div class="bg-gray-500 h-1.5 rounded-full" style="width: 0%"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 机器狗设备 -->
|
||||||
|
<div class="device-card">
|
||||||
|
<div class="flex items-start">
|
||||||
|
<div class="text-green-400 mr-3 mt-1">
|
||||||
|
<i class="fa fa-paw text-xl"></i>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<h3 class="font-medium text-white">探测狗-04</h3>
|
||||||
|
<span class="text-xs bg-success/20 text-success px-2 py-0.5 rounded-full">在线</span>
|
||||||
|
</div>
|
||||||
|
<p class="text-xs text-gray-400 mt-1">IP: 192.168.1.104</p>
|
||||||
|
<p class="text-xs text-gray-400">N39.89, E116.42</p>
|
||||||
|
<div class="mt-2 flex items-center">
|
||||||
|
<span class="text-xs text-gray-400 mr-2">信号:</span>
|
||||||
|
<div class="w-full bg-gray-700 rounded-full h-1.5">
|
||||||
|
<div class="bg-success h-1.5 rounded-full" style="width: 75%"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<!-- 中央地图区域 -->
|
||||||
|
<section class="flex-1 relative">
|
||||||
|
<div id="map" class="w-full h-full"></div>
|
||||||
|
|
||||||
|
<!-- 地图控制按钮 -->
|
||||||
|
<div class="absolute bottom-4 left-4 bg-dark-light/80 backdrop-blur-sm rounded-lg p-2 border border-gray-700/50 flex space-x-2">
|
||||||
|
<button class="bg-secondary text-white px-3 py-1 text-sm rounded">标准</button>
|
||||||
|
<button class="bg-dark-light hover:bg-secondary px-3 py-1 text-sm rounded transition-colors">卫星</button>
|
||||||
|
<button class="bg-dark-light hover:bg-secondary px-3 py-1 text-sm rounded transition-colors">地形</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 地图缩放控制 -->
|
||||||
|
<div class="absolute top-4 right-4 bg-dark-light/80 backdrop-blur-sm rounded-lg border border-gray-700/50 flex flex-col">
|
||||||
|
<button class="w-8 h-8 flex items-center justify-center hover:bg-secondary transition-colors border-b border-gray-700/50">
|
||||||
|
<i class="fa fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
<button class="w-8 h-8 flex items-center justify-center hover:bg-secondary transition-colors">
|
||||||
|
<i class="fa fa-minus"></i>
|
||||||
|
</button>
|
||||||
|
<button class="w-8 h-8 flex items-center justify-center hover:bg-secondary transition-colors border-t border-gray-700/50">
|
||||||
|
<i class="fa fa-location-arrow"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- 右侧功能面板 -->
|
||||||
|
<aside class="w-80 bg-dark-light border-l border-gray-700/50 flex flex-col">
|
||||||
|
<!-- 功能标签页 -->
|
||||||
|
<div class="flex border-b border-gray-700/50">
|
||||||
|
<button class="flex-1 py-3 text-sm font-medium tab-inactive">战场探索</button>
|
||||||
|
<button class="flex-1 py-3 text-sm font-medium tab-active">情报传输</button>
|
||||||
|
<button class="flex-1 py-3 text-sm font-medium tab-inactive">敌情统计</button>
|
||||||
|
<button class="flex-1 py-3 text-sm font-medium tab-inactive">实时情报</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 情报传输面板 -->
|
||||||
|
<div class="flex-1 overflow-y-auto p-4 scrollbar-thin">
|
||||||
|
<div class="text-center mb-6">
|
||||||
|
<div class="w-24 h-24 bg-danger/20 rounded-full flex items-center justify-center mx-auto mb-2">
|
||||||
|
<i class="fa fa-microphone text-3xl text-danger"></i>
|
||||||
|
</div>
|
||||||
|
<p class="text-sm text-gray-400">按住说话</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-4">
|
||||||
|
<div class="flex justify-between items-center mb-2">
|
||||||
|
<span class="text-sm text-gray-400">音量</span>
|
||||||
|
<span class="text-sm text-gray-400">80%</span>
|
||||||
|
</div>
|
||||||
|
<input type="range" min="0" max="100" value="80" class="w-full accent-accent h-1.5">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3 class="text-sm font-medium mb-3 mt-6">最近通话</h3>
|
||||||
|
|
||||||
|
<div class="space-y-3">
|
||||||
|
<div class="bg-primary/30 p-3 rounded-lg hover:bg-primary/50 transition-colors cursor-pointer">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<span class="font-medium text-white">指挥中心</span>
|
||||||
|
<span class="text-xs text-gray-400">05:23</span>
|
||||||
|
</div>
|
||||||
|
<p class="text-xs text-gray-400 mt-1">今天 09:45</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-primary/30 p-3 rounded-lg hover:bg-primary/50 transition-colors cursor-pointer">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<span class="font-medium text-white">侦察小队A</span>
|
||||||
|
<span class="text-xs text-gray-400">02:47</span>
|
||||||
|
</div>
|
||||||
|
<p class="text-xs text-gray-400 mt-1">今天 08:12</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-primary/30 p-3 rounded-lg hover:bg-primary/50 transition-colors cursor-pointer">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<span class="font-medium text-white">火力支援单位</span>
|
||||||
|
<span class="text-xs text-gray-400">08:15</span>
|
||||||
|
</div>
|
||||||
|
<p class="text-xs text-gray-400 mt-1">昨天 16:30</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- 底部状态栏 -->
|
||||||
|
<footer class="bg-primary/80 backdrop-blur-sm border-t border-gray-700/50 px-4 py-2 text-xs flex justify-between items-center">
|
||||||
|
<div class="flex space-x-6">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<i class="fa fa-wifi text-success mr-2"></i>
|
||||||
|
<span>连接状态: 正常</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center">
|
||||||
|
<i class="fa fa-sync text-blue-400 mr-2"></i>
|
||||||
|
<span>数据同步: 最新</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center">
|
||||||
|
<i class="fa fa-clock-o text-gray-400 mr-2"></i>
|
||||||
|
<span id="system-time">系统时间: 2023-11-15 14:30:45</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex space-x-6">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<i class="fa fa-microchip text-gray-400 mr-2"></i>
|
||||||
|
<span>CPU: 35%</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center">
|
||||||
|
<i class="fa fa-memory text-gray-400 mr-2"></i>
|
||||||
|
<span>内存: 42%</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center">
|
||||||
|
<i class="fa fa-user text-gray-400 mr-2"></i>
|
||||||
|
<span>操作员: Admin</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- 实时情报侧边栏 (默认隐藏) -->
|
||||||
|
<div id="intelligence-panel" class="fixed top-0 right-0 h-full w-80 bg-dark-light transform translate-x-full transition-transform duration-300 ease-in-out border-l border-gray-700/50 z-50">
|
||||||
|
<div class="p-3 border-b border-gray-700/50 flex justify-between items-center">
|
||||||
|
<h2 class="font-bold text-lg">实时情报 & 日志</h2>
|
||||||
|
<button id="close-intel-panel" class="text-gray-400 hover:text-white">
|
||||||
|
<i class="fa fa-times"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="p-3">
|
||||||
|
<div class="bg-danger/20 text-danger p-3 rounded-lg mb-4 flex items-start">
|
||||||
|
<i class="fa fa-exclamation-triangle mt-1 mr-2"></i>
|
||||||
|
<div>
|
||||||
|
<p class="font-medium">系统警报: 1</p>
|
||||||
|
<p class="text-xs mt-1">探测狗-02 信号强度较低</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="space-y-2 max-h-[calc(100vh-180px)] overflow-y-auto scrollbar-thin">
|
||||||
|
<div class="text-danger text-sm">
|
||||||
|
<span class="text-gray-400">[14:30:50]</span> 识别到敌情! 坐标 [116.39, 39.91]
|
||||||
|
</div>
|
||||||
|
<div class="text-blue-400 text-sm">
|
||||||
|
<span class="text-gray-400">[14:30:48]</span> 无人机-01 已拍摄照片 [IMG_0255.JPG]
|
||||||
|
</div>
|
||||||
|
<div class="text-warning text-sm">
|
||||||
|
<span class="text-gray-400">[14:30:12]</span> 机器狗-A 信号强度较低
|
||||||
|
</div>
|
||||||
|
<div class="text-gray-300 text-sm">
|
||||||
|
<span class="text-gray-400">[14:29:55]</span> 机器狗-A 已到达指定导航点
|
||||||
|
</div>
|
||||||
|
<div class="text-gray-300 text-sm">
|
||||||
|
<span class="text-gray-400">[14:28:40]</span> 无人机-01 起飞成功,高度 50m
|
||||||
|
</div>
|
||||||
|
<div class="text-gray-300 text-sm">
|
||||||
|
<span class="text-gray-400">[14:27:15]</span> 系统同步完成,数据更新至最新
|
||||||
|
</div>
|
||||||
|
<div class="text-gray-300 text-sm">
|
||||||
|
<span class="text-gray-400">[14:25:30]</span> 探测狗-04 开始自主建图
|
||||||
|
</div>
|
||||||
|
<div class="text-gray-300 text-sm">
|
||||||
|
<span class="text-gray-400">[14:20:10]</span> 与指挥中心建立语音连接
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// 初始化地图
|
||||||
|
const map = L.map('map').setView([39.9042, 116.4074], 15); // 默认北京坐标
|
||||||
|
|
||||||
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
|
}).addTo(map);
|
||||||
|
|
||||||
|
// 自定义设备图标
|
||||||
|
const droneIcon = L.icon({
|
||||||
|
iconUrl: 'https://cdn-icons-png.flaticon.com/512/1637/1637445.png',
|
||||||
|
iconSize: [32, 32],
|
||||||
|
iconAnchor: [16, 16]
|
||||||
|
});
|
||||||
|
|
||||||
|
const robotDogIcon = L.icon({
|
||||||
|
iconUrl: 'https://cdn-icons-png.flaticon.com/512/616/616559.png',
|
||||||
|
iconSize: [32, 32],
|
||||||
|
iconAnchor: [16, 16]
|
||||||
|
});
|
||||||
|
|
||||||
|
const enemyIcon = L.icon({
|
||||||
|
iconUrl: 'https://cdn-icons-png.flaticon.com/512/616/616559.png',
|
||||||
|
iconSize: [36, 36],
|
||||||
|
iconAnchor: [18, 18]
|
||||||
|
});
|
||||||
|
|
||||||
|
// 添加设备标记
|
||||||
|
L.marker([39.90, 116.40], {icon: droneIcon}).addTo(map)
|
||||||
|
.bindPopup('<b>侦察机-01</b><br>在线 - 飞行中').openPopup();
|
||||||
|
|
||||||
|
L.marker([39.91, 116.41], {icon: robotDogIcon}).addTo(map)
|
||||||
|
.bindPopup('<b>探测狗-02</b><br>在线 - 信号弱');
|
||||||
|
|
||||||
|
L.marker([39.89, 116.42], {icon: robotDogIcon}).addTo(map)
|
||||||
|
.bindPopup('<b>探测狗-04</b><br>在线 - 待命');
|
||||||
|
|
||||||
|
// 添加敌人标记
|
||||||
|
L.marker([39.905, 116.395], {icon: enemyIcon}).addTo(map)
|
||||||
|
.bindPopup('<b>敌军位置</b><br>坐标: [116.39, 39.91]<br>最后更新: 14:30:50');
|
||||||
|
|
||||||
|
// 更新系统时间
|
||||||
|
function updateSystemTime() {
|
||||||
|
const now = new Date();
|
||||||
|
const year = now.getFullYear();
|
||||||
|
const month = String(now.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(now.getDate()).padStart(2, '0');
|
||||||
|
const hours = String(now.getHours()).padStart(2, '0');
|
||||||
|
const minutes = String(now.getMinutes()).padStart(2, '0');
|
||||||
|
const seconds = String(now.getSeconds()).padStart(2, '0');
|
||||||
|
|
||||||
|
document.getElementById('system-time').textContent =
|
||||||
|
`系统时间: ${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
setInterval(updateSystemTime, 1000);
|
||||||
|
updateSystemTime();
|
||||||
|
|
||||||
|
// 标签页切换功能
|
||||||
|
const tabs = document.querySelectorAll('.tab-inactive, .tab-active');
|
||||||
|
tabs.forEach(tab => {
|
||||||
|
tab.addEventListener('click', () => {
|
||||||
|
// 移除所有标签页的active状态
|
||||||
|
document.querySelectorAll('.tab-active').forEach(activeTab => {
|
||||||
|
activeTab.classList.remove('tab-active');
|
||||||
|
activeTab.classList.add('tab-inactive');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 设置当前标签页为active
|
||||||
|
tab.classList.remove('tab-inactive');
|
||||||
|
tab.classList.add('tab-active');
|
||||||
|
|
||||||
|
// 如果点击的是"实时情报"标签,显示侧边栏
|
||||||
|
if (tab.textContent.trim() === '实时情报') {
|
||||||
|
document.getElementById('intelligence-panel').classList.remove('translate-x-full');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 关闭实时情报面板
|
||||||
|
document.getElementById('close-intel-panel').addEventListener('click', () => {
|
||||||
|
document.getElementById('intelligence-panel').classList.add('translate-x-full');
|
||||||
|
|
||||||
|
// 重置标签页状态
|
||||||
|
tabs.forEach(tab => {
|
||||||
|
if (tab.textContent.trim() === '情报传输') {
|
||||||
|
tab.classList.remove('tab-inactive');
|
||||||
|
tab.classList.add('tab-active');
|
||||||
|
} else if (tab.textContent.trim() === '实时情报') {
|
||||||
|
tab.classList.remove('tab-active');
|
||||||
|
tab.classList.add('tab-inactive');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,55 @@
|
|||||||
|
QT += core gui widgets quickwidgets positioning
|
||||||
|
QT += multimedia multimediawidgets
|
||||||
|
QT += webenginewidgets webchannel
|
||||||
|
QT += sql charts
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
|
CONFIG += c++17
|
||||||
|
|
||||||
|
# Include paths - 更新为新的目录结构
|
||||||
|
INCLUDEPATH += include
|
||||||
|
INCLUDEPATH += include/core
|
||||||
|
INCLUDEPATH += include/ui
|
||||||
|
INCLUDEPATH += AudioModule
|
||||||
|
|
||||||
|
# Build directories
|
||||||
|
OBJECTS_DIR = build
|
||||||
|
MOC_DIR = build
|
||||||
|
UI_DIR = build
|
||||||
|
RCC_DIR = build
|
||||||
|
|
||||||
|
# Source files - 按模块组织
|
||||||
|
SOURCES += \
|
||||||
|
src/main.cpp \
|
||||||
|
src/core/database/UAVDatabase.cpp \
|
||||||
|
src/core/database/DogDatabase.cpp \
|
||||||
|
src/ui/main/MainWindow.cpp \
|
||||||
|
src/ui/dialogs/DeviceDialog.cpp
|
||||||
|
|
||||||
|
# Header files - 按模块组织
|
||||||
|
HEADERS += \
|
||||||
|
include/core/database/UAVDatabase.h \
|
||||||
|
include/core/database/DogDatabase.h \
|
||||||
|
include/ui/main/MainWindow.h \
|
||||||
|
include/ui/dialogs/DeviceDialog.h
|
||||||
|
|
||||||
|
# UI forms - 按模块组织
|
||||||
|
FORMS += \
|
||||||
|
forms/main/MainWindow.ui \
|
||||||
|
forms/dialogs/DeviceDialog.ui
|
||||||
|
|
||||||
|
# Default rules for deployment.
|
||||||
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
|
!isEmpty(target.path): INSTALLS += target
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
res.qrc
|
||||||
|
|
||||||
|
# Version and metadata
|
||||||
|
VERSION = 2.0.0
|
||||||
|
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
||||||
|
TARGET = BattlefieldExplorationSystem
|
||||||
|
|
||||||
|
# 删除了所有injury相关的文件引用
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,164 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
** Meta object code from reading C++ file 'MainWindow.h'
|
||||||
|
**
|
||||||
|
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.15)
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost!
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include "../include/ui/main/MainWindow.h"
|
||||||
|
#include <QtCore/qbytearray.h>
|
||||||
|
#include <QtCore/qmetatype.h>
|
||||||
|
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||||
|
#error "The header file 'MainWindow.h' doesn't include <QObject>."
|
||||||
|
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||||
|
#error "This file was generated using the moc from 5.15.15. It"
|
||||||
|
#error "cannot be used with the include files from this version of Qt."
|
||||||
|
#error "(The moc has changed too much.)"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QT_BEGIN_MOC_NAMESPACE
|
||||||
|
QT_WARNING_PUSH
|
||||||
|
QT_WARNING_DISABLE_DEPRECATED
|
||||||
|
struct qt_meta_stringdata_MainWindow_t {
|
||||||
|
QByteArrayData data[13];
|
||||||
|
char stringdata0[235];
|
||||||
|
};
|
||||||
|
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||||
|
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
||||||
|
qptrdiff(offsetof(qt_meta_stringdata_MainWindow_t, stringdata0) + ofs \
|
||||||
|
- idx * sizeof(QByteArrayData)) \
|
||||||
|
)
|
||||||
|
static const qt_meta_stringdata_MainWindow_t qt_meta_stringdata_MainWindow = {
|
||||||
|
{
|
||||||
|
QT_MOC_LITERAL(0, 0, 10), // "MainWindow"
|
||||||
|
QT_MOC_LITERAL(1, 11, 17), // "onAddRobotClicked"
|
||||||
|
QT_MOC_LITERAL(2, 29, 0), // ""
|
||||||
|
QT_MOC_LITERAL(3, 30, 17), // "onRobotTabClicked"
|
||||||
|
QT_MOC_LITERAL(4, 48, 26), // "onSpecifiedRobotTabClicked"
|
||||||
|
QT_MOC_LITERAL(5, 75, 15), // "onAddUAVClicked"
|
||||||
|
QT_MOC_LITERAL(6, 91, 15), // "onUAVTabClicked"
|
||||||
|
QT_MOC_LITERAL(7, 107, 22), // "onRobotLocationClicked"
|
||||||
|
QT_MOC_LITERAL(8, 130, 16), // "onUAVViewClicked"
|
||||||
|
QT_MOC_LITERAL(9, 147, 18), // "onRobotViewClicked"
|
||||||
|
QT_MOC_LITERAL(10, 166, 21), // "onRobotMappingClicked"
|
||||||
|
QT_MOC_LITERAL(11, 188, 24), // "onSmartNavigationClicked"
|
||||||
|
QT_MOC_LITERAL(12, 213, 21) // "onIntelligenceClicked"
|
||||||
|
|
||||||
|
},
|
||||||
|
"MainWindow\0onAddRobotClicked\0\0"
|
||||||
|
"onRobotTabClicked\0onSpecifiedRobotTabClicked\0"
|
||||||
|
"onAddUAVClicked\0onUAVTabClicked\0"
|
||||||
|
"onRobotLocationClicked\0onUAVViewClicked\0"
|
||||||
|
"onRobotViewClicked\0onRobotMappingClicked\0"
|
||||||
|
"onSmartNavigationClicked\0onIntelligenceClicked"
|
||||||
|
};
|
||||||
|
#undef QT_MOC_LITERAL
|
||||||
|
|
||||||
|
static const uint qt_meta_data_MainWindow[] = {
|
||||||
|
|
||||||
|
// content:
|
||||||
|
8, // revision
|
||||||
|
0, // classname
|
||||||
|
0, 0, // classinfo
|
||||||
|
11, 14, // methods
|
||||||
|
0, 0, // properties
|
||||||
|
0, 0, // enums/sets
|
||||||
|
0, 0, // constructors
|
||||||
|
0, // flags
|
||||||
|
0, // signalCount
|
||||||
|
|
||||||
|
// slots: name, argc, parameters, tag, flags
|
||||||
|
1, 0, 69, 2, 0x0a /* Public */,
|
||||||
|
3, 0, 70, 2, 0x0a /* Public */,
|
||||||
|
4, 0, 71, 2, 0x0a /* Public */,
|
||||||
|
5, 0, 72, 2, 0x08 /* Private */,
|
||||||
|
6, 0, 73, 2, 0x08 /* Private */,
|
||||||
|
7, 0, 74, 2, 0x08 /* Private */,
|
||||||
|
8, 0, 75, 2, 0x08 /* Private */,
|
||||||
|
9, 0, 76, 2, 0x08 /* Private */,
|
||||||
|
10, 0, 77, 2, 0x08 /* Private */,
|
||||||
|
11, 0, 78, 2, 0x08 /* Private */,
|
||||||
|
12, 0, 79, 2, 0x08 /* Private */,
|
||||||
|
|
||||||
|
// slots: parameters
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
QMetaType::Void,
|
||||||
|
|
||||||
|
0 // eod
|
||||||
|
};
|
||||||
|
|
||||||
|
void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||||
|
{
|
||||||
|
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||||
|
auto *_t = static_cast<MainWindow *>(_o);
|
||||||
|
(void)_t;
|
||||||
|
switch (_id) {
|
||||||
|
case 0: _t->onAddRobotClicked(); break;
|
||||||
|
case 1: _t->onRobotTabClicked(); break;
|
||||||
|
case 2: _t->onSpecifiedRobotTabClicked(); break;
|
||||||
|
case 3: _t->onAddUAVClicked(); break;
|
||||||
|
case 4: _t->onUAVTabClicked(); break;
|
||||||
|
case 5: _t->onRobotLocationClicked(); break;
|
||||||
|
case 6: _t->onUAVViewClicked(); break;
|
||||||
|
case 7: _t->onRobotViewClicked(); break;
|
||||||
|
case 8: _t->onRobotMappingClicked(); break;
|
||||||
|
case 9: _t->onSmartNavigationClicked(); break;
|
||||||
|
case 10: _t->onIntelligenceClicked(); break;
|
||||||
|
default: ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
(void)_a;
|
||||||
|
}
|
||||||
|
|
||||||
|
QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = { {
|
||||||
|
QMetaObject::SuperData::link<QMainWindow::staticMetaObject>(),
|
||||||
|
qt_meta_stringdata_MainWindow.data,
|
||||||
|
qt_meta_data_MainWindow,
|
||||||
|
qt_static_metacall,
|
||||||
|
nullptr,
|
||||||
|
nullptr
|
||||||
|
} };
|
||||||
|
|
||||||
|
|
||||||
|
const QMetaObject *MainWindow::metaObject() const
|
||||||
|
{
|
||||||
|
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *MainWindow::qt_metacast(const char *_clname)
|
||||||
|
{
|
||||||
|
if (!_clname) return nullptr;
|
||||||
|
if (!strcmp(_clname, qt_meta_stringdata_MainWindow.stringdata0))
|
||||||
|
return static_cast<void*>(this);
|
||||||
|
return QMainWindow::qt_metacast(_clname);
|
||||||
|
}
|
||||||
|
|
||||||
|
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||||
|
{
|
||||||
|
_id = QMainWindow::qt_metacall(_c, _id, _a);
|
||||||
|
if (_id < 0)
|
||||||
|
return _id;
|
||||||
|
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||||
|
if (_id < 11)
|
||||||
|
qt_static_metacall(this, _c, _id, _a);
|
||||||
|
_id -= 11;
|
||||||
|
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||||
|
if (_id < 11)
|
||||||
|
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||||
|
_id -= 11;
|
||||||
|
}
|
||||||
|
return _id;
|
||||||
|
}
|
||||||
|
QT_WARNING_POP
|
||||||
|
QT_END_MOC_NAMESPACE
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,46 @@
|
|||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'DeviceDialog.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 5.15.15
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_DEVICEDIALOG_H
|
||||||
|
#define UI_DEVICEDIALOG_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QDialog>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_DeviceDialog
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
void setupUi(QDialog *DeviceDialog)
|
||||||
|
{
|
||||||
|
if (DeviceDialog->objectName().isEmpty())
|
||||||
|
DeviceDialog->setObjectName(QString::fromUtf8("DeviceDialog"));
|
||||||
|
DeviceDialog->resize(1184, 734);
|
||||||
|
|
||||||
|
retranslateUi(DeviceDialog);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(DeviceDialog);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QDialog *DeviceDialog)
|
||||||
|
{
|
||||||
|
DeviceDialog->setWindowTitle(QCoreApplication::translate("DeviceDialog", "Dialog", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class DeviceDialog: public Ui_DeviceDialog {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_DEVICEDIALOG_H
|
@ -0,0 +1,618 @@
|
|||||||
|
/********************************************************************************
|
||||||
|
** Form generated from reading UI file 'MainWindow.ui'
|
||||||
|
**
|
||||||
|
** Created by: Qt User Interface Compiler version 5.15.15
|
||||||
|
**
|
||||||
|
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef UI_MAINWINDOW_H
|
||||||
|
#define UI_MAINWINDOW_H
|
||||||
|
|
||||||
|
#include <QtCore/QVariant>
|
||||||
|
#include <QtWidgets/QAction>
|
||||||
|
#include <QtWidgets/QApplication>
|
||||||
|
#include <QtWidgets/QGridLayout>
|
||||||
|
#include <QtWidgets/QHBoxLayout>
|
||||||
|
#include <QtWidgets/QLabel>
|
||||||
|
#include <QtWidgets/QMainWindow>
|
||||||
|
#include <QtWidgets/QMenu>
|
||||||
|
#include <QtWidgets/QMenuBar>
|
||||||
|
#include <QtWidgets/QPushButton>
|
||||||
|
#include <QtWidgets/QSpacerItem>
|
||||||
|
#include <QtWidgets/QStatusBar>
|
||||||
|
#include <QtWidgets/QVBoxLayout>
|
||||||
|
#include <QtWidgets/QWidget>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class Ui_MainWindow
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QAction *action;
|
||||||
|
QAction *action_3;
|
||||||
|
QAction *action_4;
|
||||||
|
QAction *action_5;
|
||||||
|
QWidget *centralwidget;
|
||||||
|
QVBoxLayout *verticalLayout_4;
|
||||||
|
QWidget *headerWidget;
|
||||||
|
QHBoxLayout *horizontalLayout_13;
|
||||||
|
QSpacerItem *horizontalSpacer;
|
||||||
|
QHBoxLayout *horizontalLayout_logo;
|
||||||
|
QLabel *label;
|
||||||
|
QLabel *label_2;
|
||||||
|
QSpacerItem *horizontalSpacer_2;
|
||||||
|
QHBoxLayout *horizontalLayout_main;
|
||||||
|
QWidget *leftPanel;
|
||||||
|
QVBoxLayout *verticalLayout;
|
||||||
|
QLabel *leftPanelTitle;
|
||||||
|
QLabel *separatorLine;
|
||||||
|
QHBoxLayout *horizontalLayout_3;
|
||||||
|
QPushButton *robottab;
|
||||||
|
QLabel *label_10;
|
||||||
|
QHBoxLayout *horizontalLayout_4;
|
||||||
|
QPushButton *robotlocation;
|
||||||
|
QLabel *label_9;
|
||||||
|
QHBoxLayout *horizontalLayout_2;
|
||||||
|
QPushButton *addrobot;
|
||||||
|
QLabel *label_11;
|
||||||
|
QHBoxLayout *horizontalLayout;
|
||||||
|
QPushButton *mapbutton;
|
||||||
|
QLabel *label_3;
|
||||||
|
QHBoxLayout *horizontalLayout_5;
|
||||||
|
QPushButton *addUAV;
|
||||||
|
QLabel *label_8;
|
||||||
|
QHBoxLayout *horizontalLayout_6;
|
||||||
|
QPushButton *UAVtab;
|
||||||
|
QLabel *label_13;
|
||||||
|
QSpacerItem *verticalSpacer;
|
||||||
|
QWidget *centerPanel;
|
||||||
|
QVBoxLayout *verticalLayout_2;
|
||||||
|
QGridLayout *gridLayout_3;
|
||||||
|
QWidget *MapDisplayer;
|
||||||
|
QWidget *rightPanel;
|
||||||
|
QVBoxLayout *verticalLayout_3;
|
||||||
|
QLabel *rightPanelTitle;
|
||||||
|
QLabel *separatorLine_2;
|
||||||
|
QHBoxLayout *horizontalLayout_7;
|
||||||
|
QPushButton *UAVview;
|
||||||
|
QLabel *label_7;
|
||||||
|
QHBoxLayout *horizontalLayout_9;
|
||||||
|
QPushButton *robotView;
|
||||||
|
QLabel *label_4;
|
||||||
|
QHBoxLayout *horizontalLayout_8;
|
||||||
|
QPushButton *robotMapping;
|
||||||
|
QLabel *label_12;
|
||||||
|
QHBoxLayout *horizontalLayout_11;
|
||||||
|
QPushButton *smartNavigation;
|
||||||
|
QPushButton *intelligence;
|
||||||
|
QLabel *label_5;
|
||||||
|
QHBoxLayout *horizontalLayout_12;
|
||||||
|
QPushButton *faceRecognition;
|
||||||
|
QLabel *label_14;
|
||||||
|
QHBoxLayout *horizontalLayout_14;
|
||||||
|
QPushButton *faceTracking;
|
||||||
|
QLabel *label_15;
|
||||||
|
QSpacerItem *verticalSpacer_2;
|
||||||
|
QMenuBar *menubar;
|
||||||
|
QMenu *menu;
|
||||||
|
QStatusBar *statusbar;
|
||||||
|
|
||||||
|
void setupUi(QMainWindow *MainWindow)
|
||||||
|
{
|
||||||
|
if (MainWindow->objectName().isEmpty())
|
||||||
|
MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
|
||||||
|
MainWindow->setEnabled(true);
|
||||||
|
MainWindow->resize(1400, 900);
|
||||||
|
MainWindow->setToolTipDuration(0);
|
||||||
|
MainWindow->setStyleSheet(QString::fromUtf8("#centralwidget{\n"
|
||||||
|
" background-color: rgb(24, 33, 45);\n"
|
||||||
|
"}\n"
|
||||||
|
"\n"
|
||||||
|
"QPushButton {\n"
|
||||||
|
" background-color: rgb(30, 44, 62);\n"
|
||||||
|
" color: rgb(220, 230, 240);\n"
|
||||||
|
" border: none;\n"
|
||||||
|
" border-radius: 5px;\n"
|
||||||
|
" padding: 8px;\n"
|
||||||
|
" font-size: 14px;\n"
|
||||||
|
"}\n"
|
||||||
|
"\n"
|
||||||
|
"QPushButton:hover {\n"
|
||||||
|
" background-color: rgb(50, 70, 95);\n"
|
||||||
|
"}\n"
|
||||||
|
"\n"
|
||||||
|
"QPushButton:pressed {\n"
|
||||||
|
" background-color: rgb(40, 60, 85);\n"
|
||||||
|
"}\n"
|
||||||
|
""));
|
||||||
|
action = new QAction(MainWindow);
|
||||||
|
action->setObjectName(QString::fromUtf8("action"));
|
||||||
|
action_3 = new QAction(MainWindow);
|
||||||
|
action_3->setObjectName(QString::fromUtf8("action_3"));
|
||||||
|
action_4 = new QAction(MainWindow);
|
||||||
|
action_4->setObjectName(QString::fromUtf8("action_4"));
|
||||||
|
action_5 = new QAction(MainWindow);
|
||||||
|
action_5->setObjectName(QString::fromUtf8("action_5"));
|
||||||
|
centralwidget = new QWidget(MainWindow);
|
||||||
|
centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
|
||||||
|
centralwidget->setEnabled(true);
|
||||||
|
centralwidget->setStyleSheet(QString::fromUtf8(""));
|
||||||
|
verticalLayout_4 = new QVBoxLayout(centralwidget);
|
||||||
|
verticalLayout_4->setSpacing(0);
|
||||||
|
verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4"));
|
||||||
|
verticalLayout_4->setContentsMargins(0, 0, 0, 0);
|
||||||
|
headerWidget = new QWidget(centralwidget);
|
||||||
|
headerWidget->setObjectName(QString::fromUtf8("headerWidget"));
|
||||||
|
headerWidget->setMinimumSize(QSize(0, 80));
|
||||||
|
headerWidget->setMaximumSize(QSize(16777215, 80));
|
||||||
|
headerWidget->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(15, 22, 32), stop:1 rgb(25, 35, 45));"));
|
||||||
|
horizontalLayout_13 = new QHBoxLayout(headerWidget);
|
||||||
|
horizontalLayout_13->setObjectName(QString::fromUtf8("horizontalLayout_13"));
|
||||||
|
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||||
|
|
||||||
|
horizontalLayout_13->addItem(horizontalSpacer);
|
||||||
|
|
||||||
|
horizontalLayout_logo = new QHBoxLayout();
|
||||||
|
horizontalLayout_logo->setObjectName(QString::fromUtf8("horizontalLayout_logo"));
|
||||||
|
label = new QLabel(headerWidget);
|
||||||
|
label->setObjectName(QString::fromUtf8("label"));
|
||||||
|
label->setMinimumSize(QSize(60, 60));
|
||||||
|
label->setMaximumSize(QSize(60, 60));
|
||||||
|
label->setStyleSheet(QString::fromUtf8("border-image: url(:/image/res/image/logo_backgroundless.png);"));
|
||||||
|
|
||||||
|
horizontalLayout_logo->addWidget(label);
|
||||||
|
|
||||||
|
label_2 = new QLabel(headerWidget);
|
||||||
|
label_2->setObjectName(QString::fromUtf8("label_2"));
|
||||||
|
label_2->setStyleSheet(QString::fromUtf8("QLabel {\n"
|
||||||
|
" background-color: rgba(15, 28, 34, 0);\n"
|
||||||
|
" color: rgb(82, 194, 242);\n"
|
||||||
|
" border: none;\n"
|
||||||
|
" padding: 10px 20px;\n"
|
||||||
|
" border-radius: 5px;\n"
|
||||||
|
" font-size: 32px;\n"
|
||||||
|
" font-weight: bold;\n"
|
||||||
|
" font-family: \"Courier New\", \"Monaco\", monospace;\n"
|
||||||
|
" text-align: left;\n"
|
||||||
|
"}\n"
|
||||||
|
""));
|
||||||
|
|
||||||
|
horizontalLayout_logo->addWidget(label_2);
|
||||||
|
|
||||||
|
|
||||||
|
horizontalLayout_13->addLayout(horizontalLayout_logo);
|
||||||
|
|
||||||
|
horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||||
|
|
||||||
|
horizontalLayout_13->addItem(horizontalSpacer_2);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_4->addWidget(headerWidget);
|
||||||
|
|
||||||
|
horizontalLayout_main = new QHBoxLayout();
|
||||||
|
horizontalLayout_main->setSpacing(0);
|
||||||
|
horizontalLayout_main->setObjectName(QString::fromUtf8("horizontalLayout_main"));
|
||||||
|
leftPanel = new QWidget(centralwidget);
|
||||||
|
leftPanel->setObjectName(QString::fromUtf8("leftPanel"));
|
||||||
|
leftPanel->setMinimumSize(QSize(250, 0));
|
||||||
|
leftPanel->setMaximumSize(QSize(250, 16777215));
|
||||||
|
leftPanel->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(15, 22, 32), stop:1 rgb(25, 35, 45));"));
|
||||||
|
verticalLayout = new QVBoxLayout(leftPanel);
|
||||||
|
verticalLayout->setSpacing(20);
|
||||||
|
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
|
||||||
|
verticalLayout->setContentsMargins(10, 15, 10, 10);
|
||||||
|
leftPanelTitle = new QLabel(leftPanel);
|
||||||
|
leftPanelTitle->setObjectName(QString::fromUtf8("leftPanelTitle"));
|
||||||
|
leftPanelTitle->setStyleSheet(QString::fromUtf8("color: rgb(255, 255, 255);\n"
|
||||||
|
"font-size: 18px;\n"
|
||||||
|
"font-weight: bold;\n"
|
||||||
|
"padding: 12px;\n"
|
||||||
|
"margin-bottom: 10px;\n"
|
||||||
|
"background: qlineargradient(x1:0, y1:0, x2:1, y2:1, \n"
|
||||||
|
" stop:0 rgba(82, 194, 242, 0.3), \n"
|
||||||
|
" stop:1 rgba(45, 120, 180, 0.3));\n"
|
||||||
|
"border: 2px solid rgba(82, 194, 242, 0.7);\n"
|
||||||
|
"border-radius: 8px;"));
|
||||||
|
leftPanelTitle->setAlignment(Qt::AlignCenter);
|
||||||
|
|
||||||
|
verticalLayout->addWidget(leftPanelTitle);
|
||||||
|
|
||||||
|
separatorLine = new QLabel(leftPanel);
|
||||||
|
separatorLine->setObjectName(QString::fromUtf8("separatorLine"));
|
||||||
|
separatorLine->setMinimumSize(QSize(0, 3));
|
||||||
|
separatorLine->setMaximumSize(QSize(16777215, 3));
|
||||||
|
separatorLine->setStyleSheet(QString::fromUtf8("background: qlineargradient(x1:0, y1:0, x2:1, y2:0,\n"
|
||||||
|
" stop:0 rgba(82, 194, 242, 0.0),\n"
|
||||||
|
" stop:0.5 rgba(82, 194, 242, 0.8),\n"
|
||||||
|
" stop:1 rgba(82, 194, 242, 0.0));\n"
|
||||||
|
"margin-bottom: 15px;\n"
|
||||||
|
"border-radius: 2px;"));
|
||||||
|
|
||||||
|
verticalLayout->addWidget(separatorLine);
|
||||||
|
|
||||||
|
horizontalLayout_3 = new QHBoxLayout();
|
||||||
|
horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3"));
|
||||||
|
robottab = new QPushButton(leftPanel);
|
||||||
|
robottab->setObjectName(QString::fromUtf8("robottab"));
|
||||||
|
robottab->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_3->addWidget(robottab);
|
||||||
|
|
||||||
|
label_10 = new QLabel(leftPanel);
|
||||||
|
label_10->setObjectName(QString::fromUtf8("label_10"));
|
||||||
|
label_10->setMinimumSize(QSize(32, 32));
|
||||||
|
label_10->setMaximumSize(QSize(32, 32));
|
||||||
|
label_10->setStyleSheet(QString::fromUtf8("border-image: url(:/image/res/image/tab.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_3->addWidget(label_10);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout_3);
|
||||||
|
|
||||||
|
horizontalLayout_4 = new QHBoxLayout();
|
||||||
|
horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4"));
|
||||||
|
robotlocation = new QPushButton(leftPanel);
|
||||||
|
robotlocation->setObjectName(QString::fromUtf8("robotlocation"));
|
||||||
|
robotlocation->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_4->addWidget(robotlocation);
|
||||||
|
|
||||||
|
label_9 = new QLabel(leftPanel);
|
||||||
|
label_9->setObjectName(QString::fromUtf8("label_9"));
|
||||||
|
label_9->setMinimumSize(QSize(32, 32));
|
||||||
|
label_9->setMaximumSize(QSize(32, 32));
|
||||||
|
label_9->setStyleSheet(QString::fromUtf8("border-image: url(:/image/res/image/location.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_4->addWidget(label_9);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout_4);
|
||||||
|
|
||||||
|
horizontalLayout_2 = new QHBoxLayout();
|
||||||
|
horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
|
||||||
|
addrobot = new QPushButton(leftPanel);
|
||||||
|
addrobot->setObjectName(QString::fromUtf8("addrobot"));
|
||||||
|
addrobot->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(addrobot);
|
||||||
|
|
||||||
|
label_11 = new QLabel(leftPanel);
|
||||||
|
label_11->setObjectName(QString::fromUtf8("label_11"));
|
||||||
|
label_11->setMinimumSize(QSize(32, 32));
|
||||||
|
label_11->setMaximumSize(QSize(32, 32));
|
||||||
|
label_11->setStyleSheet(QString::fromUtf8("border-image: url(:/image/res/image/robotbtn.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_2->addWidget(label_11);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout_2);
|
||||||
|
|
||||||
|
horizontalLayout = new QHBoxLayout();
|
||||||
|
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
|
||||||
|
mapbutton = new QPushButton(leftPanel);
|
||||||
|
mapbutton->setObjectName(QString::fromUtf8("mapbutton"));
|
||||||
|
mapbutton->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(mapbutton);
|
||||||
|
|
||||||
|
label_3 = new QLabel(leftPanel);
|
||||||
|
label_3->setObjectName(QString::fromUtf8("label_3"));
|
||||||
|
label_3->setMinimumSize(QSize(32, 32));
|
||||||
|
label_3->setMaximumSize(QSize(32, 32));
|
||||||
|
label_3->setStyleSheet(QString::fromUtf8("border-image: url(:/image/res/image/mapbtn.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout->addWidget(label_3);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout);
|
||||||
|
|
||||||
|
horizontalLayout_5 = new QHBoxLayout();
|
||||||
|
horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5"));
|
||||||
|
addUAV = new QPushButton(leftPanel);
|
||||||
|
addUAV->setObjectName(QString::fromUtf8("addUAV"));
|
||||||
|
addUAV->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_5->addWidget(addUAV);
|
||||||
|
|
||||||
|
label_8 = new QLabel(leftPanel);
|
||||||
|
label_8->setObjectName(QString::fromUtf8("label_8"));
|
||||||
|
label_8->setMinimumSize(QSize(32, 32));
|
||||||
|
label_8->setMaximumSize(QSize(32, 32));
|
||||||
|
label_8->setStyleSheet(QString::fromUtf8("border-image: url(:/image/res/image/UAV.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_5->addWidget(label_8);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout_5);
|
||||||
|
|
||||||
|
horizontalLayout_6 = new QHBoxLayout();
|
||||||
|
horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6"));
|
||||||
|
UAVtab = new QPushButton(leftPanel);
|
||||||
|
UAVtab->setObjectName(QString::fromUtf8("UAVtab"));
|
||||||
|
UAVtab->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_6->addWidget(UAVtab);
|
||||||
|
|
||||||
|
label_13 = new QLabel(leftPanel);
|
||||||
|
label_13->setObjectName(QString::fromUtf8("label_13"));
|
||||||
|
label_13->setMinimumSize(QSize(32, 32));
|
||||||
|
label_13->setMaximumSize(QSize(32, 32));
|
||||||
|
label_13->setAutoFillBackground(false);
|
||||||
|
label_13->setStyleSheet(QString::fromUtf8("border-image: url(:/image/res/image/tab.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_6->addWidget(label_13);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout->addLayout(horizontalLayout_6);
|
||||||
|
|
||||||
|
verticalSpacer = new QSpacerItem(20, 5, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||||
|
|
||||||
|
verticalLayout->addItem(verticalSpacer);
|
||||||
|
|
||||||
|
|
||||||
|
horizontalLayout_main->addWidget(leftPanel);
|
||||||
|
|
||||||
|
centerPanel = new QWidget(centralwidget);
|
||||||
|
centerPanel->setObjectName(QString::fromUtf8("centerPanel"));
|
||||||
|
centerPanel->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(20, 28, 40), stop:1 rgb(30, 40, 55));"));
|
||||||
|
verticalLayout_2 = new QVBoxLayout(centerPanel);
|
||||||
|
verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
|
||||||
|
verticalLayout_2->setContentsMargins(15, 15, 15, 15);
|
||||||
|
gridLayout_3 = new QGridLayout();
|
||||||
|
gridLayout_3->setSpacing(0);
|
||||||
|
gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3"));
|
||||||
|
MapDisplayer = new QWidget(centerPanel);
|
||||||
|
MapDisplayer->setObjectName(QString::fromUtf8("MapDisplayer"));
|
||||||
|
MapDisplayer->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(25, 35, 50), stop:1 rgb(35, 45, 60));\n"
|
||||||
|
"border-radius: 10px;"));
|
||||||
|
|
||||||
|
gridLayout_3->addWidget(MapDisplayer, 0, 0, 1, 1);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_2->addLayout(gridLayout_3);
|
||||||
|
|
||||||
|
|
||||||
|
horizontalLayout_main->addWidget(centerPanel);
|
||||||
|
|
||||||
|
rightPanel = new QWidget(centralwidget);
|
||||||
|
rightPanel->setObjectName(QString::fromUtf8("rightPanel"));
|
||||||
|
rightPanel->setMinimumSize(QSize(280, 0));
|
||||||
|
rightPanel->setMaximumSize(QSize(280, 16777215));
|
||||||
|
rightPanel->setStyleSheet(QString::fromUtf8("background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(15, 22, 32), stop:1 rgb(25, 35, 45));"));
|
||||||
|
verticalLayout_3 = new QVBoxLayout(rightPanel);
|
||||||
|
verticalLayout_3->setSpacing(20);
|
||||||
|
verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
|
||||||
|
verticalLayout_3->setContentsMargins(10, 15, 10, 10);
|
||||||
|
rightPanelTitle = new QLabel(rightPanel);
|
||||||
|
rightPanelTitle->setObjectName(QString::fromUtf8("rightPanelTitle"));
|
||||||
|
rightPanelTitle->setStyleSheet(QString::fromUtf8("color: rgb(255, 255, 255);\n"
|
||||||
|
"font-size: 18px;\n"
|
||||||
|
"font-weight: bold;\n"
|
||||||
|
"padding: 12px;\n"
|
||||||
|
"margin-bottom: 5px;\n"
|
||||||
|
"background: qlineargradient(x1:0, y1:0, x2:1, y2:1, \n"
|
||||||
|
" stop:0 rgba(82, 194, 242, 0.3), \n"
|
||||||
|
" stop:1 rgba(45, 120, 180, 0.3));\n"
|
||||||
|
"border: 2px solid rgba(82, 194, 242, 0.7);\n"
|
||||||
|
"border-radius: 8px;"));
|
||||||
|
rightPanelTitle->setAlignment(Qt::AlignCenter);
|
||||||
|
|
||||||
|
verticalLayout_3->addWidget(rightPanelTitle);
|
||||||
|
|
||||||
|
separatorLine_2 = new QLabel(rightPanel);
|
||||||
|
separatorLine_2->setObjectName(QString::fromUtf8("separatorLine_2"));
|
||||||
|
separatorLine_2->setMinimumSize(QSize(0, 3));
|
||||||
|
separatorLine_2->setMaximumSize(QSize(16777215, 3));
|
||||||
|
separatorLine_2->setStyleSheet(QString::fromUtf8("background: qlineargradient(x1:0, y1:0, x2:1, y2:0,\n"
|
||||||
|
" stop:0 rgba(82, 194, 242, 0.0),\n"
|
||||||
|
" stop:0.5 rgba(82, 194, 242, 0.8),\n"
|
||||||
|
" stop:1 rgba(82, 194, 242, 0.0));\n"
|
||||||
|
"margin-bottom: 10px;\n"
|
||||||
|
"border-radius: 2px;"));
|
||||||
|
|
||||||
|
verticalLayout_3->addWidget(separatorLine_2);
|
||||||
|
|
||||||
|
horizontalLayout_7 = new QHBoxLayout();
|
||||||
|
horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7"));
|
||||||
|
UAVview = new QPushButton(rightPanel);
|
||||||
|
UAVview->setObjectName(QString::fromUtf8("UAVview"));
|
||||||
|
UAVview->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_7->addWidget(UAVview);
|
||||||
|
|
||||||
|
label_7 = new QLabel(rightPanel);
|
||||||
|
label_7->setObjectName(QString::fromUtf8("label_7"));
|
||||||
|
label_7->setMinimumSize(QSize(32, 32));
|
||||||
|
label_7->setMaximumSize(QSize(32, 32));
|
||||||
|
label_7->setStyleSheet(QString::fromUtf8("border-image: url(:/image/res/image/location.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_7->addWidget(label_7);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_3->addLayout(horizontalLayout_7);
|
||||||
|
|
||||||
|
horizontalLayout_9 = new QHBoxLayout();
|
||||||
|
horizontalLayout_9->setObjectName(QString::fromUtf8("horizontalLayout_9"));
|
||||||
|
robotView = new QPushButton(rightPanel);
|
||||||
|
robotView->setObjectName(QString::fromUtf8("robotView"));
|
||||||
|
robotView->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_9->addWidget(robotView);
|
||||||
|
|
||||||
|
label_4 = new QLabel(rightPanel);
|
||||||
|
label_4->setObjectName(QString::fromUtf8("label_4"));
|
||||||
|
label_4->setMinimumSize(QSize(32, 32));
|
||||||
|
label_4->setMaximumSize(QSize(32, 32));
|
||||||
|
label_4->setStyleSheet(QString::fromUtf8("border-image: url(:/image/res/image/health.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_9->addWidget(label_4);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_3->addLayout(horizontalLayout_9);
|
||||||
|
|
||||||
|
horizontalLayout_8 = new QHBoxLayout();
|
||||||
|
horizontalLayout_8->setObjectName(QString::fromUtf8("horizontalLayout_8"));
|
||||||
|
robotMapping = new QPushButton(rightPanel);
|
||||||
|
robotMapping->setObjectName(QString::fromUtf8("robotMapping"));
|
||||||
|
robotMapping->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_8->addWidget(robotMapping);
|
||||||
|
|
||||||
|
label_12 = new QLabel(rightPanel);
|
||||||
|
label_12->setObjectName(QString::fromUtf8("label_12"));
|
||||||
|
label_12->setMinimumSize(QSize(32, 32));
|
||||||
|
label_12->setMaximumSize(QSize(32, 32));
|
||||||
|
label_12->setStyleSheet(QString::fromUtf8("border-image: url(:/image/res/image/soldier.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_8->addWidget(label_12);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_3->addLayout(horizontalLayout_8);
|
||||||
|
|
||||||
|
horizontalLayout_11 = new QHBoxLayout();
|
||||||
|
horizontalLayout_11->setObjectName(QString::fromUtf8("horizontalLayout_11"));
|
||||||
|
smartNavigation = new QPushButton(rightPanel);
|
||||||
|
smartNavigation->setObjectName(QString::fromUtf8("smartNavigation"));
|
||||||
|
smartNavigation->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_11->addWidget(smartNavigation);
|
||||||
|
|
||||||
|
intelligence = new QPushButton(rightPanel);
|
||||||
|
intelligence->setObjectName(QString::fromUtf8("intelligence"));
|
||||||
|
|
||||||
|
horizontalLayout_11->addWidget(intelligence);
|
||||||
|
|
||||||
|
label_5 = new QLabel(rightPanel);
|
||||||
|
label_5->setObjectName(QString::fromUtf8("label_5"));
|
||||||
|
label_5->setMinimumSize(QSize(32, 32));
|
||||||
|
label_5->setMaximumSize(QSize(32, 32));
|
||||||
|
label_5->setStyleSheet(QString::fromUtf8("\n"
|
||||||
|
"border-image: url(:/image/res/image/infomation.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_11->addWidget(label_5);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_3->addLayout(horizontalLayout_11);
|
||||||
|
|
||||||
|
horizontalLayout_12 = new QHBoxLayout();
|
||||||
|
horizontalLayout_12->setObjectName(QString::fromUtf8("horizontalLayout_12"));
|
||||||
|
faceRecognition = new QPushButton(rightPanel);
|
||||||
|
faceRecognition->setObjectName(QString::fromUtf8("faceRecognition"));
|
||||||
|
faceRecognition->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_12->addWidget(faceRecognition);
|
||||||
|
|
||||||
|
label_14 = new QLabel(rightPanel);
|
||||||
|
label_14->setObjectName(QString::fromUtf8("label_14"));
|
||||||
|
label_14->setMinimumSize(QSize(32, 32));
|
||||||
|
label_14->setMaximumSize(QSize(32, 32));
|
||||||
|
label_14->setStyleSheet(QString::fromUtf8("\n"
|
||||||
|
"border-image: url(:/image/res/image/infomation.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_12->addWidget(label_14);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_3->addLayout(horizontalLayout_12);
|
||||||
|
|
||||||
|
horizontalLayout_14 = new QHBoxLayout();
|
||||||
|
horizontalLayout_14->setObjectName(QString::fromUtf8("horizontalLayout_14"));
|
||||||
|
faceTracking = new QPushButton(rightPanel);
|
||||||
|
faceTracking->setObjectName(QString::fromUtf8("faceTracking"));
|
||||||
|
faceTracking->setMinimumSize(QSize(0, 40));
|
||||||
|
|
||||||
|
horizontalLayout_14->addWidget(faceTracking);
|
||||||
|
|
||||||
|
label_15 = new QLabel(rightPanel);
|
||||||
|
label_15->setObjectName(QString::fromUtf8("label_15"));
|
||||||
|
label_15->setMinimumSize(QSize(32, 32));
|
||||||
|
label_15->setMaximumSize(QSize(32, 32));
|
||||||
|
label_15->setStyleSheet(QString::fromUtf8("\n"
|
||||||
|
"border-image: url(:/image/res/image/infomation.svg);"));
|
||||||
|
|
||||||
|
horizontalLayout_14->addWidget(label_15);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_3->addLayout(horizontalLayout_14);
|
||||||
|
|
||||||
|
verticalSpacer_2 = new QSpacerItem(20, 5, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||||
|
|
||||||
|
verticalLayout_3->addItem(verticalSpacer_2);
|
||||||
|
|
||||||
|
|
||||||
|
horizontalLayout_main->addWidget(rightPanel);
|
||||||
|
|
||||||
|
|
||||||
|
verticalLayout_4->addLayout(horizontalLayout_main);
|
||||||
|
|
||||||
|
MainWindow->setCentralWidget(centralwidget);
|
||||||
|
menubar = new QMenuBar(MainWindow);
|
||||||
|
menubar->setObjectName(QString::fromUtf8("menubar"));
|
||||||
|
menubar->setGeometry(QRect(0, 0, 1400, 25));
|
||||||
|
menu = new QMenu(menubar);
|
||||||
|
menu->setObjectName(QString::fromUtf8("menu"));
|
||||||
|
MainWindow->setMenuBar(menubar);
|
||||||
|
statusbar = new QStatusBar(MainWindow);
|
||||||
|
statusbar->setObjectName(QString::fromUtf8("statusbar"));
|
||||||
|
MainWindow->setStatusBar(statusbar);
|
||||||
|
|
||||||
|
menubar->addAction(menu->menuAction());
|
||||||
|
|
||||||
|
retranslateUi(MainWindow);
|
||||||
|
|
||||||
|
QMetaObject::connectSlotsByName(MainWindow);
|
||||||
|
} // setupUi
|
||||||
|
|
||||||
|
void retranslateUi(QMainWindow *MainWindow)
|
||||||
|
{
|
||||||
|
MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "\346\210\230\345\234\272\346\216\242\347\264\242\347\263\273\347\273\237", nullptr));
|
||||||
|
action->setText(QCoreApplication::translate("MainWindow", "\346\267\273\345\212\240\346\234\272\345\231\250\344\272\272", nullptr));
|
||||||
|
action_3->setText(QCoreApplication::translate("MainWindow", "\346\230\276\347\244\272\346\234\272\345\231\250\344\272\272", nullptr));
|
||||||
|
#if QT_CONFIG(tooltip)
|
||||||
|
action_3->setToolTip(QCoreApplication::translate("MainWindow", "<html><head/><body><p>\346\230\276\347\244\272\346\234\272\345\231\250\344\272\272</p></body></html>", nullptr));
|
||||||
|
#endif // QT_CONFIG(tooltip)
|
||||||
|
action_4->setText(QCoreApplication::translate("MainWindow", "\344\274\244\345\221\230", nullptr));
|
||||||
|
action_5->setText(QCoreApplication::translate("MainWindow", "\345\212\240\350\275\275\345\234\260\345\233\276", nullptr));
|
||||||
|
label->setText(QString());
|
||||||
|
label_2->setText(QCoreApplication::translate("MainWindow", "\342\227\211 UBEES", nullptr));
|
||||||
|
leftPanelTitle->setText(QCoreApplication::translate("MainWindow", "\360\237\244\226 \346\234\272\345\231\250\344\272\272\347\256\241\347\220\206", nullptr));
|
||||||
|
separatorLine->setText(QString());
|
||||||
|
robottab->setText(QCoreApplication::translate("MainWindow", "\346\234\272\345\231\250\344\272\272\345\210\227\350\241\250", nullptr));
|
||||||
|
label_10->setText(QString());
|
||||||
|
robotlocation->setText(QCoreApplication::translate("MainWindow", "\346\234\272\345\231\250\344\272\272\344\275\215\347\275\256\346\230\276\347\244\272", nullptr));
|
||||||
|
label_9->setText(QString());
|
||||||
|
addrobot->setText(QCoreApplication::translate("MainWindow", "\346\267\273\345\212\240\346\234\272\345\231\250\344\272\272", nullptr));
|
||||||
|
label_11->setText(QString());
|
||||||
|
mapbutton->setText(QCoreApplication::translate("MainWindow", "\346\230\276\347\244\272\345\234\260\345\233\276", nullptr));
|
||||||
|
label_3->setText(QString());
|
||||||
|
addUAV->setText(QCoreApplication::translate("MainWindow", "\346\267\273\345\212\240\346\227\240\344\272\272\346\234\272", nullptr));
|
||||||
|
label_8->setText(QString());
|
||||||
|
UAVtab->setText(QCoreApplication::translate("MainWindow", "\346\227\240\344\272\272\346\234\272\345\210\227\350\241\250", nullptr));
|
||||||
|
label_13->setText(QString());
|
||||||
|
rightPanelTitle->setText(QCoreApplication::translate("MainWindow", "\360\237\216\257 \346\210\230\345\234\272\346\216\242\347\264\242\346\250\241\345\235\227", nullptr));
|
||||||
|
separatorLine_2->setText(QString());
|
||||||
|
UAVview->setText(QCoreApplication::translate("MainWindow", "\346\227\240\344\272\272\346\234\272\350\247\206\350\247\222", nullptr));
|
||||||
|
label_7->setText(QString());
|
||||||
|
robotView->setText(QCoreApplication::translate("MainWindow", "\346\234\272\345\231\250\347\213\227\350\247\206\350\247\222", nullptr));
|
||||||
|
label_4->setText(QString());
|
||||||
|
robotMapping->setText(QCoreApplication::translate("MainWindow", "\346\234\272\345\231\250\347\213\227\345\273\272\345\233\276", nullptr));
|
||||||
|
label_12->setText(QString());
|
||||||
|
smartNavigation->setText(QCoreApplication::translate("MainWindow", "\360\237\247\255 \346\231\272\350\203\275\345\257\274\350\210\252", nullptr));
|
||||||
|
intelligence->setText(QCoreApplication::translate("MainWindow", "\360\237\224\212 \346\203\205\346\212\245\344\274\240\350\276\276", nullptr));
|
||||||
|
label_5->setText(QString());
|
||||||
|
faceRecognition->setText(QCoreApplication::translate("MainWindow", "\344\272\272\350\204\270\350\257\206\345\210\253", nullptr));
|
||||||
|
label_14->setText(QString());
|
||||||
|
faceTracking->setText(QCoreApplication::translate("MainWindow", "\344\272\272\350\204\270\350\267\237\351\232\217", nullptr));
|
||||||
|
label_15->setText(QString());
|
||||||
|
menu->setTitle(QCoreApplication::translate("MainWindow", "\345\212\237\350\203\275\347\225\214\351\235\242", nullptr));
|
||||||
|
} // retranslateUi
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class MainWindow: public Ui_MainWindow {};
|
||||||
|
} // namespace Ui
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // UI_MAINWINDOW_H
|
@ -0,0 +1,152 @@
|
|||||||
|
-- CasualtySightPlus 数据库表结构
|
||||||
|
-- 数据库: Client
|
||||||
|
-- 创建日期: 2025-06-18
|
||||||
|
|
||||||
|
USE Client;
|
||||||
|
|
||||||
|
-- 1. UAV设备表 (无人机)
|
||||||
|
CREATE TABLE IF NOT EXISTS uav_devices (
|
||||||
|
id VARCHAR(50) PRIMARY KEY,
|
||||||
|
name VARCHAR(100) NOT NULL DEFAULT 'UAV设备',
|
||||||
|
state INT DEFAULT 0 COMMENT '设备状态: 0=离线, 1=在线, 2=工作中, 3=错误',
|
||||||
|
ip VARCHAR(15),
|
||||||
|
port INT,
|
||||||
|
longitude DOUBLE,
|
||||||
|
latitude DOUBLE,
|
||||||
|
signal_strength INT DEFAULT 0 COMMENT '信号强度 0-100',
|
||||||
|
last_heartbeat TIMESTAMP NULL COMMENT '最后心跳时间',
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
INDEX idx_state (state),
|
||||||
|
INDEX idx_location (longitude, latitude)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='无人机设备表';
|
||||||
|
|
||||||
|
-- 2. Dog机器人表 (地面机器人)
|
||||||
|
CREATE TABLE IF NOT EXISTS dog_devices (
|
||||||
|
id VARCHAR(50) PRIMARY KEY,
|
||||||
|
name VARCHAR(100) NOT NULL DEFAULT '地面机器人',
|
||||||
|
state INT DEFAULT 0 COMMENT '设备状态: 0=离线, 1=在线, 2=工作中, 3=错误',
|
||||||
|
ip VARCHAR(15),
|
||||||
|
port INT,
|
||||||
|
longitude DOUBLE,
|
||||||
|
latitude DOUBLE,
|
||||||
|
signal_strength INT DEFAULT 0 COMMENT '信号强度 0-100',
|
||||||
|
last_heartbeat TIMESTAMP NULL COMMENT '最后心跳时间',
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
INDEX idx_state (state),
|
||||||
|
INDEX idx_location (longitude, latitude)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='地面机器人设备表';
|
||||||
|
|
||||||
|
-- 3. 伤员记录表
|
||||||
|
CREATE TABLE IF NOT EXISTS injury_records (
|
||||||
|
id VARCHAR(50) PRIMARY KEY,
|
||||||
|
rank INT COMMENT '伤员等级',
|
||||||
|
longitude DOUBLE,
|
||||||
|
latitude DOUBLE,
|
||||||
|
flag INT DEFAULT 1 COMMENT '有效标志: 0=无效, 1=有效',
|
||||||
|
severity INT DEFAULT 0 COMMENT '严重程度: 0=轻微, 1=中等, 2=严重, 3=危重',
|
||||||
|
description TEXT COMMENT '伤情描述',
|
||||||
|
discovered_by VARCHAR(50) COMMENT '发现设备ID',
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
INDEX idx_flag (flag),
|
||||||
|
INDEX idx_severity (severity),
|
||||||
|
INDEX idx_location (longitude, latitude)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='伤员记录表';
|
||||||
|
|
||||||
|
-- 4. 系统配置表
|
||||||
|
CREATE TABLE IF NOT EXISTS system_config (
|
||||||
|
config_key VARCHAR(100) PRIMARY KEY,
|
||||||
|
config_value TEXT,
|
||||||
|
config_type VARCHAR(20) DEFAULT 'string' COMMENT '配置类型: string, int, float, boolean, json',
|
||||||
|
description VARCHAR(500),
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统配置表';
|
||||||
|
|
||||||
|
-- 5. 用户会话表
|
||||||
|
CREATE TABLE IF NOT EXISTS user_sessions (
|
||||||
|
session_id VARCHAR(100) PRIMARY KEY,
|
||||||
|
user_name VARCHAR(50),
|
||||||
|
login_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
last_activity TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
ip_address VARCHAR(45),
|
||||||
|
user_agent TEXT,
|
||||||
|
status INT DEFAULT 1 COMMENT '会话状态: 0=已注销, 1=活跃',
|
||||||
|
INDEX idx_user (user_name),
|
||||||
|
INDEX idx_status (status)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户会话表';
|
||||||
|
|
||||||
|
-- 6. 设备操作日志表
|
||||||
|
CREATE TABLE IF NOT EXISTS device_operation_logs (
|
||||||
|
log_id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
device_id VARCHAR(50),
|
||||||
|
device_type VARCHAR(20) COMMENT '设备类型: uav, dog',
|
||||||
|
operation VARCHAR(50) COMMENT '操作类型: connect, disconnect, control, move',
|
||||||
|
operation_result VARCHAR(20) DEFAULT 'success' COMMENT '操作结果: success, failed, timeout',
|
||||||
|
operator VARCHAR(50) COMMENT '操作员',
|
||||||
|
operation_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
details JSON COMMENT '操作详细信息',
|
||||||
|
INDEX idx_device (device_id),
|
||||||
|
INDEX idx_operation_time (operation_time),
|
||||||
|
INDEX idx_device_type (device_type)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='设备操作日志表';
|
||||||
|
|
||||||
|
-- 插入默认系统配置
|
||||||
|
INSERT INTO system_config (config_key, config_value, config_type, description) VALUES
|
||||||
|
('app.version', '2.0.0', 'string', '应用程序版本'),
|
||||||
|
('app.theme', 'military', 'string', '默认主题'),
|
||||||
|
('database.connection_timeout', '30000', 'int', '数据库连接超时时间(毫秒)'),
|
||||||
|
('ui.auto_refresh_interval', '5000', 'int', '界面自动刷新间隔(毫秒)'),
|
||||||
|
('ui.device_card_style', 'modern', 'string', '设备卡片样式'),
|
||||||
|
('map.default_center_lat', '39.9', 'float', '地图默认中心纬度'),
|
||||||
|
('map.default_center_lon', '116.4', 'float', '地图默认中心经度'),
|
||||||
|
('map.default_zoom', '12', 'int', '地图默认缩放级别'),
|
||||||
|
('device.heartbeat_interval', '10000', 'int', '设备心跳间隔(毫秒)'),
|
||||||
|
('device.connection_timeout', '30000', 'int', '设备连接超时(毫秒)')
|
||||||
|
ON DUPLICATE KEY UPDATE
|
||||||
|
config_value = VALUES(config_value),
|
||||||
|
updated_at = CURRENT_TIMESTAMP;
|
||||||
|
|
||||||
|
-- 为兼容现有代码,创建旧表名的视图
|
||||||
|
CREATE OR REPLACE VIEW uavdatabase AS
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
state,
|
||||||
|
ip,
|
||||||
|
port,
|
||||||
|
longitude as lon,
|
||||||
|
latitude as lat
|
||||||
|
FROM uav_devices;
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW dogdatabase AS
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
state,
|
||||||
|
ip,
|
||||||
|
port,
|
||||||
|
longitude as lon,
|
||||||
|
latitude as lat
|
||||||
|
FROM dog_devices;
|
||||||
|
|
||||||
|
CREATE OR REPLACE VIEW injurydatabase AS
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
rank as injuryrank,
|
||||||
|
longitude as lon,
|
||||||
|
latitude as lat,
|
||||||
|
flag
|
||||||
|
FROM injury_records;
|
||||||
|
|
||||||
|
-- 显示创建的表
|
||||||
|
SHOW TABLES;
|
||||||
|
|
||||||
|
-- 显示表结构概要
|
||||||
|
SELECT
|
||||||
|
TABLE_NAME as '表名',
|
||||||
|
TABLE_COMMENT as '说明',
|
||||||
|
TABLE_ROWS as '记录数'
|
||||||
|
FROM information_schema.TABLES
|
||||||
|
WHERE TABLE_SCHEMA = 'Client'
|
||||||
|
ORDER BY TABLE_NAME;
|
@ -0,0 +1,486 @@
|
|||||||
|
# CasualtySightPlus 项目结构重构规划
|
||||||
|
|
||||||
|
## 当前项目结构分析
|
||||||
|
|
||||||
|
### 现有目录结构
|
||||||
|
```
|
||||||
|
Client/
|
||||||
|
├── include/ # 头文件目录
|
||||||
|
│ ├── DogDatabase.h
|
||||||
|
│ ├── InjuryAnalysisUI.h
|
||||||
|
│ ├── InjuryDatabase.h
|
||||||
|
│ ├── UAVDatabase.h
|
||||||
|
│ ├── guidingui.h
|
||||||
|
│ └── injurydisiplayui.h
|
||||||
|
├── src/ # 源码目录
|
||||||
|
│ ├── DogDatabase.cpp
|
||||||
|
│ ├── InjuryAnalysisUI.cpp
|
||||||
|
│ ├── InjuryDatabase.cpp
|
||||||
|
│ ├── UAVDatabase.cpp
|
||||||
|
│ ├── guidingui.cpp
|
||||||
|
│ ├── injurydisiplayui.cpp
|
||||||
|
│ └── main.cpp
|
||||||
|
├── ui/ # UI表单文件
|
||||||
|
│ ├── InjuryAnalysisUI.ui
|
||||||
|
│ ├── guidingui.ui
|
||||||
|
│ └── injurydisiplayui.ui
|
||||||
|
├── res/ # 资源文件
|
||||||
|
│ ├── html/
|
||||||
|
│ ├── icon/
|
||||||
|
│ ├── image/
|
||||||
|
│ └── qml/
|
||||||
|
├── build/ # 构建目录
|
||||||
|
└── AudioModule/ # 音频模块
|
||||||
|
```
|
||||||
|
|
||||||
|
### 现有数据库架构分析
|
||||||
|
|
||||||
|
#### 1. UAVDatabase (无人机数据库)
|
||||||
|
- **连接方式**: 已使用MySQL (`QMYSQL`)
|
||||||
|
- **表结构**: `uavdatabase` 表
|
||||||
|
- id (VARCHAR)
|
||||||
|
- state (INT)
|
||||||
|
- ip (VARCHAR)
|
||||||
|
- port (INT)
|
||||||
|
- lon (DOUBLE)
|
||||||
|
- lat (DOUBLE)
|
||||||
|
- **连接信息**: 数据库名: `fly_land_database`, 用户: `root`
|
||||||
|
|
||||||
|
#### 2. DogDatabase (地面机器人数据库)
|
||||||
|
- **连接方式**: 已使用MySQL (`QMYSQL`)
|
||||||
|
- **表结构**: `dogdatabase` 表
|
||||||
|
- id (VARCHAR)
|
||||||
|
- state (INT)
|
||||||
|
- ip (VARCHAR)
|
||||||
|
- port (INT)
|
||||||
|
- lon (DOUBLE)
|
||||||
|
- lat (DOUBLE)
|
||||||
|
- **单例模式**: 线程安全实现
|
||||||
|
|
||||||
|
#### 3. InjuryDatabase (伤员信息数据库)
|
||||||
|
- **连接方式**: 已使用MySQL (`QMYSQL`)
|
||||||
|
- **表结构**: `injurydatabase` 表
|
||||||
|
- id (VARCHAR)
|
||||||
|
- injuryrank (INT)
|
||||||
|
- lon (DOUBLE)
|
||||||
|
- lat (DOUBLE)
|
||||||
|
- flag (INT)
|
||||||
|
|
||||||
|
## 重构后的项目结构规划
|
||||||
|
|
||||||
|
### 新的目录结构
|
||||||
|
```
|
||||||
|
Client/
|
||||||
|
├── src/
|
||||||
|
│ ├── core/ # 核心业务逻辑
|
||||||
|
│ │ ├── database/ # 数据库层
|
||||||
|
│ │ │ ├── managers/ # 数据库管理器
|
||||||
|
│ │ │ ├── models/ # 数据模型
|
||||||
|
│ │ │ └── connections/ # 连接管理
|
||||||
|
│ │ ├── services/ # 业务服务层
|
||||||
|
│ │ └── utils/ # 工具类
|
||||||
|
│ ├── ui/ # 用户界面层
|
||||||
|
│ │ ├── main/ # 主界面
|
||||||
|
│ │ ├── components/ # 可复用组件
|
||||||
|
│ │ │ ├── DeviceCard/ # 设备卡片组件
|
||||||
|
│ │ │ ├── StatusPanel/ # 状态面板组件
|
||||||
|
│ │ │ └── MapViewer/ # 地图显示组件
|
||||||
|
│ │ ├── dialogs/ # 对话框
|
||||||
|
│ │ └── widgets/ # 自定义Widget
|
||||||
|
│ ├── resources/ # 资源文件
|
||||||
|
│ │ ├── styles/ # 样式文件
|
||||||
|
│ │ ├── themes/ # 主题配置
|
||||||
|
│ │ ├── images/ # 图片资源
|
||||||
|
│ │ ├── icons/ # 图标资源
|
||||||
|
│ │ ├── qml/ # QML文件
|
||||||
|
│ │ └── html/ # HTML文件
|
||||||
|
│ └── main.cpp
|
||||||
|
├── include/ # 公共头文件
|
||||||
|
├── forms/ # UI表单文件 (.ui)
|
||||||
|
├── build/ # 构建输出目录
|
||||||
|
├── config/ # 配置文件
|
||||||
|
├── docs/ # 项目文档
|
||||||
|
├── tests/ # 测试文件
|
||||||
|
└── scripts/ # 构建脚本
|
||||||
|
```
|
||||||
|
|
||||||
|
### 数据库层重构规划
|
||||||
|
|
||||||
|
#### 1. 连接管理器 (ConnectionManager)
|
||||||
|
```cpp
|
||||||
|
// src/core/database/connections/ConnectionManager.h
|
||||||
|
class ConnectionManager {
|
||||||
|
public:
|
||||||
|
static ConnectionManager* getInstance();
|
||||||
|
QSqlDatabase getConnection(const QString& connectionName = "default");
|
||||||
|
bool initialize(const DatabaseConfig& config);
|
||||||
|
void cleanup();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QMap<QString, QSqlDatabase> m_connections;
|
||||||
|
DatabaseConfig m_config;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2. 数据库配置管理
|
||||||
|
```cpp
|
||||||
|
// src/core/database/DatabaseConfig.h
|
||||||
|
struct DatabaseConfig {
|
||||||
|
QString host = "localhost";
|
||||||
|
int port = 3306;
|
||||||
|
QString database = "fly_land_database";
|
||||||
|
QString username = "root";
|
||||||
|
QString password;
|
||||||
|
int maxConnections = 10;
|
||||||
|
int connectionTimeout = 30000;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3. 基础数据访问对象 (BaseDAO)
|
||||||
|
```cpp
|
||||||
|
// src/core/database/BaseDAO.h
|
||||||
|
template<typename T>
|
||||||
|
class BaseDAO {
|
||||||
|
public:
|
||||||
|
virtual bool insert(const T& entity) = 0;
|
||||||
|
virtual bool update(const T& entity) = 0;
|
||||||
|
virtual bool deleteById(const QString& id) = 0;
|
||||||
|
virtual T findById(const QString& id) = 0;
|
||||||
|
virtual QList<T> findAll() = 0;
|
||||||
|
virtual QList<T> findByCondition(const QString& condition) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QSqlDatabase getDatabase();
|
||||||
|
bool executeQuery(const QString& sql, const QVariantList& params = {});
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 4. 改进的数据模型
|
||||||
|
```cpp
|
||||||
|
// src/core/database/models/UAVModel.h
|
||||||
|
struct UAVModel {
|
||||||
|
QString id;
|
||||||
|
QString name;
|
||||||
|
int state;
|
||||||
|
QString ip;
|
||||||
|
int port;
|
||||||
|
double longitude;
|
||||||
|
double latitude;
|
||||||
|
int signalStrength;
|
||||||
|
QDateTime lastHeartbeat;
|
||||||
|
QDateTime createdAt;
|
||||||
|
QDateTime updatedAt;
|
||||||
|
|
||||||
|
// 序列化支持
|
||||||
|
QJsonObject toJson() const;
|
||||||
|
static UAVModel fromJson(const QJsonObject& json);
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### UI组件重构规划
|
||||||
|
|
||||||
|
#### 1. 设备卡片组件 (DeviceCard)
|
||||||
|
```cpp
|
||||||
|
// src/ui/components/DeviceCard/DeviceCard.h
|
||||||
|
class DeviceCard : public QWidget {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit DeviceCard(QWidget* parent = nullptr);
|
||||||
|
void setDevice(const DeviceInfo& device);
|
||||||
|
void updateStatus(DeviceStatus status);
|
||||||
|
void setCardStyle(CardStyle style);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void deviceSelected(const QString& deviceId);
|
||||||
|
void controlRequested(const QString& deviceId);
|
||||||
|
void locationRequested(const QString& deviceId);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void setupUI();
|
||||||
|
void updateStatusIndicator();
|
||||||
|
void applyCardStyle();
|
||||||
|
|
||||||
|
private:
|
||||||
|
DeviceInfo m_device;
|
||||||
|
QLabel* m_nameLabel;
|
||||||
|
QLabel* m_statusLabel;
|
||||||
|
QLabel* m_ipLabel;
|
||||||
|
QLabel* m_locationLabel;
|
||||||
|
QProgressBar* m_signalBar;
|
||||||
|
QPushButton* m_detailsBtn;
|
||||||
|
QPushButton* m_controlBtn;
|
||||||
|
QPushButton* m_locateBtn;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2. 状态面板组件 (StatusPanel)
|
||||||
|
```cpp
|
||||||
|
// src/ui/components/StatusPanel/StatusPanel.h
|
||||||
|
class StatusPanel : public QWidget {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit StatusPanel(QWidget* parent = nullptr);
|
||||||
|
void addStatusItem(const QString& name, const QVariant& value);
|
||||||
|
void updateStatusItem(const QString& name, const QVariant& value);
|
||||||
|
void setUpdateInterval(int msec);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void refreshStatus();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QTimer* m_refreshTimer;
|
||||||
|
QMap<QString, QLabel*> m_statusLabels;
|
||||||
|
QVBoxLayout* m_layout;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3. 主界面重构 (MainWindow)
|
||||||
|
```cpp
|
||||||
|
// src/ui/main/MainWindow.h
|
||||||
|
class MainWindow : public QMainWindow {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit MainWindow(QWidget* parent = nullptr);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void onDeviceSelected(const QString& deviceId);
|
||||||
|
void onStatusChanged(const QString& deviceId, DeviceStatus status);
|
||||||
|
void refreshDeviceList();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void setupUI();
|
||||||
|
void setupMenus();
|
||||||
|
void setupStatusBar();
|
||||||
|
void setupDockWidgets();
|
||||||
|
void connectSignals();
|
||||||
|
|
||||||
|
private:
|
||||||
|
DeviceListWidget* m_deviceList;
|
||||||
|
MapViewerWidget* m_mapViewer;
|
||||||
|
StatusPanel* m_statusPanel;
|
||||||
|
QDockWidget* m_deviceDock;
|
||||||
|
QDockWidget* m_statusDock;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 样式系统规划
|
||||||
|
|
||||||
|
#### 1. 主题管理器 (ThemeManager)
|
||||||
|
```cpp
|
||||||
|
// src/core/ui/ThemeManager.h
|
||||||
|
class ThemeManager : public QObject {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
enum Theme { Light, Dark, Military };
|
||||||
|
|
||||||
|
static ThemeManager* getInstance();
|
||||||
|
void setTheme(Theme theme);
|
||||||
|
Theme currentTheme() const;
|
||||||
|
QString getStyleSheet(const QString& component) const;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void themeChanged(Theme theme);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void loadTheme(Theme theme);
|
||||||
|
QMap<QString, QString> m_styleSheets;
|
||||||
|
Theme m_currentTheme;
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 2. 样式配置文件结构
|
||||||
|
```
|
||||||
|
src/resources/styles/
|
||||||
|
├── themes/
|
||||||
|
│ ├── dark.qss # 深色主题
|
||||||
|
│ ├── light.qss # 浅色主题
|
||||||
|
│ └── military.qss # 军事主题
|
||||||
|
├── components/
|
||||||
|
│ ├── device_card.qss # 设备卡片样式
|
||||||
|
│ ├── status_panel.qss # 状态面板样式
|
||||||
|
│ ├── main_window.qss # 主窗口样式
|
||||||
|
│ └── buttons.qss # 按钮样式
|
||||||
|
└── common/
|
||||||
|
├── colors.qss # 颜色定义
|
||||||
|
├── fonts.qss # 字体定义
|
||||||
|
└── animations.qss # 动画效果
|
||||||
|
```
|
||||||
|
|
||||||
|
## 配置文件管理
|
||||||
|
|
||||||
|
### 1. 应用配置 (AppConfig)
|
||||||
|
```json
|
||||||
|
// config/app.json
|
||||||
|
{
|
||||||
|
"application": {
|
||||||
|
"name": "CasualtySightPlus",
|
||||||
|
"version": "2.0.0",
|
||||||
|
"theme": "military",
|
||||||
|
"language": "zh_CN"
|
||||||
|
},
|
||||||
|
"database": {
|
||||||
|
"host": "localhost",
|
||||||
|
"port": 3306,
|
||||||
|
"name": "fly_land_database",
|
||||||
|
"username": "root",
|
||||||
|
"pool_size": 10,
|
||||||
|
"connection_timeout": 30000
|
||||||
|
},
|
||||||
|
"ui": {
|
||||||
|
"window_size": [1400, 900],
|
||||||
|
"device_card_style": "modern",
|
||||||
|
"auto_refresh_interval": 5000,
|
||||||
|
"animation_enabled": true
|
||||||
|
},
|
||||||
|
"map": {
|
||||||
|
"default_center": [39.9, 116.4],
|
||||||
|
"default_zoom": 12,
|
||||||
|
"tile_server": "amap"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. 设备模板配置
|
||||||
|
```json
|
||||||
|
// config/device_templates.json
|
||||||
|
{
|
||||||
|
"uav_templates": [
|
||||||
|
{
|
||||||
|
"name": "侦察机模板",
|
||||||
|
"type": "reconnaissance",
|
||||||
|
"default_settings": {
|
||||||
|
"max_altitude": 500,
|
||||||
|
"max_speed": 50,
|
||||||
|
"camera_resolution": "1080p"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"robot_templates": [
|
||||||
|
{
|
||||||
|
"name": "巡逻机器人模板",
|
||||||
|
"type": "patrol",
|
||||||
|
"default_settings": {
|
||||||
|
"max_speed": 5,
|
||||||
|
"sensor_range": 50,
|
||||||
|
"battery_capacity": 8000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 构建系统改进
|
||||||
|
|
||||||
|
### 1. 更新的 .pro 文件结构
|
||||||
|
```pro
|
||||||
|
# CasualtySightPlus.pro
|
||||||
|
QT += core gui widgets quickwidgets positioning
|
||||||
|
QT += multimedia multimediawidgets
|
||||||
|
QT += webenginewidgets webchannel
|
||||||
|
QT += sql charts network
|
||||||
|
|
||||||
|
CONFIG += c++17
|
||||||
|
|
||||||
|
# 版本信息
|
||||||
|
VERSION = 2.0.0
|
||||||
|
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
||||||
|
|
||||||
|
# 包含路径
|
||||||
|
INCLUDEPATH += \
|
||||||
|
include \
|
||||||
|
src/core \
|
||||||
|
src/ui \
|
||||||
|
AudioModule
|
||||||
|
|
||||||
|
# 构建目录
|
||||||
|
OBJECTS_DIR = build/obj
|
||||||
|
MOC_DIR = build/moc
|
||||||
|
UI_DIR = build/ui
|
||||||
|
RCC_DIR = build/rcc
|
||||||
|
DESTDIR = build/bin
|
||||||
|
|
||||||
|
# 预编译头文件
|
||||||
|
PRECOMPILED_HEADER = src/core/pch.h
|
||||||
|
|
||||||
|
# 源文件组织
|
||||||
|
include(src/core/core.pri)
|
||||||
|
include(src/ui/ui.pri)
|
||||||
|
include(AudioModule/audio.pri)
|
||||||
|
|
||||||
|
# 资源文件
|
||||||
|
RESOURCES += \
|
||||||
|
resources/resources.qrc \
|
||||||
|
resources/styles/styles.qrc \
|
||||||
|
resources/themes/themes.qrc
|
||||||
|
|
||||||
|
# 安装规则
|
||||||
|
target.path = /opt/CasualtySightPlus/bin
|
||||||
|
config.files = config/*
|
||||||
|
config.path = /opt/CasualtySightPlus/config
|
||||||
|
INSTALLS += target config
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. 模块化 .pri 文件
|
||||||
|
```pro
|
||||||
|
# src/core/core.pri
|
||||||
|
HEADERS += \
|
||||||
|
$$PWD/database/ConnectionManager.h \
|
||||||
|
$$PWD/database/BaseDAO.h \
|
||||||
|
$$PWD/database/models/UAVModel.h \
|
||||||
|
$$PWD/database/models/DogModel.h \
|
||||||
|
$$PWD/database/models/InjuryModel.h \
|
||||||
|
$$PWD/services/DeviceService.h \
|
||||||
|
$$PWD/utils/Logger.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
$$PWD/database/ConnectionManager.cpp \
|
||||||
|
$$PWD/database/BaseDAO.cpp \
|
||||||
|
$$PWD/database/models/UAVModel.cpp \
|
||||||
|
$$PWD/database/models/DogModel.cpp \
|
||||||
|
$$PWD/database/models/InjuryModel.cpp \
|
||||||
|
$$PWD/services/DeviceService.cpp \
|
||||||
|
$$PWD/utils/Logger.cpp
|
||||||
|
```
|
||||||
|
|
||||||
|
## 迁移策略
|
||||||
|
|
||||||
|
### 阶段1: 准备工作
|
||||||
|
1. 创建新的目录结构
|
||||||
|
2. 设置构建环境
|
||||||
|
3. 创建基础框架类
|
||||||
|
|
||||||
|
### 阶段2: 数据库层迁移
|
||||||
|
1. 实现新的数据库连接管理
|
||||||
|
2. 迁移现有数据模型
|
||||||
|
3. 创建改进的DAO类
|
||||||
|
4. 测试数据库操作
|
||||||
|
|
||||||
|
### 阶段3: UI组件重构
|
||||||
|
1. 创建新的设备卡片组件
|
||||||
|
2. 重构主界面布局
|
||||||
|
3. 实现样式主题系统
|
||||||
|
4. 迁移现有功能
|
||||||
|
|
||||||
|
### 阶段4: 集成和测试
|
||||||
|
1. 集成所有模块
|
||||||
|
2. 全面功能测试
|
||||||
|
3. 性能优化
|
||||||
|
4. 文档更新
|
||||||
|
|
||||||
|
## 风险评估
|
||||||
|
|
||||||
|
### 技术风险
|
||||||
|
- **数据库迁移风险**: 中等 - 现有数据库结构已经使用MySQL
|
||||||
|
- **UI兼容性风险**: 低 - 使用标准Qt组件
|
||||||
|
- **性能风险**: 低 - 改进的架构应该提升性能
|
||||||
|
|
||||||
|
### 时间风险
|
||||||
|
- **开发周期**: 预计4-5周
|
||||||
|
- **测试时间**: 额外1周
|
||||||
|
- **文档编写**: 额外几天
|
||||||
|
|
||||||
|
### 缓解策略
|
||||||
|
1. 分阶段实施,确保每个阶段都有可工作的版本
|
||||||
|
2. 保持现有数据库结构兼容性
|
||||||
|
3. 充分的单元测试和集成测试
|
||||||
|
4. 详细的代码审查和文档
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>RobotListDialog</class>
|
<class>DeviceDialog</class>
|
||||||
<widget class="QDialog" name="RobotListDialog">
|
<widget class="QDialog" name="DeviceDialog">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>GuidingUI</class>
|
<class>MainWindow</class>
|
||||||
<widget class="QMainWindow" name="GuidingUI">
|
<widget class="QMainWindow" name="MainWindow">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
@ -1,101 +0,0 @@
|
|||||||
#ifndef INJURYDATABASE_H
|
|
||||||
#define INJURYDATABASE_H
|
|
||||||
|
|
||||||
#include <QtSql>
|
|
||||||
#include <QSqlDatabase>
|
|
||||||
#include <QWidget>
|
|
||||||
#include <QSqlQuery>
|
|
||||||
#include <QString>
|
|
||||||
#include <QSqlRecord>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QSqlError>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
|
|
||||||
struct Injury
|
|
||||||
{
|
|
||||||
QString id;
|
|
||||||
int rank;
|
|
||||||
double lon;
|
|
||||||
double lat;
|
|
||||||
int flag;
|
|
||||||
};
|
|
||||||
|
|
||||||
class InjuryDatabase
|
|
||||||
{
|
|
||||||
// Q_OBJECT宏用于提供Qt信号槽和元对象系统服务
|
|
||||||
// 它必须限定为私有访问权限
|
|
||||||
//Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
static InjuryDatabase *getInstance();
|
|
||||||
InjuryDatabase();
|
|
||||||
~InjuryDatabase();
|
|
||||||
|
|
||||||
//打开
|
|
||||||
bool open(const QString &dbName,const QString &userName = QString(),const QString &passwd = QString());
|
|
||||||
//添加数据记录
|
|
||||||
bool add(const Injury &data);
|
|
||||||
//查询所有数据
|
|
||||||
bool select_all(QList<Injury> &result);
|
|
||||||
//删除伤员记录
|
|
||||||
bool deleteById(const QString &id);
|
|
||||||
|
|
||||||
Injury data;
|
|
||||||
//返回有效信息
|
|
||||||
void ReturnInfo(QList<Injury> data);
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
//查询有效数据
|
|
||||||
bool select_valid(const QString &tableName,QList<Injury> &result);
|
|
||||||
//关闭
|
|
||||||
void close();
|
|
||||||
//开始添加字段
|
|
||||||
void beginAddFiled(const QString &tableName);
|
|
||||||
|
|
||||||
//添加字段
|
|
||||||
void addFiled(const QString &filedName);
|
|
||||||
|
|
||||||
//结束添加字段
|
|
||||||
void endAddFiled();
|
|
||||||
|
|
||||||
//开始添加行
|
|
||||||
void beginAddRow();
|
|
||||||
|
|
||||||
//添加字段值
|
|
||||||
void addValue(const QVariant &value);
|
|
||||||
|
|
||||||
//结束添加行
|
|
||||||
void endAddRow();
|
|
||||||
|
|
||||||
//执行
|
|
||||||
bool exec(const QString &sql);
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
//数据库
|
|
||||||
QSqlDatabase m_sqlDb;
|
|
||||||
|
|
||||||
//表名
|
|
||||||
QString m_tableName;
|
|
||||||
|
|
||||||
//字段名
|
|
||||||
QStringList m_fieldName;
|
|
||||||
|
|
||||||
//头sql
|
|
||||||
QString m_headerSql;
|
|
||||||
|
|
||||||
//值sql
|
|
||||||
QString m_valueSql;
|
|
||||||
|
|
||||||
//已添加row数
|
|
||||||
int m_fieldAdd = 0;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // INJURYDATABASE_H
|
|
@ -1,27 +0,0 @@
|
|||||||
#ifndef INJURYDISIPLAYUI_H
|
|
||||||
#define INJURYDISIPLAYUI_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
#include <QWebEngineView>
|
|
||||||
#include <QtWebChannel>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class InjuryDisiplayUI;
|
|
||||||
}
|
|
||||||
|
|
||||||
class InjuryDisiplayUI : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit InjuryDisiplayUI(QWidget *parent = nullptr);
|
|
||||||
~InjuryDisiplayUI();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::InjuryDisiplayUI *ui;
|
|
||||||
|
|
||||||
// 加载所有伤员标记到地图上
|
|
||||||
void loadInjuryMarkers(QWebEngineView *view);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // INJURYDISIPLAYUI_H
|
|
@ -0,0 +1,26 @@
|
|||||||
|
#ifndef DEVICEDIALOG_H
|
||||||
|
#define DEVICEDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
namespace Ui {
|
||||||
|
class DeviceDialog;
|
||||||
|
}
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
class DeviceDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit DeviceDialog(QWidget *parent = nullptr);
|
||||||
|
~DeviceDialog();
|
||||||
|
|
||||||
|
void addDeviceInfo(QString name, QString type, QString status, QString position);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::DeviceDialog *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DEVICEDIALOG_H
|
After Width: | Height: | Size: 40 KiB |
@ -1,4 +1,4 @@
|
|||||||
#include "DogDatabase.h"
|
#include "core/database/DogDatabase.h"
|
||||||
|
|
||||||
// 单例实例指针定义
|
// 单例实例指针定义
|
||||||
DogDatabase *DogDatabase::m_instance = nullptr;
|
DogDatabase *DogDatabase::m_instance = nullptr;
|
@ -1,4 +1,4 @@
|
|||||||
#include "UAVDatabase.h"
|
#include "core/database/UAVDatabase.h"
|
||||||
|
|
||||||
UAVDatabase *UAVDatabase::getInstance()
|
UAVDatabase *UAVDatabase::getInstance()
|
||||||
{
|
{
|
@ -1,120 +0,0 @@
|
|||||||
/****************************************************************************
|
|
||||||
** Meta object code from reading C++ file 'InjuryAnalysisUI.h'
|
|
||||||
**
|
|
||||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.13)
|
|
||||||
**
|
|
||||||
** WARNING! All changes made in this file will be lost!
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
#include "InjuryAnalysisUI.h"
|
|
||||||
#include <QtCore/qbytearray.h>
|
|
||||||
#include <QtCore/qmetatype.h>
|
|
||||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
|
||||||
#error "The header file 'InjuryAnalysisUI.h' doesn't include <QObject>."
|
|
||||||
#elif Q_MOC_OUTPUT_REVISION != 67
|
|
||||||
#error "This file was generated using the moc from 5.15.13. It"
|
|
||||||
#error "cannot be used with the include files from this version of Qt."
|
|
||||||
#error "(The moc has changed too much.)"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_BEGIN_MOC_NAMESPACE
|
|
||||||
QT_WARNING_PUSH
|
|
||||||
QT_WARNING_DISABLE_DEPRECATED
|
|
||||||
struct qt_meta_stringdata_InjuryAnalysisUI_t {
|
|
||||||
QByteArrayData data[3];
|
|
||||||
char stringdata0[42];
|
|
||||||
};
|
|
||||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
|
||||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
|
|
||||||
qptrdiff(offsetof(qt_meta_stringdata_InjuryAnalysisUI_t, stringdata0) + ofs \
|
|
||||||
- idx * sizeof(QByteArrayData)) \
|
|
||||||
)
|
|
||||||
static const qt_meta_stringdata_InjuryAnalysisUI_t qt_meta_stringdata_InjuryAnalysisUI = {
|
|
||||||
{
|
|
||||||
QT_MOC_LITERAL(0, 0, 16), // "InjuryAnalysisUI"
|
|
||||||
QT_MOC_LITERAL(1, 17, 23), // "on_searchButton_clicked"
|
|
||||||
QT_MOC_LITERAL(2, 41, 0) // ""
|
|
||||||
|
|
||||||
},
|
|
||||||
"InjuryAnalysisUI\0on_searchButton_clicked\0"
|
|
||||||
""
|
|
||||||
};
|
|
||||||
#undef QT_MOC_LITERAL
|
|
||||||
|
|
||||||
static const uint qt_meta_data_InjuryAnalysisUI[] = {
|
|
||||||
|
|
||||||
// content:
|
|
||||||
8, // revision
|
|
||||||
0, // classname
|
|
||||||
0, 0, // classinfo
|
|
||||||
1, 14, // methods
|
|
||||||
0, 0, // properties
|
|
||||||
0, 0, // enums/sets
|
|
||||||
0, 0, // constructors
|
|
||||||
0, // flags
|
|
||||||
0, // signalCount
|
|
||||||
|
|
||||||
// slots: name, argc, parameters, tag, flags
|
|
||||||
1, 0, 19, 2, 0x08 /* Private */,
|
|
||||||
|
|
||||||
// slots: parameters
|
|
||||||
QMetaType::Void,
|
|
||||||
|
|
||||||
0 // eod
|
|
||||||
};
|
|
||||||
|
|
||||||
void InjuryAnalysisUI::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
|
||||||
{
|
|
||||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
|
||||||
auto *_t = static_cast<InjuryAnalysisUI *>(_o);
|
|
||||||
(void)_t;
|
|
||||||
switch (_id) {
|
|
||||||
case 0: _t->on_searchButton_clicked(); break;
|
|
||||||
default: ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
(void)_a;
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_INIT_METAOBJECT const QMetaObject InjuryAnalysisUI::staticMetaObject = { {
|
|
||||||
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
|
|
||||||
qt_meta_stringdata_InjuryAnalysisUI.data,
|
|
||||||
qt_meta_data_InjuryAnalysisUI,
|
|
||||||
qt_static_metacall,
|
|
||||||
nullptr,
|
|
||||||
nullptr
|
|
||||||
} };
|
|
||||||
|
|
||||||
|
|
||||||
const QMetaObject *InjuryAnalysisUI::metaObject() const
|
|
||||||
{
|
|
||||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *InjuryAnalysisUI::qt_metacast(const char *_clname)
|
|
||||||
{
|
|
||||||
if (!_clname) return nullptr;
|
|
||||||
if (!strcmp(_clname, qt_meta_stringdata_InjuryAnalysisUI.stringdata0))
|
|
||||||
return static_cast<void*>(this);
|
|
||||||
return QWidget::qt_metacast(_clname);
|
|
||||||
}
|
|
||||||
|
|
||||||
int InjuryAnalysisUI::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
|
||||||
{
|
|
||||||
_id = QWidget::qt_metacall(_c, _id, _a);
|
|
||||||
if (_id < 0)
|
|
||||||
return _id;
|
|
||||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
|
||||||
if (_id < 1)
|
|
||||||
qt_static_metacall(this, _c, _id, _a);
|
|
||||||
_id -= 1;
|
|
||||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
|
||||||
if (_id < 1)
|
|
||||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
|
||||||
_id -= 1;
|
|
||||||
}
|
|
||||||
return _id;
|
|
||||||
}
|
|
||||||
QT_WARNING_POP
|
|
||||||
QT_END_MOC_NAMESPACE
|
|
File diff suppressed because it is too large
Load Diff
@ -1,236 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>InjuryAnalysisUI</class>
|
|
||||||
<widget class="QWidget" name="InjuryAnalysisUI">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>679</width>
|
|
||||||
<height>410</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color: rgb(245, 245, 245);
|
|
||||||
font: 11pt "Microsoft YaHei UI";</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>215</width>
|
|
||||||
<height>82</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_7">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>100</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>80</width>
|
|
||||||
<height>80</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>100</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">border-image: url(:/image/res/image/logo_backgroundless.png);</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>伤情结果统计:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="AnalysisDialog" native="true">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>80</y>
|
|
||||||
<width>631</width>
|
|
||||||
<height>291</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QPushButton {
|
|
||||||
background-color: rgba(15, 28, 34, 0);
|
|
||||||
color: rgb(0, 0, 0);
|
|
||||||
|
|
||||||
border: none;
|
|
||||||
|
|
||||||
padding: 10px 20px; /* 设置内边距 */
|
|
||||||
|
|
||||||
border-radius: 5px; /* 设置按钮圆角 */
|
|
||||||
|
|
||||||
font-size: 14px; /* 设置文字大小 */
|
|
||||||
|
|
||||||
text-align: right; /* 设置字体向右对齐 */
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QPushButton:hover {
|
|
||||||
|
|
||||||
background-color: #0364FF; /* 设置鼠标悬停时按钮背景色 */
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QPushButton:pressed {
|
|
||||||
|
|
||||||
background-color: #398439; /* 设置按钮被按下时背景色 */
|
|
||||||
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<item>
|
|
||||||
<widget class="QScrollArea" name="scrollArea">
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>365</width>
|
|
||||||
<height>229</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>伤员总数:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="sumLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>伤情轻微的伤员数:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="rank0Label">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_4">
|
|
||||||
<property name="text">
|
|
||||||
<string>伤情一般的伤员数:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="rank1Label">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_5">
|
|
||||||
<property name="text">
|
|
||||||
<string>伤情严重的伤员数:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="rank2Label">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_6">
|
|
||||||
<property name="text">
|
|
||||||
<string>输入伤员编号查询伤员信息</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="searchInput">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="searchButton">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">font: 14pt "Consolas";</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>查询</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>InjuryDisiplayUI</class>
|
|
||||||
<widget class="QDialog" name="InjuryDisiplayUI">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>1205</width>
|
|
||||||
<height>710</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Dialog</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
Loading…
Reference in new issue