前端代码 #4

Merged
pmg3qo72i merged 4 commits from wangjing into main 3 months ago

@ -0,0 +1,23 @@
QMAKE_CXX.QT_COMPILER_STDCXX = 201703L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 11
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 4
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS = \
QT_COMPILER_STDCXX \
QMAKE_GCC_MAJOR_VERSION \
QMAKE_GCC_MINOR_VERSION \
QMAKE_GCC_PATCH_VERSION
QMAKE_CXX.INCDIRS = \
/usr/include/c++/11 \
/usr/include/x86_64-linux-gnu/c++/11 \
/usr/include/c++/11/backward \
/usr/lib/gcc/x86_64-linux-gnu/11/include \
/usr/local/include \
/usr/include/x86_64-linux-gnu \
/usr/include
QMAKE_CXX.LIBDIRS = \
/usr/lib/gcc/x86_64-linux-gnu/11 \
/usr/lib/x86_64-linux-gnu \
/usr/lib \
/lib/x86_64-linux-gnu \
/lib

@ -0,0 +1,43 @@
#!/bin/bash
# Drone_project项目构建脚本shadow build系统 qmake
echo "=== 构建Drone_project项目 ==="
# 仅使用系统 qmake确保团队环境一致
if ! command -v qmake >/dev/null 2>&1; then
echo "✗ 未找到系统 qmake。请先安装sudo apt install -y qtbase5-dev qtwebengine5-dev"
exit 1
fi
QMAKE_BIN="qmake"
echo "使用 qmake: ${QMAKE_BIN} (from PATH)"
# 准备构建目录shadow build
echo "1. 准备构建目录..."
mkdir -p build || exit 1
rm -rf build/*
# 进入构建目录并生成构建文件
echo "2. 生成构建文件..."
(
cd build && "${QMAKE_BIN}" ../drone_ui.pro
) || { echo "✗ qmake 失败"; exit 1; }
# 编译项目
echo "3. 编译项目..."
(
cd build && make -j
) || { echo "✗ 编译失败"; exit 1; }
# 检查编译结果
if [ -f "build/Drone_project" ]; then
echo "✓ 编译成功!可执行文件位置: build/Drone_project"
else
echo "✗ 没找到可执行文件 build/Drone_project"
exit 1
fi
echo "=== 构建完成 ==="

@ -0,0 +1,23 @@
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 9
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 4
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS = \
QT_COMPILER_STDCXX \
QMAKE_GCC_MAJOR_VERSION \
QMAKE_GCC_MINOR_VERSION \
QMAKE_GCC_PATCH_VERSION
QMAKE_CXX.INCDIRS = \
/usr/include/c++/9 \
/usr/include/x86_64-linux-gnu/c++/9 \
/usr/include/c++/9/backward \
/usr/lib/gcc/x86_64-linux-gnu/9/include \
/usr/local/include \
/usr/include/x86_64-linux-gnu \
/usr/include
QMAKE_CXX.LIBDIRS = \
/usr/lib/gcc/x86_64-linux-gnu/9 \
/usr/lib/x86_64-linux-gnu \
/usr/lib \
/lib/x86_64-linux-gnu \
/lib

Binary file not shown.

@ -0,0 +1,620 @@
#############################################################################
# Makefile for building: Drone_project
# Generated by qmake (3.1) (Qt 5.15.3)
# Project: ../drone_ui.pro
# Template: app
# Command: /usr/lib/qt5/bin/qmake -o Makefile ../drone_ui.pro
#############################################################################
MAKEFILE = Makefile
EQ = =
####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_WEBENGINEWIDGETS_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB
CFLAGS = -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES)
CXXFLAGS = -pipe -O2 -std=gnu++1z -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES)
INCPATH = -I../../Drone_project -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtWebChannel -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtPositioning -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++
QMAKE = /usr/lib/qt5/bin/qmake
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = cp -f -R
QINSTALL = /usr/lib/qt5/bin/qmake -install qinstall
QINSTALL_PROGRAM = /usr/lib/qt5/bin/qmake -install qinstall -exe
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
TAR = tar -cf
COMPRESS = gzip -9f
DISTNAME = Drone_project1.0.0
DISTDIR = /home/wangjing/uav/Drone_project/build/.tmp/Drone_project1.0.0
LINK = g++
LFLAGS = -Wl,-O1 -Wl,-rpath-link,/usr/lib/x86_64-linux-gnu
LIBS = $(SUBLIBS) /usr/lib/x86_64-linux-gnu/libQt5WebEngineWidgets.so /usr/lib/x86_64-linux-gnu/libQt5PrintSupport.so /usr/lib/x86_64-linux-gnu/libQt5Widgets.so /usr/lib/x86_64-linux-gnu/libQt5WebEngineCore.so /usr/lib/x86_64-linux-gnu/libQt5Quick.so /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5QmlModels.so /usr/lib/x86_64-linux-gnu/libQt5WebChannel.so /usr/lib/x86_64-linux-gnu/libQt5Qml.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/libQt5Positioning.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lGL -lpthread
AR = ar cqs
RANLIB =
SED = sed
STRIP = strip
####### Output directory
OBJECTS_DIR = ./
####### Files
SOURCES = ../src/core/main.cpp \
../src/ui/mainwindow.cpp \
../src/models/dronedata.cpp \
../src/models/detectiondata.cpp \
../src/pages/videopage.cpp \
../src/pages/mappage.cpp \
../src/pages/datapage.cpp \
../src/pages/visionmodelpage.cpp \
../src/utils/stylehelper.cpp \
../src/pages/taskdecisionpage.cpp \
../src/utils/config.cpp \
../src/utils/logger.cpp \
../src/utils/errorhandler.cpp qrc_app.cpp \
moc_mainwindow.cpp \
moc_dronedata.cpp \
moc_detectiondata.cpp \
moc_videopage.cpp \
moc_mappage.cpp \
moc_datapage.cpp \
moc_visionmodelpage.cpp \
moc_taskdecisionpage.cpp
OBJECTS = main.o \
mainwindow.o \
dronedata.o \
detectiondata.o \
videopage.o \
mappage.o \
datapage.o \
visionmodelpage.o \
stylehelper.o \
taskdecisionpage.o \
config.o \
logger.o \
errorhandler.o \
qrc_app.o \
moc_mainwindow.o \
moc_dronedata.o \
moc_detectiondata.o \
moc_videopage.o \
moc_mappage.o \
moc_datapage.o \
moc_visionmodelpage.o \
moc_taskdecisionpage.o
DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_positioning.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_positioningquick.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlmodels.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlworkerscript.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webengine.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webenginecore.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webenginewidgets.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
../.qmake.stash \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources_functions.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
../../drone_ui.pro ../src/ui/mainwindow.h \
../src/models/dronedata.h \
../src/models/detectiondata.h \
../src/pages/videopage.h \
../src/pages/mappage.h \
../src/pages/datapage.h \
../src/pages/visionmodelpage.h \
../src/utils/stylehelper.h \
../src/pages/taskdecisionpage.h \
../src/utils/config.h \
../src/utils/logger.h \
../src/utils/errorhandler.h ../src/core/main.cpp \
../src/ui/mainwindow.cpp \
../src/models/dronedata.cpp \
../src/models/detectiondata.cpp \
../src/pages/videopage.cpp \
../src/pages/mappage.cpp \
../src/pages/datapage.cpp \
../src/pages/visionmodelpage.cpp \
../src/utils/stylehelper.cpp \
../src/pages/taskdecisionpage.cpp \
../src/utils/config.cpp \
../src/utils/logger.cpp \
../src/utils/errorhandler.cpp
QMAKE_TARGET = Drone_project
DESTDIR =
TARGET = Drone_project
first: all
####### Build rules
Drone_project: $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile: ../drone_ui.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_positioning.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_positioningquick.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlmodels.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlworkerscript.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webengine.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webenginecore.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webenginewidgets.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \
.qmake.stash \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources_functions.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \
../drone_ui.pro \
../src/resources/app.qrc
$(QMAKE) -o Makefile ../drone_ui.pro
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_positioning.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_positioningquick.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlmodels.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlworkerscript.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webengine.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webenginecore.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webenginewidgets.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf:
.qmake.stash:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources_functions.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf:
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf:
../drone_ui.pro:
../src/resources/app.qrc:
qmake: FORCE
@$(QMAKE) -o Makefile ../drone_ui.pro
qmake_all: FORCE
all: Makefile Drone_project
dist: distdir FORCE
(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
distdir: FORCE
@test -d $(DISTDIR) || mkdir -p $(DISTDIR)
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
$(COPY_FILE) --parents ../src/resources/app.qrc $(DISTDIR)/
$(COPY_FILE) --parents /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp $(DISTDIR)/
$(COPY_FILE) --parents ../src/ui/mainwindow.h ../src/models/dronedata.h ../src/models/detectiondata.h ../src/pages/videopage.h ../src/pages/mappage.h ../src/pages/datapage.h ../src/pages/visionmodelpage.h ../src/utils/stylehelper.h ../src/pages/taskdecisionpage.h ../src/utils/config.h ../src/utils/logger.h ../src/utils/errorhandler.h $(DISTDIR)/
$(COPY_FILE) --parents ../src/core/main.cpp ../src/ui/mainwindow.cpp ../src/models/dronedata.cpp ../src/models/detectiondata.cpp ../src/pages/videopage.cpp ../src/pages/mappage.cpp ../src/pages/datapage.cpp ../src/pages/visionmodelpage.cpp ../src/utils/stylehelper.cpp ../src/pages/taskdecisionpage.cpp ../src/utils/config.cpp ../src/utils/logger.cpp ../src/utils/errorhandler.cpp $(DISTDIR)/
clean: compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) .qmake.stash
-$(DEL_FILE) Makefile
####### Sub-libraries
mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all
check: first
benchmark: first
compiler_rcc_make_all: qrc_app.cpp
compiler_rcc_clean:
-$(DEL_FILE) qrc_app.cpp
qrc_app.cpp: ../src/resources/app.qrc \
/usr/lib/qt5/bin/rcc
/usr/lib/qt5/bin/rcc -name app ../src/resources/app.qrc -o qrc_app.cpp
compiler_moc_predefs_make_all: moc_predefs.h
compiler_moc_predefs_clean:
-$(DEL_FILE) moc_predefs.h
moc_predefs.h: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
g++ -pipe -O2 -std=gnu++1z -Wall -Wextra -dM -E -o moc_predefs.h /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp
compiler_moc_header_make_all: moc_mainwindow.cpp moc_dronedata.cpp moc_detectiondata.cpp moc_videopage.cpp moc_mappage.cpp moc_datapage.cpp moc_visionmodelpage.cpp moc_taskdecisionpage.cpp
compiler_moc_header_clean:
-$(DEL_FILE) moc_mainwindow.cpp moc_dronedata.cpp moc_detectiondata.cpp moc_videopage.cpp moc_mappage.cpp moc_datapage.cpp moc_visionmodelpage.cpp moc_taskdecisionpage.cpp
moc_mainwindow.cpp: ../src/ui/mainwindow.h \
../src/models/dronedata.h \
../src/models/detectiondata.h \
../src/pages/visionmodelpage.h \
../src/utils/stylehelper.h \
../src/pages/taskdecisionpage.h \
../src/pages/mappage.h \
moc_predefs.h \
/usr/lib/qt5/bin/moc
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/wangjing/uav/Drone_project/build/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/wangjing/uav/Drone_project -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtWebChannel -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtPositioning -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../src/ui/mainwindow.h -o moc_mainwindow.cpp
moc_dronedata.cpp: ../src/models/dronedata.h \
moc_predefs.h \
/usr/lib/qt5/bin/moc
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/wangjing/uav/Drone_project/build/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/wangjing/uav/Drone_project -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtWebChannel -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtPositioning -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../src/models/dronedata.h -o moc_dronedata.cpp
moc_detectiondata.cpp: ../src/models/detectiondata.h \
moc_predefs.h \
/usr/lib/qt5/bin/moc
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/wangjing/uav/Drone_project/build/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/wangjing/uav/Drone_project -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtWebChannel -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtPositioning -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../src/models/detectiondata.h -o moc_detectiondata.cpp
moc_videopage.cpp: ../src/pages/videopage.h \
moc_predefs.h \
/usr/lib/qt5/bin/moc
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/wangjing/uav/Drone_project/build/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/wangjing/uav/Drone_project -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtWebChannel -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtPositioning -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../src/pages/videopage.h -o moc_videopage.cpp
moc_mappage.cpp: ../src/pages/mappage.h \
moc_predefs.h \
/usr/lib/qt5/bin/moc
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/wangjing/uav/Drone_project/build/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/wangjing/uav/Drone_project -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtWebChannel -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtPositioning -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../src/pages/mappage.h -o moc_mappage.cpp
moc_datapage.cpp: ../src/pages/datapage.h \
moc_predefs.h \
/usr/lib/qt5/bin/moc
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/wangjing/uav/Drone_project/build/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/wangjing/uav/Drone_project -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtWebChannel -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtPositioning -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../src/pages/datapage.h -o moc_datapage.cpp
moc_visionmodelpage.cpp: ../src/pages/visionmodelpage.h \
moc_predefs.h \
/usr/lib/qt5/bin/moc
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/wangjing/uav/Drone_project/build/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/wangjing/uav/Drone_project -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtWebChannel -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtPositioning -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../src/pages/visionmodelpage.h -o moc_visionmodelpage.cpp
moc_taskdecisionpage.cpp: ../src/pages/taskdecisionpage.h \
../src/pages/mappage.h \
moc_predefs.h \
/usr/lib/qt5/bin/moc
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/wangjing/uav/Drone_project/build/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/wangjing/uav/Drone_project -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtWebEngineCore -I/usr/include/x86_64-linux-gnu/qt5/QtQuick -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtQmlModels -I/usr/include/x86_64-linux-gnu/qt5/QtWebChannel -I/usr/include/x86_64-linux-gnu/qt5/QtQml -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtPositioning -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include ../src/pages/taskdecisionpage.h -o moc_taskdecisionpage.cpp
compiler_moc_objc_header_make_all:
compiler_moc_objc_header_clean:
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_rcc_clean compiler_moc_predefs_clean compiler_moc_header_clean
####### Compile
main.o: ../src/core/main.cpp ../src/ui/mainwindow.h \
../src/models/dronedata.h \
../src/models/detectiondata.h \
../src/pages/visionmodelpage.h \
../src/utils/stylehelper.h \
../src/pages/taskdecisionpage.h \
../src/pages/mappage.h \
../src/utils/logger.h \
../src/utils/config.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o ../src/core/main.cpp
mainwindow.o: ../src/ui/mainwindow.cpp ../src/ui/mainwindow.h \
../src/models/dronedata.h \
../src/models/detectiondata.h \
../src/pages/visionmodelpage.h \
../src/utils/stylehelper.h \
../src/pages/taskdecisionpage.h \
../src/pages/mappage.h \
../src/pages/videopage.h \
../src/pages/datapage.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o ../src/ui/mainwindow.cpp
dronedata.o: ../src/models/dronedata.cpp ../src/models/dronedata.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dronedata.o ../src/models/dronedata.cpp
detectiondata.o: ../src/models/detectiondata.cpp ../src/models/detectiondata.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o detectiondata.o ../src/models/detectiondata.cpp
videopage.o: ../src/pages/videopage.cpp ../src/pages/videopage.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o videopage.o ../src/pages/videopage.cpp
mappage.o: ../src/pages/mappage.cpp ../src/pages/mappage.h \
../src/utils/config.h \
../src/utils/logger.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mappage.o ../src/pages/mappage.cpp
datapage.o: ../src/pages/datapage.cpp ../src/pages/datapage.h \
../src/models/dronedata.h \
../src/models/detectiondata.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o datapage.o ../src/pages/datapage.cpp
visionmodelpage.o: ../src/pages/visionmodelpage.cpp ../src/pages/visionmodelpage.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o visionmodelpage.o ../src/pages/visionmodelpage.cpp
stylehelper.o: ../src/utils/stylehelper.cpp ../src/utils/stylehelper.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stylehelper.o ../src/utils/stylehelper.cpp
taskdecisionpage.o: ../src/pages/taskdecisionpage.cpp ../src/pages/taskdecisionpage.h \
../src/pages/mappage.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o taskdecisionpage.o ../src/pages/taskdecisionpage.cpp
config.o: ../src/utils/config.cpp ../src/utils/config.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o config.o ../src/utils/config.cpp
logger.o: ../src/utils/logger.cpp ../src/utils/logger.h \
../src/utils/config.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o logger.o ../src/utils/logger.cpp
errorhandler.o: ../src/utils/errorhandler.cpp ../src/utils/errorhandler.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o errorhandler.o ../src/utils/errorhandler.cpp
qrc_app.o: qrc_app.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_app.o qrc_app.cpp
moc_mainwindow.o: moc_mainwindow.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
moc_dronedata.o: moc_dronedata.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_dronedata.o moc_dronedata.cpp
moc_detectiondata.o: moc_detectiondata.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_detectiondata.o moc_detectiondata.cpp
moc_videopage.o: moc_videopage.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_videopage.o moc_videopage.cpp
moc_mappage.o: moc_mappage.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mappage.o moc_mappage.cpp
moc_datapage.o: moc_datapage.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_datapage.o moc_datapage.cpp
moc_visionmodelpage.o: moc_visionmodelpage.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_visionmodelpage.o moc_visionmodelpage.cpp
moc_taskdecisionpage.o: moc_taskdecisionpage.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_taskdecisionpage.o moc_taskdecisionpage.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE:

Binary file not shown.

Binary file not shown.

Binary file not shown.

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,147 @@
/****************************************************************************
** Meta object code from reading C++ file 'datapage.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../src/pages/datapage.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'datapage.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.15.3. 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_DataPage_t {
QByteArrayData data[5];
char stringdata0[57];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_DataPage_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_DataPage_t qt_meta_stringdata_DataPage = {
{
QT_MOC_LITERAL(0, 0, 8), // "DataPage"
QT_MOC_LITERAL(1, 9, 13), // "dataRequested"
QT_MOC_LITERAL(2, 23, 0), // ""
QT_MOC_LITERAL(3, 24, 15), // "updateDroneInfo"
QT_MOC_LITERAL(4, 40, 16) // "updateTargetInfo"
},
"DataPage\0dataRequested\0\0updateDroneInfo\0"
"updateTargetInfo"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_DataPage[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
3, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
1, // signalCount
// signals: name, argc, parameters, tag, flags
1, 0, 29, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
3, 0, 30, 2, 0x0a /* Public */,
4, 0, 31, 2, 0x0a /* Public */,
// signals: parameters
QMetaType::Void,
// slots: parameters
QMetaType::Void,
QMetaType::Void,
0 // eod
};
void DataPage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<DataPage *>(_o);
(void)_t;
switch (_id) {
case 0: _t->dataRequested(); break;
case 1: _t->updateDroneInfo(); break;
case 2: _t->updateTargetInfo(); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (DataPage::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DataPage::dataRequested)) {
*result = 0;
return;
}
}
}
(void)_a;
}
QT_INIT_METAOBJECT const QMetaObject DataPage::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_DataPage.data,
qt_meta_data_DataPage,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *DataPage::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *DataPage::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_DataPage.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int DataPage::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 < 3)
qt_static_metacall(this, _c, _id, _a);
_id -= 3;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 3)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 3;
}
return _id;
}
// SIGNAL 0
void DataPage::dataRequested()
{
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

Binary file not shown.

@ -0,0 +1,203 @@
/****************************************************************************
** Meta object code from reading C++ file 'detectiondata.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../src/models/detectiondata.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'detectiondata.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.15.3. 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_DetectionData_t {
QByteArrayData data[12];
char stringdata0[145];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_DetectionData_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_DetectionData_t qt_meta_stringdata_DetectionData = {
{
QT_MOC_LITERAL(0, 0, 13), // "DetectionData"
QT_MOC_LITERAL(1, 14, 16), // "detectionUpdated"
QT_MOC_LITERAL(2, 31, 0), // ""
QT_MOC_LITERAL(3, 32, 13), // "statusChanged"
QT_MOC_LITERAL(4, 46, 15), // "DetectionStatus"
QT_MOC_LITERAL(5, 62, 6), // "status"
QT_MOC_LITERAL(6, 69, 11), // "targetAdded"
QT_MOC_LITERAL(7, 81, 15), // "DetectionTarget"
QT_MOC_LITERAL(8, 97, 6), // "target"
QT_MOC_LITERAL(9, 104, 13), // "targetRemoved"
QT_MOC_LITERAL(10, 118, 8), // "targetId"
QT_MOC_LITERAL(11, 127, 17) // "onSimulationTimer"
},
"DetectionData\0detectionUpdated\0\0"
"statusChanged\0DetectionStatus\0status\0"
"targetAdded\0DetectionTarget\0target\0"
"targetRemoved\0targetId\0onSimulationTimer"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_DetectionData[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
5, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
4, // signalCount
// signals: name, argc, parameters, tag, flags
1, 0, 39, 2, 0x06 /* Public */,
3, 1, 40, 2, 0x06 /* Public */,
6, 1, 43, 2, 0x06 /* Public */,
9, 1, 46, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
11, 0, 49, 2, 0x08 /* Private */,
// signals: parameters
QMetaType::Void,
QMetaType::Void, 0x80000000 | 4, 5,
QMetaType::Void, 0x80000000 | 7, 8,
QMetaType::Void, QMetaType::QString, 10,
// slots: parameters
QMetaType::Void,
0 // eod
};
void DetectionData::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<DetectionData *>(_o);
(void)_t;
switch (_id) {
case 0: _t->detectionUpdated(); break;
case 1: _t->statusChanged((*reinterpret_cast< DetectionStatus(*)>(_a[1]))); break;
case 2: _t->targetAdded((*reinterpret_cast< const DetectionTarget(*)>(_a[1]))); break;
case 3: _t->targetRemoved((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 4: _t->onSimulationTimer(); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (DetectionData::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DetectionData::detectionUpdated)) {
*result = 0;
return;
}
}
{
using _t = void (DetectionData::*)(DetectionStatus );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DetectionData::statusChanged)) {
*result = 1;
return;
}
}
{
using _t = void (DetectionData::*)(const DetectionTarget & );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DetectionData::targetAdded)) {
*result = 2;
return;
}
}
{
using _t = void (DetectionData::*)(const QString & );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DetectionData::targetRemoved)) {
*result = 3;
return;
}
}
}
}
QT_INIT_METAOBJECT const QMetaObject DetectionData::staticMetaObject = { {
QMetaObject::SuperData::link<QObject::staticMetaObject>(),
qt_meta_stringdata_DetectionData.data,
qt_meta_data_DetectionData,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *DetectionData::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *DetectionData::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_DetectionData.stringdata0))
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
int DetectionData::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 5)
qt_static_metacall(this, _c, _id, _a);
_id -= 5;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 5)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 5;
}
return _id;
}
// SIGNAL 0
void DetectionData::detectionUpdated()
{
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void DetectionData::statusChanged(DetectionStatus _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
// SIGNAL 2
void DetectionData::targetAdded(const DetectionTarget & _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 2, _a);
}
// SIGNAL 3
void DetectionData::targetRemoved(const QString & _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 3, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

Binary file not shown.

@ -0,0 +1,308 @@
/****************************************************************************
** Meta object code from reading C++ file 'dronedata.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../src/models/dronedata.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'dronedata.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.15.3. 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_DroneData_t {
QByteArrayData data[6];
char stringdata0[72];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_DroneData_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_DroneData_t qt_meta_stringdata_DroneData = {
{
QT_MOC_LITERAL(0, 0, 9), // "DroneData"
QT_MOC_LITERAL(1, 10, 11), // "dataChanged"
QT_MOC_LITERAL(2, 22, 0), // ""
QT_MOC_LITERAL(3, 23, 17), // "connectionChanged"
QT_MOC_LITERAL(4, 41, 9), // "connected"
QT_MOC_LITERAL(5, 51, 20) // "updateSimulationData"
},
"DroneData\0dataChanged\0\0connectionChanged\0"
"connected\0updateSimulationData"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_DroneData[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
3, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
2, // signalCount
// signals: name, argc, parameters, tag, flags
1, 0, 29, 2, 0x06 /* Public */,
3, 1, 30, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
5, 0, 33, 2, 0x08 /* Private */,
// signals: parameters
QMetaType::Void,
QMetaType::Void, QMetaType::Bool, 4,
// slots: parameters
QMetaType::Void,
0 // eod
};
void DroneData::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<DroneData *>(_o);
(void)_t;
switch (_id) {
case 0: _t->dataChanged(); break;
case 1: _t->connectionChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 2: _t->updateSimulationData(); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (DroneData::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DroneData::dataChanged)) {
*result = 0;
return;
}
}
{
using _t = void (DroneData::*)(bool );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DroneData::connectionChanged)) {
*result = 1;
return;
}
}
}
}
QT_INIT_METAOBJECT const QMetaObject DroneData::staticMetaObject = { {
QMetaObject::SuperData::link<QObject::staticMetaObject>(),
qt_meta_stringdata_DroneData.data,
qt_meta_data_DroneData,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *DroneData::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *DroneData::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_DroneData.stringdata0))
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
int DroneData::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 3)
qt_static_metacall(this, _c, _id, _a);
_id -= 3;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 3)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 3;
}
return _id;
}
// SIGNAL 0
void DroneData::dataChanged()
{
QMetaObject::activate(this, &staticMetaObject, 0, nullptr);
}
// SIGNAL 1
void DroneData::connectionChanged(bool _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
struct qt_meta_stringdata_DroneManager_t {
QByteArrayData data[6];
char stringdata0[61];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_DroneManager_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_DroneManager_t qt_meta_stringdata_DroneManager = {
{
QT_MOC_LITERAL(0, 0, 12), // "DroneManager"
QT_MOC_LITERAL(1, 13, 19), // "currentDroneChanged"
QT_MOC_LITERAL(2, 33, 0), // ""
QT_MOC_LITERAL(3, 34, 2), // "id"
QT_MOC_LITERAL(4, 37, 10), // "droneAdded"
QT_MOC_LITERAL(5, 48, 12) // "droneRemoved"
},
"DroneManager\0currentDroneChanged\0\0id\0"
"droneAdded\0droneRemoved"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_DroneManager[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
3, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
3, // signalCount
// signals: name, argc, parameters, tag, flags
1, 1, 29, 2, 0x06 /* Public */,
4, 1, 32, 2, 0x06 /* Public */,
5, 1, 35, 2, 0x06 /* Public */,
// signals: parameters
QMetaType::Void, QMetaType::QString, 3,
QMetaType::Void, QMetaType::QString, 3,
QMetaType::Void, QMetaType::QString, 3,
0 // eod
};
void DroneManager::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<DroneManager *>(_o);
(void)_t;
switch (_id) {
case 0: _t->currentDroneChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 1: _t->droneAdded((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 2: _t->droneRemoved((*reinterpret_cast< const QString(*)>(_a[1]))); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (DroneManager::*)(const QString & );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DroneManager::currentDroneChanged)) {
*result = 0;
return;
}
}
{
using _t = void (DroneManager::*)(const QString & );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DroneManager::droneAdded)) {
*result = 1;
return;
}
}
{
using _t = void (DroneManager::*)(const QString & );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&DroneManager::droneRemoved)) {
*result = 2;
return;
}
}
}
}
QT_INIT_METAOBJECT const QMetaObject DroneManager::staticMetaObject = { {
QMetaObject::SuperData::link<QObject::staticMetaObject>(),
qt_meta_stringdata_DroneManager.data,
qt_meta_data_DroneManager,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *DroneManager::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *DroneManager::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_DroneManager.stringdata0))
return static_cast<void*>(this);
return QObject::qt_metacast(_clname);
}
int DroneManager::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 3)
qt_static_metacall(this, _c, _id, _a);
_id -= 3;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 3)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 3;
}
return _id;
}
// SIGNAL 0
void DroneManager::currentDroneChanged(const QString & _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void DroneManager::droneAdded(const QString & _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
// SIGNAL 2
void DroneManager::droneRemoved(const QString & _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 2, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

Binary file not shown.

@ -0,0 +1,155 @@
/****************************************************************************
** Meta object code from reading C++ file 'mainwindow.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../src/ui/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.3. 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[12];
char stringdata0[184];
};
#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, 13), // "showVideoPage"
QT_MOC_LITERAL(2, 25, 0), // ""
QT_MOC_LITERAL(3, 26, 11), // "showMapPage"
QT_MOC_LITERAL(4, 38, 12), // "showDataPage"
QT_MOC_LITERAL(5, 51, 19), // "showVisionModelPage"
QT_MOC_LITERAL(6, 71, 20), // "showTaskDecisionPage"
QT_MOC_LITERAL(7, 92, 23), // "onDroneSelectionChanged"
QT_MOC_LITERAL(8, 116, 21), // "onCurrentDroneChanged"
QT_MOC_LITERAL(9, 138, 7), // "droneId"
QT_MOC_LITERAL(10, 146, 17), // "updateDroneStatus"
QT_MOC_LITERAL(11, 164, 19) // "updateDetectionInfo"
},
"MainWindow\0showVideoPage\0\0showMapPage\0"
"showDataPage\0showVisionModelPage\0"
"showTaskDecisionPage\0onDroneSelectionChanged\0"
"onCurrentDroneChanged\0droneId\0"
"updateDroneStatus\0updateDetectionInfo"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_MainWindow[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
9, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 0, 59, 2, 0x08 /* Private */,
3, 0, 60, 2, 0x08 /* Private */,
4, 0, 61, 2, 0x08 /* Private */,
5, 0, 62, 2, 0x08 /* Private */,
6, 0, 63, 2, 0x08 /* Private */,
7, 0, 64, 2, 0x08 /* Private */,
8, 1, 65, 2, 0x08 /* Private */,
10, 0, 68, 2, 0x08 /* Private */,
11, 0, 69, 2, 0x08 /* Private */,
// slots: parameters
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::QString, 9,
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->showVideoPage(); break;
case 1: _t->showMapPage(); break;
case 2: _t->showDataPage(); break;
case 3: _t->showVisionModelPage(); break;
case 4: _t->showTaskDecisionPage(); break;
case 5: _t->onDroneSelectionChanged(); break;
case 6: _t->onCurrentDroneChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 7: _t->updateDroneStatus(); break;
case 8: _t->updateDetectionInfo(); break;
default: ;
}
}
}
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 < 9)
qt_static_metacall(this, _c, _id, _a);
_id -= 9;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 9)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 9;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

Binary file not shown.

@ -0,0 +1,640 @@
/****************************************************************************
** Meta object code from reading C++ file 'mappage.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../src/pages/mappage.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'mappage.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.15.3. 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_CustomWebEnginePage_t {
QByteArrayData data[1];
char stringdata0[20];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_CustomWebEnginePage_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_CustomWebEnginePage_t qt_meta_stringdata_CustomWebEnginePage = {
{
QT_MOC_LITERAL(0, 0, 19) // "CustomWebEnginePage"
},
"CustomWebEnginePage"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_CustomWebEnginePage[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
void CustomWebEnginePage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
(void)_o;
(void)_id;
(void)_c;
(void)_a;
}
QT_INIT_METAOBJECT const QMetaObject CustomWebEnginePage::staticMetaObject = { {
QMetaObject::SuperData::link<QWebEnginePage::staticMetaObject>(),
qt_meta_stringdata_CustomWebEnginePage.data,
qt_meta_data_CustomWebEnginePage,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *CustomWebEnginePage::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *CustomWebEnginePage::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_CustomWebEnginePage.stringdata0))
return static_cast<void*>(this);
return QWebEnginePage::qt_metacast(_clname);
}
int CustomWebEnginePage::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWebEnginePage::qt_metacall(_c, _id, _a);
return _id;
}
struct qt_meta_stringdata_ThreatAreaDialog_t {
QByteArrayData data[3];
char stringdata0[26];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_ThreatAreaDialog_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_ThreatAreaDialog_t qt_meta_stringdata_ThreatAreaDialog = {
{
QT_MOC_LITERAL(0, 0, 16), // "ThreatAreaDialog"
QT_MOC_LITERAL(1, 17, 7), // "addArea"
QT_MOC_LITERAL(2, 25, 0) // ""
},
"ThreatAreaDialog\0addArea\0"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_ThreatAreaDialog[] = {
// 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 ThreatAreaDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<ThreatAreaDialog *>(_o);
(void)_t;
switch (_id) {
case 0: _t->addArea(); break;
default: ;
}
}
(void)_a;
}
QT_INIT_METAOBJECT const QMetaObject ThreatAreaDialog::staticMetaObject = { {
QMetaObject::SuperData::link<QDialog::staticMetaObject>(),
qt_meta_stringdata_ThreatAreaDialog.data,
qt_meta_data_ThreatAreaDialog,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *ThreatAreaDialog::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *ThreatAreaDialog::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_ThreatAreaDialog.stringdata0))
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
int ThreatAreaDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::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;
}
struct qt_meta_stringdata_AreaSearchDialog_t {
QByteArrayData data[1];
char stringdata0[17];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_AreaSearchDialog_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_AreaSearchDialog_t qt_meta_stringdata_AreaSearchDialog = {
{
QT_MOC_LITERAL(0, 0, 16) // "AreaSearchDialog"
},
"AreaSearchDialog"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_AreaSearchDialog[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
void AreaSearchDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
(void)_o;
(void)_id;
(void)_c;
(void)_a;
}
QT_INIT_METAOBJECT const QMetaObject AreaSearchDialog::staticMetaObject = { {
QMetaObject::SuperData::link<QDialog::staticMetaObject>(),
qt_meta_stringdata_AreaSearchDialog.data,
qt_meta_data_AreaSearchDialog,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *AreaSearchDialog::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *AreaSearchDialog::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_AreaSearchDialog.stringdata0))
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
int AreaSearchDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
return _id;
}
struct qt_meta_stringdata_PathPlanningDialog_t {
QByteArrayData data[1];
char stringdata0[19];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_PathPlanningDialog_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_PathPlanningDialog_t qt_meta_stringdata_PathPlanningDialog = {
{
QT_MOC_LITERAL(0, 0, 18) // "PathPlanningDialog"
},
"PathPlanningDialog"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_PathPlanningDialog[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
void PathPlanningDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
(void)_o;
(void)_id;
(void)_c;
(void)_a;
}
QT_INIT_METAOBJECT const QMetaObject PathPlanningDialog::staticMetaObject = { {
QMetaObject::SuperData::link<QDialog::staticMetaObject>(),
qt_meta_stringdata_PathPlanningDialog.data,
qt_meta_data_PathPlanningDialog,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *PathPlanningDialog::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *PathPlanningDialog::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_PathPlanningDialog.stringdata0))
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
int PathPlanningDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::qt_metacall(_c, _id, _a);
return _id;
}
struct qt_meta_stringdata_LocateDialog_t {
QByteArrayData data[3];
char stringdata0[24];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_LocateDialog_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_LocateDialog_t qt_meta_stringdata_LocateDialog = {
{
QT_MOC_LITERAL(0, 0, 12), // "LocateDialog"
QT_MOC_LITERAL(1, 13, 9), // "onConfirm"
QT_MOC_LITERAL(2, 23, 0) // ""
},
"LocateDialog\0onConfirm\0"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_LocateDialog[] = {
// 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 LocateDialog::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<LocateDialog *>(_o);
(void)_t;
switch (_id) {
case 0: _t->onConfirm(); break;
default: ;
}
}
(void)_a;
}
QT_INIT_METAOBJECT const QMetaObject LocateDialog::staticMetaObject = { {
QMetaObject::SuperData::link<QDialog::staticMetaObject>(),
qt_meta_stringdata_LocateDialog.data,
qt_meta_data_LocateDialog,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *LocateDialog::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *LocateDialog::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_LocateDialog.stringdata0))
return static_cast<void*>(this);
return QDialog::qt_metacast(_clname);
}
int LocateDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QDialog::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;
}
struct qt_meta_stringdata_MapPage_t {
QByteArrayData data[16];
char stringdata0[249];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_MapPage_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_MapPage_t qt_meta_stringdata_MapPage = {
{
QT_MOC_LITERAL(0, 0, 7), // "MapPage"
QT_MOC_LITERAL(1, 8, 13), // "heightChanged"
QT_MOC_LITERAL(2, 22, 0), // ""
QT_MOC_LITERAL(3, 23, 6), // "height"
QT_MOC_LITERAL(4, 30, 20), // "downloadMapRequested"
QT_MOC_LITERAL(5, 51, 18), // "setThreatRequested"
QT_MOC_LITERAL(6, 70, 19), // "areaSearchRequested"
QT_MOC_LITERAL(7, 90, 21), // "pathPlanningRequested"
QT_MOC_LITERAL(8, 112, 15), // "onHeightChanged"
QT_MOC_LITERAL(9, 128, 20), // "onDownloadMapClicked"
QT_MOC_LITERAL(10, 149, 18), // "onSetThreatClicked"
QT_MOC_LITERAL(11, 168, 19), // "onAreaSearchClicked"
QT_MOC_LITERAL(12, 188, 21), // "onPathPlanningClicked"
QT_MOC_LITERAL(13, 210, 18), // "onSearchMapClicked"
QT_MOC_LITERAL(14, 229, 16), // "runMapJavaScript"
QT_MOC_LITERAL(15, 246, 2) // "js"
},
"MapPage\0heightChanged\0\0height\0"
"downloadMapRequested\0setThreatRequested\0"
"areaSearchRequested\0pathPlanningRequested\0"
"onHeightChanged\0onDownloadMapClicked\0"
"onSetThreatClicked\0onAreaSearchClicked\0"
"onPathPlanningClicked\0onSearchMapClicked\0"
"runMapJavaScript\0js"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_MapPage[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
12, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
5, // signalCount
// signals: name, argc, parameters, tag, flags
1, 1, 74, 2, 0x06 /* Public */,
4, 0, 77, 2, 0x06 /* Public */,
5, 0, 78, 2, 0x06 /* Public */,
6, 0, 79, 2, 0x06 /* Public */,
7, 0, 80, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
8, 0, 81, 2, 0x08 /* Private */,
9, 0, 82, 2, 0x08 /* Private */,
10, 0, 83, 2, 0x08 /* Private */,
11, 0, 84, 2, 0x08 /* Private */,
12, 0, 85, 2, 0x08 /* Private */,
13, 0, 86, 2, 0x08 /* Private */,
14, 1, 87, 2, 0x0a /* Public */,
// signals: parameters
QMetaType::Void, QMetaType::QString, 3,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
// slots: parameters
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::QString, 15,
0 // eod
};
void MapPage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<MapPage *>(_o);
(void)_t;
switch (_id) {
case 0: _t->heightChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 1: _t->downloadMapRequested(); break;
case 2: _t->setThreatRequested(); break;
case 3: _t->areaSearchRequested(); break;
case 4: _t->pathPlanningRequested(); break;
case 5: _t->onHeightChanged(); break;
case 6: _t->onDownloadMapClicked(); break;
case 7: _t->onSetThreatClicked(); break;
case 8: _t->onAreaSearchClicked(); break;
case 9: _t->onPathPlanningClicked(); break;
case 10: _t->onSearchMapClicked(); break;
case 11: _t->runMapJavaScript((*reinterpret_cast< const QString(*)>(_a[1]))); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (MapPage::*)(const QString & );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MapPage::heightChanged)) {
*result = 0;
return;
}
}
{
using _t = void (MapPage::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MapPage::downloadMapRequested)) {
*result = 1;
return;
}
}
{
using _t = void (MapPage::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MapPage::setThreatRequested)) {
*result = 2;
return;
}
}
{
using _t = void (MapPage::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MapPage::areaSearchRequested)) {
*result = 3;
return;
}
}
{
using _t = void (MapPage::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MapPage::pathPlanningRequested)) {
*result = 4;
return;
}
}
}
}
QT_INIT_METAOBJECT const QMetaObject MapPage::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_MapPage.data,
qt_meta_data_MapPage,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *MapPage::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *MapPage::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_MapPage.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int MapPage::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 < 12)
qt_static_metacall(this, _c, _id, _a);
_id -= 12;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 12)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 12;
}
return _id;
}
// SIGNAL 0
void MapPage::heightChanged(const QString & _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void MapPage::downloadMapRequested()
{
QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
// SIGNAL 2
void MapPage::setThreatRequested()
{
QMetaObject::activate(this, &staticMetaObject, 2, nullptr);
}
// SIGNAL 3
void MapPage::areaSearchRequested()
{
QMetaObject::activate(this, &staticMetaObject, 3, nullptr);
}
// SIGNAL 4
void MapPage::pathPlanningRequested()
{
QMetaObject::activate(this, &staticMetaObject, 4, nullptr);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

Binary file not shown.

@ -0,0 +1,430 @@
#define __SSP_STRONG__ 3
#define __DBL_MIN_EXP__ (-1021)
#define __cpp_attributes 200809L
#define __cpp_nontype_template_parameter_auto 201606L
#define __UINT_LEAST16_MAX__ 0xffff
#define __ATOMIC_ACQUIRE 2
#define __FLT128_MAX_10_EXP__ 4932
#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F
#define __GCC_IEC_559_COMPLEX 2
#define __cpp_aggregate_nsdmi 201304L
#define __UINT_LEAST8_TYPE__ unsigned char
#define __SIZEOF_FLOAT80__ 16
#define __INTMAX_C(c) c ## L
#define __CHAR_BIT__ 8
#define __UINT8_MAX__ 0xff
#define __SCHAR_WIDTH__ 8
#define __WINT_MAX__ 0xffffffffU
#define __FLT32_MIN_EXP__ (-125)
#define __cpp_static_assert 201411L
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __SIZE_MAX__ 0xffffffffffffffffUL
#define __WCHAR_MAX__ 0x7fffffff
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L)
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define __GCC_IEC_559 2
#define __FLT32X_DECIMAL_DIG__ 17
#define __FLT_EVAL_METHOD__ 0
#define __cpp_binary_literals 201304L
#define __FLT64_DECIMAL_DIG__ 17
#define __CET__ 3
#define __cpp_noexcept_function_type 201510L
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __cpp_variadic_templates 200704L
#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL
#define __SIG_ATOMIC_TYPE__ int
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __cpp_variable_templates 201304L
#define __FLT32X_MAX_EXP__ 1024
#define __FLT32_HAS_DENORM__ 1
#define __UINT_FAST8_MAX__ 0xff
#define __cpp_rvalue_reference 200610L
#define __cpp_nested_namespace_definitions 201411L
#define __DEC64_MAX_EXP__ 385
#define __INT8_C(c) c
#define __INT_LEAST8_WIDTH__ 8
#define __cpp_variadic_using 201611L
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL
#define __INT_LEAST8_MAX__ 0x7f
#define __cpp_capture_star_this 201603L
#define __SHRT_MAX__ 0x7fff
#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L
#define __FLT64X_MAX_10_EXP__ 4932
#define __cpp_if_constexpr 201606L
#define __LDBL_IS_IEC_60559__ 2
#define __FLT64X_HAS_QUIET_NAN__ 1
#define __UINT_LEAST8_MAX__ 0xff
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
#define __UINTMAX_TYPE__ long unsigned int
#define __linux 1
#define __DEC32_EPSILON__ 1E-6DF
#define __FLT_EVAL_METHOD_TS_18661_3__ 0
#define __OPTIMIZE__ 1
#define __unix 1
#define __UINT32_MAX__ 0xffffffffU
#define __GXX_EXPERIMENTAL_CXX0X__ 1
#define __FLT128_MIN_EXP__ (-16381)
#define __WINT_MIN__ 0U
#define __FLT128_MIN_10_EXP__ (-4931)
#define __FLT32X_IS_IEC_60559__ 2
#define __INT_LEAST16_WIDTH__ 16
#define __SCHAR_MAX__ 0x7f
#define __FLT128_MANT_DIG__ 113
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
#define __INT64_C(c) c ## L
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define _FORTIFY_SOURCE 2
#define __FLT32X_MANT_DIG__ 53
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define __cpp_aligned_new 201606L
#define __USER_LABEL_PREFIX__
#define __FLT32_MAX_10_EXP__ 38
#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x
#define __STDC_HOSTED__ 1
#define __DEC64_MIN_EXP__ (-382)
#define __cpp_decltype_auto 201304L
#define __DBL_DIG__ 15
#define __FLT32_DIG__ 6
#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
#define __GXX_WEAK__ 1
#define __SHRT_WIDTH__ 16
#define __FLT32_IS_IEC_60559__ 2
#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
#define __DBL_IS_IEC_60559__ 2
#define __DEC32_MAX__ 9.999999E96DF
#define __cpp_threadsafe_static_init 200806L
#define __cpp_enumerator_attributes 201411L
#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x
#define __FLT32X_HAS_INFINITY__ 1
#define __INT32_MAX__ 0x7fffffff
#define __unix__ 1
#define __INT_WIDTH__ 32
#define __SIZEOF_LONG__ 8
#define __STDC_IEC_559__ 1
#define __STDC_ISO_10646__ 201706L
#define __UINT16_C(c) c
#define __DECIMAL_DIG__ 21
#define __STDC_IEC_559_COMPLEX__ 1
#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
#define __gnu_linux__ 1
#define __INT16_MAX__ 0x7fff
#define __FLT64_MIN_EXP__ (-1021)
#define __FLT64X_MIN_10_EXP__ (-4931)
#define __LDBL_HAS_QUIET_NAN__ 1
#define __FLT64_MANT_DIG__ 53
#define __FLT64X_MANT_DIG__ 64
#define __GNUC__ 11
#define __GXX_RTTI 1
#define __pie__ 2
#define __MMX__ 1
#define __FLT_HAS_DENORM__ 1
#define __SIZEOF_LONG_DOUBLE__ 16
#define __BIGGEST_ALIGNMENT__ 16
#define __STDC_UTF_16__ 1
#define __FLT64_MAX_10_EXP__ 308
#define __cpp_delegating_constructors 200604L
#define __FLT32_HAS_INFINITY__ 1
#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L)
#define __cpp_raw_strings 200710L
#define __INT_FAST32_MAX__ 0x7fffffffffffffffL
#define __DBL_HAS_INFINITY__ 1
#define __SIZEOF_FLOAT__ 4
#define __HAVE_SPECULATION_SAFE_VALUE 1
#define __cpp_fold_expressions 201603L
#define __DEC32_MIN_EXP__ (-94)
#define __INTPTR_WIDTH__ 64
#define __FLT64X_HAS_INFINITY__ 1
#define __UINT_LEAST32_MAX__ 0xffffffffU
#define __FLT32X_HAS_DENORM__ 1
#define __INT_FAST16_TYPE__ long int
#define __MMX_WITH_SSE__ 1
#define __LDBL_HAS_DENORM__ 1
#define __cplusplus 201703L
#define __cpp_ref_qualifiers 200710L
#define __DEC32_MIN__ 1E-95DF
#define __DEPRECATED 1
#define __cpp_rvalue_references 200610L
#define __DBL_MAX_EXP__ 1024
#define __WCHAR_WIDTH__ 32
#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
#define __DEC128_EPSILON__ 1E-33DL
#define __SSE2_MATH__ 1
#define __ATOMIC_HLE_RELEASE 131072
#define __PTRDIFF_MAX__ 0x7fffffffffffffffL
#define __amd64 1
#define __ATOMIC_HLE_ACQUIRE 65536
#define __GNUG__ 11
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
#define __SIZEOF_SIZE_T__ 8
#define __cpp_nsdmi 200809L
#define __FLT64X_MIN_EXP__ (-16381)
#define __SIZEOF_WINT_T__ 4
#define __LONG_LONG_WIDTH__ 64
#define __cpp_initializer_lists 200806L
#define __FLT32_MAX_EXP__ 128
#define __cpp_hex_float 201603L
#define __GXX_ABI_VERSION 1016
#define __FLT128_HAS_INFINITY__ 1
#define __FLT_MIN_EXP__ (-125)
#define __GCC_HAVE_DWARF2_CFI_ASM 1
#define __x86_64 1
#define __cpp_lambdas 200907L
#define __INT_FAST64_TYPE__ long int
#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
#define __cpp_template_auto 201606L
#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L)
#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
#define __FLT64X_NORM_MAX__ 1.18973149535723176502126385303097021e+4932F64x
#define __SIZEOF_POINTER__ 8
#define __LP64__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
#define __DECIMAL_BID_FORMAT__ 1
#define __FLT64_MIN_10_EXP__ (-307)
#define __FLT64X_DECIMAL_DIG__ 21
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __UINT16_MAX__ 0xffff
#define __LDBL_HAS_INFINITY__ 1
#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
#define __UINT8_TYPE__ unsigned char
#define __FLT_DIG__ 6
#define __DEC_EVAL_METHOD__ 2
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __FLT_MANT_DIG__ 24
#define __LDBL_DECIMAL_DIG__ 21
#define __VERSION__ "11.4.0"
#define __UINT64_C(c) c ## UL
#define __cpp_unicode_characters 201411L
#define _STDC_PREDEF_H 1
#define __INT_LEAST32_MAX__ 0x7fffffff
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define __FLT128_MAX_EXP__ 16384
#define __FLT32_MANT_DIG__ 24
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __STDC_IEC_60559_COMPLEX__ 201404L
#define __cpp_aggregate_bases 201603L
#define __FLT128_HAS_DENORM__ 1
#define __FLT32_DECIMAL_DIG__ 9
#define __FLT128_DIG__ 33
#define __INT32_C(c) c
#define __DEC64_EPSILON__ 1E-15DD
#define __ORDER_PDP_ENDIAN__ 3412
#define __DEC128_MIN_EXP__ (-6142)
#define __INT_FAST32_TYPE__ long int
#define __UINT_LEAST16_TYPE__ short unsigned int
#define unix 1
#define __DBL_HAS_DENORM__ 1
#define __cpp_rtti 199711L
#define __SIZE_TYPE__ long unsigned int
#define __UINT64_MAX__ 0xffffffffffffffffUL
#define __FLT_IS_IEC_60559__ 2
#define __GNUC_WIDE_EXECUTION_CHARSET_NAME "UTF-32LE"
#define __FLT64X_DIG__ 18
#define __INT8_TYPE__ signed char
#define __cpp_digit_separators 201309L
#define __ELF__ 1
#define __GCC_ASM_FLAG_OUTPUTS__ 1
#define __UINT32_TYPE__ unsigned int
#define __FLT_RADIX__ 2
#define __INT_LEAST16_TYPE__ short int
#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L
#define __UINTMAX_C(c) c ## UL
#define __GLIBCXX_BITSIZE_INT_N_0 128
#define __k8 1
#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
#define __SIG_ATOMIC_MAX__ 0x7fffffff
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __STDC_IEC_60559_BFP__ 201404L
#define __SIZEOF_PTRDIFF_T__ 8
#define __LDBL_DIG__ 18
#define __FLT64_IS_IEC_60559__ 2
#define __x86_64__ 1
#define __FLT32X_MIN_EXP__ (-1021)
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __INT_FAST16_MAX__ 0x7fffffffffffffffL
#define __FLT64_DIG__ 15
#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL
#define __UINT_LEAST64_TYPE__ long unsigned int
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 0x7fffffffffffffffL
#define __FLT64X_HAS_DENORM__ 1
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __FLT_HAS_INFINITY__ 1
#define __GNUC_EXECUTION_CHARSET_NAME "UTF-8"
#define __cpp_unicode_literals 200710L
#define __UINT_FAST16_TYPE__ long unsigned int
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __INT_FAST32_WIDTH__ 64
#define __CHAR16_TYPE__ short unsigned int
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __SIZE_WIDTH__ 64
#define __SEG_FS 1
#define __INT_LEAST16_MAX__ 0x7fff
#define __DEC64_MANT_DIG__ 16
#define __INT64_MAX__ 0x7fffffffffffffffL
#define __SEG_GS 1
#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
#define __SIG_ATOMIC_WIDTH__ 32
#define __INT_LEAST64_TYPE__ long int
#define __INT16_TYPE__ short int
#define __INT_LEAST8_TYPE__ signed char
#define __cpp_structured_bindings 201606L
#define __SIZEOF_INT__ 4
#define __DEC32_MAX_EXP__ 97
#define __INT_FAST8_MAX__ 0x7f
#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
#define __INTPTR_MAX__ 0x7fffffffffffffffL
#define __cpp_sized_deallocation 201309L
#define __cpp_guaranteed_copy_elision 201606L
#define linux 1
#define __FLT64_HAS_QUIET_NAN__ 1
#define __FLT32_MIN_10_EXP__ (-37)
#define __EXCEPTIONS 1
#define __PTRDIFF_WIDTH__ 64
#define __LDBL_MANT_DIG__ 64
#define __cpp_range_based_for 201603L
#define __FLT64_HAS_INFINITY__ 1
#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x
#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define __code_model_small__ 1
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define __cpp_nontype_template_args 201411L
#define __DEC32_MANT_DIG__ 7
#define __cpp_return_type_deduction 201304L
#define __k8__ 1
#define __INTPTR_TYPE__ long int
#define __UINT16_TYPE__ short unsigned int
#define __WCHAR_TYPE__ int
#define __pic__ 2
#define __UINTPTR_MAX__ 0xffffffffffffffffUL
#define __INT_FAST64_WIDTH__ 64
#define __cpp_decltype 200707L
#define __INT_FAST64_MAX__ 0x7fffffffffffffffL
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __FLT_NORM_MAX__ 3.40282346638528859811704183484516925e+38F
#define __FLT64X_MAX_EXP__ 16384
#define __UINT_FAST64_TYPE__ long unsigned int
#define __cpp_inline_variables 201606L
#define __INT_MAX__ 0x7fffffff
#define __linux__ 1
#define __INT64_TYPE__ long int
#define __FLT_MAX_EXP__ 128
#define __ORDER_BIG_ENDIAN__ 4321
#define __DBL_MANT_DIG__ 53
#define __cpp_inheriting_constructors 201511L
#define __SIZEOF_FLOAT128__ 16
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ unsigned int
#define __UINT_LEAST32_TYPE__ unsigned int
#define __SIZEOF_SHORT__ 2
#define __FLT32_NORM_MAX__ 3.40282346638528859811704183484516925e+38F32
#define __SSE__ 1
#define __LDBL_MIN_EXP__ (-16381)
#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
#define __amd64__ 1
#define __WINT_WIDTH__ 32
#define __INT_LEAST64_WIDTH__ 64
#define __LDBL_MAX_EXP__ 16384
#define __FLT32X_MAX_10_EXP__ 308
#define __SIZEOF_INT128__ 16
#define __FLT64X_IS_IEC_60559__ 2
#define __LDBL_MAX_10_EXP__ 4932
#define __ATOMIC_RELAXED 0
#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L)
#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
#define _LP64 1
#define __UINT8_C(c) c
#define __FLT64_MAX_EXP__ 1024
#define __INT_LEAST32_TYPE__ int
#define __SIZEOF_WCHAR_T__ 4
#define __GNUC_PATCHLEVEL__ 0
#define __FLT128_NORM_MAX__ 1.18973149535723176508575932662800702e+4932F128
#define __FLT64_NORM_MAX__ 1.79769313486231570814527423731704357e+308F64
#define __FLT128_HAS_QUIET_NAN__ 1
#define __INTMAX_MAX__ 0x7fffffffffffffffL
#define __INT_FAST8_TYPE__ signed char
#define __cpp_namespace_attributes 201411L
#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
#define __STDCPP_THREADS__ 1
#define __GNUC_STDC_INLINE__ 1
#define __FLT64_HAS_DENORM__ 1
#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
#define __DBL_DECIMAL_DIG__ 17
#define __STDC_UTF_32__ 1
#define __INT_FAST8_WIDTH__ 8
#define __FXSR__ 1
#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
#define __DBL_NORM_MAX__ double(1.79769313486231570814527423731704357e+308L)
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __INTMAX_WIDTH__ 64
#define __cpp_runtime_arrays 198712L
#define __UINT64_TYPE__ long unsigned int
#define __UINT32_C(c) c ## U
#define __cpp_alias_templates 200704L
#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
#define __FLT128_IS_IEC_60559__ 2
#define __INT8_MAX__ 0x7f
#define __LONG_WIDTH__ 64
#define __PIC__ 2
#define __UINT_FAST32_TYPE__ long unsigned int
#define __FLT32X_NORM_MAX__ 1.79769313486231570814527423731704357e+308F32x
#define __CHAR32_TYPE__ unsigned int
#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F
#define __cpp_constexpr 201603L
#define __SSE2__ 1
#define __cpp_deduction_guides 201703L
#define __INT32_TYPE__ int
#define __SIZEOF_DOUBLE__ 8
#define __cpp_exceptions 199711L
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
#define __INT_LEAST32_WIDTH__ 32
#define __INTMAX_TYPE__ long int
#define __DEC128_MAX_EXP__ 6145
#define __FLT32X_HAS_QUIET_NAN__ 1
#define __ATOMIC_CONSUME 1
#define __GNUC_MINOR__ 4
#define __GLIBCXX_TYPE_INT_N_0 __int128
#define __INT_FAST16_WIDTH__ 64
#define __UINTMAX_MAX__ 0xffffffffffffffffUL
#define __PIE__ 2
#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
#define __cpp_template_template_args 201611L
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L
#define __INT16_C(c) c
#define __STDC__ 1
#define __FLT32X_DIG__ 15
#define __PTRDIFF_TYPE__ long int
#define __ATOMIC_SEQ_CST 5
#define __FLT32X_MIN_10_EXP__ (-307)
#define __UINTPTR_TYPE__ long unsigned int
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-4931)
#define __cpp_generic_lambdas 201304L
#define __SSE_MATH__ 1
#define __SIZEOF_LONG_LONG__ 8
#define __cpp_user_defined_literals 200809L
#define __FLT128_DECIMAL_DIG__ 36
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
#define __FLT32_HAS_QUIET_NAN__ 1
#define __FLT_DECIMAL_DIG__ 9
#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL
#define __LDBL_NORM_MAX__ 1.18973149535723176502126385303097021e+4932L
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define __UINT_FAST8_TYPE__ unsigned char
#define _GNU_SOURCE 1
#define __cpp_init_captures 201304L
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_RELEASE 3

@ -0,0 +1,156 @@
/****************************************************************************
** Meta object code from reading C++ file 'taskdecisionpage.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../src/pages/taskdecisionpage.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'taskdecisionpage.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.15.3. 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_TaskDecisionPage_t {
QByteArrayData data[13];
char stringdata0[165];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_TaskDecisionPage_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_TaskDecisionPage_t qt_meta_stringdata_TaskDecisionPage = {
{
QT_MOC_LITERAL(0, 0, 16), // "TaskDecisionPage"
QT_MOC_LITERAL(1, 17, 13), // "onStepChanged"
QT_MOC_LITERAL(2, 31, 0), // ""
QT_MOC_LITERAL(3, 32, 4), // "step"
QT_MOC_LITERAL(4, 37, 20), // "onTargetClearChanged"
QT_MOC_LITERAL(5, 58, 5), // "clear"
QT_MOC_LITERAL(6, 64, 14), // "onGeneratePath"
QT_MOC_LITERAL(7, 79, 17), // "onRecommendDrones"
QT_MOC_LITERAL(8, 97, 14), // "onReplanSearch"
QT_MOC_LITERAL(9, 112, 15), // "onAddTargetType"
QT_MOC_LITERAL(10, 128, 14), // "onGenerateTask"
QT_MOC_LITERAL(11, 143, 10), // "onNextStep"
QT_MOC_LITERAL(12, 154, 10) // "onPrevStep"
},
"TaskDecisionPage\0onStepChanged\0\0step\0"
"onTargetClearChanged\0clear\0onGeneratePath\0"
"onRecommendDrones\0onReplanSearch\0"
"onAddTargetType\0onGenerateTask\0"
"onNextStep\0onPrevStep"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_TaskDecisionPage[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
9, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: name, argc, parameters, tag, flags
1, 1, 59, 2, 0x08 /* Private */,
4, 1, 62, 2, 0x08 /* Private */,
6, 0, 65, 2, 0x08 /* Private */,
7, 0, 66, 2, 0x08 /* Private */,
8, 0, 67, 2, 0x08 /* Private */,
9, 0, 68, 2, 0x08 /* Private */,
10, 0, 69, 2, 0x08 /* Private */,
11, 0, 70, 2, 0x08 /* Private */,
12, 0, 71, 2, 0x08 /* Private */,
// slots: parameters
QMetaType::Void, QMetaType::Int, 3,
QMetaType::Void, QMetaType::Bool, 5,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
0 // eod
};
void TaskDecisionPage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<TaskDecisionPage *>(_o);
(void)_t;
switch (_id) {
case 0: _t->onStepChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 1: _t->onTargetClearChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
case 2: _t->onGeneratePath(); break;
case 3: _t->onRecommendDrones(); break;
case 4: _t->onReplanSearch(); break;
case 5: _t->onAddTargetType(); break;
case 6: _t->onGenerateTask(); break;
case 7: _t->onNextStep(); break;
case 8: _t->onPrevStep(); break;
default: ;
}
}
}
QT_INIT_METAOBJECT const QMetaObject TaskDecisionPage::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_TaskDecisionPage.data,
qt_meta_data_TaskDecisionPage,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *TaskDecisionPage::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *TaskDecisionPage::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_TaskDecisionPage.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int TaskDecisionPage::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 < 9)
qt_static_metacall(this, _c, _id, _a);
_id -= 9;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 9)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 9;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

Binary file not shown.

@ -0,0 +1,144 @@
/****************************************************************************
** Meta object code from reading C++ file 'videopage.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../src/pages/videopage.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'videopage.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.15.3. 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_VideoPage_t {
QByteArrayData data[5];
char stringdata0[63];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_VideoPage_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_VideoPage_t qt_meta_stringdata_VideoPage = {
{
QT_MOC_LITERAL(0, 0, 9), // "VideoPage"
QT_MOC_LITERAL(1, 10, 21), // "droneSelectionChanged"
QT_MOC_LITERAL(2, 32, 0), // ""
QT_MOC_LITERAL(3, 33, 5), // "index"
QT_MOC_LITERAL(4, 39, 23) // "onDroneSelectionChanged"
},
"VideoPage\0droneSelectionChanged\0\0index\0"
"onDroneSelectionChanged"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_VideoPage[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
2, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
1, // signalCount
// signals: name, argc, parameters, tag, flags
1, 1, 24, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
4, 0, 27, 2, 0x08 /* Private */,
// signals: parameters
QMetaType::Void, QMetaType::Int, 3,
// slots: parameters
QMetaType::Void,
0 // eod
};
void VideoPage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<VideoPage *>(_o);
(void)_t;
switch (_id) {
case 0: _t->droneSelectionChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 1: _t->onDroneSelectionChanged(); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (VideoPage::*)(int );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&VideoPage::droneSelectionChanged)) {
*result = 0;
return;
}
}
}
}
QT_INIT_METAOBJECT const QMetaObject VideoPage::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_VideoPage.data,
qt_meta_data_VideoPage,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *VideoPage::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *VideoPage::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_VideoPage.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int VideoPage::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 < 2)
qt_static_metacall(this, _c, _id, _a);
_id -= 2;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 2)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 2;
}
return _id;
}
// SIGNAL 0
void VideoPage::droneSelectionChanged(int _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

Binary file not shown.

@ -0,0 +1,166 @@
/****************************************************************************
** Meta object code from reading C++ file 'visionmodelpage.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include <memory>
#include "../src/pages/visionmodelpage.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'visionmodelpage.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.15.3. 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_VisionModelPage_t {
QByteArrayData data[7];
char stringdata0[88];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_VisionModelPage_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_VisionModelPage_t qt_meta_stringdata_VisionModelPage = {
{
QT_MOC_LITERAL(0, 0, 15), // "VisionModelPage"
QT_MOC_LITERAL(1, 16, 17), // "modelRunRequested"
QT_MOC_LITERAL(2, 34, 0), // ""
QT_MOC_LITERAL(3, 35, 5), // "input"
QT_MOC_LITERAL(4, 41, 18), // "modelStopRequested"
QT_MOC_LITERAL(5, 60, 12), // "onRunClicked"
QT_MOC_LITERAL(6, 73, 14) // "onInputChanged"
},
"VisionModelPage\0modelRunRequested\0\0"
"input\0modelStopRequested\0onRunClicked\0"
"onInputChanged"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_VisionModelPage[] = {
// content:
8, // revision
0, // classname
0, 0, // classinfo
4, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
2, // signalCount
// signals: name, argc, parameters, tag, flags
1, 1, 34, 2, 0x06 /* Public */,
4, 0, 37, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
5, 0, 38, 2, 0x08 /* Private */,
6, 0, 39, 2, 0x08 /* Private */,
// signals: parameters
QMetaType::Void, QMetaType::QString, 3,
QMetaType::Void,
// slots: parameters
QMetaType::Void,
QMetaType::Void,
0 // eod
};
void VisionModelPage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<VisionModelPage *>(_o);
(void)_t;
switch (_id) {
case 0: _t->modelRunRequested((*reinterpret_cast< const QString(*)>(_a[1]))); break;
case 1: _t->modelStopRequested(); break;
case 2: _t->onRunClicked(); break;
case 3: _t->onInputChanged(); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
{
using _t = void (VisionModelPage::*)(const QString & );
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&VisionModelPage::modelRunRequested)) {
*result = 0;
return;
}
}
{
using _t = void (VisionModelPage::*)();
if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&VisionModelPage::modelStopRequested)) {
*result = 1;
return;
}
}
}
}
QT_INIT_METAOBJECT const QMetaObject VisionModelPage::staticMetaObject = { {
QMetaObject::SuperData::link<QWidget::staticMetaObject>(),
qt_meta_stringdata_VisionModelPage.data,
qt_meta_data_VisionModelPage,
qt_static_metacall,
nullptr,
nullptr
} };
const QMetaObject *VisionModelPage::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *VisionModelPage::qt_metacast(const char *_clname)
{
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_VisionModelPage.stringdata0))
return static_cast<void*>(this);
return QWidget::qt_metacast(_clname);
}
int VisionModelPage::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 < 4)
qt_static_metacall(this, _c, _id, _a);
_id -= 4;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 4)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 4;
}
return _id;
}
// SIGNAL 0
void VisionModelPage::modelRunRequested(const QString & _t1)
{
void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(std::addressof(_t1))) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
// SIGNAL 1
void VisionModelPage::modelStopRequested()
{
QMetaObject::activate(this, &staticMetaObject, 1, nullptr);
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE

Binary file not shown.

@ -0,0 +1,46 @@
/****************************************************************************
** Resource object code
**
** Created by: The Resource Compiler for Qt version 5.15.3
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#ifdef QT_NAMESPACE
# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
# define QT_RCC_MANGLE_NAMESPACE0(x) x
# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
#else
# define QT_RCC_PREPEND_NAMESPACE(name) name
# define QT_RCC_MANGLE_NAMESPACE(name) name
#endif
#ifdef QT_NAMESPACE
namespace QT_NAMESPACE {
#endif
#ifdef QT_NAMESPACE
}
#endif
int QT_RCC_MANGLE_NAMESPACE(qInitResources_app)();
int QT_RCC_MANGLE_NAMESPACE(qInitResources_app)()
{
return 1;
}
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_app)();
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_app)()
{
return 1;
}
namespace {
struct initializer {
initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources_app)(); }
~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources_app)(); }
} dummy;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,19 @@
#!/bin/bash
echo "=== 运行Drone_project并捕获所有日志 ==="
echo "程序将在15秒后自动停止"
echo ""
# 先运行程序看看所有输出
timeout 15s ./build/Drone_project 2>&1 | tee /tmp/drone_output.log
echo ""
echo "=== 查找定位相关日志 ==="
grep -E "(🗺️|📍|🔐|🌐|✅|❌|🏠|👂|MapPage|地图|定位|GPS|IP|北京|坐标|JS|INFO|WARN|ERROR|qDebug)" /tmp/drone_output.log || echo "未找到定位相关日志"
echo ""
echo "=== 显示前20行日志 ==="
head -20 /tmp/drone_output.log
echo ""
echo "=== 调试完成 ==="

Binary file not shown.

@ -0,0 +1,36 @@
QT += core widgets webenginewidgets positioning
CONFIG += c++17
TEMPLATE = app
TARGET = Drone_project
SOURCES += \
src/core/main.cpp \
src/ui/mainwindow.cpp \
src/models/dronedata.cpp \
src/models/detectiondata.cpp \
src/pages/videopage.cpp \
src/pages/mappage.cpp \
src/pages/datapage.cpp \
src/pages/visionmodelpage.cpp \
src/utils/stylehelper.cpp \
src/pages/taskdecisionpage.cpp \
src/utils/config.cpp \
src/utils/logger.cpp \
src/utils/errorhandler.cpp
HEADERS += \
src/ui/mainwindow.h \
src/models/dronedata.h \
src/models/detectiondata.h \
src/pages/videopage.h \
src/pages/mappage.h \
src/pages/datapage.h \
src/pages/visionmodelpage.h \
src/utils/stylehelper.h \
src/pages/taskdecisionpage.h \
src/utils/config.h \
src/utils/logger.h \
src/utils/errorhandler.h
RESOURCES += \
src/resources/app.qrc

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 16.0.1, 2025-09-24T21:35:22. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{d6548bba-c6d9-4cdb-a6a4-a3221e622b53}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="qlonglong">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoDetect">true</value>
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.LineEndingBehavior">0</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">2</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap">
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
<value type="bool" key="AutoTest.Framework.Boost">true</value>
<value type="bool" key="AutoTest.Framework.CTest">false</value>
<value type="bool" key="AutoTest.Framework.Catch">true</value>
<value type="bool" key="AutoTest.Framework.GTest">true</value>
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
</valuemap>
<value type="bool" key="AutoTest.ApplyFilter">false</value>
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
<valuelist type="QVariantList" key="AutoTest.PathFilters"/>
<value type="int" key="AutoTest.RunAfterBuild">0</value>
<value type="bool" key="AutoTest.UseGlobal">true</value>
<valuemap type="QVariantMap" key="ClangTools">
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
<value type="int" key="ClangTools.ParallelJobs">6</value>
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
</valuemap>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="DeviceType">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.gcc_64_kit</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/wangjing/uav/Drone_project/build/Desktop_Qt_5_15_2_GCC_64bit-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/wangjing/uav/Drone_project/build/Desktop_Qt_5_15_2_GCC_64bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/wangjing/uav/Drone_project/build/Desktop_Qt_5_15_2_GCC_64bit-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/wangjing/uav/Drone_project/build/Desktop_Qt_5_15_2_GCC_64bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="int" key="QtQuickCompiler">0</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/wangjing/uav/Drone_project/build/Desktop_Qt_5_15_2_GCC_64bit-Profile</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/wangjing/uav/Drone_project/build/Desktop_Qt_5_15_2_GCC_64bit-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="int" key="QtQuickCompiler">0</value>
<value type="int" key="SeparateDebugInfo">0</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">部署</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="CustomOutputParsers"/>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph dwarf,4096 -F 250</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/wangjing/uav/Drone_project/drone_ui.pro</value>
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/wangjing/uav/Drone_project/build/Desktop_Qt_5_15_2_GCC_64bit-Debug</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="qlonglong">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>

@ -0,0 +1,41 @@
#include <QApplication>
#include "../ui/mainwindow.h"
int main(int argc, char *argv[]) {
// 禁用 Wayland优先使用 X11(xcb),否则回退为 offscreen
QByteArray display = qgetenv("DISPLAY");
if (!display.isEmpty()) {
qputenv("QT_QPA_PLATFORM", QByteArray("xcb"));
} else {
qputenv("QT_QPA_PLATFORM", QByteArray("offscreen"));
}
QApplication app(argc, argv);
app.setApplicationDisplayName("");
// 全局样式表(浅色主题)
app.setStyleSheet(
"*{font-family:'Segoe UI','PingFang SC','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;}"
"QWidget{background:#fafafa;color:#222;}"
"QGroupBox{border:1px solid #e0e0e0;border-radius:8px;margin-top:8px;padding-top:12px;}"
"QGroupBox::title{subcontrol-origin: margin;left:10px;padding:0 6px;color:#111;font-weight:bold;}"
"QFrame{background:white;border:1px solid #e6e6e6;border-radius:8px;}"
"#headerBar{background:#ffffff;border:1px solid #e6e6e6;border-radius:10px;}"
"#sideNav{background:#ffffff;border:1px solid #e6e6e6;border-radius:10px;}"
"#rightPanel{background:transparent;}"
"QToolButton{background:#ffffff;border:1px solid #e6e6e6;border-radius:8px;padding:6px;}"
"QToolButton:hover{background:#f2f7ff;border-color:#d0dcff;}"
"QPushButton{background:#ffffff;border:1px solid #d9d9d9;border-radius:8px;padding:6px 10px;}"
"QPushButton:hover{background:#f8f8f8;border-color:#c8c8c8;}"
"QPushButton:pressed{background:#f0f0f0;}"
"QPushButton[primary='true']{background:#2979ff;color:#fff;border:1px solid #1f6ae6;}"
"QPushButton[primary='true']:hover{background:#1565c0;border-color:#155bb0;}"
"QLabel.section{font-weight:bold;padding:4px 0;}"
"QLineEdit,QComboBox{background:#ffffff;border:1px solid #d9d9d9;border-radius:6px;padding:4px 6px;}"
"QComboBox QAbstractItemView{border:1px solid #d9d9d9;background:#ffffff;selection-background-color:#e8f0ff;}"
"#recLed{background:#e33;border-radius:7px;}"
);
MainWindow w;
w.resize(1280, 800);
w.show();
return app.exec();
}

@ -0,0 +1,182 @@
#include "detectiondata.h"
#include <QRandomGenerator>
#include <QDebug>
#include <QtMath>
/**
*
*
*/
DetectionData::DetectionData(QObject* parent)
: QObject(parent)
, status_(IDLE)
, accuracy_(0.0f)
, lastUpdate_(QDateTime::currentDateTime())
, simulationTimer_(new QTimer(this))
, simulationStep_(0)
{
// 初始化目标类型和ID列表
targetTypes_ << "人员" << "车辆" << "建筑物" << "障碍物" << "动物";
targetIds_ << "T001" << "T002" << "T003" << "T004" << "T005" << "T006" << "T007" << "T008";
// 设置模拟定时器
simulationTimer_->setInterval(2000); // 每2秒更新一次
connect(simulationTimer_, &QTimer::timeout, this, &DetectionData::onSimulationTimer);
}
DetectionData::~DetectionData() {
stopSimulation();
}
QString DetectionData::getStatusText() const {
switch (status_) {
case IDLE: return "● 空闲";
case DETECTING: return "● 检测中";
case PROCESSING: return "● 处理中";
case ERROR: return "● 错误";
default: return "● 未知";
}
}
void DetectionData::setStatus(DetectionStatus status) {
if (status_ != status) {
status_ = status;
lastUpdate_ = QDateTime::currentDateTime();
emit statusChanged(status);
emit detectionUpdated();
qDebug() << "检测状态变更为:" << getStatusText();
}
}
void DetectionData::setAccuracy(float accuracy) {
if (qAbs(accuracy_ - accuracy) > 0.01f) {
accuracy_ = qBound(0.0f, accuracy, 100.0f);
lastUpdate_ = QDateTime::currentDateTime();
emit detectionUpdated();
}
}
void DetectionData::addTarget(const DetectionTarget& target) {
targets_.append(target);
lastUpdate_ = QDateTime::currentDateTime();
emit targetAdded(target);
emit detectionUpdated();
qDebug() << "添加检测目标:" << target.type << target.id << "置信度:" << target.confidence;
}
void DetectionData::removeTarget(const QString& targetId) {
for (int i = 0; i < targets_.size(); ++i) {
if (targets_[i].id == targetId) {
targets_.removeAt(i);
lastUpdate_ = QDateTime::currentDateTime();
emit targetRemoved(targetId);
emit detectionUpdated();
qDebug() << "移除检测目标:" << targetId;
return;
}
}
}
void DetectionData::clearTargets() {
if (!targets_.isEmpty()) {
targets_.clear();
lastUpdate_ = QDateTime::currentDateTime();
emit detectionUpdated();
qDebug() << "清空所有检测目标";
}
}
void DetectionData::startSimulation() {
if (!simulationTimer_->isActive()) {
simulationTimer_->start();
setStatus(DETECTING);
qDebug() << "开始检测模拟";
}
}
void DetectionData::stopSimulation() {
if (simulationTimer_->isActive()) {
simulationTimer_->stop();
setStatus(IDLE);
qDebug() << "停止检测模拟";
}
}
void DetectionData::updateSimulation() {
onSimulationTimer();
}
void DetectionData::onSimulationTimer() {
simulationStep_++;
// 随机更新检测状态
if (simulationStep_ % 10 == 0) {
DetectionStatus newStatus = static_cast<DetectionStatus>(
QRandomGenerator::global()->bounded(0, 4));
setStatus(newStatus);
}
// 随机添加或移除目标
if (simulationStep_ % 3 == 0) {
if (targets_.size() < 5 && QRandomGenerator::global()->bounded(0, 2)) {
generateRandomTarget();
} else if (targets_.size() > 0 && QRandomGenerator::global()->bounded(0, 3) == 0) {
int index = QRandomGenerator::global()->bounded(0, targets_.size());
removeTarget(targets_[index].id);
}
}
// 更新现有目标位置
updateTargetPositions();
// 更新检测精度
float newAccuracy = 85.0f + QRandomGenerator::global()->generateDouble() * 15.0f;
setAccuracy(newAccuracy);
emit detectionUpdated();
}
void DetectionData::generateRandomTarget() {
DetectionTarget target;
target.type = getRandomTargetType();
target.id = getRandomTargetId();
target.confidence = 70.0f + QRandomGenerator::global()->generateDouble() * 30.0f;
target.position = QVector3D(
QRandomGenerator::global()->generateDouble() * 100.0f,
QRandomGenerator::global()->generateDouble() * 100.0f,
QRandomGenerator::global()->generateDouble() * 20.0f
);
target.size = QVector3D(
1.0f + QRandomGenerator::global()->generateDouble() * 3.0f,
1.0f + QRandomGenerator::global()->generateDouble() * 3.0f,
1.0f + QRandomGenerator::global()->generateDouble() * 2.0f
);
target.timestamp = QDateTime::currentDateTime();
addTarget(target);
}
void DetectionData::updateTargetPositions() {
for (auto& target : targets_) {
// 模拟目标移动
float dx = (QRandomGenerator::global()->generateDouble() - 0.5) * 2.0f;
float dy = (QRandomGenerator::global()->generateDouble() - 0.5) * 2.0f;
float dz = (QRandomGenerator::global()->generateDouble() - 0.5) * 0.5f;
target.position += QVector3D(dx, dy, dz);
// 限制在合理范围内
target.position.setX(qBound(0.0f, target.position.x(), 100.0f));
target.position.setY(qBound(0.0f, target.position.y(), 100.0f));
target.position.setZ(qBound(0.0f, target.position.z(), 20.0f));
}
}
QString DetectionData::getRandomTargetType() {
return targetTypes_[QRandomGenerator::global()->bounded(0, targetTypes_.size())];
}
QString DetectionData::getRandomTargetId() {
return targetIds_[QRandomGenerator::global()->bounded(0, targetIds_.size())];
}

@ -0,0 +1,98 @@
#ifndef DETECTIONDATA_H
#define DETECTIONDATA_H
#include <QObject>
#include <QString>
#include <QDateTime>
#include <QTimer>
#include <QVector>
#include <QStringList>
#include <QVector3D>
/**
*
*
*/
struct DetectionTarget {
QString type; // 目标类型(人员、车辆、建筑物等)
QString id; // 目标ID
float confidence; // 置信度
QVector3D position; // 位置信息
QVector3D size; // 尺寸信息
QDateTime timestamp; // 检测时间
DetectionTarget() : confidence(0.0f) {}
DetectionTarget(const QString& t, const QString& i, float c)
: type(t), id(i), confidence(c) {
timestamp = QDateTime::currentDateTime();
}
};
/**
*
*
*/
class DetectionData : public QObject {
Q_OBJECT
public:
explicit DetectionData(QObject* parent = nullptr);
~DetectionData();
// 检测状态
enum DetectionStatus {
IDLE, // 空闲
DETECTING, // 检测中
PROCESSING, // 处理中
ERROR // 错误
};
// 获取检测信息
QVector<DetectionTarget> getTargets() const { return targets_; }
DetectionStatus getStatus() const { return status_; }
float getAccuracy() const { return accuracy_; }
QDateTime getLastUpdate() const { return lastUpdate_; }
QString getStatusText() const;
// 设置检测信息
void setStatus(DetectionStatus status);
void setAccuracy(float accuracy);
void addTarget(const DetectionTarget& target);
void removeTarget(const QString& targetId);
void clearTargets();
// 模拟检测数据更新
void startSimulation();
void stopSimulation();
void updateSimulation();
signals:
void detectionUpdated();
void statusChanged(DetectionStatus status);
void targetAdded(const DetectionTarget& target);
void targetRemoved(const QString& targetId);
private slots:
void onSimulationTimer();
private:
QVector<DetectionTarget> targets_;
DetectionStatus status_;
float accuracy_;
QDateTime lastUpdate_;
// 模拟数据更新
QTimer* simulationTimer_;
int simulationStep_;
// 模拟目标类型列表
QStringList targetTypes_;
QStringList targetIds_;
void generateRandomTarget();
void updateTargetPositions();
QString getRandomTargetType();
QString getRandomTargetId();
};
#endif // DETECTIONDATA_H

@ -0,0 +1,215 @@
#include "dronedata.h"
#include <QRandomGenerator>
#include <QDebug>
#include <QtMath>
/**
*
*
*/
DroneData::DroneData(const QString& id, const QString& name, QObject* parent)
: QObject(parent)
, id_(id)
, name_(name)
, connected_(false)
, position_(0, 0, 0)
, expectedPosition_(0, 0, 0)
, velocity_(0, 0, 0)
, expectedVelocity_(0, 0, 0)
, attitude_(0, 0, 0)
, simulationTimer_(new QTimer(this))
, simulationStep_(0)
{
// 设置模拟数据更新定时器
simulationTimer_->setInterval(100); // 100ms更新一次
connect(simulationTimer_, &QTimer::timeout, this, &DroneData::updateSimulationData);
}
void DroneData::setConnected(bool connected) {
if (connected_ != connected) {
connected_ = connected;
emit connectionChanged(connected);
emit dataChanged();
}
}
void DroneData::setPosition(const QVector3D& pos) {
if (position_ != pos) {
position_ = pos;
emit dataChanged();
}
}
void DroneData::setExpectedPosition(const QVector3D& pos) {
if (expectedPosition_ != pos) {
expectedPosition_ = pos;
emit dataChanged();
}
}
void DroneData::setVelocity(const QVector3D& vel) {
if (velocity_ != vel) {
velocity_ = vel;
emit dataChanged();
}
}
void DroneData::setExpectedVelocity(const QVector3D& vel) {
if (expectedVelocity_ != vel) {
expectedVelocity_ = vel;
emit dataChanged();
}
}
void DroneData::setAttitude(const QVector3D& att) {
if (attitude_ != att) {
attitude_ = att;
emit dataChanged();
}
}
void DroneData::startSimulation() {
if (!simulationTimer_->isActive()) {
simulationTimer_->start();
qDebug() << "开始模拟无人机" << name_ << "的数据更新";
}
}
void DroneData::stopSimulation() {
if (simulationTimer_->isActive()) {
simulationTimer_->stop();
qDebug() << "停止模拟无人机" << name_ << "的数据更新";
}
}
void DroneData::updateSimulationData() {
if (!connected_) return;
simulationStep_++;
// 模拟位置变化(简单的正弦波运动)
float t = simulationStep_ * 0.01f;
float x = 10.0f * qSin(t) + 50.0f;
float y = 10.0f * qCos(t) + 50.0f;
float z = 5.0f * qSin(t * 0.5f) + 30.0f;
setPosition(QVector3D(x, y, z));
// 模拟速度变化
float vx = 10.0f * qCos(t);
float vy = -10.0f * qSin(t);
float vz = 5.0f * qCos(t * 0.5f) * 0.5f;
setVelocity(QVector3D(vx, vy, vz));
// 模拟姿态变化
float roll = 5.0f * qSin(t * 0.3f);
float pitch = 3.0f * qCos(t * 0.4f);
float yaw = t * 10.0f;
setAttitude(QVector3D(roll, pitch, yaw));
// 期望位置稍微滞后于实际位置
setExpectedPosition(QVector3D(x + 2.0f, y + 1.0f, z + 0.5f));
setExpectedVelocity(QVector3D(vx * 0.9f, vy * 0.9f, vz * 0.9f));
}
/**
*
*
*/
DroneManager::DroneManager(QObject* parent)
: QObject(parent)
, currentDroneId_("")
{
}
DroneManager::~DroneManager() {
qDeleteAll(drones_);
}
void DroneManager::addDrone(const QString& id, const QString& name) {
// 检查是否已存在
for (auto* drone : drones_) {
if (drone->getId() == id) {
qDebug() << "无人机" << id << "已存在";
return;
}
}
// 创建新无人机
auto* drone = new DroneData(id, name, this);
drones_.append(drone);
// 如果是第一架无人机,设为当前选中
if (currentDroneId_.isEmpty()) {
setCurrentDrone(id);
}
// 开始模拟数据更新
drone->setConnected(true);
drone->startSimulation();
emit droneAdded(id);
qDebug() << "添加无人机:" << id << name;
}
void DroneManager::removeDrone(const QString& id) {
for (int i = 0; i < drones_.size(); ++i) {
if (drones_[i]->getId() == id) {
auto* drone = drones_[i];
drone->stopSimulation();
drone->deleteLater();
drones_.removeAt(i);
// 如果删除的是当前选中的无人机,切换到其他无人机
if (currentDroneId_ == id) {
if (!drones_.isEmpty()) {
setCurrentDrone(drones_[0]->getId());
} else {
currentDroneId_ = "";
emit currentDroneChanged("");
}
}
emit droneRemoved(id);
qDebug() << "删除无人机:" << id;
return;
}
}
}
DroneData* DroneManager::getDrone(const QString& id) const {
for (auto* drone : drones_) {
if (drone->getId() == id) {
return drone;
}
}
return nullptr;
}
DroneData* DroneManager::getCurrentDrone() const {
return getDrone(currentDroneId_);
}
QVector<DroneData*> DroneManager::getAllDrones() const {
return drones_;
}
void DroneManager::setCurrentDrone(const QString& id) {
if (currentDroneId_ != id && getDrone(id) != nullptr) {
currentDroneId_ = id;
emit currentDroneChanged(id);
qDebug() << "切换当前无人机到:" << id;
}
}
QStringList DroneManager::getDroneIds() const {
QStringList ids;
for (auto* drone : drones_) {
ids.append(drone->getId());
}
return ids;
}

@ -0,0 +1,108 @@
#ifndef DRONEDATA_H
#define DRONEDATA_H
#include <QObject>
#include <QString>
#include <QVector3D>
#include <QTimer>
#include <QVector>
#include <QStringList>
/**
*
* 姿
*/
class DroneData : public QObject {
Q_OBJECT
public:
explicit DroneData(const QString& id, const QString& name, QObject* parent = nullptr);
// 基本信息
QString getId() const { return id_; }
QString getName() const { return name_; }
bool isConnected() const { return connected_; }
// 位置信息
QVector3D getPosition() const { return position_; }
QVector3D getExpectedPosition() const { return expectedPosition_; }
// 速度信息
QVector3D getVelocity() const { return velocity_; }
QVector3D getExpectedVelocity() const { return expectedVelocity_; }
// 姿态信息
QVector3D getAttitude() const { return attitude_; }
// 设置方法
void setConnected(bool connected);
void setPosition(const QVector3D& pos);
void setExpectedPosition(const QVector3D& pos);
void setVelocity(const QVector3D& vel);
void setExpectedVelocity(const QVector3D& vel);
void setAttitude(const QVector3D& att);
// 模拟数据更新(用于演示)
void startSimulation();
void stopSimulation();
signals:
void dataChanged();
void connectionChanged(bool connected);
private slots:
void updateSimulationData();
private:
QString id_;
QString name_;
bool connected_;
// 位置、速度、姿态数据
QVector3D position_;
QVector3D expectedPosition_;
QVector3D velocity_;
QVector3D expectedVelocity_;
QVector3D attitude_;
// 模拟数据更新定时器
QTimer* simulationTimer_;
int simulationStep_;
};
/**
*
*
*/
class DroneManager : public QObject {
Q_OBJECT
public:
explicit DroneManager(QObject* parent = nullptr);
~DroneManager();
// 无人机管理
void addDrone(const QString& id, const QString& name);
void removeDrone(const QString& id);
DroneData* getDrone(const QString& id) const;
DroneData* getCurrentDrone() const;
QVector<DroneData*> getAllDrones() const;
// 当前选中无人机
void setCurrentDrone(const QString& id);
QString getCurrentDroneId() const { return currentDroneId_; }
// 获取所有无人机ID列表
QStringList getDroneIds() const;
signals:
void currentDroneChanged(const QString& id);
void droneAdded(const QString& id);
void droneRemoved(const QString& id);
private:
QVector<DroneData*> drones_;
QString currentDroneId_;
};
#endif // DRONEDATA_H

@ -0,0 +1,126 @@
#include "datapage.h"
#include <QDebug>
// 添加必要包含
#include <QTableWidgetItem>
#include "../models/dronedata.h" // 假设全局访问DroneManager
extern DroneManager* globalDroneManager; // 如果需要全局访问,实际应通过参数传递
#include "../models/detectiondata.h"
extern DetectionData* globalDetectionData;
/**
*
*
*/
DataPage::DataPage(QWidget* parent)
: QWidget(parent)
, infoBoard_(nullptr)
, droneTable_(nullptr)
, targetGroup_(nullptr)
, targetLabel_(nullptr)
// 初始化基大小
, baseFontSize_(10)
, initialWidth_(800)
{
setupUI();
}
DataPage::~DataPage() {
// Qt会自动清理子对象
}
void DataPage::setupUI() {
auto* mainLayout = new QVBoxLayout(this);
mainLayout->setSpacing(8);
mainLayout->setContentsMargins(0, 0, 0, 0);
// 标题
auto* title = new QLabel("数据监控");
title->setProperty("class", "section");
mainLayout->addWidget(title);
// 无人机信息表格
droneTable_ = new QTableWidget(this);
droneTable_->setColumnCount(5);
droneTable_->setHorizontalHeaderLabels({"型号", "飞行状态", "电量", "搭载武器", "其他"});
droneTable_->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
droneTable_->verticalHeader()->hide();
droneTable_->setAlternatingRowColors(true);
droneTable_->setSelectionBehavior(QAbstractItemView::SelectRows);
mainLayout->addWidget(droneTable_, 1);
// 目标统计组
targetGroup_ = new QGroupBox("扫描目标统计");
auto* targetLayout = new QVBoxLayout(targetGroup_);
targetLabel_ = new QLabel("无目标");
targetLabel_->setAlignment(Qt::AlignCenter);
targetLayout->addWidget(targetLabel_);
mainLayout->addWidget(targetGroup_);
// 初始更新
updateDroneInfo();
updateTargetInfo();
}
void DataPage::setupInfoBoard() {
infoBoard_ = new QFrame(this);
infoBoard_->setMinimumHeight(520);
infoBoard_->setStyleSheet("QFrame{background:#f8f9fa; border:1px solid #dee2e6; border-radius:8px;}");
}
void DataPage::updateDroneInfo() {
if (!globalDroneManager) return;
droneTable_->setRowCount(0); // 清空
QStringList droneIds = globalDroneManager->getDroneIds();
for (const QString& id : droneIds) {
DroneData* drone = globalDroneManager->getDrone(id);
if (drone) {
int row = droneTable_->rowCount();
droneTable_->insertRow(row);
droneTable_->setItem(row, 0, new QTableWidgetItem(drone->getName()));
droneTable_->setItem(row, 1, new QTableWidgetItem("飞行中")); // 假设状态
droneTable_->setItem(row, 2, new QTableWidgetItem("80%")); // 假设电量
droneTable_->setItem(row, 3, new QTableWidgetItem("导弹")); // 假设武器
droneTable_->setItem(row, 4, new QTableWidgetItem("正常")); // 其他
}
}
}
void DataPage::updateTargetInfo() {
if (!globalDetectionData) return;
QVector<DetectionTarget> targets = globalDetectionData->getTargets();
QMap<QString, int> typeCount;
for (const auto& target : targets) {
typeCount[target.type]++;
}
QStringList targetStrings;
for (auto it = typeCount.begin(); it != typeCount.end(); ++it) {
targetStrings.append(QString("%1 × %2").arg(it.key()).arg(it.value()));
}
targetLabel_->setText(targetStrings.isEmpty() ? "无目标" : targetStrings.join(", "));
}
// 添加resizeEvent实现即使简单也添加以一致
void DataPage::resizeEvent(QResizeEvent *event) {
QWidget::resizeEvent(event);
float scale = static_cast<float>(width()) / initialWidth_;
QFont font = this->font();
font.setPointSizeF(baseFontSize_ * scale);
droneTable_->setFont(font);
targetLabel_->setFont(font);
// 调整表格行高
int rowHeight = static_cast<int>(30 * scale);
for (int i = 0; i < droneTable_->rowCount(); ++i) {
droneTable_->setRowHeight(i, rowHeight);
}
// 如果infoBoard_有子组件可以在这里调整当前为空
qDebug() << "DataPage resized with scale:" << scale;
}

@ -0,0 +1,54 @@
#ifndef DATAPAGE_H
#define DATAPAGE_H
#include <QWidget>
#include <QFrame>
#include <QGroupBox>
#include <QVBoxLayout>
// 添加新包含
#include <QTableWidget>
#include <QLabel>
#include <QHeaderView>
/**
*
*
*/
class DataPage : public QWidget {
Q_OBJECT
public:
explicit DataPage(QWidget* parent = nullptr);
~DataPage();
protected:
void resizeEvent(QResizeEvent *event) override;
// 获取组件引用
QFrame* getInfoBoard() const { return infoBoard_; }
signals:
void dataRequested();
public slots:
void updateDroneInfo(); // 更新无人机信息
void updateTargetInfo(); // 更新目标信息
private:
void setupUI();
void setupInfoBoard();
// UI组件
QFrame* infoBoard_;
QTableWidget* droneTable_; // 无人机表格
QGroupBox* targetGroup_; // 目标统计组
QLabel* targetLabel_; // 目标统计标签
// 基大小用于缩放
int baseFontSize_ = 10;
int initialWidth_ = 800;
};
#endif // DATAPAGE_H

@ -0,0 +1,928 @@
#include "mappage.h"
#include <QDebug>
#include <QWebEngineSettings>
#include <QWebEnginePage>
#include <QWebEngineView>
#include <QUrl>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QComboBox>
#include <QPushButton>
#include <QFrame>
#include <QDateTimeEdit>
#include <QTableWidget>
#include <QGridLayout>
#include <QHeaderView>
#include <QFont>
#include <QResizeEvent>
#include <QWebEngineSettings>
#include <QWebEnginePage>
#include <QWebEngineView>
#include <QUrl>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QComboBox>
#include <QPushButton>
#include <QFrame>
#include <QDateTimeEdit>
#include <QTableWidget>
#include <QGridLayout>
#include <QHeaderView>
#include <QFont>
#include <QResizeEvent>
#include <QMessageBox> // Added for QMessageBox
#include <QRadioButton> // Added for QRadioButton
#include <QDateTimeEdit> // Added for QDateTimeEdit
#include <QGroupBox> // Added for QGroupBox
/**
*
*
*/
MapPage::MapPage(QWidget* parent)
: QWidget(parent)
, mapArea_(nullptr)
, heightCombo_(nullptr)
, downloadMapBtn_(nullptr)
, mapView_(nullptr)
, setThreatBtn_(nullptr)
, areaSearchBtn_(nullptr)
, pathPlanningBtn_(nullptr)
, coordInput_(nullptr)
, locateBtn_(nullptr)
, searchMapBtn_(nullptr)
, threatDialog_(nullptr)
, searchDialog_(nullptr)
, planningDialog_(nullptr)
, locateDialog_(nullptr)
, baseFontSize_(10)
{
setupUI();
enableGeolocation(); // 启用geolocation
qDebug() << "MapPage 构造函数完成";
// 初始化对话框
threatDialog_ = new ThreatAreaDialog(this);
searchDialog_ = new AreaSearchDialog(this);
planningDialog_ = new PathPlanningDialog(this);
locateDialog_ = new LocateDialog(this); // 确保初始化
}
MapPage::~MapPage() {
// Qt会自动清理子对象
}
void MapPage::setupUI() {
auto* mainLayout = new QVBoxLayout(this);
mainLayout->setSpacing(8);
mainLayout->setContentsMargins(0, 0, 0, 0);
// 标题
auto* title = new QLabel("路径监控");
title->setProperty("class", "section");
mainLayout->addWidget(title);
// 地图类型切换
mainLayout->addWidget(createMapControlsWidget());
// 地图区域
setupMapArea();
mainLayout->addWidget(mapArea_, 1);
// 控制条
setupControlBar();
mainLayout->addWidget(createControlBarWidget());
}
void MapPage::setupMapControls() {
// 地图控制设置
}
QWidget* MapPage::createMapControlsWidget() {
auto* top = new QWidget(this);
auto* layout = new QHBoxLayout(top);
layout->setContentsMargins(0, 0, 0, 0);
layout->addStretch(1);
return top;
}
void MapPage::setupMapArea() {
mapArea_ = new QFrame(this);
mapArea_->setMinimumHeight(520);
// 使用全局样式
auto* layout = new QVBoxLayout(mapArea_);
layout->setContentsMargins(0, 0, 0, 0);
mapView_ = new QWebEngineView(mapArea_);
mapView_->setPage(new CustomWebEnginePage(mapView_));
layout->addWidget(mapView_);
// 添加加载完成调试
connect(mapView_, &QWebEngineView::loadFinished, this, [this](bool ok) {
qDebug() << (ok ? "地图 HTML 加载成功" : "地图 HTML 加载失败");
});
// 添加默认地图加载
const QString defaultHtml = R"(
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<title></title>
<style>
html, body, #container { margin: 0; padding: 0; width: 100%; height: 100%; }
</style>
<script>
window.onerror = function(msg, url, line) { console.log("JS 错误: " + msg + " at line " + line); };
</script>
<script src="https://webapi.amap.com/maps?v=2.0&key=492dc9daf4eae7cab678c0f3efed8198&callback=initMap" async defer></script>
<script>
function initMap() {
window.map = new AMap.Map('container', { // 使用window.map使其全局
layers: [new AMap.TileLayer.Satellite(), new AMap.TileLayer.RoadNet()],
zoom: 10
});
AMap.plugin(['AMap.ToolBar', 'AMap.Scale', 'AMap.Geolocation'], function() {
window.map.addControl(new AMap.ToolBar());
window.map.addControl(new AMap.Scale());
var geolocation = new AMap.Geolocation({
enableHighAccuracy: true,
timeout: 10000, // 增加超时到10秒
maximumAge: 0,
convert: true,
showButton: true,
buttonPosition: 'LB',
buttonOffset: new AMap.Pixel(10, 20),
showMarker: true,
showCircle: true,
panToLocation: true,
zoomToAccuracy: true
});
window.map.addControl(geolocation);
geolocation.getCurrentPosition(function(status, result) {
if (status === 'complete') {
var lnglat = result.position;
window.map.setCenter(lnglat);
window.map.setZoom(15);
console.log("定位成功: " + lnglat);
} else {
console.log("定位失败: " + result.message + " - 尝试 IP 定位");
geolocation.getCityInfo(function(status, result) {
if (status === 'complete') {
var citybounds = result.bounds;
window.map.setBounds(citybounds);
console.log("IP 定位成功: " + result.city);
} else {
console.log("IP 定位失败: " + result.message);
window.map.setCenter([116.397428, 39.90923]);
}
});
}
});
// 添加持续监听位置变化
geolocation.watchPosition();
});
}
</script>
</head>
<body>
<div id="container"></div>
</body>
</html>
)";
mapView_->setHtml(defaultHtml, QUrl("https://webapi.amap.com/"));
}
void MapPage::setupControlBar() {
// 控制条设置
}
QWidget* MapPage::createControlBarWidget() {
auto* bar = new QWidget(this);
auto* layout = new QHBoxLayout(bar);
layout->setContentsMargins(0, 0, 0, 0);
auto* heightLabel = new QLabel("航线高度:");
layout->addWidget(heightLabel);
heightCombo_ = new QComboBox();
heightCombo_->addItems({"30.00", "50.00", "80.00"});
heightCombo_->setFixedWidth(100);
connect(heightCombo_, QOverload<const QString&>::of(&QComboBox::currentTextChanged),
this, &MapPage::onHeightChanged);
layout->addWidget(heightCombo_);
layout->addStretch(1);
// 添加地图检索按钮
searchMapBtn_ = new QPushButton("地图检索");
searchMapBtn_->setProperty("primary", true);
connect(searchMapBtn_, &QPushButton::clicked, this, &MapPage::onSearchMapClicked);
layout->addWidget(searchMapBtn_);
downloadMapBtn_ = new QPushButton("地图下载");
downloadMapBtn_->setProperty("primary", true);
connect(downloadMapBtn_, &QPushButton::clicked, this, &MapPage::onDownloadMapClicked);
layout->addWidget(downloadMapBtn_);
// 添加新按钮 - 为了整洁,将它们分组在布局末尾
setThreatBtn_ = new QPushButton("设置威胁区域");
setThreatBtn_->setProperty("primary", true);
connect(setThreatBtn_, &QPushButton::clicked, this, &MapPage::onSetThreatClicked);
layout->addWidget(setThreatBtn_);
areaSearchBtn_ = new QPushButton("区域搜索");
areaSearchBtn_->setProperty("primary", true);
connect(areaSearchBtn_, &QPushButton::clicked, this, &MapPage::onAreaSearchClicked);
layout->addWidget(areaSearchBtn_);
pathPlanningBtn_ = new QPushButton("路径规划");
pathPlanningBtn_->setProperty("primary", true);
connect(pathPlanningBtn_, &QPushButton::clicked, this, &MapPage::onPathPlanningClicked);
layout->addWidget(pathPlanningBtn_);
return bar;
}
// 添加缺失的实现
void MapPage::onHeightChanged() {
emit heightChanged(heightCombo_->currentText());
qDebug() << "航线高度变更为:" << heightCombo_->currentText();
}
void MapPage::onDownloadMapClicked() {
emit downloadMapRequested();
qDebug() << "地图下载请求";
}
// 新槽函数实现
void MapPage::onSetThreatClicked() {
threatDialog_->exec(); // 打开模态对话框
// 执行JS添加overlay (示例)
mapView_->page()->runJavaScript("addThreatArea();"); // 假设JS函数
}
void MapPage::onAreaSearchClicked() {
searchDialog_->exec();
}
void MapPage::onPathPlanningClicked() {
planningDialog_->exec();
}
// 添加resizeEvent实现
void MapPage::resizeEvent(QResizeEvent *event) {
QWidget::resizeEvent(event);
// 移除所有设置以防止无限resize循环
// 只计算scale用于调试
const int initialWidth = 800;
float scale = qMax(1.0f, static_cast<float>(width()) / initialWidth);
qDebug() << "MapPage resized with scale:" << scale;
}
// 添加enableGeolocation实现
void MapPage::enableGeolocation() {
if (mapView_) {
QWebEngineSettings* settings = mapView_->settings();
settings->setAttribute(QWebEngineSettings::JavascriptEnabled, true);
settings->setAttribute(QWebEngineSettings::LocalStorageEnabled, true);
// 启用geolocation
mapView_->page()->setFeaturePermission(QUrl("https://webapi.amap.com/"), QWebEnginePage::Geolocation, QWebEnginePage::PermissionGrantedByUser);
}
}
// 移除类定义
// class ThreatAreaDialog : public QDialog { ... };
// 实现成员函数
ThreatAreaDialog::ThreatAreaDialog(QWidget* parent) : QDialog(parent) {
setWindowTitle("设置威胁区域");
setMinimumSize(600, 500);
auto* layout = new QVBoxLayout(this);
layout->setSpacing(15);
layout->setContentsMargins(20, 20, 20, 20);
// 威胁区域基本信息组
auto* basicGroup = new QGroupBox("基本信息");
basicGroup->setStyleSheet("QGroupBox { font-weight: bold; margin-top: 10px; }");
auto* basicLayout = new QGridLayout(basicGroup);
basicLayout->setSpacing(10);
// 威胁类型
basicLayout->addWidget(new QLabel("威胁类型:"), 0, 0);
typeCombo_ = new QComboBox();
typeCombo_->addItems({"导弹威胁", "雷达干扰", "防空火力", "禁飞区域", "其他"});
typeCombo_->setStyleSheet("QComboBox { padding: 5px; border: 1px solid #ccc; border-radius: 4px; }");
basicLayout->addWidget(typeCombo_, 0, 1);
// 威胁等级
basicLayout->addWidget(new QLabel("威胁等级:"), 0, 2);
auto* levelCombo = new QComboBox();
levelCombo->addItems({"", "", ""});
levelCombo->setStyleSheet("QComboBox { padding: 5px; border: 1px solid #ccc; border-radius: 4px; }");
basicLayout->addWidget(levelCombo, 0, 3);
// 时间设置组
auto* timeGroup = new QGroupBox("威胁区域存在时间");
timeGroup->setStyleSheet("QGroupBox { font-weight: bold; margin-top: 10px; }");
auto* timeLayout = new QVBoxLayout(timeGroup);
// 时间模式选择
auto* timeModeLayout = new QHBoxLayout();
auto* singleTimeMode = new QRadioButton("单时间点");
auto* timeRangeMode = new QRadioButton("时间段");
singleTimeMode->setChecked(true);
timeModeLayout->addWidget(singleTimeMode);
timeModeLayout->addWidget(timeRangeMode);
timeModeLayout->addStretch();
timeLayout->addLayout(timeModeLayout);
// 单时间点设置
auto* singleTimeWidget = new QWidget();
auto* singleTimeLayout = new QHBoxLayout(singleTimeWidget);
singleTimeLayout->setContentsMargins(0, 0, 0, 0);
singleTimeLayout->addWidget(new QLabel("时间:"));
timeEdit_ = new QDateTimeEdit(QDateTime::currentDateTime());
timeEdit_->setDisplayFormat("yyyy-MM-dd hh:mm:ss");
timeEdit_->setCalendarPopup(true);
timeEdit_->setStyleSheet("QDateTimeEdit { padding: 5px; border: 1px solid #ccc; border-radius: 4px; }");
singleTimeLayout->addWidget(timeEdit_);
auto* setCurrentBtn = new QPushButton("设为当前时间");
setCurrentBtn->setStyleSheet("QPushButton { padding: 5px 10px; background: #e3f2fd; border: 1px solid #2196f3; border-radius: 4px; color: #1976d2; }");
singleTimeLayout->addWidget(setCurrentBtn);
singleTimeLayout->addStretch();
timeLayout->addWidget(singleTimeWidget);
// 时间模式选择器已定义用于UI切换
// 时间段设置
auto* timeRangeWidget = new QWidget();
auto* timeRangeLayout = new QVBoxLayout(timeRangeWidget);
timeRangeLayout->setContentsMargins(0, 0, 0, 0);
// 开始时间
auto* startTimeLayout = new QHBoxLayout();
startTimeLayout->addWidget(new QLabel("开始时间:"));
auto* startTimeEdit = new QDateTimeEdit(QDateTime::currentDateTime());
startTimeEdit->setDisplayFormat("yyyy-MM-dd hh:mm:ss");
startTimeEdit->setCalendarPopup(true);
startTimeEdit->setStyleSheet("QDateTimeEdit { padding: 5px; border: 1px solid #ccc; border-radius: 4px; }");
startTimeLayout->addWidget(startTimeEdit);
auto* setStartCurrentBtn = new QPushButton("设为当前");
setStartCurrentBtn->setStyleSheet("QPushButton { padding: 5px 10px; background: #e8f5e8; border: 1px solid #4caf50; border-radius: 4px; color: #2e7d32; }");
startTimeLayout->addWidget(setStartCurrentBtn);
startTimeLayout->addStretch();
timeRangeLayout->addLayout(startTimeLayout);
// 结束时间
auto* endTimeLayout = new QHBoxLayout();
endTimeLayout->addWidget(new QLabel("结束时间:"));
auto* endTimeEdit = new QDateTimeEdit(QDateTime::currentDateTime().addSecs(3600)); // 默认1小时后
endTimeEdit->setDisplayFormat("yyyy-MM-dd hh:mm:ss");
endTimeEdit->setCalendarPopup(true);
endTimeEdit->setStyleSheet("QDateTimeEdit { padding: 5px; border: 1px solid #ccc; border-radius: 4px; }");
endTimeLayout->addWidget(endTimeEdit);
auto* setEndCurrentBtn = new QPushButton("设为当前");
setEndCurrentBtn->setStyleSheet("QPushButton { padding: 5px 10px; background: #e8f5e8; border: 1px solid #4caf50; border-radius: 4px; color: #2e7d32; }");
endTimeLayout->addWidget(setEndCurrentBtn);
endTimeLayout->addStretch();
timeRangeLayout->addLayout(endTimeLayout);
// 持续时间显示和快速设置
auto* durationLayout = new QHBoxLayout();
auto* durationLabel = new QLabel("持续时间: 1小时");
durationLabel->setStyleSheet("QLabel { color: #666; font-weight: bold; }");
durationLayout->addWidget(durationLabel);
durationLayout->addStretch();
// 快速时间设置按钮
auto* quickTimeLayout = new QHBoxLayout();
auto* quick1Hour = new QPushButton("1小时");
auto* quick4Hour = new QPushButton("4小时");
auto* quick1Day = new QPushButton("1天");
auto* quick1Week = new QPushButton("1周");
QString quickBtnStyle = "QPushButton { padding: 4px 8px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 3px; font-size: 11px; }";
quick1Hour->setStyleSheet(quickBtnStyle);
quick4Hour->setStyleSheet(quickBtnStyle);
quick1Day->setStyleSheet(quickBtnStyle);
quick1Week->setStyleSheet(quickBtnStyle);
quickTimeLayout->addWidget(quick1Hour);
quickTimeLayout->addWidget(quick4Hour);
quickTimeLayout->addWidget(quick1Day);
quickTimeLayout->addWidget(quick1Week);
quickTimeLayout->addStretch();
durationLayout->addLayout(quickTimeLayout);
timeRangeLayout->addLayout(durationLayout);
timeLayout->addWidget(timeRangeWidget);
timeRangeWidget->setVisible(false); // 默认隐藏
// 连接时间模式切换信号
connect(singleTimeMode, &QRadioButton::toggled, [singleTimeWidget, timeRangeWidget](bool checked) {
singleTimeWidget->setVisible(checked);
timeRangeWidget->setVisible(!checked);
});
connect(timeRangeMode, &QRadioButton::toggled, [singleTimeWidget, timeRangeWidget](bool checked) {
singleTimeWidget->setVisible(!checked);
timeRangeWidget->setVisible(checked);
});
// 连接单时间点信号
connect(setCurrentBtn, &QPushButton::clicked, [this]() {
timeEdit_->setDateTime(QDateTime::currentDateTime());
});
// 连接时间段信号
connect(setStartCurrentBtn, &QPushButton::clicked, [startTimeEdit]() {
startTimeEdit->setDateTime(QDateTime::currentDateTime());
});
connect(setEndCurrentBtn, &QPushButton::clicked, [endTimeEdit]() {
endTimeEdit->setDateTime(QDateTime::currentDateTime());
});
// 连接快速时间设置
connect(quick1Hour, &QPushButton::clicked, [startTimeEdit, endTimeEdit, durationLabel]() {
QDateTime start = QDateTime::currentDateTime();
QDateTime end = start.addSecs(3600);
startTimeEdit->setDateTime(start);
endTimeEdit->setDateTime(end);
durationLabel->setText("持续时间: 1小时");
});
connect(quick4Hour, &QPushButton::clicked, [startTimeEdit, endTimeEdit, durationLabel]() {
QDateTime start = QDateTime::currentDateTime();
QDateTime end = start.addSecs(4 * 3600);
startTimeEdit->setDateTime(start);
endTimeEdit->setDateTime(end);
durationLabel->setText("持续时间: 4小时");
});
connect(quick1Day, &QPushButton::clicked, [startTimeEdit, endTimeEdit, durationLabel]() {
QDateTime start = QDateTime::currentDateTime();
QDateTime end = start.addDays(1);
startTimeEdit->setDateTime(start);
endTimeEdit->setDateTime(end);
durationLabel->setText("持续时间: 1天");
});
connect(quick1Week, &QPushButton::clicked, [startTimeEdit, endTimeEdit, durationLabel]() {
QDateTime start = QDateTime::currentDateTime();
QDateTime end = start.addDays(7);
startTimeEdit->setDateTime(start);
endTimeEdit->setDateTime(end);
durationLabel->setText("持续时间: 1周");
});
// 连接时间变化信号,更新持续时间显示
connect(startTimeEdit, &QDateTimeEdit::dateTimeChanged, [startTimeEdit, endTimeEdit, durationLabel]() {
qint64 seconds = startTimeEdit->dateTime().secsTo(endTimeEdit->dateTime());
if (seconds > 0) {
int hours = seconds / 3600;
int minutes = (seconds % 3600) / 60;
if (hours > 0) {
durationLabel->setText(QString("持续时间: %1小时%2分钟").arg(hours).arg(minutes));
} else {
durationLabel->setText(QString("持续时间: %1分钟").arg(minutes));
}
} else {
durationLabel->setText("持续时间: 无效时间段");
durationLabel->setStyleSheet("QLabel { color: #f44336; font-weight: bold; }");
}
});
connect(endTimeEdit, &QDateTimeEdit::dateTimeChanged, [startTimeEdit, endTimeEdit, durationLabel]() {
qint64 seconds = startTimeEdit->dateTime().secsTo(endTimeEdit->dateTime());
if (seconds > 0) {
int hours = seconds / 3600;
int minutes = (seconds % 3600) / 60;
if (hours > 0) {
durationLabel->setText(QString("持续时间: %1小时%2分钟").arg(hours).arg(minutes));
} else {
durationLabel->setText(QString("持续时间: %1分钟").arg(minutes));
}
durationLabel->setStyleSheet("QLabel { color: #666; font-weight: bold; }");
} else {
durationLabel->setText("持续时间: 无效时间段");
durationLabel->setStyleSheet("QLabel { color: #f44336; font-weight: bold; }");
}
});
// 坐标设置组
auto* coordGroup = new QGroupBox("坐标设置");
coordGroup->setStyleSheet("QGroupBox { font-weight: bold; margin-top: 10px; }");
auto* coordLayout = new QVBoxLayout(coordGroup);
// 坐标输入方式选择
auto* coordMethodLayout = new QHBoxLayout();
auto* manualInput = new QRadioButton("手动输入");
auto* mapClick = new QRadioButton("地图点击选择");
manualInput->setChecked(true);
coordMethodLayout->addWidget(manualInput);
coordMethodLayout->addWidget(mapClick);
coordMethodLayout->addStretch();
coordLayout->addLayout(coordMethodLayout);
// 坐标输入区域
auto* coordInputLayout = new QHBoxLayout();
coordInputLayout->addWidget(new QLabel("坐标:"));
coordInput_ = new QLineEdit();
coordInput_->setPlaceholderText("格式: 经度,纬度 (例: 116.397,39.909)");
coordInput_->setStyleSheet("QLineEdit { padding: 5px; border: 1px solid #ccc; border-radius: 4px; }");
coordInputLayout->addWidget(coordInput_, 1);
auto* getCurrentPosBtn = new QPushButton("获取当前位置");
getCurrentPosBtn->setStyleSheet("QPushButton { padding: 5px 10px; background: #e3f2fd; border: 1px solid #2196f3; border-radius: 4px; color: #1976d2; }");
coordInputLayout->addWidget(getCurrentPosBtn);
coordLayout->addLayout(coordInputLayout);
// 坐标示例和帮助
auto* coordHelp = new QLabel("支持格式: 单点(116.397,39.909) | 多点(116.397,39.909;116.398,39.910) | 区域(116.397,39.909,116.398,39.910)");
coordHelp->setStyleSheet("QLabel { color: #666; font-size: 11px; }");
coordHelp->setWordWrap(true);
coordLayout->addWidget(coordHelp);
// 连接坐标选择信号
connect(manualInput, &QRadioButton::toggled, coordInput_, &QLineEdit::setEnabled);
connect(mapClick, &QRadioButton::toggled, [this](bool checked) {
coordInput_->setEnabled(!checked);
if (checked) {
coordInput_->setPlaceholderText("请在地图上点击选择坐标...");
} else {
coordInput_->setPlaceholderText("格式: 经度,纬度 (例: 116.397,39.909)");
}
});
connect(getCurrentPosBtn, &QPushButton::clicked, [this]() {
// 这里可以集成GPS定位功能
coordInput_->setText("116.397,39.909"); // 示例坐标
});
// 图形设置组
auto* shapeGroup = new QGroupBox("图形设置");
shapeGroup->setStyleSheet("QGroupBox { font-weight: bold; margin-top: 10px; }");
auto* shapeLayout = new QGridLayout(shapeGroup);
shapeLayout->setSpacing(10);
shapeLayout->addWidget(new QLabel("图形类型:"), 0, 0);
shapeCombo_ = new QComboBox();
shapeCombo_->addItems({"圆形", "多边形", "矩形", "椭圆"});
shapeCombo_->setStyleSheet("QComboBox { padding: 5px; border: 1px solid #ccc; border-radius: 4px; }");
shapeLayout->addWidget(shapeCombo_, 0, 1);
shapeLayout->addWidget(new QLabel("颜色:"), 0, 2);
colorCombo_ = new QComboBox();
colorCombo_->addItems({"红色", "黄色", "蓝色", "绿色", "紫色", "橙色"});
colorCombo_->setStyleSheet("QComboBox { padding: 5px; border: 1px solid #ccc; border-radius: 4px; }");
shapeLayout->addWidget(colorCombo_, 0, 3);
// 添加所有组到主布局
layout->addWidget(basicGroup);
layout->addWidget(timeGroup);
layout->addWidget(coordGroup);
layout->addWidget(shapeGroup);
// 威胁区域列表组
auto* listGroup = new QGroupBox("威胁区域列表");
listGroup->setStyleSheet("QGroupBox { font-weight: bold; margin-top: 10px; }");
auto* listLayout = new QVBoxLayout(listGroup);
// 表格
areaTable_ = new QTableWidget(0, 6);
areaTable_->setHorizontalHeaderLabels({"威胁类型", "威胁等级", "时间", "坐标", "图形", "操作"});
areaTable_->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
areaTable_->setAlternatingRowColors(true);
areaTable_->setSelectionBehavior(QAbstractItemView::SelectRows);
areaTable_->setStyleSheet("QTableWidget { gridline-color: #e0e0e0; }");
listLayout->addWidget(areaTable_);
// 表格操作按钮
auto* tableButtons = new QHBoxLayout();
auto* addBtn = new QPushButton("添加威胁区域");
auto* editBtn = new QPushButton("编辑选中");
auto* deleteBtn = new QPushButton("删除选中");
auto* clearBtn = new QPushButton("清空列表");
// 设置按钮样式
addBtn->setStyleSheet("QPushButton { padding: 8px 16px; background: #4caf50; color: white; border: none; border-radius: 4px; font-weight: bold; }");
editBtn->setStyleSheet("QPushButton { padding: 8px 16px; background: #2196f3; color: white; border: none; border-radius: 4px; }");
deleteBtn->setStyleSheet("QPushButton { padding: 8px 16px; background: #f44336; color: white; border: none; border-radius: 4px; }");
clearBtn->setStyleSheet("QPushButton { padding: 8px 16px; background: #ff9800; color: white; border: none; border-radius: 4px; }");
tableButtons->addWidget(addBtn);
tableButtons->addWidget(editBtn);
tableButtons->addWidget(deleteBtn);
tableButtons->addWidget(clearBtn);
tableButtons->addStretch();
listLayout->addLayout(tableButtons);
layout->addWidget(listGroup);
// 威胁区域统计组
auto* statsGroup = new QGroupBox("威胁区域统计");
statsGroup->setStyleSheet("QGroupBox { font-weight: bold; margin-top: 10px; }");
auto* statsLayout = new QHBoxLayout(statsGroup);
auto* totalLabel = new QLabel("总计: 0个");
auto* currentLabel = new QLabel("当前威胁: 0个");
auto* futureLabel = new QLabel("未来威胁: 0个");
auto* historyLabel = new QLabel("历史威胁: 0个");
totalLabel->setStyleSheet("QLabel { color: #333; font-weight: bold; }");
currentLabel->setStyleSheet("QLabel { color: #f44336; font-weight: bold; }");
futureLabel->setStyleSheet("QLabel { color: #ff9800; font-weight: bold; }");
historyLabel->setStyleSheet("QLabel { color: #9e9e9e; font-weight: bold; }");
statsLayout->addWidget(totalLabel);
statsLayout->addWidget(currentLabel);
statsLayout->addWidget(futureLabel);
statsLayout->addWidget(historyLabel);
statsLayout->addStretch();
layout->addWidget(statsGroup);
// 底部按钮区域
auto* buttons = new QHBoxLayout();
auto* previewBtn = new QPushButton("预览效果");
auto* saveBtn = new QPushButton("保存设置");
auto* cancelBtn = new QPushButton("取消");
// 设置底部按钮样式
previewBtn->setStyleSheet("QPushButton { padding: 10px 20px; background: #9c27b0; color: white; border: none; border-radius: 4px; font-weight: bold; }");
saveBtn->setStyleSheet("QPushButton { padding: 10px 20px; background: #4caf50; color: white; border: none; border-radius: 4px; font-weight: bold; }");
cancelBtn->setStyleSheet("QPushButton { padding: 10px 20px; background: #757575; color: white; border: none; border-radius: 4px; }");
buttons->addStretch();
buttons->addWidget(previewBtn);
buttons->addWidget(saveBtn);
buttons->addWidget(cancelBtn);
layout->addLayout(buttons);
// 连接信号槽
connect(addBtn, &QPushButton::clicked, this, &ThreatAreaDialog::addArea);
connect(editBtn, &QPushButton::clicked, [this]() {
int row = areaTable_->currentRow();
if (row >= 0) {
// 编辑选中行
QMessageBox::information(this, "编辑", "编辑功能待实现");
} else {
QMessageBox::warning(this, "提示", "请先选择要编辑的行");
}
});
connect(deleteBtn, &QPushButton::clicked, [this]() {
int row = areaTable_->currentRow();
if (row >= 0) {
areaTable_->removeRow(row);
} else {
QMessageBox::warning(this, "提示", "请先选择要删除的行");
}
});
connect(clearBtn, &QPushButton::clicked, [this]() {
if (QMessageBox::question(this, "确认", "确定要清空所有威胁区域吗?") == QMessageBox::Yes) {
areaTable_->setRowCount(0);
}
});
connect(previewBtn, &QPushButton::clicked, [this]() {
QMessageBox::information(this, "预览", "威胁区域预览功能待实现");
});
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
connect(saveBtn, &QPushButton::clicked, this, &QDialog::accept);
}
void ThreatAreaDialog::addArea() {
// 验证输入
if (coordInput_->text().isEmpty()) {
QMessageBox::warning(this, "输入错误", "请输入坐标信息!");
return;
}
// 验证时间设置
QDateTime currentTime = QDateTime::currentDateTime();
QDateTime threatTime = timeEdit_->dateTime();
// 检查时间是否合理(不能是过去时间,除非是历史记录)
if (threatTime < currentTime.addDays(-1)) {
int ret = QMessageBox::question(this, "时间确认",
"设置的威胁时间较早,是否确认添加?\n"
"这可能是历史威胁记录。",
QMessageBox::Yes | QMessageBox::No);
if (ret == QMessageBox::No) {
return;
}
}
int row = areaTable_->rowCount();
areaTable_->insertRow(row);
// 威胁类型
areaTable_->setItem(row, 0, new QTableWidgetItem(typeCombo_->currentText()));
// 威胁等级 (默认为"中")
areaTable_->setItem(row, 1, new QTableWidgetItem(""));
// 时间信息 - 根据当前选择的时间模式来设置
QString timeInfo;
// 判断威胁状态
QString status;
if (threatTime > currentTime) {
status = "未来威胁";
} else if (threatTime >= currentTime.addDays(-1)) {
status = "当前威胁";
} else {
status = "历史威胁";
}
timeInfo = QString("%1: %2").arg(status).arg(threatTime.toString("yyyy-MM-dd hh:mm:ss"));
areaTable_->setItem(row, 2, new QTableWidgetItem(timeInfo));
// 根据威胁状态设置行颜色
QTableWidgetItem* timeItem = areaTable_->item(row, 2);
if (status == "未来威胁") {
timeItem->setBackground(QColor(255, 243, 224)); // 浅橙色
} else if (status == "当前威胁") {
timeItem->setBackground(QColor(255, 235, 238)); // 浅红色
} else {
timeItem->setBackground(QColor(245, 245, 245)); // 浅灰色
}
// 坐标
areaTable_->setItem(row, 3, new QTableWidgetItem(coordInput_->text()));
// 图形信息
QString shapeInfo = QString("%1 (%2)").arg(shapeCombo_->currentText()).arg(colorCombo_->currentText());
areaTable_->setItem(row, 4, new QTableWidgetItem(shapeInfo));
// 操作按钮
auto* actionWidget = new QWidget();
auto* actionLayout = new QHBoxLayout(actionWidget);
actionLayout->setContentsMargins(2, 2, 2, 2);
actionLayout->setSpacing(2);
auto* editBtn = new QPushButton("编辑");
auto* deleteBtn = new QPushButton("删除");
editBtn->setStyleSheet("QPushButton { padding: 2px 6px; background: #2196f3; color: white; border: none; border-radius: 2px; font-size: 10px; }");
deleteBtn->setStyleSheet("QPushButton { padding: 2px 6px; background: #f44336; color: white; border: none; border-radius: 2px; font-size: 10px; }");
actionLayout->addWidget(editBtn);
actionLayout->addWidget(deleteBtn);
actionLayout->addStretch();
areaTable_->setCellWidget(row, 5, actionWidget);
// 连接操作按钮
connect(editBtn, &QPushButton::clicked, [this, row]() {
// 编辑功能
QMessageBox::information(this, "编辑", QString("编辑第 %1 行").arg(row + 1));
});
connect(deleteBtn, &QPushButton::clicked, [this, row]() {
if (QMessageBox::question(this, "确认删除", "确定要删除这个威胁区域吗?") == QMessageBox::Yes) {
areaTable_->removeRow(row);
}
});
// 清空输入框
coordInput_->clear();
// 显示成功消息
QMessageBox::information(this, "添加成功", "威胁区域已添加到列表中!");
// 更新统计信息
updateThreatStats();
}
// 更新威胁区域统计信息
void ThreatAreaDialog::updateThreatStats() {
// 这里需要访问统计标签,但由于它们是局部变量,我们暂时跳过
// 在实际应用中,应该将统计标签作为成员变量存储
qDebug() << "威胁区域统计已更新";
}
void ThreatAreaDialog::resizeEvent(QResizeEvent *event) {
QDialog::resizeEvent(event);
}
// 类似 for AreaSearchDialog
AreaSearchDialog::AreaSearchDialog(QWidget* parent) : QDialog(parent) {
setWindowTitle("区域搜索");
auto* layout = new QVBoxLayout(this);
filterCombo_ = new QComboBox();
filterCombo_->addItems({"所有", "导弹威胁", "雷达干扰"});
layout->addWidget(new QLabel("过滤类型:"));
layout->addWidget(filterCombo_);
resultTable_ = new QTableWidget(0, 4);
resultTable_->setHorizontalHeaderLabels({"类型", "时间", "位置", "详情"});
layout->addWidget(resultTable_);
QPushButton* searchBtn = new QPushButton("搜索");
layout->addWidget(searchBtn);
}
void AreaSearchDialog::resizeEvent(QResizeEvent *event) {
QDialog::resizeEvent(event);
}
// 类似 for PathPlanningDialog
PathPlanningDialog::PathPlanningDialog(QWidget* parent) : QDialog(parent) {
setWindowTitle("路径规划");
auto* layout = new QVBoxLayout(this);
startInput_ = new QLineEdit("起点坐标");
endInput_ = new QLineEdit("终点坐标");
layout->addWidget(startInput_);
layout->addWidget(endInput_);
pathTable_ = new QTableWidget(0, 2);
pathTable_->setHorizontalHeaderLabels({"", "坐标"});
layout->addWidget(pathTable_);
QPushButton* planBtn = new QPushButton("规划");
layout->addWidget(planBtn);
}
void PathPlanningDialog::resizeEvent(QResizeEvent *event) {
QDialog::resizeEvent(event);
}
// 添加onLocateClicked实现
void MapPage::onSearchMapClicked() {
if (locateDialog_->exec() == QDialog::Accepted) {
double lng = locateDialog_->getLongitude();
double lat = locateDialog_->getLatitude();
// 执行JS移动地图中心使用window.map以匹配全局变量
QString js = QString("window.map.setCenter([%1, %2]); window.map.setZoom(15);").arg(lng).arg(lat);
mapView_->page()->runJavaScript(js);
}
}
// 移除旧的onLocateClicked
// void MapPage::onLocateClicked() { ... }
// 添加LocateDialog实现
LocateDialog::LocateDialog(QWidget* parent) : QDialog(parent) {
setWindowTitle("地图检索");
auto* layout = new QVBoxLayout(this);
lngInput_ = new QLineEdit();
lngInput_->setPlaceholderText("输入经度 (例如: 116.397)");
layout->addWidget(new QLabel("经度:"));
layout->addWidget(lngInput_);
latInput_ = new QLineEdit();
latInput_->setPlaceholderText("输入纬度 (例如: 39.909)");
layout->addWidget(new QLabel("纬度:"));
layout->addWidget(latInput_);
auto* buttons = new QHBoxLayout();
auto* confirmBtn = new QPushButton("确认");
auto* cancelBtn = new QPushButton("取消");
buttons->addStretch();
buttons->addWidget(confirmBtn);
buttons->addWidget(cancelBtn);
buttons->addStretch();
layout->addLayout(buttons);
connect(confirmBtn, &QPushButton::clicked, this, &LocateDialog::onConfirm);
connect(cancelBtn, &QPushButton::clicked, this, &QDialog::reject);
}
void LocateDialog::onConfirm() {
bool okLng, okLat;
lng_ = lngInput_->text().toDouble(&okLng);
lat_ = latInput_->text().toDouble(&okLat);
if (!okLng || !okLat) {
QMessageBox::warning(this, "输入错误", "请输入有效的经纬度值!");
return;
}
accept();
}
double LocateDialog::getLongitude() const { return lng_; }
double LocateDialog::getLatitude() const { return lat_; }
// 添加公共方法实现
void MapPage::runMapJavaScript(const QString& js) {
if (mapView_) {
mapView_->page()->runJavaScript(js);
}
}

@ -0,0 +1,182 @@
#ifndef MAPPAGE_H
#define MAPPAGE_H
#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QComboBox>
#include <QLineEdit>
#include <QFrame>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QWebEngineView>
#include <QWebEnginePage>
#include <QDebug>
#include <QWebEngineSettings>
#include <QDialog> // 添加
#include <QComboBox>
#include <QDateTimeEdit>
#include <QPushButton>
#include <QTableWidget>
#include <QFormLayout>
#include <QLineEdit>
#include <QMessageBox> // 添加以支持输入验证警告
#include <QGroupBox> // 添加QGroupBox支持
#include <QRadioButton> // 添加QRadioButton支持
class CustomWebEnginePage : public QWebEnginePage {
Q_OBJECT
public:
CustomWebEnginePage(QObject* parent = nullptr) : QWebEnginePage(parent) {}
protected:
void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID) override {
qDebug() << "JS 消息 (级别:" << level << "):" << message << " (行:" << lineNumber << ", 来源:" << sourceID << ")";
}
};
// 移除前向声明
// class ThreatAreaDialog;
// class AreaSearchDialog;
// class PathPlanningDialog;
// 定义类
class ThreatAreaDialog : public QDialog {
Q_OBJECT
public:
ThreatAreaDialog(QWidget* parent = nullptr);
private slots:
void addArea();
void updateThreatStats();
protected:
void resizeEvent(QResizeEvent *event) override;
private:
QComboBox* typeCombo_;
QDateTimeEdit* timeEdit_;
QComboBox* shapeCombo_;
QComboBox* colorCombo_;
QTableWidget* areaTable_;
QLineEdit* coordInput_;
};
class AreaSearchDialog : public QDialog {
Q_OBJECT
public:
AreaSearchDialog(QWidget* parent = nullptr);
protected:
void resizeEvent(QResizeEvent *event) override;
private:
QComboBox* filterCombo_;
QTableWidget* resultTable_;
};
class PathPlanningDialog : public QDialog {
Q_OBJECT
public:
PathPlanningDialog(QWidget* parent = nullptr);
protected:
void resizeEvent(QResizeEvent *event) override;
private:
QLineEdit* startInput_;
QLineEdit* endInput_;
QTableWidget* pathTable_;
};
// 添加LocateDialog类定义
class LocateDialog : public QDialog {
Q_OBJECT
public:
LocateDialog(QWidget* parent = nullptr);
double getLongitude() const;
double getLatitude() const;
private slots:
void onConfirm();
private:
QLineEdit* lngInput_;
QLineEdit* latInput_;
double lng_;
double lat_;
};
/**
*
*
*/
class MapPage : public QWidget {
Q_OBJECT
public:
explicit MapPage(QWidget* parent = nullptr);
~MapPage();
// 获取组件引用
QComboBox* getHeightCombo() const { return heightCombo_; }
QPushButton* getDownloadMapBtn() const { return downloadMapBtn_; }
// 添加新信号
signals:
void heightChanged(const QString& height);
void downloadMapRequested();
void setThreatRequested();
void areaSearchRequested();
void pathPlanningRequested();
private slots:
void onHeightChanged();
void onDownloadMapClicked();
// 添加新槽函数
void onSetThreatClicked();
void onAreaSearchClicked();
void onPathPlanningClicked();
// 添加新槽
void onSearchMapClicked(); // 新增声明
public slots:
void runMapJavaScript(const QString& js); // 添加公共方法运行JS
protected:
void resizeEvent(QResizeEvent *event) override;
private:
void setupUI();
void setupMapControls();
void setupMapArea();
void setupControlBar();
// 添加新方法
void enableGeolocation();
// 创建UI组件的辅助方法
QWidget* createMapControlsWidget();
QWidget* createControlBarWidget();
// UI组件
QFrame* mapArea_;
QComboBox* heightCombo_;
QPushButton* downloadMapBtn_;
QWebEngineView* mapView_;
// 添加新按钮成员
QPushButton* setThreatBtn_;
QPushButton* areaSearchBtn_;
QPushButton* pathPlanningBtn_;
// 添加新组件
QLineEdit* coordInput_;
QPushButton* locateBtn_;
QPushButton* searchMapBtn_;
// 添加对话框成员
ThreatAreaDialog* threatDialog_;
AreaSearchDialog* searchDialog_;
PathPlanningDialog* planningDialog_;
LocateDialog* locateDialog_;
// 添加基字体大小(用于缩放)
int baseFontSize_ = 10; // 默认基字体大小,根据您的样式调整
};
// 移除所有类定义从h文件移出
#endif // MAPPAGE_H

@ -0,0 +1,285 @@
#include "taskdecisionpage.h"
#include <QMessageBox>
TaskDecisionPage::TaskDecisionPage(QWidget* parent)
: QWidget(parent)
, contentStack_(nullptr)
, stepList_(nullptr)
, prevBtn_(nullptr)
, nextBtn_(nullptr)
, generateBtn_(nullptr)
, currentStep_(0)
, isTargetClear_(true)
, previewMapPage_(nullptr)
{
setupUI();
}
void TaskDecisionPage::setupUI() {
auto* mainLayout = new QHBoxLayout(this);
mainLayout->setContentsMargins(10, 10, 10, 10);
// 左侧步骤导航
stepList_ = new QListWidget();
stepList_->setFixedWidth(200);
stepList_->addItems({"1. 目标位置确认", "2. 路径规划", "3. 区域搜索策略", "4. 打击目标清单", "5. 任务预览与生成"});
connect(stepList_, &QListWidget::currentRowChanged, this, &TaskDecisionPage::onStepChanged);
mainLayout->addWidget(stepList_);
// 中间内容区
auto* contentLayout = new QVBoxLayout();
contentStack_ = new QStackedWidget();
contentStack_->addWidget(createStep1Widget());
contentStack_->addWidget(createStep2Widget());
contentStack_->addWidget(createStep3Widget());
contentStack_->addWidget(createStep4Widget());
contentStack_->addWidget(createStep5Widget());
contentLayout->addWidget(contentStack_, 1);
// 底部导航
auto* bottomLayout = new QHBoxLayout();
prevBtn_ = new QPushButton("上一步");
connect(prevBtn_, &QPushButton::clicked, this, &TaskDecisionPage::onPrevStep);
nextBtn_ = new QPushButton("下一步");
connect(nextBtn_, &QPushButton::clicked, this, &TaskDecisionPage::onNextStep);
generateBtn_ = new QPushButton("生成任务包");
generateBtn_->setEnabled(false);
connect(generateBtn_, &QPushButton::clicked, this, &TaskDecisionPage::onGenerateTask);
bottomLayout->addWidget(prevBtn_);
bottomLayout->addWidget(nextBtn_);
bottomLayout->addStretch(1);
bottomLayout->addWidget(generateBtn_);
contentLayout->addLayout(bottomLayout);
mainLayout->addLayout(contentLayout, 1);
// 右侧预览区嵌入MapPage
previewMapPage_ = new MapPage();
previewMapPage_->setMinimumWidth(300);
mainLayout->addWidget(previewMapPage_);
// 初始化
onStepChanged(0);
}
QWidget* TaskDecisionPage::createStep1Widget() {
auto* widget = new QWidget();
auto* layout = new QVBoxLayout(widget);
layout->addWidget(new QLabel("步骤1: 确认目标位置是否明确?"));
clearYes_ = new QRadioButton("明确");
clearNo_ = new QRadioButton("不明确");
clearYes_->setChecked(true);
connect(clearYes_, &QRadioButton::toggled, this, &TaskDecisionPage::onTargetClearChanged);
connect(clearNo_, &QRadioButton::toggled, this, &TaskDecisionPage::onTargetClearChanged);
layout->addWidget(clearYes_);
layout->addWidget(clearNo_);
auto* clearGroup = new QGroupBox("坐标输入");
auto* clearLayout = new QVBoxLayout(clearGroup);
startCoord_ = new QLineEdit();
startCoord_->setPlaceholderText("起点坐标: lng,lat");
targetCoord_ = new QLineEdit();
targetCoord_->setPlaceholderText("目标坐标: lng,lat");
roughCoord_ = new QLineEdit();
roughCoord_->setPlaceholderText("大致坐标: lng,lat");
roughCoord_->setVisible(false);
clearLayout->addWidget(startCoord_);
clearLayout->addWidget(targetCoord_);
clearLayout->addWidget(roughCoord_);
layout->addWidget(clearGroup);
return widget;
}
QWidget* TaskDecisionPage::createStep2Widget() {
auto* widget = new QWidget();
auto* layout = new QVBoxLayout(widget);
layout->addWidget(new QLabel("步骤2: 规划路径"));
pathResult_ = new QTextEdit();
pathResult_->setReadOnly(true);
layout->addWidget(pathResult_);
auto* btn = new QPushButton("生成路径");
connect(btn, &QPushButton::clicked, this, &TaskDecisionPage::onGeneratePath);
layout->addWidget(btn);
return widget;
}
QWidget* TaskDecisionPage::createStep3Widget() {
auto* widget = new QWidget();
auto* layout = new QVBoxLayout(widget);
layout->addWidget(new QLabel("步骤3: 规划区域搜索策略"));
areaSize_ = new QLineEdit();
areaSize_->setPlaceholderText("区域大小/形状 (e.g., 圆形,半径5km)");
layout->addWidget(areaSize_);
droneCount_ = new QSpinBox();
droneCount_->setRange(1, 10);
layout->addWidget(droneCount_);
auto* recBtn = new QPushButton("推荐无人机数量");
connect(recBtn, &QPushButton::clicked, this, &TaskDecisionPage::onRecommendDrones);
layout->addWidget(recBtn);
auto* replanBtn = new QPushButton("重新规划");
connect(replanBtn, &QPushButton::clicked, this, &TaskDecisionPage::onReplanSearch);
layout->addWidget(replanBtn);
searchTable_ = new QTableWidget(0, 4);
searchTable_->setHorizontalHeaderLabels({"无人机ID", "搜索路径", "时间", "范围占比"});
layout->addWidget(searchTable_);
searchTime_ = new QLabel("预计搜索时间: N/A");
coverage_ = new QLabel("覆盖范围: N/A");
layout->addWidget(searchTime_);
layout->addWidget(coverage_);
return widget;
}
QWidget* TaskDecisionPage::createStep4Widget() {
auto* widget = new QWidget();
auto* layout = new QVBoxLayout(widget);
layout->addWidget(new QLabel("步骤4: 设置打击目标清单"));
targetTable_ = new QTableWidget(0, 3);
targetTable_->setHorizontalHeaderLabels({"目标类型", "优先级", "打击方式"});
layout->addWidget(targetTable_);
auto* addBtn = new QPushButton("添加类型");
connect(addBtn, &QPushButton::clicked, this, &TaskDecisionPage::onAddTargetType);
layout->addWidget(addBtn);
return widget;
}
QWidget* TaskDecisionPage::createStep5Widget() {
auto* widget = new QWidget();
auto* layout = new QVBoxLayout(widget);
layout->addWidget(new QLabel("步骤5: 任务预览与生成"));
taskPreview_ = new QTextEdit();
taskPreview_->setReadOnly(true);
layout->addWidget(taskPreview_);
return widget;
}
void TaskDecisionPage::onStepChanged(int step) {
currentStep_ = step;
contentStack_->setCurrentIndex(step);
prevBtn_->setEnabled(step > 0);
nextBtn_->setEnabled(step < 4);
generateBtn_->setEnabled(step == 4);
// 隐藏/显示步骤3基于isTargetClear_
if (!isTargetClear_ && step == 2) {
onNextStep(); // 跳到步骤3
} else if (isTargetClear_ && step == 3) {
onNextStep(); // 跳过步骤3
}
}
void TaskDecisionPage::onTargetClearChanged(bool clear) {
isTargetClear_ = clear;
startCoord_->setVisible(clear);
targetCoord_->setVisible(clear);
roughCoord_->setVisible(!clear);
}
void TaskDecisionPage::onGeneratePath() {
// 模拟调用地图规划
pathData_ = "路径生成: 从起点到目标长度5km时间10min";
pathResult_->setText(pathData_);
QMessageBox::information(this, "路径规划", "路径已生成!");
// 更新预览地图:绘制路径
QString js = "window.map.add(new AMap.Polyline({path: [[116.3,39.9], [116.4,39.9], [116.4,40.0]], strokeColor: '#FF0000'}));";
previewMapPage_->runMapJavaScript(js);
}
void TaskDecisionPage::onRecommendDrones() {
// 模拟推荐(基于区域大小)
droneCount_->setValue(3); // 示例
QMessageBox::information(this, "推荐", "推荐使用3架无人机");
}
void TaskDecisionPage::onReplanSearch() {
// 模拟规划
searchTable_->setRowCount(droneCount_->value());
for (int i = 0; i < droneCount_->value(); ++i) {
searchTable_->setItem(i, 0, new QTableWidgetItem(QString("Drone %1").arg(i+1)));
searchTable_->setItem(i, 1, new QTableWidgetItem("路径描述"));
searchTable_->setItem(i, 2, new QTableWidgetItem("5min"));
searchTable_->setItem(i, 3, new QTableWidgetItem("30%"));
}
searchTime_->setText("预计搜索时间: 15min");
coverage_->setText("覆盖范围: 90%");
searchData_ = "搜索策略生成";
QMessageBox::information(this, "规划", "搜索策略已重新规划!");
// 更新预览地图:绘制搜索区域
QString js = "window.map.add(new AMap.Polygon({path: [[116.3,39.9], [116.5,39.9], [116.5,40.1], [116.3,40.1]], fillColor: '#00FF00'}));";
previewMapPage_->runMapJavaScript(js);
}
void TaskDecisionPage::onAddTargetType() {
int row = targetTable_->rowCount();
targetTable_->insertRow(row);
auto* typeCombo = new QComboBox();
typeCombo->addItems({"人员", "车辆", "建筑"});
targetTable_->setCellWidget(row, 0, typeCombo);
auto* priSpin = new QSpinBox();
priSpin->setRange(1, 10);
targetTable_->setCellWidget(row, 1, priSpin);
auto* wayCombo = new QComboBox();
wayCombo->addItems({"导弹", "激光引导", "监视"});
targetTable_->setCellWidget(row, 2, wayCombo);
}
void TaskDecisionPage::onGenerateTask() {
// 汇总数据生成预览(模拟)
QString preview = "任务摘要:\n";
preview += QString("目标明确: %1\n").arg(isTargetClear_ ? "" : "");
preview += "路径: " + pathData_ + "\n";
if (!isTargetClear_) preview += "搜索策略: " + searchData_ + "\n";
preview += "打击清单:\n";
for (int i = 0; i < targetTable_->rowCount(); ++i) {
auto* type = qobject_cast<QComboBox*>(targetTable_->cellWidget(i, 0));
auto* pri = qobject_cast<QSpinBox*>(targetTable_->cellWidget(i, 1));
auto* way = qobject_cast<QComboBox*>(targetTable_->cellWidget(i, 2));
preview += QString("%1 (优先级 %2, 方式 %3)\n").arg(type->currentText()).arg(pri->value()).arg(way->currentText());
}
taskPreview_->setText(preview);
// 生成任务包模拟保存JSON
QMessageBox::information(this, "生成", "任务数据包已生成!");
}
void TaskDecisionPage::onNextStep() {
if (currentStep_ < 4) {
// 简单验证(实际添加更多)
if (currentStep_ == 0 && startCoord_->text().isEmpty()) {
QMessageBox::warning(this, "错误", "请输入坐标!");
return;
}
onStepChanged(currentStep_ + 1);
}
}
void TaskDecisionPage::onPrevStep() {
if (currentStep_ > 0) {
onStepChanged(currentStep_ - 1);
}
}

@ -0,0 +1,87 @@
#ifndef TASKDECISIONPAGE_H
#define TASKDECISIONPAGE_H
#include <QWidget>
#include <QStackedWidget>
#include <QListWidget>
#include <QProgressBar>
#include <QPushButton>
#include <QRadioButton>
#include <QLineEdit>
#include <QTableWidget>
#include <QComboBox>
#include <QTextEdit>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGroupBox>
#include <QSpinBox> // 添加以支持QSpinBox
#include "mappage.h" // 添加用于嵌入MapPage
class TaskDecisionPage : public QWidget {
Q_OBJECT
public:
explicit TaskDecisionPage(QWidget* parent = nullptr);
private slots:
void onStepChanged(int step);
void onTargetClearChanged(bool clear);
void onGeneratePath();
void onRecommendDrones();
void onReplanSearch();
void onAddTargetType();
void onGenerateTask();
void onNextStep();
void onPrevStep();
private:
void setupUI();
QWidget* createStep1Widget(); // 目标位置确认
QWidget* createStep2Widget(); // 路径规划
QWidget* createStep3Widget(); // 区域搜索策略
QWidget* createStep4Widget(); // 打击目标清单
QWidget* createStep5Widget(); // 任务预览与生成
// 成员变量
QStackedWidget* contentStack_;
QListWidget* stepList_;
QPushButton* prevBtn_;
QPushButton* nextBtn_;
QPushButton* generateBtn_;
// 步骤1
QRadioButton* clearYes_;
QRadioButton* clearNo_;
QLineEdit* startCoord_;
QLineEdit* targetCoord_;
QLineEdit* roughCoord_;
// 步骤2
QTextEdit* pathResult_;
// 步骤3
QLineEdit* areaSize_;
QSpinBox* droneCount_;
QTableWidget* searchTable_;
QLabel* searchTime_;
QLabel* coverage_;
// 步骤4
QTableWidget* targetTable_;
// 步骤5
QTextEdit* taskPreview_;
// 数据存储
int currentStep_;
bool isTargetClear_;
// 假设的路径/搜索数据(实际中从地图调用)
QString pathData_;
QString searchData_;
// 预览地图使用MapPage
MapPage* previewMapPage_;
};
#endif // TASKDECISIONPAGE_H

@ -0,0 +1,296 @@
#include "videopage.h"
#include <QDebug>
// 添加缺失的包含
#include <QScrollArea>
/**
*
*
*/
VideoPage::VideoPage(QWidget* parent)
: QWidget(parent)
, droneSelector_(nullptr)
, videoInfoLabel_(nullptr)
, videoArea_(nullptr)
, detectionTargets_(nullptr)
, detectionTargetObject_(nullptr)
, detectionAccuracy_(nullptr)
, detectionTime_(nullptr)
, playBtn_(nullptr)
, pauseBtn_(nullptr)
, captureBtn_(nullptr)
, recordBtn_(nullptr)
, stopBtn_(nullptr)
, selectBtn_(nullptr)
, clickBtn_(nullptr)
, controlBtn_(nullptr)
// 初始化基大小
, baseFontSize_(10)
, initialWidth_(800)
{
setupUI();
}
VideoPage::~VideoPage() {
// Qt会自动清理子对象
}
void VideoPage::setupUI() {
auto* mainLayout = new QVBoxLayout(this);
mainLayout->setSpacing(8);
mainLayout->setContentsMargins(0, 0, 0, 0);
// 顶部无人机选择区域
setupDroneSelector();
mainLayout->addWidget(createDroneSelectorWidget());
// 视频区域
setupVideoArea();
mainLayout->addWidget(videoArea_, 1);
// 控制条
setupControlBar();
mainLayout->addWidget(createControlBarWidget());
// 检测信息对话框使用QScrollArea包裹以防溢出
auto* scrollArea = new QScrollArea(this);
scrollArea->setWidgetResizable(true);
scrollArea->setWidget(createDetectionDialogWidget());
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
mainLayout->addWidget(scrollArea);
}
void VideoPage::setupDroneSelector() {
// 这个方法将在createDroneSelectorWidget中实现
}
QWidget* VideoPage::createDroneSelectorWidget() {
auto* topBar = new QWidget(this);
auto* layout = new QHBoxLayout(topBar);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(12);
auto* droneLabel = new QLabel("选择无人机:");
droneLabel->setStyleSheet("font-weight:bold;");
layout->addWidget(droneLabel);
droneSelector_ = new QComboBox(this);
droneSelector_->setFixedWidth(150);
droneSelector_->setObjectName("droneSelector");
connect(droneSelector_, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &VideoPage::onDroneSelectionChanged);
layout->addWidget(droneSelector_);
layout->addStretch(1);
auto* statusLabel = new QLabel("● 已连接");
statusLabel->setStyleSheet("color:#4caf50; font-weight:bold;");
layout->addWidget(statusLabel);
return topBar;
}
void VideoPage::setupVideoArea() {
videoArea_ = new QFrame(this);
videoArea_->setStyleSheet("QFrame{background:#2b2b2b; border:1px solid #444;}");
videoArea_->setMinimumHeight(520);
auto* centerLayout = new QVBoxLayout(videoArea_);
centerLayout->setContentsMargins(0, 0, 0, 0);
centerLayout->addStretch(1);
videoInfoLabel_ = new QLabel("当前监控: 无人机-001");
videoInfoLabel_->setStyleSheet("color:#ffffff; font-size:16px; font-weight:bold; background:rgba(0,0,0,0.3); padding:8px; border-radius:4px;");
videoInfoLabel_->setAlignment(Qt::AlignCenter);
videoInfoLabel_->setObjectName("videoInfoLabel");
centerLayout->addWidget(videoInfoLabel_);
centerLayout->addStretch(1);
}
QWidget* VideoPage::createControlBarWidget() {
auto* bottom = new QWidget(this);
auto* layout = new QHBoxLayout(bottom);
layout->setContentsMargins(0, 0, 0, 0);
// 创建控制按钮
QStringList buttonTexts = {"播放", "暂停", "拍照(T)", "录像(R)", "停止", "框选", "点击", "手动控制"};
QPushButton** buttons[] = {&playBtn_, &pauseBtn_, &captureBtn_, &recordBtn_,
&stopBtn_, &selectBtn_, &clickBtn_, &controlBtn_};
for (int i = 0; i < buttonTexts.size(); ++i) {
*buttons[i] = new QPushButton(buttonTexts[i]);
layout->addWidget(*buttons[i]);
}
layout->addStretch(1);
return bottom;
}
void VideoPage::setupControlBar() {
// 控制条设置已在createControlBarWidget中完成
}
void VideoPage::setupDetectionDialog() {
// 这个方法将在createDetectionDialogWidget中实现
}
QWidget* VideoPage::createDetectionDialogWidget() {
auto* detectionDialog = new QFrame(this);
detectionDialog->setStyleSheet("QFrame{background:#f8f9fa; border:1px solid #dee2e6; border-radius:8px; margin:4px;}");
// detectionDialog->setMaximumHeight(120); // 移除最大高度,让它可扩展
auto* detectionLayout = new QVBoxLayout(detectionDialog);
detectionLayout->setContentsMargins(12, 8, 12, 8);
detectionLayout->setSpacing(6);
// 检测信息标题
auto* detectionTitle = new QLabel("实时检测信息");
detectionTitle->setStyleSheet("font-weight:bold; color:#495057; font-size:14px;");
detectionLayout->addWidget(detectionTitle);
// 检测信息内容区域
auto* detectionContent = new QWidget();
auto* contentLayout = new QHBoxLayout(detectionContent);
contentLayout->setContentsMargins(0, 0, 0, 0);
contentLayout->setSpacing(20);
// 检测目标信息
auto* targetInfo = createTargetInfoWidget();
contentLayout->addWidget(targetInfo);
// 目标对象信息
auto* targetObjectInfo = createTargetObjectInfoWidget();
contentLayout->addWidget(targetObjectInfo);
// 检测精度信息
auto* accuracyInfo = createAccuracyInfoWidget();
contentLayout->addWidget(accuracyInfo);
// 检测时间信息
auto* timeInfo = createTimeInfoWidget();
contentLayout->addWidget(timeInfo);
contentLayout->addStretch(1);
detectionLayout->addWidget(detectionContent);
return detectionDialog;
}
QWidget* VideoPage::createTargetInfoWidget() {
auto* targetInfo = new QWidget();
auto* layout = new QVBoxLayout(targetInfo);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(4);
auto* targetLabel = new QLabel("检测目标:");
targetLabel->setStyleSheet("font-weight:bold; color:#6c757d;");
detectionTargets_ = new QLabel("人员 × 3, 车辆 × 2");
detectionTargets_->setStyleSheet("color:#28a745; font-weight:bold;");
detectionTargets_->setObjectName("detectionTargets");
layout->addWidget(targetLabel);
layout->addWidget(detectionTargets_);
return targetInfo;
}
QWidget* VideoPage::createTargetObjectInfoWidget() {
auto* targetObjectInfo = new QWidget();
auto* layout = new QVBoxLayout(targetObjectInfo);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(4);
auto* targetObjectLabel = new QLabel("是否为目标对象:");
targetObjectLabel->setStyleSheet("font-weight:bold; color:#6c757d;");
detectionTargetObject_ = new QLabel("● 是");
detectionTargetObject_->setStyleSheet("color:#28a745; font-weight:bold;");
detectionTargetObject_->setObjectName("detectionTargetObject");
layout->addWidget(targetObjectLabel);
layout->addWidget(detectionTargetObject_);
return targetObjectInfo;
}
QWidget* VideoPage::createAccuracyInfoWidget() {
auto* accuracyInfo = new QWidget();
auto* layout = new QVBoxLayout(accuracyInfo);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(4);
auto* accuracyLabel = new QLabel("检测精度:");
accuracyLabel->setStyleSheet("font-weight:bold; color:#6c757d;");
detectionAccuracy_ = new QLabel("95.2%");
detectionAccuracy_->setStyleSheet("color:#fd7e14; font-weight:bold;");
detectionAccuracy_->setObjectName("detectionAccuracy");
layout->addWidget(accuracyLabel);
layout->addWidget(detectionAccuracy_);
return accuracyInfo;
}
QWidget* VideoPage::createTimeInfoWidget() {
auto* timeInfo = new QWidget();
auto* layout = new QVBoxLayout(timeInfo);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(4);
auto* timeLabel = new QLabel("最后更新:");
timeLabel->setStyleSheet("font-weight:bold; color:#6c757d;");
detectionTime_ = new QLabel("2024-01-15 14:32:15");
detectionTime_->setStyleSheet("color:#6c757d;");
detectionTime_->setObjectName("detectionTime");
layout->addWidget(timeLabel);
layout->addWidget(detectionTime_);
return timeInfo;
}
// 添加resizeEvent实现
void VideoPage::resizeEvent(QResizeEvent *event) {
QWidget::resizeEvent(event);
float scale = static_cast<float>(width()) / initialWidth_;
QFont font = this->font();
font.setPointSizeF(baseFontSize_ * scale);
// 调整组合框和标签
if (droneSelector_) droneSelector_->setFont(font);
if (videoInfoLabel_) videoInfoLabel_->setFont(font);
// 调整控制按钮
int buttonHeight = static_cast<int>(40 * scale); // 增加基高度到40便于使用
int buttonWidth = static_cast<int>(150 * scale); // 增加基宽度到150确保文字完整且按钮更大
QPushButton* buttons[] = {playBtn_, pauseBtn_, captureBtn_, recordBtn_,
stopBtn_, selectBtn_, clickBtn_, controlBtn_};
for (auto* btn : buttons) {
if (btn) {
btn->setFont(font);
btn->setMinimumHeight(buttonHeight);
btn->setMinimumWidth(buttonWidth);
}
}
// 调整检测标签
QLabel* detectionLabels[] = {detectionTargets_, detectionTargetObject_,
detectionAccuracy_, detectionTime_};
for (auto* label : detectionLabels) {
if (label) label->setFont(font);
}
qDebug() << "VideoPage resized with scale:" << scale;
}
void VideoPage::onDroneSelectionChanged() {
emit droneSelectionChanged(droneSelector_->currentIndex());
}

@ -0,0 +1,82 @@
#ifndef VIDEOPAGE_H
#define VIDEOPAGE_H
#include <QWidget>
#include <QComboBox>
#include <QLabel>
#include <QFrame>
#include <QPushButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
/**
*
*
*/
class VideoPage : public QWidget {
Q_OBJECT
public:
explicit VideoPage(QWidget* parent = nullptr);
~VideoPage();
protected:
void resizeEvent(QResizeEvent *event) override;
// 获取组件引用
QComboBox* getDroneSelector() const { return droneSelector_; }
QLabel* getVideoInfoLabel() const { return videoInfoLabel_; }
QLabel* getDetectionTargets() const { return detectionTargets_; }
QLabel* getDetectionTargetObject() const { return detectionTargetObject_; }
QLabel* getDetectionAccuracy() const { return detectionAccuracy_; }
QLabel* getDetectionTime() const { return detectionTime_; }
signals:
void droneSelectionChanged(int index);
private slots:
void onDroneSelectionChanged();
private:
void setupUI();
void setupVideoArea();
void setupControlBar();
void setupDetectionDialog();
void setupDroneSelector();
// 创建UI组件的辅助方法
QWidget* createDroneSelectorWidget();
QWidget* createControlBarWidget();
QWidget* createDetectionDialogWidget();
QWidget* createTargetInfoWidget();
QWidget* createTargetObjectInfoWidget();
QWidget* createAccuracyInfoWidget();
QWidget* createTimeInfoWidget();
// UI组件
QComboBox* droneSelector_;
QLabel* videoInfoLabel_;
QFrame* videoArea_;
// 检测信息组件
QLabel* detectionTargets_;
QLabel* detectionTargetObject_;
QLabel* detectionAccuracy_;
QLabel* detectionTime_;
// 控制按钮
QPushButton* playBtn_;
QPushButton* pauseBtn_;
QPushButton* captureBtn_;
QPushButton* recordBtn_;
QPushButton* stopBtn_;
QPushButton* selectBtn_;
QPushButton* clickBtn_;
QPushButton* controlBtn_;
// 添加基字体大小和初始宽度
int baseFontSize_ = 10;
int initialWidth_ = 800;
};
#endif // VIDEOPAGE_H

@ -0,0 +1,109 @@
#include "visionmodelpage.h"
#include <QDebug>
/**
*
*
*/
VisionModelPage::VisionModelPage(QWidget* parent)
: QWidget(parent)
, inputEdit_(nullptr)
, runBtn_(nullptr)
, canvas_(nullptr)
// 初始化基大小
, baseFontSize_(10)
, initialWidth_(800)
{
setupUI();
}
VisionModelPage::~VisionModelPage() {
// Qt会自动清理子对象
}
void VisionModelPage::setupUI() {
auto* mainLayout = new QVBoxLayout(this);
mainLayout->setSpacing(8);
mainLayout->setContentsMargins(0, 0, 0, 0);
// 标题
auto* title = new QLabel("视觉模型");
title->setProperty("class", "section");
mainLayout->addWidget(title);
// 输入区域
setupInputArea();
mainLayout->addWidget(createInputAreaWidget());
// 画布区域
setupCanvas();
mainLayout->addWidget(canvas_, 1);
}
void VisionModelPage::setupInputArea() {
// 输入区域设置
}
QWidget* VisionModelPage::createInputAreaWidget() {
auto* top = new QWidget(this);
auto* layout = new QHBoxLayout(top);
layout->setContentsMargins(0, 0, 0, 0);
inputEdit_ = new QLineEdit();
inputEdit_->setPlaceholderText("输入检测目标或模型路径...");
connect(inputEdit_, &QLineEdit::textChanged, this, &VisionModelPage::onInputChanged);
layout->addWidget(inputEdit_, 1);
runBtn_ = new QPushButton("运行");
runBtn_->setProperty("primary", true);
connect(runBtn_, &QPushButton::clicked, this, &VisionModelPage::onRunClicked);
layout->addWidget(runBtn_);
return top;
}
void VisionModelPage::setupCanvas() {
canvas_ = new QFrame(this);
canvas_->setMinimumHeight(520);
canvas_->setStyleSheet("QFrame{background:#f8f9fa; border:1px solid #dee2e6; border-radius:8px;}");
}
void VisionModelPage::onRunClicked() {
QString input = inputEdit_->text();
if (!input.isEmpty()) {
emit modelRunRequested(input);
qDebug() << "运行视觉模型,输入:" << input;
}
}
// 添加resizeEvent实现
void VisionModelPage::resizeEvent(QResizeEvent *event) {
QWidget::resizeEvent(event);
float scale = static_cast<float>(width()) / initialWidth_;
QFont font = this->font();
font.setPointSizeF(baseFontSize_ * scale);
if (inputEdit_) {
inputEdit_->setFont(font);
inputEdit_->setMinimumHeight(static_cast<int>(30 * scale));
inputEdit_->setMinimumWidth(static_cast<int>(300 * scale)); // 增加宽度
}
if (runBtn_) {
runBtn_->setFont(font);
runBtn_->setMinimumHeight(static_cast<int>(30 * scale));
runBtn_->setMinimumWidth(static_cast<int>(120 * scale)); // 增加宽度
}
qDebug() << "VisionModelPage resized with scale:" << scale;
}
void VisionModelPage::onInputChanged() {
QString input = inputEdit_->text();
runBtn_->setEnabled(!input.isEmpty());
}

@ -0,0 +1,57 @@
#ifndef VISIONMODELPAGE_H
#define VISIONMODELPAGE_H
#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QFrame>
#include <QHBoxLayout>
#include <QVBoxLayout>
/**
*
*
*/
class VisionModelPage : public QWidget {
Q_OBJECT
public:
explicit VisionModelPage(QWidget* parent = nullptr);
~VisionModelPage();
// 获取组件引用
QLineEdit* getInputEdit() const { return inputEdit_; }
QPushButton* getRunBtn() const { return runBtn_; }
QFrame* getCanvas() const { return canvas_; }
protected:
void resizeEvent(QResizeEvent *event) override;
signals:
void modelRunRequested(const QString& input);
void modelStopRequested();
private slots:
void onRunClicked();
void onInputChanged();
private:
void setupUI();
void setupInputArea();
void setupCanvas();
// 创建UI组件的辅助方法
QWidget* createInputAreaWidget();
// UI组件
QLineEdit* inputEdit_;
QPushButton* runBtn_;
QFrame* canvas_;
// 添加基大小
int baseFontSize_ = 10;
int initialWidth_ = 800;
};
#endif // VISIONMODELPAGE_H

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<!-- 预留资源入口:图标/样式等,可后续补充,如 icons/app.png -->
</qresource>
</RCC>

@ -0,0 +1,680 @@
#include "mainwindow.h"
#include "../models/dronedata.h"
#include "../models/detectiondata.h"
#include "../pages/videopage.h"
#include "../pages/mappage.h"
#include "../pages/datapage.h"
#include "../pages/visionmodelpage.h"
#include "../utils/stylehelper.h"
#include <QApplication>
#include <QStackedWidget>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QToolButton>
#include <QPushButton>
#include <QLabel>
#include <QGroupBox>
#include <QFrame>
#include <QLineEdit>
#include <QComboBox>
#include <QSpacerItem>
#include <QProgressBar>
#include <QGraphicsDropShadowEffect>
#include <QDebug> // Added for qDebug
#include <QScrollArea> // Added for QScrollArea
// 添加TaskDecisionPage包含
#include "../pages/taskdecisionpage.h"
// 在文件顶部添加extern声明
// extern DroneManager* globalDroneManager;
// extern DetectionData* globalDetectionData;
// 改为定义
DroneManager* globalDroneManager = nullptr;
DetectionData* globalDetectionData = nullptr;
static QGroupBox* makeGroupBox(const QString& title, QWidget* inner) {
auto* gb = new QGroupBox(title);
auto* v = new QVBoxLayout(gb);
v->setContentsMargins(10,10,10,10);
v->addWidget(inner);
return gb;
}
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, droneManager_(new DroneManager(this))
, droneSelector_(nullptr)
, posXLabel_(nullptr), posYLabel_(nullptr), posZLabel_(nullptr)
, velXLabel_(nullptr), velYLabel_(nullptr), velZLabel_(nullptr)
, attRLabel_(nullptr), attPLabel_(nullptr), attYLabel_(nullptr)
, expXLabel_(nullptr), expYLabel_(nullptr), expZLabel_(nullptr)
, expVxLabel_(nullptr), expVyLabel_(nullptr), expVzLabel_(nullptr)
, videoInfoLabel_(nullptr)
, detectionTargets_(nullptr), detectionTargetObject_(nullptr), detectionAccuracy_(nullptr), detectionTime_(nullptr)
, detectionData_(new DetectionData(this))
// 初始化新成员
, baseFontSize_(10)
, initialWidth_(1200)
{
// 初始化无人机数据
initializeDrones();
// 顶部工具条
auto* header = buildHeader();
// 左侧侧边栏
auto* side = buildSideNav();
// 页面堆栈
pages_ = new QStackedWidget(this);
auto* pageMap = buildMapPage(); // 先地图
auto* pageVideo = buildVideoPage(); // 然后视频
auto* pageData = buildDataPage();
auto* pageTask = buildTaskDecisionPage(); // 新页面
auto* pageVision = buildVisionModelPage();
pages_->addWidget(pageMap);
pages_->addWidget(pageVideo);
pages_->addWidget(pageData);
pages_->addWidget(pageTask);
pages_->addWidget(pageVision);
// 右侧状态信息(两页共用静态占位)
rightPanel_ = buildRightStatusPanel();
rightPanel_->setMinimumWidth(260);
// 中间主体
auto* centerWidget = new QWidget(this);
auto* centerV = new QVBoxLayout(centerWidget);
centerV->setContentsMargins(8,8,8,8);
centerV->setSpacing(8);
centerV->addWidget(header);
auto* contentH = new QHBoxLayout();
contentH->setSpacing(8);
contentH->addWidget(side);
contentH->addWidget(pages_, 1);
contentH->addWidget(rightPanel_);
centerV->addLayout(contentH, 1);
setCentralWidget(centerWidget);
setWindowTitle("");
// 设置初始大小(用于缩放计算)
resize(1200, 800); // 假设初始大小,您可以调整
// 连接信号槽
connect(droneManager_, &DroneManager::currentDroneChanged,
this, &MainWindow::onCurrentDroneChanged);
// 连接检测数据信号
connect(detectionData_, &DetectionData::detectionUpdated,
this, &MainWindow::updateDetectionInfo);
// 启动检测模拟
// detectionData_->startSimulation();
globalDroneManager = droneManager_;
globalDetectionData = detectionData_;
// 连接信号到DataPage
DataPage* dataPage = qobject_cast<DataPage*>(pages_->widget(2));
if (dataPage) {
connect(droneManager_, &DroneManager::currentDroneChanged, dataPage, &DataPage::updateDroneInfo);
connect(detectionData_, &DetectionData::detectionUpdated, dataPage, &DataPage::updateTargetInfo);
}
}
// 增强resizeEvent来调整所有收集的组件
void MainWindow::resizeEvent(QResizeEvent *event) {
QMainWindow::resizeEvent(event);
// 移除所有设置以防止无限resize循环
// 只计算scale用于调试
float scale = static_cast<float>(width()) / initialWidth_;
qDebug() << "MainWindow resized with scale:" << scale;
}
QWidget* MainWindow::buildHeader() {
auto* w = new QWidget(this);
w->setObjectName(QString("headerBar"));
auto* h = new QHBoxLayout(w);
h->setContentsMargins(10,6,10,6);
h->setSpacing(12);
auto* logo = new QLabel("基于无人机的察打一体地面指挥端");
logo->setStyleSheet("font-weight:bold; font-size:16px;");
h->addWidget(logo);
h->addSpacing(20);
h->addStretch(1);
// 在buildHeader中收集头部按钮
for (auto text : {"连接设置"}) {
auto* b = new QPushButton(text);
b->setProperty("primary", true);
h->addWidget(b);
headerButtons_.append(b);
}
auto* rec = new QLabel(" ");
rec->setFixedSize(14,14);
rec->setObjectName(QString("recLed"));
h->addWidget(rec);
// 阴影
auto* shadow = new QGraphicsDropShadowEffect(w);
shadow->setBlurRadius(18);
shadow->setOffset(0, 2);
shadow->setColor(QColor(0,0,0,30));
w->setGraphicsEffect(shadow);
return w;
}
QWidget* MainWindow::buildSideNav() {
auto* side = new QWidget(this);
// side->setFixedWidth(76); // 移除固定宽度,让它可调整
side->setObjectName(QString("sideNav"));
auto* v = new QVBoxLayout(side);
v->setContentsMargins(6,8,6,8);
v->setSpacing(10);
// 在buildSideNav中收集侧边栏按钮
auto makeBtn = [&](const QString& text, auto slot){
auto* b = new QToolButton();
b->setText(text);
b->setToolButtonStyle(Qt::ToolButtonTextOnly);
b->setFixedHeight(48);
connect(b, &QToolButton::clicked, this, slot);
v->addWidget(b);
sideNavButtons_.append(b); // 添加到列表
};
// 在buildSideNav中调整槽连接以交换内容
makeBtn("视频监控", &MainWindow::showMapPage); // 显示原地图内容
makeBtn("地图监控", &MainWindow::showVideoPage); // 显示原视频内容
makeBtn("数据监控", &MainWindow::showDataPage);
makeBtn("任务决策", &MainWindow::showTaskDecisionPage);
makeBtn("视觉模型", &MainWindow::showVisionModelPage);
v->addStretch(1);
auto* shadow = new QGraphicsDropShadowEffect(side);
shadow->setBlurRadius(18);
shadow->setOffset(0, 2);
shadow->setColor(QColor(0,0,0,24));
side->setGraphicsEffect(shadow);
return side;
}
QWidget* MainWindow::buildVideoPage() {
// 左图风格:中间大区域 + 底部控制条
auto* page = new QWidget(this);
auto* v = new QVBoxLayout(page);
v->setSpacing(8);
v->setContentsMargins(0,0,0,0);
// 顶部无人机选择区域
auto* topBar = new QWidget(page);
auto* th = new QHBoxLayout(topBar);
th->setContentsMargins(0,0,0,0);
th->setSpacing(12);
auto* droneLabel = new QLabel("选择无人机:");
droneLabel->setStyleSheet("font-weight:bold;");
th->addWidget(droneLabel);
droneSelector_ = new QComboBox(page);
droneSelector_->setFixedWidth(150);
droneSelector_->setObjectName("droneSelector");
// 从无人机管理器获取无人机列表
QStringList droneIds = droneManager_->getDroneIds();
for (const QString& id : droneIds) {
DroneData* drone = droneManager_->getDrone(id);
if (drone) {
droneSelector_->addItem(drone->getName(), id);
}
}
// 连接选择变化信号
connect(droneSelector_, QOverload<int>::of(&QComboBox::currentIndexChanged),
this, &MainWindow::onDroneSelectionChanged);
th->addWidget(droneSelector_);
th->addStretch(1);
// 连接状态指示器
auto* statusLabel = new QLabel("● 已连接");
statusLabel->setStyleSheet("color:#4caf50; font-weight:bold;");
th->addWidget(statusLabel);
v->addWidget(topBar);
// 中间黑色占位(视频/地图区域)
auto* center = new QFrame(page);
center->setStyleSheet("QFrame{background:#2b2b2b; border:1px solid #444;}");
center->setMinimumHeight(520);
// 在视频区域添加当前无人机信息显示
videoInfoLabel_ = new QLabel("当前监控: 无人机-001");
videoInfoLabel_->setStyleSheet("color:#ffffff; font-size:16px; font-weight:bold; background:rgba(0,0,0,0.3); padding:8px; border-radius:4px;");
videoInfoLabel_->setAlignment(Qt::AlignCenter);
videoInfoLabel_->setObjectName("videoInfoLabel");
// 将信息标签添加到视频区域中心
auto* centerLayout = new QVBoxLayout(center);
centerLayout->setContentsMargins(0,0,0,0);
centerLayout->addStretch(1);
centerLayout->addWidget(videoInfoLabel_);
centerLayout->addStretch(1);
// 底部条(交换为原地图页的播放控制)
auto* bottom = new QWidget(page);
auto* bh = new QHBoxLayout(bottom);
bh->setContentsMargins(0,0,0,0);
for (auto text : {"播放", "暂停", "拍照(T)", "录像(R)", "停止", "框选", "点击", "手动控制"}) {
bh->addWidget(new QPushButton(text));
}
bh->addStretch(1);
// 检测信息对话框
auto* detectionDialog = new QFrame(page);
detectionDialog->setStyleSheet("QFrame{background:#f8f9fa; border:1px solid #dee2e6; border-radius:8px; margin:4px;}");
detectionDialog->setMaximumHeight(120);
auto* detectionLayout = new QVBoxLayout(detectionDialog);
detectionLayout->setContentsMargins(12,8,12,8);
detectionLayout->setSpacing(6);
// 检测信息标题
auto* detectionTitle = new QLabel("实时检测信息");
detectionTitle->setStyleSheet("font-weight:bold; color:#495057; font-size:14px;");
detectionLayout->addWidget(detectionTitle);
// 检测信息内容区域
auto* detectionContent = new QWidget();
auto* contentLayout = new QHBoxLayout(detectionContent);
contentLayout->setContentsMargins(0,0,0,0);
contentLayout->setSpacing(20);
// 检测目标信息
auto* targetInfo = new QWidget();
auto* targetLayout = new QVBoxLayout(targetInfo);
targetLayout->setContentsMargins(0,0,0,0);
targetLayout->setSpacing(4);
auto* targetLabel = new QLabel("检测目标:");
targetLabel->setStyleSheet("font-weight:bold; color:#6c757d;");
detectionTargets_ = new QLabel("人员 × 3, 车辆 × 2");
detectionTargets_->setStyleSheet("color:#28a745; font-weight:bold;");
detectionTargets_->setObjectName("detectionTargets");
targetLayout->addWidget(targetLabel);
targetLayout->addWidget(detectionTargets_);
// 目标对象信息
auto* targetObjectInfo = new QWidget();
auto* targetObjectLayout = new QVBoxLayout(targetObjectInfo);
targetObjectLayout->setContentsMargins(0,0,0,0);
targetObjectLayout->setSpacing(4);
auto* targetObjectLabel = new QLabel("是否为目标对象:");
targetObjectLabel->setStyleSheet("font-weight:bold; color:#6c757d;");
detectionTargetObject_ = new QLabel("● 是");
detectionTargetObject_->setStyleSheet("color:#28a745; font-weight:bold;");
detectionTargetObject_->setObjectName("detectionTargetObject");
targetObjectLayout->addWidget(targetObjectLabel);
targetObjectLayout->addWidget(detectionTargetObject_);
// 检测精度信息
auto* accuracyInfo = new QWidget();
auto* accuracyLayout = new QVBoxLayout(accuracyInfo);
accuracyLayout->setContentsMargins(0,0,0,0);
accuracyLayout->setSpacing(4);
auto* accuracyLabel = new QLabel("检测精度:");
accuracyLabel->setStyleSheet("font-weight:bold; color:#6c757d;");
detectionAccuracy_ = new QLabel("95.2%");
detectionAccuracy_->setStyleSheet("color:#fd7e14; font-weight:bold;");
detectionAccuracy_->setObjectName("detectionAccuracy");
accuracyLayout->addWidget(accuracyLabel);
accuracyLayout->addWidget(detectionAccuracy_);
// 检测时间信息
auto* timeInfo = new QWidget();
auto* timeLayout = new QVBoxLayout(timeInfo);
timeLayout->setContentsMargins(0,0,0,0);
timeLayout->setSpacing(4);
auto* timeLabel = new QLabel("最后更新:");
timeLabel->setStyleSheet("font-weight:bold; color:#6c757d;");
detectionTime_ = new QLabel("2024-01-15 14:32:15");
detectionTime_->setStyleSheet("color:#6c757d;");
detectionTime_->setObjectName("detectionTime");
timeLayout->addWidget(timeLabel);
timeLayout->addWidget(detectionTime_);
contentLayout->addWidget(targetInfo);
contentLayout->addWidget(targetObjectInfo);
contentLayout->addWidget(accuracyInfo);
contentLayout->addWidget(timeInfo);
contentLayout->addStretch(1);
detectionLayout->addWidget(detectionContent);
v->addWidget(center, 1);
v->addWidget(bottom);
v->addWidget(detectionDialog);
return page;
}
QWidget* MainWindow::buildMapPage() {
return new MapPage(this);
}
QWidget* MainWindow::buildRightStatusPanel() {
auto* panel = new QWidget(this);
panel->setObjectName(QString("rightPanel"));
auto* v = new QVBoxLayout(panel);
v->setSpacing(8);
v->setContentsMargins(0,0,0,0);
// 基本信息 / GPS信息 标签页视觉(简化为两个分组)
auto makeKV = [this](const QString& k, QLabel** labelRef) {
auto* row = new QWidget();
auto* h = new QHBoxLayout(row);
h->setContentsMargins(0,0,0,0);
h->addWidget(new QLabel(k));
auto* val = new QLabel("0.00");
val->setAlignment(Qt::AlignRight);
*labelRef = val; // 保存标签引用
h->addWidget(val);
return row;
};
auto* baseInfo = new QWidget();
auto* bi = new QVBoxLayout(baseInfo);
bi->setContentsMargins(0,0,0,0);
bi->addWidget(new QLabel("位置[x y z] [m]"));
bi->addWidget(makeKV("x:", &posXLabel_));
bi->addWidget(makeKV("y:", &posYLabel_));
bi->addWidget(makeKV("z:", &posZLabel_));
bi->addSpacing(6);
bi->addWidget(new QLabel("速度[x y z] [m/s]"));
bi->addWidget(makeKV("vx:", &velXLabel_));
bi->addWidget(makeKV("vy:", &velYLabel_));
bi->addWidget(makeKV("vz:", &velZLabel_));
bi->addSpacing(6);
bi->addWidget(new QLabel("姿态[r p y] [deg]"));
bi->addWidget(makeKV("r:", &attRLabel_));
bi->addWidget(makeKV("p:", &attPLabel_));
bi->addWidget(makeKV("y:", &attYLabel_));
v->addWidget(makeGroupBox("基本信息", baseInfo));
auto* expectInfo = new QWidget();
auto* ei = new QVBoxLayout(expectInfo);
ei->setContentsMargins(0,0,0,0);
ei->addWidget(new QLabel("期望位置[x y z] [m]"));
ei->addWidget(makeKV("ex:", &expXLabel_));
ei->addWidget(makeKV("ey:", &expYLabel_));
ei->addWidget(makeKV("ez:", &expZLabel_));
ei->addSpacing(6);
ei->addWidget(new QLabel("期望速度[x y z] [m/s]"));
ei->addWidget(makeKV("evx:", &expVxLabel_));
ei->addWidget(makeKV("evy:", &expVyLabel_));
ei->addWidget(makeKV("evz:", &expVzLabel_));
v->addWidget(makeGroupBox("期望信息", expectInfo));
// 右侧按钮区域(当前悬停等)
auto* act = new QWidget();
auto* av = new QVBoxLayout(act);
for (auto text : {"当前点悬停", "初始化悬停", "删除"}) {
auto* b = new QPushButton(text);
b->setProperty("primary", true);
av->addWidget(b);
rightPanelButtons_.append(b); // 添加到列表
}
av->addSpacing(8);
auto* mode = new QComboBox();
mode->addItems({"XYZ_POS", "XYZ_POS_YAW", "VEL", "ACC"});
av->addWidget(mode);
rightPanelModeCombo_ = mode; // 保存引用
for (auto k : {"x [m]", "y [m]", "z [m]", "yaw [deg]"}) {
auto* e = new QLineEdit();
e->setPlaceholderText(k);
av->addWidget(e);
rightPanelInputs_.append(e); // 添加到列表
}
auto* upload = new QPushButton("上传");
upload->setProperty("primary", true);
av->addWidget(upload);
rightPanelButtons_.append(upload); // 添加到列表
av->addStretch(1);
// 阴影
auto* shadow = new QGraphicsDropShadowEffect(panel);
shadow->setBlurRadius(18);
shadow->setOffset(0, 2);
shadow->setColor(QColor(0,0,0,16));
panel->setGraphicsEffect(shadow);
// 使用QScrollArea包裹act以防溢出
auto* scrollArea = new QScrollArea(panel);
scrollArea->setWidgetResizable(true);
scrollArea->setWidget(act);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
v->addWidget(scrollArea, 1); // 替换原v->addWidget(act);
return panel;
}
void MainWindow::showVideoPage() { pages_->setCurrentIndex(0); }
void MainWindow::showMapPage() { pages_->setCurrentIndex(1); }
void MainWindow::showDataPage() { pages_->setCurrentIndex(2); }
void MainWindow::showTaskDecisionPage() { pages_->setCurrentIndex(3); }
void MainWindow::showVisionModelPage() { pages_->setCurrentIndex(4); }
QWidget* MainWindow::buildDataPage() {
return new DataPage(this); // 使用DataPage类
}
QWidget* MainWindow::buildVisionModelPage() {
auto* page = new QWidget(this);
auto* v = new QVBoxLayout(page);
v->setSpacing(8);
v->setContentsMargins(0,0,0,0);
auto* title = new QLabel("视觉模型");
title->setProperty("class", "section");
v->addWidget(title);
auto* top = new QWidget(page);
auto* th = new QHBoxLayout(top);
th->setContentsMargins(0,0,0,0);
auto* input = new QLineEdit();
input->setPlaceholderText("输入检测目标或模型路径...");
auto* runBtn = new QPushButton("运行");
runBtn->setProperty("primary", true);
th->addWidget(input, 1);
th->addWidget(runBtn);
v->addWidget(top);
auto* canvas = new QFrame(page);
canvas->setMinimumHeight(520);
v->addWidget(canvas, 1);
return page;
}
// 添加新页面构建函数(简单占位)
QWidget* MainWindow::buildTaskDecisionPage() {
return new TaskDecisionPage(this); // 使用新类
}
// 初始化无人机数据
void MainWindow::initializeDrones() {
// 添加4架无人机
droneManager_->addDrone("drone-001", "无人机-001");
droneManager_->addDrone("drone-002", "无人机-002");
droneManager_->addDrone("drone-003", "无人机-003");
droneManager_->addDrone("drone-004", "无人机-004");
// 设置第一架为当前选中
if (!droneManager_->getDroneIds().isEmpty()) {
droneManager_->setCurrentDrone(droneManager_->getDroneIds().first());
}
}
// 无人机选择变化处理
void MainWindow::onDroneSelectionChanged() {
if (!droneSelector_) return;
int index = droneSelector_->currentIndex();
if (index >= 0) {
QString droneId = droneSelector_->itemData(index).toString();
droneManager_->setCurrentDrone(droneId);
}
}
// 当前无人机变化处理
void MainWindow::onCurrentDroneChanged(const QString& droneId) {
if (!droneSelector_) return;
// 更新下拉框选择
for (int i = 0; i < droneSelector_->count(); ++i) {
if (droneSelector_->itemData(i).toString() == droneId) {
droneSelector_->setCurrentIndex(i);
break;
}
}
// 连接当前无人机的数据更新信号
DroneData* currentDrone = droneManager_->getCurrentDrone();
if (currentDrone) {
connect(currentDrone, &DroneData::dataChanged,
this, &MainWindow::updateDroneStatus, Qt::UniqueConnection);
updateDroneStatus(); // 立即更新一次
}
}
// 更新无人机状态显示
void MainWindow::updateDroneStatus() {
DroneData* currentDrone = droneManager_->getCurrentDrone();
if (!currentDrone) return;
// 更新视频区域显示信息
if (videoInfoLabel_) {
videoInfoLabel_->setText(QString("当前监控: %1").arg(currentDrone->getName()));
}
// 更新位置信息
QVector3D pos = currentDrone->getPosition();
if (posXLabel_) posXLabel_->setText(QString::number(pos.x(), 'f', 2));
if (posYLabel_) posYLabel_->setText(QString::number(pos.y(), 'f', 2));
if (posZLabel_) posZLabel_->setText(QString::number(pos.z(), 'f', 2));
// 更新速度信息
QVector3D vel = currentDrone->getVelocity();
if (velXLabel_) velXLabel_->setText(QString::number(vel.x(), 'f', 2));
if (velYLabel_) velYLabel_->setText(QString::number(vel.y(), 'f', 2));
if (velZLabel_) velZLabel_->setText(QString::number(vel.z(), 'f', 2));
// 更新姿态信息
QVector3D att = currentDrone->getAttitude();
if (attRLabel_) attRLabel_->setText(QString::number(att.x(), 'f', 2));
if (attPLabel_) attPLabel_->setText(QString::number(att.y(), 'f', 2));
if (attYLabel_) attYLabel_->setText(QString::number(att.z(), 'f', 2));
// 更新期望位置信息
QVector3D expPos = currentDrone->getExpectedPosition();
if (expXLabel_) expXLabel_->setText(QString::number(expPos.x(), 'f', 2));
if (expYLabel_) expYLabel_->setText(QString::number(expPos.y(), 'f', 2));
if (expZLabel_) expZLabel_->setText(QString::number(expPos.z(), 'f', 2));
// 更新期望速度信息
QVector3D expVel = currentDrone->getExpectedVelocity();
if (expVxLabel_) expVxLabel_->setText(QString::number(expVel.x(), 'f', 2));
if (expVyLabel_) expVyLabel_->setText(QString::number(expVel.y(), 'f', 2));
if (expVzLabel_) expVzLabel_->setText(QString::number(expVel.z(), 'f', 2));
}
// 更新检测信息显示
void MainWindow::updateDetectionInfo() {
if (!detectionData_) return;
// 更新检测目标信息
if (detectionTargets_) {
QVector<DetectionTarget> targets = detectionData_->getTargets();
QStringList targetCounts;
// 统计各类型目标数量
QMap<QString, int> typeCount;
for (const auto& target : targets) {
typeCount[target.type]++;
}
// 生成目标描述文本
for (auto it = typeCount.begin(); it != typeCount.end(); ++it) {
targetCounts.append(QString("%1 × %2").arg(it.key()).arg(it.value()));
}
if (targetCounts.isEmpty()) {
detectionTargets_->setText("无检测目标");
detectionTargets_->setStyleSheet("color:#6c757d; font-weight:bold;");
} else {
detectionTargets_->setText(targetCounts.join(", "));
detectionTargets_->setStyleSheet("color:#28a745; font-weight:bold;");
}
}
// 更新目标对象信息
if (detectionTargetObject_) {
QVector<DetectionTarget> targets = detectionData_->getTargets();
bool hasTargets = !targets.isEmpty();
if (hasTargets) {
detectionTargetObject_->setText("● 是");
detectionTargetObject_->setStyleSheet("color:#28a745; font-weight:bold;");
} else {
detectionTargetObject_->setText("● 否");
detectionTargetObject_->setStyleSheet("color:#6c757d; font-weight:bold;");
}
}
// 更新检测精度
if (detectionAccuracy_) {
float accuracy = detectionData_->getAccuracy();
detectionAccuracy_->setText(QString("%1%").arg(accuracy, 0, 'f', 1));
// 根据精度设置颜色
QString color;
if (accuracy >= 90.0f) {
color = "#28a745";
} else if (accuracy >= 80.0f) {
color = "#fd7e14";
} else {
color = "#dc3545";
}
detectionAccuracy_->setStyleSheet(QString("color:%1; font-weight:bold;").arg(color));
}
// 更新最后更新时间
if (detectionTime_) {
QDateTime lastUpdate = detectionData_->getLastUpdate();
detectionTime_->setText(lastUpdate.toString("yyyy-MM-dd hh:mm:ss"));
}
}

@ -0,0 +1,92 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "../models/dronedata.h"
#include "../models/detectiondata.h"
// 添加缺失的包含
#include <QList>
#include <QToolButton>
#include <QLineEdit>
#include "../pages/visionmodelpage.h"
#include "../utils/stylehelper.h"
// 添加TaskDecisionPage包含
#include "../pages/taskdecisionpage.h"
class QStackedWidget;
class QPushButton;
class QLabel;
class QGroupBox;
class QComboBox;
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
protected:
void resizeEvent(QResizeEvent *event) override;
private:
QWidget* buildHeader();
QWidget* buildSideNav();
QWidget* buildVideoPage(); // "视频监控"样式页(左图所示)
QWidget* buildMapPage(); // "地图监控/消息反馈"样式页(右图所示)
QWidget* buildDataPage(); // 数据监控:信息栏
QWidget* buildVisionModelPage(); // 视觉模型:顶部输入框
QWidget* buildRightStatusPanel(); // 右侧信息栏(两页共用)
QWidget* buildTaskDecisionPage(); // 任务决策页面
void initializeDrones(); // 初始化无人机数据
private slots:
void showVideoPage();
void showMapPage();
void showDataPage();
void showVisionModelPage();
void showTaskDecisionPage();
void onDroneSelectionChanged();
void onCurrentDroneChanged(const QString& droneId);
void updateDroneStatus();
void updateDetectionInfo();
private:
QStackedWidget* pages_;
QWidget* rightPanel_;
DroneManager* droneManager_;
QComboBox* droneSelector_;
// 右侧面板的标签引用,用于动态更新
QLabel* posXLabel_, *posYLabel_, *posZLabel_;
QLabel* velXLabel_, *velYLabel_, *velZLabel_;
QLabel* attRLabel_, *attPLabel_, *attYLabel_;
QLabel* expXLabel_, *expYLabel_, *expZLabel_;
QLabel* expVxLabel_, *expVyLabel_, *expVzLabel_;
// 视频区域信息标签
QLabel* videoInfoLabel_;
// 检测信息标签引用
QLabel* detectionTargets_;
QLabel* detectionTargetObject_;
QLabel* detectionAccuracy_;
QLabel* detectionTime_;
// 检测数据模型
DetectionData* detectionData_;
// 添加成员来存储需要缩放的组件
QList<QToolButton*> sideNavButtons_;
QList<QPushButton*> headerButtons_;
QList<QPushButton*> rightPanelButtons_;
QList<QLineEdit*> rightPanelInputs_;
QComboBox* rightPanelModeCombo_;
// 添加基字体大小和初始宽度
int baseFontSize_ = 10;
int initialWidth_ = 1200;
};
#endif // MAINWINDOW_H

@ -0,0 +1,29 @@
#include "config.h"
#include <QSettings>
#include <QDir>
AppConfig& AppConfig::instance() {
static AppConfig cfg;
return cfg;
}
void AppConfig::load() {
const QString configDir = QDir::homePath() + "/.drone_project";
QDir().mkpath(configDir);
const QString iniPath = configDir + "/app.ini";
QSettings s(iniPath, QSettings::IniFormat);
amapKey_ = s.value("amap/api_key", QStringLiteral("")).toString();
if (amapKey_.isEmpty()) {
// 提供一个安全的占位,提示用户自行配置
amapKey_ = QStringLiteral("YOUR_AMAP_API_KEY");
s.setValue("amap/api_key", amapKey_);
}
logLevel_ = s.value("log/level", QStringLiteral("info")).toString();
}
QString AppConfig::amapApiKey() const { return amapKey_; }
QString AppConfig::logLevel() const { return logLevel_; }

@ -0,0 +1,23 @@
#ifndef CONFIG_H
#define CONFIG_H
#include <QString>
class AppConfig {
public:
static AppConfig& instance();
void load();
QString amapApiKey() const;
QString logLevel() const;
private:
AppConfig() = default;
QString amapKey_;
QString logLevel_;
};
#endif // CONFIG_H

@ -0,0 +1,12 @@
#include "errorhandler.h"
#include <QMessageBox>
void ErrorHandler::showWarning(QWidget* parent, const QString& title, const QString& msg) {
QMessageBox::warning(parent, title, msg);
}
void ErrorHandler::showCritical(QWidget* parent, const QString& title, const QString& msg) {
QMessageBox::critical(parent, title, msg);
}

@ -0,0 +1,15 @@
#ifndef ERRORHANDLER_H
#define ERRORHANDLER_H
#include <QString>
#include <QWidget>
class ErrorHandler {
public:
static void showWarning(QWidget* parent, const QString& title, const QString& msg);
static void showCritical(QWidget* parent, const QString& title, const QString& msg);
};
#endif // ERRORHANDLER_H

@ -0,0 +1,24 @@
#include "logger.h"
#include "config.h"
#include <QLoggingCategory>
#include <QString>
Q_LOGGING_CATEGORY(logApp, "app")
Q_LOGGING_CATEGORY(logMap, "map")
void LoggerInit::setupFromConfig() {
AppConfig::instance().load();
const QString level = AppConfig::instance().logLevel().toLower();
QtMsgType minType = QtInfoMsg;
if (level == "debug") minType = QtDebugMsg;
else if (level == "warning") minType = QtWarningMsg;
else if (level == "critical") minType = QtCriticalMsg;
qSetMessagePattern("[%{time yyyy-MM-dd hh:mm:ss.zzz}] %{type} %{category}: %{message}");
QLoggingCategory::setFilterRules(QString(
"*.debug=%1\n*.info=true\n*.warning=true\n*.critical=true\n*.fatal=true"
).arg(minType <= QtDebugMsg ? "true" : "false"));
}

@ -0,0 +1,16 @@
#ifndef LOGGER_H
#define LOGGER_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(logApp)
Q_DECLARE_LOGGING_CATEGORY(logMap)
class LoggerInit {
public:
static void setupFromConfig();
};
#endif // LOGGER_H

@ -0,0 +1,119 @@
#include "stylehelper.h"
#include <QApplication>
/**
*
* UI
*/
QString StyleHelper::getGlobalStyleSheet() {
return R"(
*{font-family:'Segoe UI','PingFang SC','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;}
QWidget{background:#fafafa;color:#222;}
QGroupBox{border:1px solid #e0e0e0;border-radius:8px;margin-top:8px;padding-top:12px;}
QGroupBox::title{subcontrol-origin: margin;left:10px;padding:0 6px;color:#111;font-weight:bold;}
QFrame{background:white;border:1px solid #e6e6e6;border-radius:8px;}
#headerBar{background:#ffffff;border:1px solid #e6e6e6;border-radius:10px;}
#sideNav{background:#ffffff;border:1px solid #e6e6e6;border-radius:10px;}
#rightPanel{background:transparent;}
QToolButton{background:#ffffff;border:1px solid #e6e6e6;border-radius:8px;padding:6px;}
QToolButton:hover{background:#f2f7ff;border-color:#d0dcff;}
QPushButton{background:#ffffff;border:1px solid #d9d9d9;border-radius:8px;padding:6px 10px;}
QPushButton:hover{background:#f8f8f8;border-color:#c8c8c8;}
QPushButton:pressed{background:#f0f0f0;}
QPushButton[primary='true']{background:#2979ff;color:#fff;border:1px solid #1f6ae6;}
QPushButton[primary='true']:hover{background:#1565c0;border-color:#155bb0;}
QLabel.section{font-weight:bold;padding:4px 0;}
QLineEdit,QComboBox{background:#ffffff;border:1px solid #d9d9d9;border-radius:6px;padding:4px 6px;}
QComboBox QAbstractItemView{border:1px solid #d9d9d9;background:#ffffff;selection-background-color:#e8f0ff;}
#recLed{background:#e33;border-radius:7px;}
)";
}
QString StyleHelper::getButtonStyle(const QString& type) {
if (type == "primary") {
return "QPushButton{background:#2979ff;color:#fff;border:1px solid #1f6ae6;border-radius:8px;padding:6px 10px;}"
"QPushButton:hover{background:#1565c0;border-color:#155bb0;}";
} else if (type == "success") {
return "QPushButton{background:#28a745;color:#fff;border:1px solid #1e7e34;border-radius:8px;padding:6px 10px;}"
"QPushButton:hover{background:#1e7e34;border-color:#1c7430;}";
} else if (type == "warning") {
return "QPushButton{background:#fd7e14;color:#fff;border:1px solid #e55a00;border-radius:8px;padding:6px 10px;}"
"QPushButton:hover{background:#e55a00;border-color:#d35400;}";
} else if (type == "danger") {
return "QPushButton{background:#dc3545;color:#fff;border:1px solid #c82333;border-radius:8px;padding:6px 10px;}"
"QPushButton:hover{background:#c82333;border-color:#bd2130;}";
} else {
return "QPushButton{background:#ffffff;border:1px solid #d9d9d9;border-radius:8px;padding:6px 10px;}"
"QPushButton:hover{background:#f8f8f8;border-color:#c8c8c8;}"
"QPushButton:pressed{background:#f0f0f0;}";
}
}
QString StyleHelper::getGroupBoxStyle() {
return "QGroupBox{border:1px solid #e0e0e0;border-radius:8px;margin-top:8px;padding-top:12px;}"
"QGroupBox::title{subcontrol-origin: margin;left:10px;padding:0 6px;color:#111;font-weight:bold;}";
}
QString StyleHelper::getFrameStyle() {
return "QFrame{background:white;border:1px solid #e6e6e6;border-radius:8px;}";
}
QString StyleHelper::getLabelStyle(const QString& type) {
if (type == "title") {
return "QLabel{font-weight:bold;font-size:16px;color:#111;}";
} else if (type == "section") {
return "QLabel{font-weight:bold;padding:4px 0;color:#495057;}";
} else if (type == "success") {
return "QLabel{color:#28a745;font-weight:bold;}";
} else if (type == "warning") {
return "QLabel{color:#fd7e14;font-weight:bold;}";
} else if (type == "danger") {
return "QLabel{color:#dc3545;font-weight:bold;}";
} else if (type == "info") {
return "QLabel{color:#17a2b8;font-weight:bold;}";
} else {
return "QLabel{color:#6c757d;}";
}
}
void StyleHelper::applyStyle(QWidget* widget, const QString& style) {
widget->setStyleSheet(style);
}
QString StyleHelper::getPrimaryColor() {
return "#2979ff";
}
QString StyleHelper::getSecondaryColor() {
return "#6c757d";
}
QString StyleHelper::getSuccessColor() {
return "#28a745";
}
QString StyleHelper::getWarningColor() {
return "#fd7e14";
}
QString StyleHelper::getErrorColor() {
return "#dc3545";
}
QString StyleHelper::getInfoColor() {
return "#17a2b8";
}
int StyleHelper::getBorderRadius() {
return 8;
}
int StyleHelper::getPadding() {
return 6;
}
int StyleHelper::getMargin() {
return 8;
}

@ -0,0 +1,40 @@
#ifndef STYLEHELPER_H
#define STYLEHELPER_H
#include <QString>
#include <QWidget>
/**
*
* UI
*/
class StyleHelper {
public:
// 获取全局样式表
static QString getGlobalStyleSheet();
// 获取组件特定样式
static QString getButtonStyle(const QString& type = "default");
static QString getGroupBoxStyle();
static QString getFrameStyle();
static QString getLabelStyle(const QString& type = "default");
// 应用样式到组件
static void applyStyle(QWidget* widget, const QString& style);
// 颜色主题
static QString getPrimaryColor();
static QString getSecondaryColor();
static QString getSuccessColor();
static QString getWarningColor();
static QString getErrorColor();
static QString getInfoColor();
// 尺寸常量
static int getBorderRadius();
static int getPadding();
static int getMargin();
};
#endif // STYLEHELPER_H
Loading…
Cancel
Save