增加光电吊舱通信设置页面和配置功能、增加控制区域隐藏与显示功能
parent
bf1961df46
commit
04ce4e937e
@ -0,0 +1,48 @@
|
|||||||
|
#ifndef GDDCSET_H
|
||||||
|
#define GDDCSET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QByteArray>
|
||||||
|
#include <QDir>
|
||||||
|
#include <windows.h>
|
||||||
|
#include "Src/GDDC/structDefineMyslef.h"
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class GDDCSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
class GDDCSet : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit GDDCSet(QWidget *parent = nullptr);
|
||||||
|
~GDDCSet();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::GDDCSet *ui;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void initUDPSocket(); //初始化UDPSocket
|
||||||
|
void initWindow(); //初始化窗口
|
||||||
|
void initParam(); //初始化参数
|
||||||
|
void saveDataToLocalIni(); //保存数据至本地ini文件
|
||||||
|
QByteArray m_configIniPath; //ini配置文件路径
|
||||||
|
|
||||||
|
QString m_playURL1; //光电吊舱-视频连接-显示窗口1-URL地址
|
||||||
|
int m_playPort1; //光电吊舱-视频连接-显示窗口-1端口
|
||||||
|
QString m_playURL2; //光电吊舱-视频连接-显示窗口2-URL地址
|
||||||
|
int m_playPort2; //光电吊舱-视频连接-显示窗口-2端口
|
||||||
|
MyPairNetwork m_myPairNetwork;//网络通信结构体
|
||||||
|
signals:
|
||||||
|
void SignalStartConnect(int a); //信号开始连接
|
||||||
|
void SignalStopConnect(int a); //信号停止连接
|
||||||
|
private slots:
|
||||||
|
void on_pushButton_ConnectURL1_clicked();
|
||||||
|
void on_pushButton_ConnectURL2_clicked();
|
||||||
|
void on_pushButton_serialControlRefalsh_clicked();
|
||||||
|
void on_pushButton_serialControlConnect_clicked();
|
||||||
|
void on_pushButton_NetCtrlConnect_clicked();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // GDDCSET_H
|
@ -0,0 +1,49 @@
|
|||||||
|
#ifndef STRUCTDEFINEMYSLEF_H
|
||||||
|
#define STRUCTDEFINEMYSLEF_H
|
||||||
|
|
||||||
|
#endif // STRUCTDEFINEMYSLEF_H
|
||||||
|
#include <QString>
|
||||||
|
#include <QHostAddress>
|
||||||
|
|
||||||
|
struct MyPairNetwork
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyPairNetwork(){};
|
||||||
|
MyPairNetwork(QString a,int b,QString c,int d){
|
||||||
|
localIP = a;
|
||||||
|
localPort = b;
|
||||||
|
remoteIP = c;
|
||||||
|
remotePort = d;
|
||||||
|
localAddr.setAddress(localIP);
|
||||||
|
remoteAddr.setAddress(remoteIP);
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
QString localIP;
|
||||||
|
quint16 localPort;
|
||||||
|
QHostAddress localAddr;
|
||||||
|
QString remoteIP;
|
||||||
|
quint16 remotePort;
|
||||||
|
QHostAddress remoteAddr;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void setLocalIP(QString ip){
|
||||||
|
localIP = ip;
|
||||||
|
localAddr.setAddress(localIP);
|
||||||
|
}
|
||||||
|
void setLocalPort(quint16 port){
|
||||||
|
localPort = port;
|
||||||
|
}
|
||||||
|
void setRemoteIP(QString ip){
|
||||||
|
remoteIP = ip;
|
||||||
|
remoteAddr.setAddress(remoteIP);
|
||||||
|
}
|
||||||
|
void setRemotePort(quint16 port){
|
||||||
|
remotePort = port;
|
||||||
|
}
|
||||||
|
QString getLocalIP(){return localIP;}
|
||||||
|
quint16 getLocalPort(){return localPort;}
|
||||||
|
QHostAddress getLocalAddr(){return localAddr;}
|
||||||
|
QString getRemoteIP(){return remoteIP;}
|
||||||
|
quint16 getRemotePort(){return remotePort;}
|
||||||
|
QHostAddress getRemoteAddr(){return remoteAddr;}
|
||||||
|
};
|
@ -1,74 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>HomePageDlg</class>
|
|
||||||
<widget class="QWidget" name="HomePageDlg">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>1510</width>
|
|
||||||
<height>989</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QWidget" name="widget_2" native="true">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-image: url(:/res/981csP.png);
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center;
|
|
||||||
background-attachment: fixed;
|
|
||||||
background-size: cover;</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
Binary file not shown.
After Width: | Height: | Size: 858 B |
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 951 B |
Binary file not shown.
Loading…
Reference in New Issue