After Width: | Height: | Size: 700 KiB |
@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <QMainWindow>
|
||||
#include "ui_Prediction.h"
|
||||
#include <QPixmap>
|
||||
#include <QPainter>
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
|
||||
class Prediction : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Prediction(QPixmap image, double start_pos_x, double start_pos_y, double length, double width, double height, QWidget *parent = nullptr);
|
||||
~Prediction();
|
||||
//QPainter *painter;
|
||||
|
||||
private:
|
||||
Ui::PredictionClass ui;
|
||||
double distance_of_pix(int height,int length,int width);
|
||||
int onclick_wind_button(double dis,int type,int Tree_Type,int start_pos_x,int start_pos_y,int length,int wid);
|
||||
void getWeatherInfo(QString city);
|
||||
};
|
@ -0,0 +1,56 @@
|
||||
#include "Setting.h"
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
#include <QMessageBox>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
|
||||
Setting::Setting(QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
/*float longitude = ui.longitude->text().toFloat();
|
||||
float latitude = ui.latitude->text().toFloat();
|
||||
int hours = ui.hours->text().toInt();
|
||||
int minutes = ui.minutes->text().toInt();
|
||||
int seconds = ui.seconds->text().toInt();*/
|
||||
tcpsocket = new QTcpSocket(this);
|
||||
tcpsocket->connectToHost("192.168.8.100", 9090);
|
||||
connect(ui.finished, &QPushButton::clicked, this, &Setting::on_finished_button);
|
||||
QString styleSheet = QString("background-image:url(:/background_1.png);\
|
||||
background-repeat:no-repeat;background-position:center;").arg(QCoreApplication::applicationDirPath());
|
||||
this->setStyleSheet(styleSheet);
|
||||
this->resize(806, 453);
|
||||
ui.finished->setStyleSheet("background-color: white;");
|
||||
}
|
||||
|
||||
Setting::~Setting()
|
||||
{
|
||||
}
|
||||
void Setting::on_finished_button() {
|
||||
float longitude = ui.longitude->text().toFloat();
|
||||
float latitude = ui.latitude->text().toFloat();
|
||||
int hours = ui.hours->text().toInt();
|
||||
int minutes = ui.minutes->text().toInt();
|
||||
int seconds = ui.seconds->text().toInt();
|
||||
int x = ui.x->text().toInt();
|
||||
int y = ui.y->text().toInt();
|
||||
int z = ui.z->text().toInt();
|
||||
QJsonObject msg;
|
||||
msg.insert("type", "Set");
|
||||
msg.insert("lon", longitude);
|
||||
msg.insert("lat", latitude);
|
||||
msg.insert("hours", hours);
|
||||
msg.insert("minutes", minutes);
|
||||
msg.insert("seconds", seconds);
|
||||
msg.insert("x", x);
|
||||
msg.insert("y", y);
|
||||
msg.insert("z", z);
|
||||
QJsonDocument jsonDocument;
|
||||
jsonDocument.setObject(msg);
|
||||
QByteArray dataArray = jsonDocument.toJson();
|
||||
if (tcpsocket->write(dataArray) == -1) {
|
||||
qDebug() << "send TCP data package failed!";
|
||||
}
|
||||
qDebug() << "sent!";
|
||||
}
|
@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SettingClass</class>
|
||||
<widget class="QMainWindow" name="SettingClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>871</width>
|
||||
<height>571</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Setting</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<widget class="QWidget" name="gridLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>100</y>
|
||||
<width>451</width>
|
||||
<height>241</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="Start_Timer">
|
||||
<property name="text">
|
||||
<string>出发时间:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QLineEdit" name="seconds">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>秒</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="hours">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>时</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="longitude">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>经度</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="minutes">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>分</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="latitude">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>纬度</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="Speed_Lable">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>目的地</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>x,y,z</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="x">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="y">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLineEdit" name="z">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="finished">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>360</x>
|
||||
<y>370</y>
|
||||
<width>93</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>完成</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>871</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
After Width: | Height: | Size: 961 KiB |
After Width: | Height: | Size: 61 KiB |
@ -0,0 +1,104 @@
|
||||
#include "UAV_UI_new.h"
|
||||
#include "Setting.h"
|
||||
#include "tips.h"
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <string.h>
|
||||
#include <qlabel.h>
|
||||
#include <qdebug.h>
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
#include <QMessageBox>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
using namespace cv;
|
||||
using namespace std;
|
||||
VideoCapture cap;
|
||||
Prediction* Predict_UI;
|
||||
int length, wid, start_pos_x, start_pos_y, heig,slope,elevation;
|
||||
const string VideoCaptureAdress = "http://admin:admin@192.168.8.126:8081";
|
||||
//const string VideoCaptureAdress = "rtsp://192.168.144.108:8000/375897"; //热成像
|
||||
//const string VideoCaptureAdress = "rtsp://192.168.144.108:8000/165506"; //nomal
|
||||
//const string VideoCaptureAdress = "C:\\Users\\87334\\Videos\\Captures\\Fast_sent.mp4";
|
||||
UAV_UI_new::UAV_UI_new(QWidget* parent)
|
||||
: QMainWindow(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
timer = new QTimer(this);
|
||||
ui.display->setStyleSheet("border:1px solid black ");
|
||||
ui.play_tag->setStyleSheet("background-color:white");
|
||||
connect(ui.Settings, &QPushButton::clicked, this, &UAV_UI_new::onclick_Setting_button);
|
||||
connect(ui.connection, &QPushButton::clicked, this, &UAV_UI_new::on_connection_button);
|
||||
connect(ui.stop, &QPushButton::clicked, this, &UAV_UI_new::on_stop_button);
|
||||
connect(ui.Prediction, &QPushButton::clicked, this, &UAV_UI_new::on_predict_button);
|
||||
connect(timer, SIGNAL(timeout()), this, SLOT(importImage()));
|
||||
tcpsocket = new QTcpSocket(this);
|
||||
tcpsocket->connectToHost("192.168.8.100", 9090);
|
||||
connect(tcpsocket, &QTcpSocket::connected, [=]() {
|
||||
QMessageBox *tip = new QMessageBox(this);
|
||||
//QLabel *tip = new QLabel(this);
|
||||
tip->setText("连接成功");
|
||||
tip->setInformativeText("connected successfully");
|
||||
tip->setStandardButtons(QMessageBox::Ok);
|
||||
tip->show();
|
||||
});
|
||||
connect(tcpsocket, &QTcpSocket::readyRead, [=]() {
|
||||
QByteArray jsonData = tcpsocket->readAll(); // 接收 JSON 数据
|
||||
QJsonDocument jsonDocument = QJsonDocument::fromJson(jsonData);
|
||||
QJsonObject jsonObject = jsonDocument.object();
|
||||
QString type = jsonObject.value("type").toString();
|
||||
if (type == "Alarming") {
|
||||
QPixmap image_Pre(":/Fire.png");
|
||||
tips* tip = new tips(image_Pre);
|
||||
tip->show();
|
||||
ui.Prediction->setStyleSheet("color:red");
|
||||
length = jsonObject.value("length").toDouble();
|
||||
wid = jsonObject.value("width").toDouble();
|
||||
qDebug() << jsonObject.value("center_x").toDouble() << jsonObject.value("length").toDouble() / 2;
|
||||
start_pos_x = jsonObject.value("center_x").toDouble() - jsonObject.value("length").toDouble() / 2;
|
||||
start_pos_y = jsonObject.value("center_y").toDouble() - jsonObject.value("width").toDouble() / 2;
|
||||
qDebug() << start_pos_x << " " << start_pos_y << "mAIN";
|
||||
slope = jsonObject.value("slope").toDouble();
|
||||
elevation = jsonObject.value("slope").toDouble();
|
||||
}
|
||||
if (type == "Set") {
|
||||
heig = jsonObject.value("z").toInt();
|
||||
}
|
||||
});
|
||||
QString styleSheet = QString("background-image:url(:/background_3.png);\
|
||||
background-repeat:no-repeat;background-position:center;").arg(QCoreApplication::applicationDirPath());
|
||||
this->setStyleSheet(styleSheet);
|
||||
this->resize(1440, 720);
|
||||
}
|
||||
|
||||
UAV_UI_new::~UAV_UI_new()
|
||||
{}
|
||||
void UAV_UI_new::on_connection_button() {
|
||||
cap.open(VideoCaptureAdress);
|
||||
timer->start(100);
|
||||
};
|
||||
void UAV_UI_new::onclick_Setting_button() {
|
||||
Settings_UI.show();
|
||||
}
|
||||
void UAV_UI_new::importImage() {
|
||||
Mat image;
|
||||
cap >> image;
|
||||
cvtColor(image, image, COLOR_BGR2RGB);
|
||||
cv::resize(image, image, Size(640, 480));
|
||||
QPixmap showimage = QPixmap::fromImage(QImage((const uchar*)(image.data),
|
||||
image.cols,
|
||||
image.rows,
|
||||
image.step,
|
||||
QImage::Format_RGB888));
|
||||
ui.display->setPixmap(showimage);
|
||||
image_Pre = showimage;
|
||||
}
|
||||
void UAV_UI_new::on_stop_button() {
|
||||
timer->stop();
|
||||
cap.release();
|
||||
ui.display->clear();
|
||||
}
|
||||
void UAV_UI_new::on_predict_button() {
|
||||
QPixmap image_Pre(":/Fire.png");
|
||||
Predict_UI = new Prediction(image_Pre, start_pos_x,start_pos_y,length,wid,100);
|
||||
Predict_UI->show();
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include "ui_UAV_UI_new.h"
|
||||
#include "Setting.h"
|
||||
#include "Prediction.h"
|
||||
#include <QTimer>
|
||||
#include <qpushbutton.h>
|
||||
#include <QPushbutton>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
|
||||
class UAV_UI_new : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
UAV_UI_new(QWidget *parent = nullptr);
|
||||
~UAV_UI_new();
|
||||
|
||||
private:
|
||||
Ui::UAV_UI_newClass ui;
|
||||
QTimer* timer;
|
||||
double rate;
|
||||
QTcpServer* tcpserver;
|
||||
QTcpSocket* tcpsocket;
|
||||
Setting Settings_UI;
|
||||
QPixmap image_Pre;
|
||||
|
||||
private slots:
|
||||
void on_connection_button();
|
||||
void on_stop_button();
|
||||
void importImage();
|
||||
void onclick_Setting_button();
|
||||
void on_predict_button();
|
||||
};
|
@ -0,0 +1,9 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>background_1.png</file>
|
||||
<file>background_2.png</file>
|
||||
<file>background_3.png</file>
|
||||
<file>Fire.png</file>
|
||||
<file>kill_fire.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>UAV_UI_newClass</class>
|
||||
<widget class="QMainWindow" name="UAV_UI_newClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1440</width>
|
||||
<height>1000</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1440</width>
|
||||
<height>1200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>UAV_UI_new</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>60</y>
|
||||
<width>642</width>
|
||||
<height>509</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="display">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="stop">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>820</x>
|
||||
<y>140</y>
|
||||
<width>93</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>关闭图像</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="connection">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>820</x>
|
||||
<y>70</y>
|
||||
<width>93</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>连接图像</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="play_tag">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>40</y>
|
||||
<width>81</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>实时图像</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="Settings">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1350</x>
|
||||
<y>0</y>
|
||||
<width>93</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>设置</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="action">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>820</x>
|
||||
<y>200</y>
|
||||
<width>93</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>出警</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="Prediction">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>820</x>
|
||||
<y>260</y>
|
||||
<width>93</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>预测</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1440</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
<include location="UAV_UI_new.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>qml;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Form Files">
|
||||
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
|
||||
<Extensions>ui</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Translation Files">
|
||||
<UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
|
||||
<Extensions>ts</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="UAV_UI_new.qrc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</QtRcc>
|
||||
<QtUic Include="UAV_UI_new.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtMoc Include="UAV_UI_new.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<ClCompile Include="UAV_UI_new.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tips.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Setting.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Prediction.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="tips.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Setting.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Prediction.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="tips.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="Setting.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="Prediction.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource1.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="levelToSpeed.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="FP.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="UAV_UI_new1.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="background.jpg">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
<Image Include="Settings.jpg">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
<Image Include="Settings_2.jpg">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Image>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<QtLastBackgroundBuild>2023-06-14T08:40:27.1306328Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<QtLastBackgroundBuild>2023-06-14T08:40:27.2066207Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
</Project>
|
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 134 KiB |
After Width: | Height: | Size: 232 KiB |
After Width: | Height: | Size: 661 KiB |
After Width: | Height: | Size: 159 KiB |
@ -0,0 +1,14 @@
|
||||
#include "UAV_UI_new.h"
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <string.h>
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
UAV_UI_new w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
#include "tips.h"
|
||||
|
||||
tips::tips(QPixmap image,QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
ui.display->setPixmap(image);
|
||||
connect(ui.action, &QPushButton::clicked, this, &tips::on_action_button);
|
||||
ui.action->setStyleSheet("background-color:red;");
|
||||
QString styleSheet = QString("background-image:url(:/kill_fire.jpg);\
|
||||
background-repeat:no-repeat;background-position:center;").arg(QCoreApplication::applicationDirPath());
|
||||
this->setStyleSheet(styleSheet);
|
||||
}
|
||||
|
||||
tips::~tips()
|
||||
{
|
||||
}
|
||||
void tips::on_action_button() {
|
||||
//·Å¾¯±¨
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include <QMainWindow>
|
||||
#include "ui_tips.h"
|
||||
|
||||
class tips : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tips(QPixmap image, QWidget *parent = nullptr);
|
||||
~tips();
|
||||
|
||||
private:
|
||||
Ui::tipsClass ui;
|
||||
void on_action_button();
|
||||
};
|
@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>tipsClass</class>
|
||||
<widget class="QMainWindow" name="tipsClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1130</width>
|
||||
<height>644</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>1130</width>
|
||||
<height>644</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>1130</width>
|
||||
<height>644</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>tips</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<widget class="QLabel" name="Pre_tag">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>19</x>
|
||||
<y>6</y>
|
||||
<width>81</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>火势状况</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="display">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="action">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>830</x>
|
||||
<y>40</y>
|
||||
<width>93</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>出警</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1130</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|