CasualtySightPlus

pull/15/head
eazzy 5 months ago
parent 76462e40a7
commit 75e6794501

@ -0,0 +1,29 @@
.DS_Store
node_modules
/dist
/node_modules.zip
.vscode
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
public/server1.js
src/components/UploadClueTable.vue
src/utils/request.js
node_modules.zip

@ -0,0 +1,721 @@
/*
! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com
*/
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
box-sizing: border-box;
/* 1 */
border-width: 0;
/* 2 */
border-style: solid;
/* 2 */
border-color: #e5e7eb;
/* 2 */
}
::before,
::after {
--tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/
html,
:host {
line-height: 1.5;
/* 1 */
-webkit-text-size-adjust: 100%;
/* 2 */
-moz-tab-size: 4;
/* 3 */
-o-tab-size: 4;
tab-size: 4;
/* 3 */
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* 4 */
font-feature-settings: normal;
/* 5 */
font-variation-settings: normal;
/* 6 */
-webkit-tap-highlight-color: transparent;
/* 7 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
margin: 0;
/* 1 */
line-height: inherit;
/* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
height: 0;
/* 1 */
color: inherit;
/* 2 */
border-top-width: 1px;
/* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
color: inherit;
text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
/* 1 */
font-feature-settings: normal;
/* 2 */
font-variation-settings: normal;
/* 3 */
font-size: 1em;
/* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
text-indent: 0;
/* 1 */
border-color: inherit;
/* 2 */
border-collapse: collapse;
/* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit;
/* 1 */
font-feature-settings: inherit;
/* 1 */
font-variation-settings: inherit;
/* 1 */
font-size: 100%;
/* 1 */
font-weight: inherit;
/* 1 */
line-height: inherit;
/* 1 */
letter-spacing: inherit;
/* 1 */
color: inherit;
/* 1 */
margin: 0;
/* 2 */
padding: 0;
/* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
-webkit-appearance: button;
/* 1 */
background-color: transparent;
/* 2 */
background-image: none;
/* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
-webkit-appearance: textfield;
/* 1 */
outline-offset: -2px;
/* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button;
/* 1 */
font: inherit;
/* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
fieldset {
margin: 0;
padding: 0;
}
legend {
padding: 0;
}
ol,
ul,
menu {
list-style: none;
margin: 0;
padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::-moz-placeholder, textarea::-moz-placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
input::placeholder,
textarea::placeholder {
opacity: 1;
/* 1 */
color: #9ca3af;
/* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block;
/* 1 */
vertical-align: middle;
/* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
max-width: 100%;
height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden] {
display: none;
}
*, ::before, ::after {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}
::backdrop {
--tw-border-spacing-x: 0;
--tw-border-spacing-y: 0;
--tw-translate-x: 0;
--tw-translate-y: 0;
--tw-rotate: 0;
--tw-skew-x: 0;
--tw-skew-y: 0;
--tw-scale-x: 1;
--tw-scale-y: 1;
--tw-pan-x: ;
--tw-pan-y: ;
--tw-pinch-zoom: ;
--tw-scroll-snap-strictness: proximity;
--tw-gradient-from-position: ;
--tw-gradient-via-position: ;
--tw-gradient-to-position: ;
--tw-ordinal: ;
--tw-slashed-zero: ;
--tw-numeric-figure: ;
--tw-numeric-spacing: ;
--tw-numeric-fraction: ;
--tw-ring-inset: ;
--tw-ring-offset-width: 0px;
--tw-ring-offset-color: #fff;
--tw-ring-color: rgb(59 130 246 / 0.5);
--tw-ring-offset-shadow: 0 0 #0000;
--tw-ring-shadow: 0 0 #0000;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
--tw-blur: ;
--tw-brightness: ;
--tw-contrast: ;
--tw-grayscale: ;
--tw-hue-rotate: ;
--tw-invert: ;
--tw-saturate: ;
--tw-sepia: ;
--tw-drop-shadow: ;
--tw-backdrop-blur: ;
--tw-backdrop-brightness: ;
--tw-backdrop-contrast: ;
--tw-backdrop-grayscale: ;
--tw-backdrop-hue-rotate: ;
--tw-backdrop-invert: ;
--tw-backdrop-opacity: ;
--tw-backdrop-saturate: ;
--tw-backdrop-sepia: ;
--tw-contain-size: ;
--tw-contain-layout: ;
--tw-contain-paint: ;
--tw-contain-style: ;
}
.container {
width: 100%;
}
@media (min-width: 640px) {
.container {
max-width: 640px;
}
}
@media (min-width: 768px) {
.container {
max-width: 768px;
}
}
@media (min-width: 1024px) {
.container {
max-width: 1024px;
}
}
@media (min-width: 1280px) {
.container {
max-width: 1280px;
}
}
@media (min-width: 1536px) {
.container {
max-width: 1536px;
}
}
.absolute {
position: absolute;
}
.order-first {
order: -9999;
}
.mx-auto {
margin-left: auto;
margin-right: auto;
}
.block {
display: block;
}
.flex {
display: flex;
}
.grid {
display: grid;
}
.max-w-7xl {
max-width: 80rem;
}
.max-w-xs {
max-width: 20rem;
}
.grid-cols-1 {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
.flex-col {
flex-direction: column;
}
.gap-x-8 {
-moz-column-gap: 2rem;
column-gap: 2rem;
}
.gap-y-16 {
row-gap: 4rem;
}
.gap-y-4 {
row-gap: 1rem;
}
.border {
border-width: 1px;
}
.bg-white {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.px-6 {
padding-left: 1.5rem;
padding-right: 1.5rem;
}
.py-24 {
padding-top: 6rem;
padding-bottom: 6rem;
}
.text-center {
text-align: center;
}
.text-3xl {
font-size: 1.875rem;
line-height: 2.25rem;
}
.text-base {
font-size: 1rem;
line-height: 1.5rem;
}
.font-semibold {
font-weight: 600;
}
.leading-7 {
line-height: 1.75rem;
}
.tracking-tight {
letter-spacing: -0.025em;
}
.text-gray-600 {
--tw-text-opacity: 1;
color: rgb(75 85 99 / var(--tw-text-opacity));
}
.text-gray-900 {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity));
}
@media (min-width: 640px) {
.sm\:py-32 {
padding-top: 8rem;
padding-bottom: 8rem;
}
.sm\:text-5xl {
font-size: 3rem;
line-height: 1;
}
}
@media (min-width: 1024px) {
.lg\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lg\:px-8 {
padding-left: 2rem;
padding-right: 2rem;
}
}

@ -5,9 +5,9 @@ QT += multimediawidgets
QT += webenginewidgets webchannel QT += webenginewidgets webchannel
QT += sql QT += sql
QT += network QT += network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
QMAKE_PROJECT_DEPTH = 0 QMAKE_PROJECT_DEPTH = 0
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17 CONFIG += c++17
# You can make your code fail to compile if it uses deprecated APIs. # You can make your code fail to compile if it uses deprecated APIs.
@ -22,7 +22,8 @@ SOURCES += \
UIs/sourcefiles/robotlistui.cpp \ UIs/sourcefiles/robotlistui.cpp \
UIs/sourcefiles/uavui.cpp \ UIs/sourcefiles/uavui.cpp \
UIs/sourcefiles/uavlist.cpp \ UIs/sourcefiles/uavlist.cpp \
UIs/sourcefiles/injurydisplayui.cpp \ UIs/sourcefiles/injurydisplayui.cpp \
UIs/sourcefiles/singlecasualtyinfo.cpp \
# database # database
database/sourcefiles/DogDatabase.cpp \ database/sourcefiles/DogDatabase.cpp \
database/sourcefiles/InjuryDatabase.cpp \ database/sourcefiles/InjuryDatabase.cpp \
@ -39,6 +40,7 @@ HEADERS += \
UIs/headfiles/uavui.h \ UIs/headfiles/uavui.h \
UIs/headfiles/uavlist.h \ UIs/headfiles/uavlist.h \
UIs/headfiles/injurydisplayui.h \ UIs/headfiles/injurydisplayui.h \
UIs/headfiles/singlecasualtyinfo.h \
# databaes # databaes
database/headfiles/DogDatabase.h \ database/headfiles/DogDatabase.h \
database/headfiles/InjuryDatabase.h \ database/headfiles/InjuryDatabase.h \
@ -49,6 +51,7 @@ FORMS += \
UIs/ui/guidingui.ui \ UIs/ui/guidingui.ui \
UIs/ui/robotui.ui \ UIs/ui/robotui.ui \
UIs/ui/robotlistui.ui \ UIs/ui/robotlistui.ui \
UIs/ui/singlecasualtyinfo.ui \
UIs/ui/uavui.ui \ UIs/ui/uavui.ui \
UIs/ui/uavlist.ui \ UIs/ui/uavlist.ui \
UIs/ui/injurydisplayui.ui UIs/ui/injurydisplayui.ui

@ -1,268 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 13.0.0, 2024-06-18T15:29:58. -->
<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\CasualtySightPlus\build\Desktop_Qt_6_7_0_MSVC2019_64bit-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/PROJECT/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\CasualtySightPlus\build\Desktop_Qt_6_7_0_MSVC2019_64bit-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/PROJECT/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\CasualtySightPlus\build\Desktop_Qt_6_7_0_MSVC2019_64bit-Profile</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">D:/PROJECT/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 &quot;dwarf,4096&quot; -F 250</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/PROJECT/CasualtySightPlus/CasualtySightPlus.pro</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">D:/PROJECT/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/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>

@ -42,10 +42,6 @@ public:
// 功能界面地图显示控制 // 功能界面地图显示控制
void MapDisplayControl(QPushButton*,QWidget*,QGridLayout*); void MapDisplayControl(QPushButton*,QWidget*,QGridLayout*);
// 添加机器人按钮槽函数 // 添加机器人按钮槽函数
void on_addrobot_clicked();
// 功能界面添加机器人按钮控制
void AddRobotControl(QPushButton*);
// 机器人列表显示按钮槽函数
void on_robottab_clicked(); void on_robottab_clicked();
// 功能界面显示机器人列表按钮控制 // 功能界面显示机器人列表按钮控制
void RobotsInfosControl(QPushButton*); void RobotsInfosControl(QPushButton*);
@ -57,13 +53,18 @@ public:
void InjuryInfoControl(QPushButton*); void InjuryInfoControl(QPushButton*);
// 伤情显示界面按钮槽函数 // 伤情显示界面按钮槽函数
void on_showInjuryInfo_clicked(); void on_showInjuryInfo_clicked();
private slots:
// 伤情显示按钮槽函数
// void on_showInjuryInfo_clicked();
private: private:
// 界面
Ui::GuidingUI *ui; Ui::GuidingUI *ui;
// 栈组件用于显示地图和不显示地图时的展示
QStackedWidget *stackedWidget;
// 用于存放背景
QWidget *backgroundWidget;
// 背景图片存放的具体位置
QLabel *backgroundLabel;
signals:
}; };
#endif // GUIDINGUI_H #endif // GUIDINGUI_H

@ -2,7 +2,12 @@
#define INJURYDISPLAYUI_H #define INJURYDISPLAYUI_H
#include <QMainWindow> #include <QMainWindow>
/* 有关伤员数据库头文件 */
#include "../../database/headfiles/InjuryDatabase.h"
/* 有关列表列卡阴影效果头文件 */
#include <QGraphicsDropShadowEffect>
/* 有关伤员伤情具体细节显示的头文件 */
#include "singlecasualtyinfo.h"
namespace Ui { namespace Ui {
class InjuryDisplayUI; class InjuryDisplayUI;
} }
@ -10,13 +15,23 @@ class InjuryDisplayUI;
class InjuryDisplayUI : public QMainWindow class InjuryDisplayUI : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit InjuryDisplayUI(QWidget *parent = nullptr); explicit InjuryDisplayUI(QWidget *parent = nullptr);
~InjuryDisplayUI(); ~InjuryDisplayUI();
/* 伤员信息展示 */
void InjuryDisplay();
/* 控制按钮详情按钮跳转槽函数 */
void on_detailBtn_clicked();
/* 控制按钮详情跳转槽函数 */
void SingleCasualtyDisplay();
private: private:
// 界面指针
Ui::InjuryDisplayUI *ui; Ui::InjuryDisplayUI *ui;
// 伤员列表
QList<Injury> casualtyList;
// 数据库
InjuryDatabase *db;
}; };
#endif // INJURYDISPLAYUI_H #endif // INJURYDISPLAYUI_H

@ -0,0 +1,22 @@
#ifndef SINGLECASUALTYINFO_H
#define SINGLECASUALTYINFO_H
#include <QMainWindow>
namespace Ui {
class SingleCasualtyInfo;
}
class SingleCasualtyInfo : public QMainWindow
{
Q_OBJECT
public:
explicit SingleCasualtyInfo(QWidget *parent = nullptr);
~SingleCasualtyInfo();
private:
Ui::SingleCasualtyInfo *ui;
};
#endif // SINGLECASUALTYINFO_H

@ -17,10 +17,9 @@ GuidingUI::GuidingUI(QWidget *parent)
, ui(new Ui::GuidingUI) , ui(new Ui::GuidingUI)
{ {
ui->setupUi(this); ui->setupUi(this);
/* 控制地图显示 */ /* 控制地图显示 */
MapDisplayControl(ui->mapbutton,ui->MapDisplayer,ui->gridLayout_3); MapDisplayControl(ui->mapbutton,ui->MapDisplayer,ui->gridLayout_3);
/* 控制添加机器人 */
AddRobotControl(ui->addRobotBtn);
/* 控制机器人列表 */ /* 控制机器人列表 */
RobotsInfosControl(ui->robotListBtn); RobotsInfosControl(ui->robotListBtn);
/* 控制无人机列表*/ /* 控制无人机列表*/
@ -32,17 +31,20 @@ GuidingUI::GuidingUI(QWidget *parent)
GuidingUI::~GuidingUI() GuidingUI::~GuidingUI()
{ {
delete ui; delete ui;
delete stackedWidget;
delete backgroundLabel;
delete backgroundWidget;
} }
void GuidingUI::MapDisplayControl(QPushButton *btnCtr,QWidget*Tar,QGridLayout*layout) void GuidingUI::MapDisplayControl(QPushButton *btnCtr,QWidget*Tar,QGridLayout*layout)
{ {
// 创建堆栈部件 // 创建堆栈部件
QStackedWidget* stackedWidget = new QStackedWidget(this); stackedWidget = new QStackedWidget(this);
// 创建背景板部件 // 创建背景板部件
QWidget* backgroundWidget = new QWidget(this); backgroundWidget = new QWidget(this);
QPixmap backgroundPixmap(":/image/res/image/mapdisplayer.svg"); QPixmap backgroundPixmap(":/image/res/image/mapdisplayer.svg");
QLabel *backgroundLabel = new QLabel(backgroundWidget); backgroundLabel = new QLabel(backgroundWidget);
backgroundLabel->setPixmap(backgroundPixmap); backgroundLabel->setPixmap(backgroundPixmap);
// 设置堆栈部件的组成 // 设置堆栈部件的组成
@ -69,30 +71,52 @@ void GuidingUI::MapDisplayControl(QPushButton *btnCtr,QWidget*Tar,QGridLayout*la
// 将堆栈部件添加到布局当中 // 将堆栈部件添加到布局当中
layout->addWidget(stackedWidget); layout->addWidget(stackedWidget);
QWebEngineView *view = new QWebEngineView(ui->MapDisplayer); QWebEngineView* view = new QWebEngineView(ui->MapDisplayer);
// 设置HTML文件的路径这里使用资源文件系统 // 设置HTML文件的路径这里使用资源文件系统
QUrl url = QUrl("qrc:/html/res/html/map.html"); QUrl url = QUrl("qrc:/html/res/html/map.html");
view->load(url); view->load(url);
// 用来存放伤员查询的结果
QList<Injury> result;
// 伤员信息数据库对象
InjuryDatabase injuryinfo;
// 用于存放数据库当中返回的伤员
injuryinfo.select_all(result);
// 连接loadFinished信号来确认页面是否加载成功并在加载成功后调用addMarker函数 // 连接loadFinished信号来确认页面是否加载成功并在加载成功后调用addMarker函数
connect(view, &QWebEngineView::loadFinished, [view]() { connect(view, &QWebEngineView::loadFinished, [view,result]() {
// 假设我们要添加的坐标和等级 // 假设我们要添加的坐标和等级
QList<Injury> result; qint16 minorCount = 0;
InjuryDatabase injuryinfo; qint16 moderateCount = 0;
injuryinfo.select_all(result); qint16 severeCount = 0;
for(int i=0;i<result.length();i++) for(int i=0;i<result.length();i++)
{ {
double latitude = result[i].lat; double latitude = result[i].lat;
double longitude = result[i].lon; double longitude = result[i].lon;
int level = result[i].rank; int level = result[i].rank;
if (level == 0) {
minorCount++;
}
else if (level == 1) {
moderateCount++;
}
else if (level == 2) {
severeCount++;
}
// 调用JavaScript函数传递参数 // 调用JavaScript函数传递参数
view->page()->runJavaScript(QString("addMarker(%1, %2, %3)").arg(latitude).arg(longitude).arg(level), [](const QVariant &result) { view->page()->runJavaScript(QString("addMarker(%1, %2, %3)").arg(latitude).arg(longitude).arg(level), [](const QVariant &result) {
// 这里可以处理JavaScript函数执行后的结果 // 这里可以处理JavaScript函数执行后的结果
}); });
} }
view->page()->runJavaScript(QString("updateStatistics(%1, %2, %3)").arg(severeCount).arg(moderateCount).arg(minorCount));
}); });
// 由于 MapDisplayer 已经在 UI 布局中,我们不需要创建新的布局 // 由于 MapDisplayer 已经在 UI 布局中,我们不需要创建新的布局
// 直接将 QWebEngineView 添加到 MapDisplayer 中 // 直接将 QWebEngineView 添加到 MapDisplayer 中
QVBoxLayout *layout1 = qobject_cast<QVBoxLayout*>(ui->MapDisplayer->layout()); QVBoxLayout *layout1 = qobject_cast<QVBoxLayout*>(ui->MapDisplayer->layout());
@ -106,54 +130,10 @@ void GuidingUI::MapDisplayControl(QPushButton *btnCtr,QWidget*Tar,QGridLayout*la
} }
} }
void GuidingUI::on_addrobot_clicked()
{
QDialog *dialog = new QDialog(this);
QVBoxLayout *layout = new QVBoxLayout;
QHBoxLayout *nameLayout = new QHBoxLayout;
QLabel *nameLabel = new QLabel("名称(customized)", dialog);
QLineEdit *nameEdit = new QLineEdit(dialog);
nameLayout->addWidget(nameLabel);
nameLayout->addWidget(nameEdit);
layout->addLayout(nameLayout);
QHBoxLayout *ipLayout = new QHBoxLayout;
QLabel *ipLabel = new QLabel("IP地址", dialog);
QLineEdit *ipEdit = new QLineEdit(dialog);
ipLayout->addWidget(ipLabel);
ipLayout->addWidget(ipEdit);
layout->addLayout(ipLayout);
QPushButton *okButton = new QPushButton("确定", dialog);
layout->addWidget(okButton);
connect(okButton, &QPushButton::clicked, dialog, &QDialog::accept);
connect(dialog, &QDialog::accepted, [=]() {
QString name = nameEdit->text();
QString ip = ipEdit->text();
// listWidget->addItem(name + " - " + ip);
});
dialog->setLayout(layout);
dialog->exec();
}
void GuidingUI::AddRobotControl(QPushButton* btnCtr)
{
connect(btnCtr,&QPushButton::clicked,this,&GuidingUI::on_addrobot_clicked);
}
void on_specifiedrobottab_clicked()
{
}
/** /**
* @brief * @brief
* @date 202466 * @date 202466
* @author yyz * @author myz
* @param null * @param null
* @details , * @details ,
*/ */
@ -178,7 +158,7 @@ void GuidingUI::on_showInjuryInfo_clicked()
/** /**
* @brief * @brief
* @date 2024610 * @date 2024610
* @author yyz * @author myz
*/ */
void GuidingUI::on_UAVListBtn_clicked() void GuidingUI::on_UAVListBtn_clicked()
{ {
@ -189,7 +169,7 @@ void GuidingUI::on_UAVListBtn_clicked()
/** /**
* @brief * @brief
* @date 2024610 * @date 2024610
* @author yyz * @author myz
* @param ctrBtn: * @param ctrBtn:
*/ */
void GuidingUI::UAVInfosControl(QPushButton* btnCtr) void GuidingUI::UAVInfosControl(QPushButton* btnCtr)
@ -200,7 +180,7 @@ void GuidingUI::UAVInfosControl(QPushButton* btnCtr)
/** /**
* @brief * @brief
* @date 2024618 * @date 2024618
* @author yyz * @author myz
* @param ctrBtn: * @param ctrBtn:
*/ */
void GuidingUI::InjuryInfoControl(QPushButton* btnCtr) void GuidingUI::InjuryInfoControl(QPushButton* btnCtr)

@ -1,14 +1,123 @@
#include "../headfiles/injurydisplayui.h" #include "../headfiles/injurydisplayui.h"
#include "ui_injurydisplayui.h" #include "ui_injurydisplayui.h"
// 单页面最大显示数
constexpr int MAX_DISPLAY_NUM = 10;
InjuryDisplayUI::InjuryDisplayUI(QWidget *parent) InjuryDisplayUI::InjuryDisplayUI(QWidget *parent)
: QMainWindow(parent) : QMainWindow(parent)
, ui(new Ui::InjuryDisplayUI) , ui(new Ui::InjuryDisplayUI)
, db(new InjuryDatabase)
{ {
ui->setupUi(this); ui->setupUi(this);
/* 提取伤员信息 */
db->select_all(casualtyList);
/* 显示伤员信息 */
InjuryDisplay();
/* 控制详情按钮跳转 */
SingleCasualtyDisplay();
} }
InjuryDisplayUI::~InjuryDisplayUI() InjuryDisplayUI::~InjuryDisplayUI()
{ {
delete ui; delete ui;
} }
/**
* @brief
* @date 202472
* @author myz
*/
void InjuryDisplayUI::InjuryDisplay()
{
/* 所有的显示框 */
const auto children = ui->ListWidget->children();
/* 存储单个显示框 */
QWidget* tableItem;
/* 用于存储伤员属性 */
QLabel* label_index, *label_level, *label_coords;
qint16 rank; // 存放伤员伤情等级以供判定
QString unitLat, unitLon; // 存放经纬度单位
/* 如果有伤员 */
if(casualtyList.size() > 0)
{
/* 从1开始是应为ListWidget的子部件第一个是布局而非显示框 */
for(int i = 1; i < children.size() && i <= 10 && i <= casualtyList.size(); ++i)
{
const auto children_labels = children[i]->children();
/* 把一名伤员的属性索引到这几个位置上 */
label_index = qobject_cast<QLabel*>(children_labels[1]);
label_level = qobject_cast<QLabel*>(children_labels[2]);
label_coords = qobject_cast<QLabel*>(children_labels[3]);
/* 设置对应的文本 */
label_index->setText(casualtyList[i - 1].id);
/* 根据伤情的等级rank判定level*/
rank = casualtyList[i - 1].rank;
if(rank == 2) // 严重
{
label_level->setText(QString("严重"));
label_level->setStyleSheet("QLabel{"
"color: #FF5733"
" }");
}
else if(rank == 1)
{
label_level->setText(QString("中等"));
label_level->setStyleSheet("QLabel{"
"color: #FFEB3B"
" }");
}
else if(rank == 0)
{
label_level->setText(QString("轻微"));
label_level->setStyleSheet("QLabel{"
"color: #A5D63F"
" }");
}
// label_level->setText(QString::number(casualtyList[i - 1].rank));
/* 格式化地理坐标 */
unitLat = casualtyList[i - 1].lat >= 0 ? "N, " : "S, ";
unitLon = casualtyList[i - 1].lon >= 0 ? "E )" : "W )";
label_coords->setText(QString("( ")+
QString::number(casualtyList[i - 1].lat)
+ unitLat
+ QString::number(casualtyList[i - 1].lon)
+ unitLon);
/* 添加阴影效果 */
// 创建阴影效果
QGraphicsDropShadowEffect *effect = new QGraphicsDropShadowEffect(this);
effect->setBlurRadius(24);
effect->setOffset(0, 3);
effect->setColor(qRgba(149,157,165,20));
tableItem = qobject_cast<QWidget*>(children[i]);
tableItem->setGraphicsEffect(effect);
}
}
}
/**
* @brief
* @date 202473
* @author myz
*/
void InjuryDisplayUI::on_detailBtn_clicked()
{
SingleCasualtyInfo* singleCasualty = new SingleCasualtyInfo(this);
singleCasualty->show();
}
/**
* @brief
* @date 202474
* @author myz
*/
void InjuryDisplayUI::SingleCasualtyDisplay()
{
/* 得到所有的列表显示框 */
const QObjectList children = ui->ListWidget->children();
// 用于指向按钮的ptr
QPushButton* btnPtr;
QObjectList children_elements;
children_elements = children[1]->children();
btnPtr = qobject_cast<QPushButton*>(children_elements[4]);
connect(btnPtr,&QPushButton::clicked,this,&InjuryDisplayUI::on_detailBtn_clicked);
}

@ -7,7 +7,7 @@ constexpr int COLUMN_NUM = 7;
/** /**
* @brief * @brief
* @date 2024610 * @date 2024610
* @author yyz * @author myz
*/ */
class StateDelegate : public QStyledItemDelegate class StateDelegate : public QStyledItemDelegate
{ {

@ -0,0 +1,14 @@
#include "../headfiles/singlecasualtyinfo.h"
#include "ui_singlecasualtyinfo.h"
SingleCasualtyInfo::SingleCasualtyInfo(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::SingleCasualtyInfo)
{
ui->setupUi(this);
}
SingleCasualtyInfo::~SingleCasualtyInfo()
{
delete ui;
}

@ -2,7 +2,7 @@
/** /**
* @brief * @brief
* @date 2024610 * @date 2024610
* @author yyz * @author myz
* @attention ui uavlist.ui robotlistUI * @attention ui uavlist.ui robotlistUI
*/ */
#include "../headfiles/uavlist.h" #include "../headfiles/uavlist.h"
@ -13,7 +13,7 @@ constexpr int COLUMN_NUM = 7;
/** /**
* @brief * @brief
* @date 2024610 * @date 2024610
* @author yyz * @author myz
*/ */
class StateDelegate : public QStyledItemDelegate class StateDelegate : public QStyledItemDelegate
{ {

@ -109,13 +109,13 @@ max-height:60px;
QLabel{ QLabel{
min-width: 50px; min-width: 45px;
min-height:50px; min-height:45px;
max-width:60px; max-width:45px;
max-height:60px; max-height:45px;
} }
QPushButton:hover { QPushButton:hover {
@ -134,6 +134,9 @@ QPushButton:hover QLabel {
}</string> }</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -161,18 +164,18 @@ QPushButton:hover QLabel {
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>50</width> <width>45</width>
<height>50</height> <height>45</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>45</width>
<height>60</height> <height>45</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">border-image: url(:/image/res/image/tab.svg);</string> <string notr="true">image: url(:/guidingui/res/icon/icons_guidingUI/2.svg);</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@ -216,62 +219,7 @@ QPushButton:hover QLabel {
<layout class="QHBoxLayout" name="robotCoordsBtnLayout"/> <layout class="QHBoxLayout" name="robotCoordsBtnLayout"/>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<layout class="QHBoxLayout" name="addRobotBtnLayout"> <layout class="QHBoxLayout" name="addRobotBtnLayout"/>
<item>
<widget class="QLabel" name="addRobotBtnIcon">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/image/res/image/robotbtn.svg);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="addRobotBtn">
<property name="minimumSize">
<size>
<width>190</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>60</height>
</size>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>-1</pointsize>
</font>
</property>
<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>
</layout>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<layout class="QHBoxLayout" name="mapBtnLayout"> <layout class="QHBoxLayout" name="mapBtnLayout">
@ -282,18 +230,19 @@ border: none;
<widget class="QLabel" name="mapButtonIcon"> <widget class="QLabel" name="mapButtonIcon">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>50</width> <width>45</width>
<height>50</height> <height>45</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>45</width>
<height>60</height> <height>45</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">border-image: url(:/image/res/image/mapbtn.svg);</string> <string notr="true">image: url(:/guidingui/res/icon/icons_guidingUI/4.svg);
</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@ -334,55 +283,7 @@ border: none;
</layout> </layout>
</item> </item>
<item row="4" column="0"> <item row="4" column="0">
<layout class="QHBoxLayout" name="addUAVBtnLayout"> <layout class="QHBoxLayout" name="addUAVBtnLayout"/>
<item>
<widget class="QLabel" name="addUAVBtnIcon">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/image/res/image/UAV.svg);</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="addUAVBtn">
<property name="minimumSize">
<size>
<width>190</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>60</height>
</size>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>-1</pointsize>
</font>
</property>
<property name="text">
<string>添加无人机</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item row="5" column="0"> <item row="5" column="0">
<layout class="QHBoxLayout" name="UAVListBtnLayout"> <layout class="QHBoxLayout" name="UAVListBtnLayout">
@ -390,21 +291,22 @@ border: none;
<widget class="QLabel" name="UAVListBtnIcon"> <widget class="QLabel" name="UAVListBtnIcon">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>50</width> <width>45</width>
<height>50</height> <height>45</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>45</width>
<height>60</height> <height>45</height>
</size> </size>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">border-image: url(:/image/res/image/tab.svg);</string> <string notr="true">image: url(:/guidingui/res/icon/icons_guidingUI/3.svg);
</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@ -447,18 +349,18 @@ border: none;
<widget class="QLabel" name="casualtyInfoBtnIcon"> <widget class="QLabel" name="casualtyInfoBtnIcon">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>50</width> <width>45</width>
<height>50</height> <height>45</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>45</width>
<height>60</height> <height>45</height>
</size> </size>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">border-image: url(:/image/res/image/health.svg);</string> <string notr="true">image: url(:/guidingui/res/icon/icons_guidingUI/1.svg);</string>
</property> </property>
<property name="text"> <property name="text">
<string/> <string/>
@ -499,7 +401,21 @@ border: none;
<layout class="QHBoxLayout" name="casualtyListBtnLayout"/> <layout class="QHBoxLayout" name="casualtyListBtnLayout"/>
</item> </item>
<item row="9" column="0"> <item row="9" column="0">
<layout class="QHBoxLayout" name="ctrPanelBtnLayout"/> <layout class="QHBoxLayout" name="ctrPanelBtnLayout">
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
</layout> </layout>
</widget> </widget>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,247 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SingleCasualtyInfo</class>
<widget class="QMainWindow" name="SingleCasualtyInfo">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>650</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<property name="styleSheet">
<string notr="true">min-width: 500px;
min-height:650px;
max-width: 500px;
max-height: 650px;</string>
</property>
<widget class="QWidget" name="centralwidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">#centralwidget{
background-color: rgb(246, 247, 250);
min-width: 500px;
min-height:650px;
max-width: 500px;
max-height: 650px;
}
#header{
background-color: rgb(15, 18, 34);
max-height: 40px;
min-height:40px;
min-width: 500px;
max-width: 500px;
}
#analyInfo{
min-height:300px;
max-height:300px;
min-width: 500px;
max-width: 500px;
}
#normalInfo{
min-height:300px;
max-height:300px;
min-width: 500px;
max-width: 500px;
}
</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="3" column="0">
<widget class="QWidget" name="normalInfo" native="true">
<property name="styleSheet">
<string notr="true">photo{
min-width: 50px;
min-height:50px;
max-width:50px;
max-height:50px;
}</string>
</property>
<widget class="QWidget" name="photo" native="true">
<property name="geometry">
<rect>
<x>9</x>
<y>9</y>
<width>200</width>
<height>290</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">#photo{
border-image: url(:/singleCasualtyInfo/res/image/image_singlecasualtyui/1.png);
min-width:200px;
min-height:290px;
max-width: 200px;
max-height:290px;
border-radius: 20px;
}</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>230</x>
<y>10</y>
<width>500</width>
<height>650</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>500</width>
<height>650</height>
</size>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>28</pointsize>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">#label{
color: rgb(15, 18, 34);
}</string>
</property>
<property name="text">
<string>姓名/序号</string>
</property>
</widget>
<widget class="QLabel" name="levTag">
<property name="geometry">
<rect>
<x>230</x>
<y>70</y>
<width>271</width>
<height>41</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>271</width>
<height>41</height>
</size>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>16</pointsize>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">#levTag{
color: rgb(159, 159, 161);
font: 16pt &quot;微软雅黑&quot;;
min-width: 271px;
min-height:41px;
max-width:271px;
max-height:41px;
}</string>
</property>
<property name="text">
<string>伤情等级</string>
</property>
</widget>
<widget class="QLabel" name="lev">
<property name="geometry">
<rect>
<x>230</x>
<y>110</y>
<width>80</width>
<height>41</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>80</width>
<height>41</height>
</size>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>16</pointsize>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">#lev{
color: rgb(255, 0, 0);
font: 16pt &quot;微软雅黑&quot;;
min-width: 80px;
min-height:41px;
max-width:80px;
max-height:41px;
border-radius: 24px;
}</string>
</property>
<property name="text">
<string>严重</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</widget>
</item>
<item row="1" column="0">
<widget class="QFrame" name="header">
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QWidget" name="analyInfo" native="true">
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);
border-radius: 15px;
min-width:400px;</string>
</property>
<layout class="QGridLayout" name="gridLayout_3"/>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

@ -1,20 +0,0 @@
QMAKE_CXX.QT_COMPILER_STDCXX = 199711L
QMAKE_CXX.QMAKE_MSC_VER = 1931
QMAKE_CXX.QMAKE_MSC_FULL_VER = 193131106
QMAKE_CXX.COMPILER_MACROS = \
QT_COMPILER_STDCXX \
QMAKE_MSC_VER \
QMAKE_MSC_FULL_VER
QMAKE_CXX.INCDIRS = \
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.31.31103\\ATLMFC\\include" \
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.31.31103\\include" \
"C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.19041.0\\ucrt" \
"C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.19041.0\\\\shared" \
"C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.19041.0\\\\um" \
"C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.19041.0\\\\winrt" \
"C:\\Program Files (x86)\\Windows Kits\\10\\\\include\\10.0.19041.0\\\\cppwinrt"
QMAKE_CXX.LIBDIRS = \
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.31.31103\\ATLMFC\\lib\\x64" \
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.31.31103\\lib\\x64" \
"C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.19041.0\\ucrt\\x64" \
"C:\\Program Files (x86)\\Windows Kits\\10\\\\lib\\10.0.19041.0\\\\um\\x64"

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save