Compare commits

..

No commits in common. 'main' and 'dev' have entirely different histories.
main ... dev

@ -14,7 +14,7 @@ QMAKE_PROJECT_DEPTH = 0
# QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\" # QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
#程序版本 #程序版本
VERSION = 1.1.0.5 VERSION = 1.1.0.4
#程序版本 #程序版本
QMAKE_TARGET_COMPANY = "HTSDFP" QMAKE_TARGET_COMPANY = "HTSDFP"

@ -348,7 +348,7 @@ void GDDCCmdDlg::on_pushButton_3_4_released() {
clearTJDCCmdBuffer(); clearTJDCCmdBuffer();
TJDCCmdBuffer[0] = (std::byte)0x45; TJDCCmdBuffer[0] = (std::byte)0x45;
TJDCCmdBuffer[1] = (std::byte)0x00; TJDCCmdBuffer[1] = (std::byte)0x00;
sendCurDate(TJDCCmdBuffer, 3); sendCurDate(TJDCCmdBuffer, 1);
} }
// 变倍- // 变倍-

@ -97,7 +97,7 @@
<rect> <rect>
<x>174</x> <x>174</x>
<y>150</y> <y>150</y>
<width>168</width> <width>161</width>
<height>106</height> <height>106</height>
</rect> </rect>
</property> </property>

@ -584,9 +584,9 @@ void GDDCStateInfo::UDPMessageReceive(QByteArray &da, int size) {
} }
bool GDDCStateInfo::checkdata(QByteArray buffer, int length, int type) { bool GDDCStateInfo::checkdata(QByteArray buffer, int length, int type) {
if (length < 64) { // if (length != 64) {
return false; // return false;
} // }
if ((buffer.at(0) != '\xFC') || (buffer.at(1) != '\x2C') || if ((buffer.at(0) != '\xFC') || (buffer.at(1) != '\x2C') ||
buffer.at(63) != '\xF0') { buffer.at(63) != '\xF0') {
return false; return false;

@ -11,7 +11,6 @@
#include <iostream> #include <iostream>
#include <QPixmap> #include <QPixmap>
#include "ui_gddcdlg.h" #include "ui_gddcdlg.h"
#include <QWidget>
#pragma comment(lib, "Wtsapi32.lib") #pragma comment(lib, "Wtsapi32.lib")
using namespace std; using namespace std;
@ -312,34 +311,11 @@ void GDDCdlg::mouseMoveEvent(QMouseEvent *event) {
QPointF diff = event->pos() - _dragStartPositon; QPointF diff = event->pos() - _dragStartPositon;
qDebug() << "x:" << diff.x() <<"y:" <<diff.y(); qDebug() << "x:" << diff.x() <<"y:" <<diff.y();
m_GDDCCmdDlg->setMoveParm(diff); m_GDDCCmdDlg->setMoveParm(diff);
_moveFlag = true;
if(qAbs(diff.x()) > 5 || qAbs(diff.y()) >5)//像素点超过5ptx才算移动否则为跟踪 firstLocation->move((_dragStartPositon - QPoint(firstLocation->width()/2, firstLocation->height()/2)).toPoint());
{ lastLocation->move(event->pos() - QPoint(lastLocation->width() / 2, lastLocation->height() / 2));
_moveFlag = true; firstLocation->show();
firstLocation->move((_dragStartPositon - QPoint(firstLocation->width()/2, firstLocation->height()/2)).toPoint()); lastLocation->show();
lastLocation->move(event->pos() - QPoint(lastLocation->width() / 2, lastLocation->height() / 2));
firstLocation->show();
lastLocation->show();
}
QPointF widgetPos = mapFromGlobal(event->globalPosition());
//如果移动的时候超过了画面显示区域,则自动退出伺服控制
if(!ui->WgtffmpegVideo->rect().contains(widgetPos.toPoint()))
{
_moveFlag = false;
std::byte buffer[10] = {static_cast<std::byte>(0)};
buffer[5] = (std::byte)0x70;
buffer[6] = (std::byte)0x00;
buffer[7] = (std::byte)0x00;
buffer[8] = (std::byte)0x00;
buffer[9] = (std::byte)0x00;
// 发送3次
m_GDDCCmdDlg->sendCurDate(buffer, 3);
firstLocation->hide();
lastLocation->hide();
}
} }
} }
@ -350,7 +326,7 @@ void GDDCdlg::mouseReleaseEvent(QMouseEvent *event)
if(event->button() == Qt::LeftButton && _moveFlag) if(event->button() == Qt::LeftButton && _moveFlag)
{ {
_moveFlag = false; _moveFlag = false;
std::byte buffer[10] = {static_cast<std::byte>(0)}; std::byte buffer[10];
buffer[5] = (std::byte)0x70; buffer[5] = (std::byte)0x70;
buffer[6] = (std::byte)0x00; buffer[6] = (std::byte)0x00;
buffer[7] = (std::byte)0x00; buffer[7] = (std::byte)0x00;
@ -471,7 +447,7 @@ void GDDCdlg::resizeUI() {
void GDDCdlg::setGlobalSetMap( void GDDCdlg::setGlobalSetMap(
std::unordered_map<QString, settingStruct> &gSetMap) { std::unordered_map<QString, settingStruct> &gSetMap) {
if (m_DlgGDDCSet) { if (m_DlgGDDCSet) {
m_DlgGDDCSet->initPullURL(gSetMap["Pod"].net.remoteIp); m_DlgGDDCSet->initPullURL(gSetMap["光电吊舱"].net.remoteIp);
} }
} }

@ -101,8 +101,6 @@ void deviceStateDlg::initParam() {
cmdlist[2] << "/c" << "ping" << "www.baidu.com -n 2"; cmdlist[2] << "/c" << "ping" << "www.baidu.com -n 2";
cmdlist[3] << "/c" << "ping" << "www.baidu.com -n 2"; cmdlist[3] << "/c" << "ping" << "www.baidu.com -n 2";
cmdlist[4] << "/c" << "ping" << "www.baidu.com -n 2"; cmdlist[4] << "/c" << "ping" << "www.baidu.com -n 2";
cmdlist[5] << "/c" << "ping" << "www.baidu.com -n 2";
cmdlist[6] << "/c" << "ping" << "www.baidu.com -n 2";
startNetDetn(); startNetDetn();
} }
@ -150,22 +148,6 @@ void deviceStateDlg::receiveResult(int id, QString result,QString delay) {
} }
ui->pushButton_state_3DCamra->setToolTip(delay); ui->pushButton_state_3DCamra->setToolTip(delay);
break; break;
case 5:
if (result == "在线") {
ui->pushButton_state_rescue->setIcon(m_greenIcon);
} else {
ui->pushButton_state_rescue->setIcon(m_redIcon);
}
ui->pushButton_state_rescue->setToolTip(delay);
break;
case 6:
if (result == "在线") {
ui->pushButton_state_PDT->setIcon(m_greenIcon);
} else {
ui->pushButton_state_PDT->setIcon(m_redIcon);
}
ui->pushButton_state_PDT->setToolTip(delay);
break;
default: default:
break; break;
} }
@ -209,20 +191,6 @@ void deviceStateDlg::setDeviceIP(int id, settingStruct param) {
cmdlist[4] << strIp; cmdlist[4] << strIp;
m_networkDetection[4]->DyChangeCmdList(cmdlist[4]); // 更新到网络检测线程 m_networkDetection[4]->DyChangeCmdList(cmdlist[4]); // 更新到网络检测线程
break; break;
case HomePageSetingWidget::RescueLoading:
strIp = stringIPSelect(param.url);
strIp="/c ping " + strIp + " -n 1";
cmdlist[5].clear();
cmdlist[5] << strIp;
m_networkDetection[5]->DyChangeCmdList(cmdlist[5]); // 更新到网络检测线程
break;
case HomePageSetingWidget::PdtLoading:
strIp = stringIPSelect(param.url);
strIp="/c ping " + strIp + " -n 1";
cmdlist[6].clear();
cmdlist[6] << strIp;
m_networkDetection[6]->DyChangeCmdList(cmdlist[6]); // 更新到网络检测线程
break;
default: default:
break; break;
} }
@ -260,13 +228,11 @@ QString deviceStateDlg::stringIPSelect(QString str) {
void deviceStateDlg::setUrl( void deviceStateDlg::setUrl(
std::unordered_map<QString, settingStruct> &urlMap) { std::unordered_map<QString, settingStruct> &urlMap) {
m_urlMap = urlMap; m_urlMap = urlMap;
setDeviceIP(HomePageSetingWidget::GDDC, m_urlMap["Pod"]); setDeviceIP(HomePageSetingWidget::GDDC, m_urlMap["光电吊舱"]);
setDeviceIP(HomePageSetingWidget::L_Link, m_urlMap["L-Link"]); setDeviceIP(HomePageSetingWidget::L_Link, m_urlMap["L链"]);
setDeviceIP(HomePageSetingWidget::Adhoc_Network, m_urlMap["HocNetwork"]); setDeviceIP(HomePageSetingWidget::Adhoc_Network, m_urlMap["宽带自组网"]);
setDeviceIP(HomePageSetingWidget::Satelite_Comm, m_urlMap["SatelliteComm"]); setDeviceIP(HomePageSetingWidget::Satelite_Comm, m_urlMap["机载卫通"]);
setDeviceIP(HomePageSetingWidget::ModelCamera, m_urlMap["ModelCamera"]); setDeviceIP(HomePageSetingWidget::ModelCamera, m_urlMap["三维建模"]);
setDeviceIP(HomePageSetingWidget::RescueLoading, m_urlMap["RescueLoading"]);
setDeviceIP(HomePageSetingWidget::PdtLoading, m_urlMap["PdtLoading"]);
} }
// 开始网络监测 // 开始网络监测
void deviceStateDlg::startNetDetn() { void deviceStateDlg::startNetDetn() {

@ -7,7 +7,7 @@
#include <QThread> #include <QThread>
#include <QTimer> #include <QTimer>
#include <QWidget> #include <QWidget>
#define deviceNum 7 #define deviceNum 5
namespace Ui { namespace Ui {
class deviceStateDlg; class deviceStateDlg;
} }
@ -52,8 +52,6 @@ public:
// 2 自组网 // 2 自组网
// 3ku卫通 // 3ku卫通
// 4三维相机 // 4三维相机
// 5 搜救载荷
// 6 PDT
QStringList cmdlist[deviceNum]; QStringList cmdlist[deviceNum];
QIcon m_greyIcon,m_greenIcon,m_redIcon; QIcon m_greyIcon,m_greenIcon,m_redIcon;
networkDetection *m_networkDetection[deviceNum]; networkDetection *m_networkDetection[deviceNum];

@ -22,8 +22,6 @@ void HomePageSetingWidget::init() {
_lLink.url = _configIni->value("L-Link/IP").toString(); _lLink.url = _configIni->value("L-Link/IP").toString();
_adHocNetwork.url = _configIni->value("HocNetwork/IP").toString(); _adHocNetwork.url = _configIni->value("HocNetwork/IP").toString();
_satelliteComm.url = _configIni->value("SatelliteComm/IP").toString(); _satelliteComm.url = _configIni->value("SatelliteComm/IP").toString();
_rescueLoad.url = _configIni->value("RescueLoading/IP").toString();
_pdtLoad.url = _configIni->value("PdtLoading/IP").toString();
_ModelCamera.net.remoteIp = _ModelCamera.net.remoteIp =
_configIni->value("ModelCamera/remoteIp").toString(); _configIni->value("ModelCamera/remoteIp").toString();
_ModelCamera.net.remotePort = _ModelCamera.net.remotePort =
@ -39,16 +37,12 @@ void HomePageSetingWidget::init() {
_allParamMap.insert({"HocNetwork", _adHocNetwork}); _allParamMap.insert({"HocNetwork", _adHocNetwork});
_allParamMap.insert({"SatelliteComm", _satelliteComm}); _allParamMap.insert({"SatelliteComm", _satelliteComm});
_allParamMap.insert({"ModelCamera", _ModelCamera}); _allParamMap.insert({"ModelCamera", _ModelCamera});
_allParamMap.insert({"RescueLoading", _rescueLoad});
_allParamMap.insert({"PdtLoading", _pdtLoad});
// 显示到配置页面 // 显示到配置页面
ui->GDDCLineEdit->setText(_GDDC.net.remoteIp); ui->GDDCLineEdit->setText(_GDDC.net.remoteIp);
ui->lLinkLineEdit->setText(_lLink.url); ui->lLinkLineEdit->setText(_lLink.url);
ui->netLineEdit->setText(_adHocNetwork.url); ui->netLineEdit->setText(_adHocNetwork.url);
ui->sateliteLineEdit->setText(_satelliteComm.url); ui->sateliteLineEdit->setText(_satelliteComm.url);
ui->RescueLineEdit->setText(_rescueLoad.url);
ui->PdtLineEdit->setText(_pdtLoad.url);
ui->modelCameraLineEditRemoteIp->setText(_ModelCamera.net.remoteIp); ui->modelCameraLineEditRemoteIp->setText(_ModelCamera.net.remoteIp);
ui->modelCameraLineEditRemotePort->setText( ui->modelCameraLineEditRemotePort->setText(
QString::number(_ModelCamera.net.remotePort)); QString::number(_ModelCamera.net.remotePort));
@ -90,24 +84,6 @@ void HomePageSetingWidget::on_sateliteButton_clicked() {
_configIni->setValue("SatelliteComm/IP", _satelliteComm.url); _configIni->setValue("SatelliteComm/IP", _satelliteComm.url);
emit sendOneSet(Satelite_Comm, _satelliteComm); emit sendOneSet(Satelite_Comm, _satelliteComm);
} }
//搜救载荷
void HomePageSetingWidget::on_RescueButton_clicked()
{
// 写参数到配置文件
_rescueLoad.url = ui->RescueLineEdit->text();
_configIni->setValue("RescueLoading/IP", _rescueLoad.url);
emit sendOneSet(RescueLoading, _rescueLoad);
}
void HomePageSetingWidget::on_PdtButton_clicked()
{
// 写参数到配置文件
_pdtLoad.url = ui->PdtLineEdit->text();
_configIni->setValue("PdtLoading/IP", _pdtLoad.url);
emit sendOneSet(PdtLoading, _pdtLoad);
}
// 三维相机 // 三维相机
void HomePageSetingWidget::on_modelCameraButton_clicked() { void HomePageSetingWidget::on_modelCameraButton_clicked() {
// 写参数到配置文件 // 写参数到配置文件
@ -130,9 +106,6 @@ void HomePageSetingWidget::on_oneKeyButton_clicked() {
on_netButton_clicked(); on_netButton_clicked();
on_sateliteButton_clicked(); on_sateliteButton_clicked();
on_modelCameraButton_clicked(); on_modelCameraButton_clicked();
on_sateliteButton_clicked();
on_RescueButton_clicked();
on_PdtButton_clicked();
} }
/************************************************* /*************************************************
* @func getAllParam * @func getAllParam
@ -142,5 +115,3 @@ void HomePageSetingWidget::on_oneKeyButton_clicked() {
std::unordered_map<QString, settingStruct> HomePageSetingWidget::getAllParam() { std::unordered_map<QString, settingStruct> HomePageSetingWidget::getAllParam() {
return _allParamMap; return _allParamMap;
} }

@ -23,9 +23,7 @@ private:
settingStruct _GDDC; // 光电吊舱 settingStruct _GDDC; // 光电吊舱
settingStruct _lLink; // L链 settingStruct _lLink; // L链
settingStruct _adHocNetwork; // 自组网 settingStruct _adHocNetwork; // 自组网
settingStruct _satelliteComm; // 卫通 settingStruct _satelliteComm; // PDT
settingStruct _rescueLoad; // 搜救载荷
settingStruct _pdtLoad; // PDT
settingStruct _ModelCamera; // 三维建模 settingStruct _ModelCamera; // 三维建模
std::unordered_map<QString, settingStruct> _allParamMap; // 存储所有设置信息 std::unordered_map<QString, settingStruct> _allParamMap; // 存储所有设置信息
public: public:
@ -43,9 +41,7 @@ public:
L_Link, L_Link,
Adhoc_Network, Adhoc_Network,
Satelite_Comm, Satelite_Comm,
ModelCamera, ModelCamera
RescueLoading,
PdtLoading
}; };
private slots: private slots:
@ -54,11 +50,10 @@ private slots:
void on_sateliteButton_clicked(); void on_sateliteButton_clicked();
void on_oneKeyButton_clicked(); void on_oneKeyButton_clicked();
void on_GDDCPushButton_clicked(); void on_GDDCPushButton_clicked();
void on_modelCameraButton_clicked(); void on_modelCameraButton_clicked();
void on_RescueButton_clicked();
void on_PdtButton_clicked();
signals: signals:
// 发送信号给网页显示 // 发送信号给网页显示
void sendOneSet(unsigned char, settingStruct); void sendOneSet(unsigned char, settingStruct);
}; };

@ -7,14 +7,14 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>725</width> <width>725</width>
<height>611</height> <height>532</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>设置</string> <string>设置</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset> <iconset resource="../../mainwindow.qrc">
<normaloff>:/res/settings.png</normaloff>:/res/settings.png</iconset> <normaloff>:/res/settings.png</normaloff>:/res/settings.png</iconset>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
@ -222,9 +222,6 @@
<string>L链</string> <string>L链</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLineEdit" name="lLinkLineEdit"/>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
@ -232,6 +229,9 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1">
<widget class="QLineEdit" name="lLinkLineEdit"/>
</item>
<item row="0" column="2"> <item row="0" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
@ -281,139 +281,21 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="RescueGroupBox"> <widget class="QGroupBox" name="modelCameraGroupBox">
<property name="title"> <property name="title">
<string>搜救载荷</string> <string>三维建模</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_6"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="1">
<widget class="QLineEdit" name="RescueLineEdit"/>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_9"> <widget class="QLabel" name="label_5">
<property name="text"> <property name="text">
<string>IP:</string> <string>远端IP:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Policy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="RescueButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>100</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>设置</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="PdtGroupBox">
<property name="title">
<string>PDT</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLineEdit" name="PdtLineEdit"/> <widget class="QLineEdit" name="modelCameraLineEditRemoteIp"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>IP:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Policy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PdtButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>100</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>设置</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="modelCameraGroupBox">
<property name="title">
<string>三维建模</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="2"> <item row="0" column="2">
<widget class="QLabel" name="label_6"> <widget class="QLabel" name="label_6">
<property name="text"> <property name="text">
@ -421,25 +303,29 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="3">
<widget class="QLabel" name="label_5"> <widget class="QLineEdit" name="modelCameraLineEditRemotePort"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text"> <property name="text">
<string>远端IP:</string> <string>本地IP:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="3">
<widget class="QLineEdit" name="modelCameraLineEditRemotePort"/>
</item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="modelCameraLineEditLocalIp"/> <widget class="QLineEdit" name="modelCameraLineEditLocalIp"/>
</item> </item>
<item row="1" column="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>本地端口:</string>
</property>
</widget>
</item>
<item row="1" column="3"> <item row="1" column="3">
<widget class="QLineEdit" name="modelCameraLineEditLocalPort"/> <widget class="QLineEdit" name="modelCameraLineEditLocalPort"/>
</item> </item>
<item row="0" column="1">
<widget class="QLineEdit" name="modelCameraLineEditRemoteIp"/>
</item>
<item row="1" column="4"> <item row="1" column="4">
<layout class="QHBoxLayout" name="horizontalLayout_8"> <layout class="QHBoxLayout" name="horizontalLayout_8">
<item> <item>
@ -485,20 +371,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>本地IP:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>本地端口:</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -565,6 +437,8 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<resources/> <resources>
<include location="../../mainwindow.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

@ -195,9 +195,9 @@ bool DecodeStream::isValidAVFrame(AVFrame *frame) {
} }
// 如果需要,添加更多判断条件,例如时间戳或关键帧检查 // 如果需要,添加更多判断条件,例如时间戳或关键帧检查
// if (frame->pts == AV_NOPTS_VALUE) { if (frame->pts == AV_NOPTS_VALUE) {
// return false; return false;
// } }
return true; // 如果所有条件都通过,则认为 AVFrame 有效 return true; // 如果所有条件都通过,则认为 AVFrame 有效
} }
@ -214,10 +214,10 @@ bool DecodeStream::isValidAVPacket(AVPacket *pkt) {
} }
// 检查时间戳 // 检查时间戳
// if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) { if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) {
// qDebug() << "Invalid AVPacket: pts or dts is AV_NOPTS_VALUE.\n"; qDebug() << "Invalid AVPacket: pts or dts is AV_NOPTS_VALUE.\n";
// return false; return false;
// } }
// 检查流索引(如果是多流) // 检查流索引(如果是多流)
if (pkt->stream_index < 0) { if (pkt->stream_index < 0) {

@ -288,10 +288,10 @@ bool ReadStream::isValidAVPacket(AVPacket *pkt) {
} }
// 检查时间戳 // 检查时间戳
// if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) { if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) {
// qDebug() << "Invalid AVPacket 0: pts or dts is AV_NOPTS_VALUE.\n"; qDebug() << "Invalid AVPacket 0: pts or dts is AV_NOPTS_VALUE.\n";
// return false; return false;
// } }
// 检查流索引(如果是多流) // 检查流索引(如果是多流)
if (pkt->stream_index < 0) { if (pkt->stream_index < 0) {

@ -2,7 +2,7 @@
global::global() {} global::global() {}
QString g_SoftwareVersion = "版本号V1.1.0.7_20250218"; QString g_SoftwareVersion = "版本号V1.1.0.4_20241226";
NotifyManager *g_notifyManager = nullptr; NotifyManager *g_notifyManager = nullptr;

@ -93,7 +93,7 @@ void MainWindow::initWindow() {
// 使用类中的get方法获取配置文件中的IP // 使用类中的get方法获取配置文件中的IP
m_allSetMap = m_HomePagedlg->settingWidget->getAllParam(); m_allSetMap = m_HomePagedlg->settingWidget->getAllParam();
m_GDDCdlg->setGlobalSetMap(m_allSetMap); m_GDDCdlg->setGlobalSetMap(m_allSetMap);
/*qDebug() << "=============设备配置================"; qDebug() << "=============设备配置================";
qDebug() << "光电吊舱------"; qDebug() << "光电吊舱------";
qDebug() << "远端ip" << m_allSetMap["光电吊舱"].net.remoteIp; qDebug() << "远端ip" << m_allSetMap["光电吊舱"].net.remoteIp;
qDebug() << "L链----------"; qDebug() << "L链----------";
@ -106,14 +106,14 @@ void MainWindow::initWindow() {
qDebug() << "远端ip:" << m_allSetMap["三维建模"].net.remoteIp; qDebug() << "远端ip:" << m_allSetMap["三维建模"].net.remoteIp;
qDebug() << "远端端口:" << m_allSetMap["三维建模"].net.remotePort; qDebug() << "远端端口:" << m_allSetMap["三维建模"].net.remotePort;
qDebug() << "本地ip:" << m_allSetMap["三维建模"].net.localIp; qDebug() << "本地ip:" << m_allSetMap["三维建模"].net.localIp;
qDebug() << "本地端口:" << m_allSetMap["三维建模"].net.localPort;*/ qDebug() << "本地端口:" << m_allSetMap["三维建模"].net.localPort;
// mWeb = new CWebEngineView(); // mWeb = new CWebEngineView();
// mWeb->setPage(new CustomWebEnginePage()); // mWeb->setPage(new CustomWebEnginePage());
// mWeb->load(QUrl("http://192.168.150.1")); // mWeb->load(QUrl("http://192.168.150.1"));
lLinkWeb = new CWebEngineView(); lLinkWeb = new CWebEngineView();
lLinkWeb->setPage(new CustomWebEnginePage()); lLinkWeb->setPage(new CustomWebEnginePage());
lLinkWeb->load(QUrl(m_allSetMap["L-Link"].url)); lLinkWeb->load(QUrl(m_allSetMap["L"].url));
connect(lLinkWeb->page(), &QWebEnginePage::loadFinished, this, [=]() { connect(lLinkWeb->page(), &QWebEnginePage::loadFinished, this, [=]() {
// QString jsScript = R"( // QString jsScript = R"(
// var usernameField = // var usernameField =
@ -139,14 +139,14 @@ void MainWindow::initWindow() {
adHocNetworkWeb = new CWebEngineView(); adHocNetworkWeb = new CWebEngineView();
adHocNetworkWeb->setPage(new CustomWebEnginePage()); adHocNetworkWeb->setPage(new CustomWebEnginePage());
adHocNetworkWeb->load(QUrl(m_allSetMap["HocNetwork"].url)); adHocNetworkWeb->load(QUrl(m_allSetMap["宽带自组网"].url));
satelliteCommWeb = new CWebEngineView(); satelliteCommWeb = new CWebEngineView();
satelliteCommWeb->setPage(new CustomWebEnginePage()); satelliteCommWeb->setPage(new CustomWebEnginePage());
satelliteCommWeb->load(QUrl(m_allSetMap["SatelliteComm"].url)); satelliteCommWeb->load(QUrl(m_allSetMap["机载卫通"].url));
m_ModelCameraDlg = new ModelCameraDlg(this); m_ModelCameraDlg = new ModelCameraDlg(this);
emit m_ModelCameraDlg->sendNetParam_signal(m_allSetMap["ModelCamera"].net); emit m_ModelCameraDlg->sendNetParam_signal(m_allSetMap["三维建模"].net);
// 接收主页面设置窗口的url数据传递并设置 // 接收主页面设置窗口的url数据传递并设置
connect( connect(
m_HomePagedlg->settingWidget, &HomePageSetingWidget::sendOneSet, this, m_HomePagedlg->settingWidget, &HomePageSetingWidget::sendOneSet, this,
@ -423,19 +423,3 @@ void MainWindow::initNotifyManager() {
g_notifyManager->setDisplayTime(2000); g_notifyManager->setDisplayTime(2000);
g_notifyManager->setNotifyWndSize(300, 60); g_notifyManager->setNotifyWndSize(300, 60);
} }
bool MainWindow::nativeEvent(const QByteArray &eventType, void *message,
qintptr *result) {
#ifdef Q_OS_WIN
MSG *msg = (MSG *)message;
if (msg->message == WM_SYSCOMMAND) {
if (61587 == msg->wParam) { // 单击事件
return true;
}
if (61539 == msg->wParam) { // 双击事件
return true;
}
}
#endif
return QMainWindow::nativeEvent(eventType, message, result);
}

@ -20,9 +20,9 @@
#include "Src/RescueLoad/rescueloadwidget.h" #include "Src/RescueLoad/rescueloadwidget.h"
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include "windows.h" // #include <QWindow>
#include "windowsx.h" // #include <WinUser.h>
#pragma comment(lib, "user32.lib") // #include <windows.h>
#endif #endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
namespace Ui { namespace Ui {
@ -46,10 +46,6 @@ public:
void initWindow(); void initWindow();
void initButton(); void initButton();
void initSignalSlot(); void initSignalSlot();
protected:
bool nativeEvent(const QByteArray &eventType, void *message,
qintptr *result);
private slots: private slots:
void toolButton_clicked(); void toolButton_clicked();
void toolButton_2_clicked(); void toolButton_2_clicked();

@ -261,7 +261,7 @@
</action> </action>
<action name="toolbar_action2"> <action name="toolbar_action2">
<property name="icon"> <property name="icon">
<iconset> <iconset resource="mainwindow.qrc">
<normaloff>:/res/GDDC.png</normaloff>:/res/GDDC.png</iconset> <normaloff>:/res/GDDC.png</normaloff>:/res/GDDC.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -273,7 +273,7 @@
</action> </action>
<action name="toolbar_action3"> <action name="toolbar_action3">
<property name="icon"> <property name="icon">
<iconset> <iconset resource="mainwindow.qrc">
<normaloff>:/res/LChain.png</normaloff>:/res/LChain.png</iconset> <normaloff>:/res/LChain.png</normaloff>:/res/LChain.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -347,6 +347,8 @@
</property> </property>
</action> </action>
</widget> </widget>
<resources/> <resources>
<include location="mainwindow.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

Loading…
Cancel
Save