增加版本号显示;增加光电吊舱红外报警设置功能

video_old
caoyuhui 6 months ago
parent 6661f68478
commit cc115d2201

@ -13,6 +13,7 @@ SDFPDlg::SDFPDlg(QWidget *parent)
//嵌入到主窗口
setWindowFlags(Qt::CustomizeWindowHint|Qt::FramelessWindowHint);
hide();
ui->label_version->setText(g_SoftwareVersion);
}
SDFPDlg::~SDFPDlg()

@ -2,6 +2,7 @@
#define SDFPDLG_H
#include <QWidget>
#include "global.h"
namespace Ui {
class SDFPDlg;

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>768</width>
<height>440</height>
<width>955</width>
<height>518</height>
</rect>
</property>
<property name="windowTitle">
@ -16,9 +16,39 @@
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="2">
<widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">image: url(:/res/981csNew.png);</string>
</property>
</widget>
</item>
<item row="1" column="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_version">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>版本号V0.00.00</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
@ -33,15 +63,8 @@
</property>
</spacer>
</item>
<item>
<widget class="QWidget" name="widget" native="true">
<property name="styleSheet">
<string notr="true">image: url(:/res/981csNew.png);</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<item row="0" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>

@ -69,6 +69,8 @@ void GDDCCmdDlg::initParam() {
ui->comboBox_4_2->addItem("5");
ui->comboBox_4_2->addItem("6");
ui->comboBox_4_2->addItem("7");
ui->comboBox_4_3->addItem("关闭");//关闭温度报警或者阈值检测功能
ui->comboBox_4_3->addItem("开启");//开启温度报警或者阈值检测功能
/*稳定平台*/
ui->comboBox_5_1->addItem("非常慢");
@ -654,6 +656,36 @@ void GDDCCmdDlg::on_pushButton_4_18_pressed() {
}
void GDDCCmdDlg::on_pushButton_4_18_released() { clearTJDCCmdBuffer(); }
// 红外报警设置
void GDDCCmdDlg::on_pushButton_4_19_pressed()
{
UINT8 Bit7 = 0;
UINT8 Bit0 = 0;
int sel = ui->lineEdit_4_1->text().toInt();
int sel2 = ui->lineEdit_4_2->text().toInt()*10;
if(ui->comboBox_4_3->currentIndex()==0) { // 关闭温度报警或者阈值检测功能;
Bit7 = 0b00000000;
} else { // 开启温度报警或者阈值检测功能;
Bit7 = 0b10000000;
}
if(ui->radioButton_4_1->isChecked()) { //温度阈值
Bit0 = 0b00000000;
TJDCCmdBuffer[0] = (std::byte)(Bit7+Bit0);
TJDCCmdBuffer[1] = (std::byte)sel; //观瞄型
TJDCCmdBuffer[2] = (std::byte)(sel>>8);
} else { //16位 RAW 数据阈值
Bit0 = 0b00000001;
TJDCCmdBuffer[0] = (std::byte)(Bit7+Bit0);
TJDCCmdBuffer[1] = (std::byte)sel2; //测温型
TJDCCmdBuffer[2] = (std::byte)(sel2>>8);
}
}
void GDDCCmdDlg::on_pushButton_4_19_released(){ clearTJDCCmdBuffer(); }
// 俯仰+
void GDDCCmdDlg::on_pushButton_5_1_pressed() {
if (paramIsFrame) {
@ -928,3 +960,6 @@ void GDDCCmdDlg::on_pushButton_6_8_clicked() {
ui->pushButton_6_8->setDown(false);
}
}

@ -174,6 +174,8 @@ private slots:
void on_pushButton_4_17_released();
void on_pushButton_4_18_pressed();
void on_pushButton_4_18_released();
void on_pushButton_4_19_pressed();
void on_pushButton_4_19_released();
/*云台控制*/
void on_pushButton_5_1_pressed();
void on_pushButton_5_1_released();
@ -225,6 +227,7 @@ private slots:
void on_pushButton_6_7_pressed();
void on_pushButton_6_7_released();
void on_pushButton_6_8_clicked();
};
#endif // GDDCCMDDLG_H

@ -80,7 +80,7 @@
<enum>QTabWidget::TabShape::Rounded</enum>
</property>
<property name="currentIndex">
<number>5</number>
<number>3</number>
</property>
<property name="elideMode">
<enum>Qt::TextElideMode::ElideNone</enum>
@ -1380,6 +1380,104 @@
</rect>
</property>
</widget>
<widget class="QGroupBox" name="groupBox_4_1">
<property name="geometry">
<rect>
<x>720</x>
<y>10</y>
<width>201</width>
<height>161</height>
</rect>
</property>
<property name="title">
<string>红外报警设置</string>
</property>
<widget class="QComboBox" name="comboBox_4_3">
<property name="geometry">
<rect>
<x>10</x>
<y>120</y>
<width>71</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton_4_19">
<property name="geometry">
<rect>
<x>100</x>
<y>120</y>
<width>71</width>
<height>31</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>设置</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_4_1">
<property name="geometry">
<rect>
<x>80</x>
<y>40</y>
<width>91</width>
<height>23</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_4_2">
<property name="geometry">
<rect>
<x>80</x>
<y>80</y>
<width>91</width>
<height>23</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_4_3">
<property name="geometry">
<rect>
<x>180</x>
<y>80</y>
<width>16</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>℃</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_4_1">
<property name="geometry">
<rect>
<x>10</x>
<y>40</y>
<width>61</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>观瞄型</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_4_2">
<property name="geometry">
<rect>
<x>10</x>
<y>80</y>
<width>61</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>测温型</string>
</property>
</widget>
</widget>
</widget>
<widget class="QWidget" name="tab_5">
<attribute name="title">

@ -341,7 +341,7 @@ void GDDCdlg::resizeUI() {
// 定时器处理
void GDDCdlg::GDDCControlTimeOut() {
if (m_GDDCCmdDlg->sendTimes > 0) {
if (m_GDDCCmdDlg->sendTimes > 0) { // 优先发送次数指令
m_GDDCCmdDlg->sendTimes -= 1;
// UDP控制
@ -357,7 +357,7 @@ void GDDCdlg::GDDCControlTimeOut() {
if (m_GDDCCmdDlg->sendTimes == 0) {
m_GDDCCmdDlg->clearTJDCCmdBuffer();
}
} else {
} else { // 发送常发帧或长按指令
m_GDDCCmdDlg->UpdateDataTJDC();
// UDP控制
if (connectFlag[3]) {

@ -1,12 +1,10 @@
#include "global.h"
global::global() {}
QString g_SoftwareVersion = "版本号V1.00.00";
QColor g_themeColor(51, 51, 51);
QString g_PushBtnStyle = /**正常情况下样式**/
"QPushButton{"
"font: 12pt '微软雅黑';"
@ -155,4 +153,4 @@ uint16_t calCRC16(const uint8_t *cpu8Data, uint16_t u16Len)
return u16CRC;
}
global::global() {}

@ -3,6 +3,7 @@
#include <QColor>
extern QString g_SoftwareVersion; //软件版本号
/*******************系统颜色***************************************/
extern QColor g_themeColor;

Loading…
Cancel
Save