@ -0,0 +1,44 @@
|
||||
QT += core gui
|
||||
QT += core gui quickwidgets positioning location
|
||||
QT += multimedia
|
||||
QT += multimediawidgets
|
||||
QT += webenginewidgets webchannel
|
||||
QT += sql
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++17
|
||||
|
||||
# You can make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
DogDatabase.cpp \
|
||||
InjuryAnalysisUI.cpp \
|
||||
InjuryDatabase.cpp \
|
||||
UAVDatabase.cpp \
|
||||
injurydisiplayui.cpp \
|
||||
main.cpp \
|
||||
guidingui.cpp
|
||||
|
||||
HEADERS += \
|
||||
DogDatabase.h \
|
||||
InjuryAnalysisUI.h \
|
||||
InjuryDatabase.h \
|
||||
UAVDatabase.h \
|
||||
guidingui.h \
|
||||
injurydisiplayui.h
|
||||
|
||||
FORMS += \
|
||||
InjuryAnalysisUI.ui \
|
||||
guidingui.ui \
|
||||
injurydisiplayui.ui
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
RESOURCES += \
|
||||
res.qrc
|
@ -0,0 +1,268 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 13.0.0, 2024-05-17T08:33:35. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{c17bc554-7aa8-48e6-9607-c4ecd694950b}</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.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</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.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>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<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 6.7.0 MSVC2019 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.7.0 MSVC2019 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.670.win64_msvc2019_64_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</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">D:\PROJECT\QT\CasualtySightPlus\build\Desktop_Qt_6_7_0_MSVC2019_64bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/PROJECT/QT/CasualtySightPlus/build/Desktop_Qt_6_7_0_MSVC2019_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">D:\PROJECT\QT\CasualtySightPlus\build\Desktop_Qt_6_7_0_MSVC2019_64bit-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/PROJECT/QT/CasualtySightPlus/build/Desktop_Qt_6_7_0_MSVC2019_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">D:\PROJECT\QT\CasualtySightPlus\build\Desktop_Qt_6_7_0_MSVC2019_64bit-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/PROJECT/QT/CasualtySightPlus/build/Desktop_Qt_6_7_0_MSVC2019_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:D:/PROJECT/QT/CasualtySightPlus/CasualtySightPlus.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/PROJECT/QT/CasualtySightPlus/CasualtySightPlus.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">D:/PROJECT/QT/CasualtySightPlus/build/Desktop_Qt_6_7_0_MSVC2019_64bit-Release</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,104 @@
|
||||
#ifndef DOGDATABASE_H
|
||||
#define DOGDATABASE_H
|
||||
|
||||
#include <QtSql>
|
||||
<<<<<<< HEAD:src/Client2/fly_land/DogDatabase.h
|
||||
#include <QWidget>
|
||||
#include <QSqlQuery>
|
||||
#include <QSqlDatabase>
|
||||
=======
|
||||
#include <QSqlDatabase>
|
||||
#include <QWidget>
|
||||
#include <QSqlQuery>
|
||||
>>>>>>> master:src/Client/DogDatabase.h
|
||||
#include <QString>
|
||||
#include <QSqlRecord>
|
||||
#include <QDebug>
|
||||
#include "UAVDatabase.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
struct Dog
|
||||
{
|
||||
QString id;
|
||||
int state;
|
||||
QString ip;
|
||||
int port;
|
||||
double lon;
|
||||
double lat;
|
||||
};
|
||||
|
||||
|
||||
class DogDatabase
|
||||
{
|
||||
// Q_OBJECT宏用于提供Qt信号槽和元对象系统服务
|
||||
// 它必须限定为私有访问权限
|
||||
//Q_OBJECT
|
||||
|
||||
public:
|
||||
static DogDatabase *getInstance();
|
||||
DogDatabase();
|
||||
~DogDatabase();
|
||||
|
||||
Dog data;
|
||||
|
||||
//返回状态信息
|
||||
int giveInfo(QString id);
|
||||
//添加数据记录
|
||||
bool add(const Dog &data);
|
||||
//查询位置信息数据
|
||||
Point ReturnUAVPosition( QString id);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
//打开
|
||||
bool open(const QString &dbName,const QString &userName = QString(),const QString &passwd = QString());
|
||||
//关闭
|
||||
void close();
|
||||
//开始添加字段
|
||||
void beginAddFiled(const QString &tableName);
|
||||
|
||||
//添加字段
|
||||
void addFiled(const QString &filedName);
|
||||
|
||||
//结束添加字段
|
||||
void endAddFiled();
|
||||
|
||||
//开始添加行
|
||||
void beginAddRow();
|
||||
|
||||
//添加字段值
|
||||
void addValue(const QVariant &value);
|
||||
|
||||
//结束添加行
|
||||
void endAddRow();
|
||||
|
||||
//执行
|
||||
bool exec(const QString &sql);
|
||||
|
||||
|
||||
private:
|
||||
//数据库
|
||||
QSqlDatabase m_sqlDb;
|
||||
|
||||
//表名
|
||||
QString m_tableName;
|
||||
|
||||
//字段名
|
||||
QStringList m_fieldName;
|
||||
|
||||
//头sql
|
||||
QString m_headerSql;
|
||||
|
||||
//值sql
|
||||
QString m_valueSql;
|
||||
|
||||
//已添加row数
|
||||
int m_fieldAdd = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DOGDATABASE_H
|
@ -0,0 +1,236 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>InjuryAnalysisUI</class>
|
||||
<widget class="QWidget" name="InjuryAnalysisUI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>679</width>
|
||||
<height>410</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(245, 245, 245);
|
||||
font: 11pt "Microsoft YaHei UI";</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>0</y>
|
||||
<width>215</width>
|
||||
<height>82</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>100</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/logo_backgroundless.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>伤情结果统计:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="AnalysisDialog" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>80</y>
|
||||
<width>631</width>
|
||||
<height>291</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton {
|
||||
background-color: rgba(15, 28, 34, 0);
|
||||
color: rgb(0, 0, 0);
|
||||
|
||||
border: none;
|
||||
|
||||
padding: 10px 20px; /* 设置内边距 */
|
||||
|
||||
border-radius: 5px; /* 设置按钮圆角 */
|
||||
|
||||
font-size: 14px; /* 设置文字大小 */
|
||||
|
||||
text-align: right; /* 设置字体向右对齐 */
|
||||
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
|
||||
background-color: #0364FF; /* 设置鼠标悬停时按钮背景色 */
|
||||
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
|
||||
background-color: #398439; /* 设置按钮被按下时背景色 */
|
||||
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>365</width>
|
||||
<height>229</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>伤员总数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="sumLabel">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>伤情轻微的伤员数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="rank0Label">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>伤情一般的伤员数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="rank1Label">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>伤情严重的伤员数:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="rank2Label">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>输入伤员编号查询伤员信息</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="searchInput">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="searchButton">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font: 14pt "Consolas";</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>查询</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -0,0 +1,98 @@
|
||||
#ifndef INJURYDATABASE_H
|
||||
#define INJURYDATABASE_H
|
||||
|
||||
#include <QtSql>
|
||||
#include <QSqlDatabase>
|
||||
#include <QWidget>
|
||||
#include <QSqlQuery>
|
||||
#include <QString>
|
||||
#include <QSqlRecord>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
struct Injury
|
||||
{
|
||||
QString id;
|
||||
int rank;
|
||||
double lon;
|
||||
double lat;
|
||||
int flag;
|
||||
};
|
||||
|
||||
class InjuryDatabase
|
||||
{
|
||||
// Q_OBJECT宏用于提供Qt信号槽和元对象系统服务
|
||||
// 它必须限定为私有访问权限
|
||||
//Q_OBJECT
|
||||
|
||||
public:
|
||||
static InjuryDatabase *getInstance();
|
||||
InjuryDatabase();
|
||||
~InjuryDatabase();
|
||||
|
||||
//打开
|
||||
bool open(const QString &dbName,const QString &userName = QString(),const QString &passwd = QString());
|
||||
//添加数据记录
|
||||
bool add(const Injury &data);
|
||||
//查询所有数据
|
||||
bool select_all(QList<Injury> &result);
|
||||
|
||||
Injury data;
|
||||
//返回有效信息
|
||||
void ReturnInfo(QList<Injury> data);
|
||||
|
||||
|
||||
private:
|
||||
//查询有效数据
|
||||
bool select_valid(const QString &tableName,QList<Injury> &result);
|
||||
//关闭
|
||||
void close();
|
||||
//开始添加字段
|
||||
void beginAddFiled(const QString &tableName);
|
||||
|
||||
//添加字段
|
||||
void addFiled(const QString &filedName);
|
||||
|
||||
//结束添加字段
|
||||
void endAddFiled();
|
||||
|
||||
//开始添加行
|
||||
void beginAddRow();
|
||||
|
||||
//添加字段值
|
||||
void addValue(const QVariant &value);
|
||||
|
||||
//结束添加行
|
||||
void endAddRow();
|
||||
|
||||
//执行
|
||||
bool exec(const QString &sql);
|
||||
|
||||
|
||||
private:
|
||||
//数据库
|
||||
QSqlDatabase m_sqlDb;
|
||||
|
||||
//表名
|
||||
QString m_tableName;
|
||||
|
||||
//字段名
|
||||
QStringList m_fieldName;
|
||||
|
||||
//头sql
|
||||
QString m_headerSql;
|
||||
|
||||
//值sql
|
||||
QString m_valueSql;
|
||||
|
||||
//已添加row数
|
||||
int m_fieldAdd = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // INJURYDATABASE_H
|
@ -0,0 +1,110 @@
|
||||
#ifndef UAVDATABASE_H
|
||||
#define UAVDATABASE_H
|
||||
|
||||
<<<<<<< HEAD:src/Client2/fly_land/UAVDatabase.h
|
||||
#include <QtSql>
|
||||
#include <QWidget>
|
||||
#include <QSqlQuery>
|
||||
=======
|
||||
#include <QWidget>
|
||||
#include <QSqlQuery>
|
||||
#include <QtSql>
|
||||
>>>>>>> master:src/Client/UAVDatabase.h
|
||||
#include <QSqlDatabase>
|
||||
#include <QString>
|
||||
#include <QSqlRecord>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
struct UAV
|
||||
{
|
||||
QString id;
|
||||
int state;
|
||||
QString ip;
|
||||
int port;
|
||||
double lon;
|
||||
double lat;
|
||||
};
|
||||
|
||||
//存储经纬度信息
|
||||
struct Point
|
||||
{
|
||||
double lon;
|
||||
double lat;
|
||||
};
|
||||
|
||||
class UAVDatabase
|
||||
{
|
||||
// Q_OBJECT宏用于提供Qt信号槽和元对象系统服务
|
||||
// 它必须限定为私有访问权限
|
||||
//Q_OBJECT
|
||||
|
||||
public:
|
||||
static UAVDatabase *getInstance();
|
||||
UAVDatabase();
|
||||
~UAVDatabase();
|
||||
|
||||
UAV data;
|
||||
|
||||
//返回状态信息
|
||||
int giveInfo(QString id);
|
||||
//添加数据记录
|
||||
bool add(const UAV &data);
|
||||
//查询位置信息数据
|
||||
Point ReturnUAVPosition( QString id);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
//打开
|
||||
bool open(const QString &dbName,const QString &userName = QString(),const QString &passwd = QString());
|
||||
//关闭
|
||||
void close();
|
||||
//开始添加字段
|
||||
void beginAddFiled(const QString &tableName);
|
||||
|
||||
//添加字段
|
||||
void addFiled(const QString &filedName);
|
||||
|
||||
//结束添加字段
|
||||
void endAddFiled();
|
||||
|
||||
//开始添加行
|
||||
void beginAddRow();
|
||||
|
||||
//添加字段值
|
||||
void addValue(const QVariant &value);
|
||||
|
||||
//结束添加行
|
||||
void endAddRow();
|
||||
|
||||
//执行
|
||||
bool exec(const QString &sql);
|
||||
|
||||
|
||||
private:
|
||||
//数据库
|
||||
QSqlDatabase m_sqlDb;
|
||||
|
||||
//表名
|
||||
QString m_tableName;
|
||||
|
||||
//字段名
|
||||
QStringList m_fieldName;
|
||||
|
||||
//头sql
|
||||
QString m_headerSql;
|
||||
|
||||
//值sql
|
||||
QString m_valueSql;
|
||||
|
||||
//已添加row数
|
||||
int m_fieldAdd = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // UAVDATABASE_H
|
@ -0,0 +1,50 @@
|
||||
#ifndef GUIDINGUI_H
|
||||
#define GUIDINGUI_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
#include <QDialog>
|
||||
#include <QLineEdit>
|
||||
#include <string>
|
||||
#include <QTableWidget>
|
||||
#include <cstring>
|
||||
#include <QQuickItem>
|
||||
#include <QFormLayout>
|
||||
#include <QStackedWidget>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
class GuidingUI;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class GuidingUI : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GuidingUI(QWidget *parent = nullptr);
|
||||
~GuidingUI();
|
||||
// 功能界面地图显示控制
|
||||
void MapDisplayControl(QPushButton*,QWidget*,QGridLayout*);
|
||||
// 添加机器人按钮槽函数
|
||||
void on_addrobot_clicked();
|
||||
// 功能界面添加机器人按钮控制
|
||||
void AddRobotControl(QPushButton*);
|
||||
// 机器人列表显示按钮槽函数
|
||||
void on_robottab_clicked();
|
||||
// 功能界面显示已配置机器人列表按钮控制
|
||||
void RobotsInfosControl(QPushButton*);
|
||||
// 机器人列表当中的切换到指定机器人页面槽函数
|
||||
void on_specifiedrobottab_clicked();
|
||||
|
||||
private slots:
|
||||
void on_addCasualty_clicked();
|
||||
|
||||
void on_showInjuryInfo_clicked();
|
||||
|
||||
private:
|
||||
Ui::GuidingUI *ui;
|
||||
};
|
||||
#endif // GUIDINGUI_H
|
@ -0,0 +1,420 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>GuidingUI</class>
|
||||
<widget class="QMainWindow" name="GuidingUI">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1000</width>
|
||||
<height>663</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>伤情态势感知分析系统</string>
|
||||
</property>
|
||||
<property name="toolTipDuration">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#centralwidget{
|
||||
background-color: rgb(15, 18, 34);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel {
|
||||
background-color: rgba(15, 28, 34, 0);
|
||||
color: white; /* 设置字体颜色为白色 */
|
||||
|
||||
border: none;
|
||||
|
||||
padding: 10px 20px; /* 设置内边距 */
|
||||
|
||||
border-radius: 5px; /* 设置按钮圆角 */
|
||||
|
||||
font-size: 30px; /* 设置文字大小 */
|
||||
|
||||
font-weight: bold; /*设置字体加粗*/
|
||||
|
||||
text-align: right; /* 设置字体居左对齐 */
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ACM</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QWidget" name="MapDisplayer" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>100</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/logo_backgroundless.png);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton {
|
||||
background-color: rgba(15, 28, 34, 0);
|
||||
color: rgb(255, 255, 255);
|
||||
|
||||
border: none;
|
||||
|
||||
padding: 10px 20px; /* 设置内边距 */
|
||||
|
||||
border-radius: 5px; /* 设置按钮圆角 */
|
||||
|
||||
font-size: 14px; /* 设置文字大小 */
|
||||
|
||||
text-align: right; /* 设置字体向右对齐 */
|
||||
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
|
||||
background-color: #0364FF; /* 设置鼠标悬停时按钮背景色 */
|
||||
|
||||
}
|
||||
|
||||
QPushButton:pressed {
|
||||
|
||||
background-color: #398439; /* 设置按钮被按下时背景色 */
|
||||
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QPushButton" name="robottab">
|
||||
<property name="text">
|
||||
<string>机器人列表</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/tab.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="robotlocation">
|
||||
<property name="text">
|
||||
<string>机器人位置显示</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/location.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addrobot">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#QPushButton{
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>添加机器人</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/robotbtn.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="mapbutton">
|
||||
<property name="text">
|
||||
<string>显示地图</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/mapbtn.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addUAV">
|
||||
<property name="text">
|
||||
<string>添加无人机</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/UAV.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QPushButton" name="UAVtab">
|
||||
<property name="text">
|
||||
<string>无人机列表</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/tab.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QPushButton" name="casualtycondition">
|
||||
<property name="text">
|
||||
<string>显示伤情</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/health.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QPushButton" name="UAVlocation">
|
||||
<property name="text">
|
||||
<string>无人机位置显示</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/location.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QPushButton" name="casualtyList">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#QPushButton{
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
color: rgb(255, 255, 255);
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>伤员列表</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-image: url(:/image/res/image/soldier.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QPushButton" name="showInjuryInfo">
|
||||
<property name="text">
|
||||
<string>展示信息</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">
|
||||
border-image: url(:/image/res/image/infomation.svg);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1000</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>功能界面</string>
|
||||
</property>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="action">
|
||||
<property name="text">
|
||||
<string>添加机器人</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_3">
|
||||
<property name="text">
|
||||
<string>显示机器人</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>显示机器人</p></body></html></string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_4">
|
||||
<property name="text">
|
||||
<string>伤员</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_5">
|
||||
<property name="text">
|
||||
<string>加载地图</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -0,0 +1,24 @@
|
||||
#ifndef INJURYDISIPLAYUI_H
|
||||
#define INJURYDISIPLAYUI_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QWebEngineView>
|
||||
#include <QtWebChannel>
|
||||
|
||||
namespace Ui {
|
||||
class InjuryDisiplayUI;
|
||||
}
|
||||
|
||||
class InjuryDisiplayUI : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit InjuryDisiplayUI(QWidget *parent = nullptr);
|
||||
~InjuryDisiplayUI();
|
||||
|
||||
private:
|
||||
Ui::InjuryDisiplayUI *ui;
|
||||
};
|
||||
|
||||
#endif // INJURYDISIPLAYUI_H
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>InjuryDisiplayUI</class>
|
||||
<widget class="QDialog" name="InjuryDisiplayUI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1205</width>
|
||||
<height>710</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -0,0 +1,26 @@
|
||||
#include "guidingui.h"
|
||||
#include "InjuryDatabase.h"
|
||||
#include "DogDatabase.h"
|
||||
#include "UAVDatabase.h"
|
||||
#include <QApplication>
|
||||
#include <QtSql>
|
||||
#include <QSqlDatabase>
|
||||
#include <QIcon>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
//设置窗口图标
|
||||
QIcon icon(":/image/res/image/logo_backgroundless.png");
|
||||
a.setWindowIcon(icon);
|
||||
|
||||
GuidingUI w;
|
||||
w.show();
|
||||
QStringList lis= QSqlDatabase::drivers();
|
||||
for (int i=0;i<lis.length();i++) {
|
||||
qDebug() <<"dri:"<<lis[i];
|
||||
}
|
||||
|
||||
return a.exec();
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
<RCC>
|
||||
<qresource prefix="/image">
|
||||
<file>res/image/health.png</file>
|
||||
<file>res/image/health.png.svg</file>
|
||||
<file>res/image/health.svg</file>
|
||||
<file>res/image/info.png</file>
|
||||
<file>res/image/infomation.svg</file>
|
||||
<file>res/image/location.png</file>
|
||||
<file>res/image/location.svg</file>
|
||||
<file>res/image/logo.png</file>
|
||||
<file>res/image/logo_backgroundless.png</file>
|
||||
<file>res/image/map.png</file>
|
||||
<file>res/image/map.svg</file>
|
||||
<file>res/image/MapBackGround.png</file>
|
||||
<file>res/image/mapbtn.svg</file>
|
||||
<file>res/image/robot.png</file>
|
||||
<file>res/image/robotbtn.svg</file>
|
||||
<file>res/image/soldier.png</file>
|
||||
<file>res/image/soldier.svg</file>
|
||||
<file>res/image/tab.png</file>
|
||||
<file>res/image/tab.svg</file>
|
||||
<file>res/image/uav.png</file>
|
||||
<file>res/image/UAV.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/qml">
|
||||
<file>res/qml/MAP.qml</file>
|
||||
<file>res/qml/MAP2.qml</file>
|
||||
</qresource>
|
||||
<qresource prefix="/html">
|
||||
<file>res/html/map.html</file>
|
||||
</qresource>
|
||||
<qresource prefix="/icon">
|
||||
<file>res/icon/green.png</file>
|
||||
<file>res/icon/red.png</file>
|
||||
<file>res/icon/yellow.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 703 B |
After Width: | Height: | Size: 1001 B |
After Width: | Height: | Size: 726 B |
After Width: | Height: | Size: 609 B |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 299 B |
After Width: | Height: | Size: 628 B |
After Width: | Height: | Size: 708 B |
@ -0,0 +1,38 @@
|
||||
import QtQuick
|
||||
import QtLocation
|
||||
import QtPositioning
|
||||
import QtQuick.Controls
|
||||
import QtLocation 5.15
|
||||
import QtPositioning 5.15
|
||||
Window {
|
||||
id: root
|
||||
visible: true
|
||||
width: 640
|
||||
height: 480
|
||||
title: qsTr("My Qt Location")
|
||||
|
||||
Map {
|
||||
id: the_map
|
||||
anchors.fill: parent
|
||||
minimumZoomLevel: 3
|
||||
maximumZoomLevel: 16
|
||||
zoomLevel: 10
|
||||
center: QtPositioning.coordinate(30.67, 104.06)
|
||||
|
||||
plugin: Plugin {
|
||||
name: "mymap" //"esri" "mapbox" "osm" "here"
|
||||
|
||||
// 使用parameters属性来设置插件参数
|
||||
parameters: [
|
||||
PluginParameter {
|
||||
name: "mapPath"
|
||||
value: applicationDirPath+"/dianzi_gaode_ArcgisServerTiles/_alllayers"
|
||||
},
|
||||
PluginParameter {
|
||||
name: "format"
|
||||
value: "png"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,375 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Window 2.2
|
||||
import QtLocation 5.6
|
||||
import QtPositioning 5.6
|
||||
import QtQuick.Controls 2.4
|
||||
import Qt.labs.settings 1.0
|
||||
import Qt.labs.platform 1.0
|
||||
import QtQuick
|
||||
import QtLocation
|
||||
import QtPositioning
|
||||
import QtQuick.Controls
|
||||
import QtLocation 5.15
|
||||
import QtPositioning 5.15
|
||||
Window {
|
||||
id: window
|
||||
visible: true
|
||||
width: 820
|
||||
height: 560
|
||||
color: "#ffffff"
|
||||
title: qsTr("覆盖规划")
|
||||
|
||||
Settings{
|
||||
id:settings
|
||||
property var jd : 112.9334574
|
||||
property var wd : 28.2312227
|
||||
}
|
||||
|
||||
Plugin {
|
||||
id: mapPlugin
|
||||
name: "osm" // "mapboxgl", "esri", ...
|
||||
}
|
||||
|
||||
Item {
|
||||
id: itemMenu
|
||||
width: 180
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 0
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
property var itemList: []
|
||||
|
||||
Row {
|
||||
id: row
|
||||
y: 10
|
||||
height: 40
|
||||
spacing: 10
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 10
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
|
||||
Label {
|
||||
id: label
|
||||
width: 50
|
||||
height: 40
|
||||
text: qsTr("经度:")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pointSize: 13
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle
|
||||
width: 100
|
||||
height: 40
|
||||
color: "#ffffff"
|
||||
border.color: "#b0b8b4"
|
||||
border.width: 2
|
||||
|
||||
TextInput {
|
||||
id: textInput_JD
|
||||
height: 20
|
||||
text: settings.jd
|
||||
clip: true
|
||||
anchors.rightMargin: 5
|
||||
anchors.leftMargin: 5
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
font.pointSize: 12
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
id: row1
|
||||
x: 7
|
||||
y: 60
|
||||
height: 40
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
Label {
|
||||
id: label1
|
||||
width: 50
|
||||
height: 40
|
||||
text: qsTr("纬度:")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: 13
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle1
|
||||
width: 100
|
||||
height: 40
|
||||
color: "#ffffff"
|
||||
border.color: "#b0b8b4"
|
||||
TextInput {
|
||||
id: textInput_WD
|
||||
height: 20
|
||||
text: settings.wd
|
||||
cursorVisible: true
|
||||
clip: true
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 5
|
||||
font.pointSize: 12
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.rightMargin: 5
|
||||
}
|
||||
border.width: 2
|
||||
}
|
||||
anchors.right: parent.right
|
||||
spacing: 10
|
||||
anchors.rightMargin: 10
|
||||
}
|
||||
|
||||
Row {
|
||||
id: row2
|
||||
y: 110
|
||||
height: 40
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
Label {
|
||||
id: label2
|
||||
width: 50
|
||||
height: 40
|
||||
text: qsTr("半径:")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: 13
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle2
|
||||
width: 100
|
||||
height: 40
|
||||
color: "#ffffff"
|
||||
border.color: "#b0b8b4"
|
||||
TextInput {
|
||||
id: textInput_Distance
|
||||
height: 20
|
||||
text: qsTr("")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 5
|
||||
font.pointSize: 12
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.rightMargin: 5
|
||||
}
|
||||
border.width: 2
|
||||
}
|
||||
anchors.right: parent.right
|
||||
spacing: 10
|
||||
anchors.rightMargin: 10
|
||||
}
|
||||
|
||||
Row {
|
||||
id: row3
|
||||
x: -9
|
||||
y: 160
|
||||
height: 40
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
Label {
|
||||
id: label3
|
||||
width: 50
|
||||
height: 40
|
||||
text: qsTr("颜色:")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pointSize: 13
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle_color
|
||||
width: 100
|
||||
height: 40
|
||||
color: "#cc72f462"
|
||||
border.color: "#b0b8b4"
|
||||
border.width: 0
|
||||
MouseArea{
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
onClicked: colorDialog.open()
|
||||
}
|
||||
}
|
||||
anchors.right: parent.right
|
||||
spacing: 10
|
||||
anchors.rightMargin: 12
|
||||
}
|
||||
|
||||
Button {
|
||||
id: button1
|
||||
x: 40
|
||||
y: 215
|
||||
width: 100
|
||||
text: qsTr("添加覆盖圈")
|
||||
onClicked: {
|
||||
var component = Qt.createComponent("MyCircle.qml")
|
||||
if(component.status === Component.Ready){
|
||||
var circle = component.createObject(myMap)
|
||||
var jd = textInput_JD.text
|
||||
var wd = textInput_WD.text
|
||||
circle.myCoordinate = QtPositioning.coordinate(wd, jd)
|
||||
circle.myColor = rectangle_color.color
|
||||
circle.distance = textInput_Distance.text
|
||||
myMap.addMapItemGroup(circle)
|
||||
itemMenu.itemList.push(circle)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: button2
|
||||
x: 40
|
||||
y: 265
|
||||
width: 100
|
||||
text: qsTr("删除")
|
||||
onClicked: {
|
||||
var obj = itemMenu.itemList[itemMenu.itemList.length-1]
|
||||
myMap.removeMapItemGroup(obj)
|
||||
itemMenu.itemList.pop()
|
||||
delete obj
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
id: button3
|
||||
x: 40
|
||||
y: 315
|
||||
width: 100
|
||||
text: qsTr("清除测距")
|
||||
onClicked: {
|
||||
lineObj.path = []
|
||||
distanceLabel.text = ''
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: text1
|
||||
x: 18
|
||||
y: 427
|
||||
text: qsTr("双击左键获取图上位置坐标")
|
||||
font.pixelSize: 12
|
||||
}
|
||||
|
||||
Text {
|
||||
id: text2
|
||||
x: 18
|
||||
y: 453
|
||||
text: qsTr("点击鼠标右键进行地图测距")
|
||||
font.pixelSize: 12
|
||||
}
|
||||
|
||||
Button {
|
||||
id: button4
|
||||
x: 40
|
||||
y: 369
|
||||
width: 100
|
||||
text: qsTr("保存中心")
|
||||
onClicked: {
|
||||
settings.jd = textInput_JD.text
|
||||
settings.wd = textInput_WD.text
|
||||
text_info.text = "地图中心位置已保存"
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: text_info
|
||||
x: 74
|
||||
y: 482
|
||||
width: 32
|
||||
height: 12
|
||||
color: "#f66060"
|
||||
text: qsTr("")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: 12
|
||||
}
|
||||
}
|
||||
|
||||
Map {
|
||||
id:myMap
|
||||
anchors.leftMargin: 180
|
||||
anchors.fill: parent
|
||||
plugin: mapPlugin
|
||||
center: QtPositioning.coordinate(settings.wd, settings.jd) // Oslo
|
||||
zoomLevel: 11
|
||||
property bool measure: false
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea_measure
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.RightButton | Qt.LeftButton
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
if(mouse.button === Qt.RightButton){
|
||||
if(!lineObj.start){
|
||||
myMap.measure = true
|
||||
lineObj.path = []
|
||||
var c = myMap.toCoordinate(Qt.point(mouse.x, mouse.y))
|
||||
lineObj.addCoordinate(c)
|
||||
lineObj.start = true
|
||||
}else{
|
||||
myMap.measure = false
|
||||
var c = myMap.toCoordinate(Qt.point(mouse.x, mouse.y))
|
||||
lineObj.addCoordinate(c)
|
||||
lineObj.start = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onPositionChanged:{
|
||||
if(myMap.measure){
|
||||
var c = myMap.toCoordinate(Qt.point(mouse.x, mouse.y))
|
||||
var path = lineObj.path;
|
||||
path[1] = c;
|
||||
lineObj.path = path;
|
||||
distanceLabel.coordinate = c
|
||||
var dis = c.distanceTo(path[0])
|
||||
distanceLabel.text =" 距离:"+Math.round(dis)/1000+"千米"
|
||||
}
|
||||
}
|
||||
onDoubleClicked: {
|
||||
if(mouse.button === Qt.LeftButton){
|
||||
var c = myMap.toCoordinate(Qt.point(mouse.x, mouse.y))
|
||||
textInput_JD.text = c.longitude.toFixed(6)
|
||||
textInput_WD.text = c.latitude.toFixed(6)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MapPolyline {
|
||||
id:lineObj
|
||||
line.width: 3
|
||||
line.color: 'green'
|
||||
path: []
|
||||
|
||||
property bool start: false
|
||||
}
|
||||
|
||||
MapQuickItem{
|
||||
id:distanceLabel
|
||||
property string text: ''
|
||||
sourceItem:Label{
|
||||
color: "darkturquoise"
|
||||
font.bold: true
|
||||
font.pointSize: 15
|
||||
font.family: "微软雅黑"
|
||||
text: distanceLabel.text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColorDialog {
|
||||
id: colorDialog
|
||||
options:ColorDialog.ShowAlphaChannel
|
||||
onAccepted: {
|
||||
rectangle_color.color = colorDialog.currentColor
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
// import QtQuick 2.15
|
||||
// import QtPositioning 5.15
|
||||
// import QtLocation 5.15
|
||||
|
||||
// Rectangle {
|
||||
// width: 400
|
||||
// height: 300
|
||||
|
||||
// PositionSource {
|
||||
// id: positionSource
|
||||
// updateInterval: 1000
|
||||
// preferredPositioningMethods: PositionSource.AllPositioningMethods
|
||||
// }
|
||||
// Plugin {
|
||||
// id: mapPlugin
|
||||
// name: "osm"
|
||||
// }
|
||||
// Map {
|
||||
// id: map
|
||||
// anchors.fill: parent
|
||||
// plugin: Plugin {
|
||||
// name: "osm" // 使用OpenStreetMap
|
||||
// }
|
||||
// center: positionSource.position.coordinate
|
||||
// zoomLevel: 13
|
||||
|
||||
// Component.onCompleted: {
|
||||
// map.addMapItem(markerComponent)
|
||||
// }
|
||||
// }
|
||||
|
||||
// Component {
|
||||
// id: markerComponent
|
||||
// Rectangle {
|
||||
// width: 20
|
||||
// height: 20
|
||||
// color: "blue"
|
||||
// radius: 10
|
||||
// }
|
||||
// }
|
||||
// }
|