From bf1961df4627706642c846fa87bc2734fda0b951 Mon Sep 17 00:00:00 2001 From: caoyuhui <1152604503@qq.com> Date: Fri, 12 Jul 2024 15:47:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E7=95=8C=E9=9D=A2=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=9B=E7=9B=AE=E6=A0=87=E8=B7=9F=E8=B8=AA=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E8=B0=83=E6=95=B4=EF=BC=9B=E4=BC=BA=E6=9C=8D=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E6=AD=A5=E9=95=BF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gddcdlg.cpp | 25 +++++++++++++------------ gddcdlg.ui | 9 ++++++--- mainwindow.cpp | 2 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/gddcdlg.cpp b/gddcdlg.cpp index 08c62c0..ec99655 100644 --- a/gddcdlg.cpp +++ b/gddcdlg.cpp @@ -131,6 +131,7 @@ void GDDCdlg::initParam() ui->comboBox_5_1->addItem("快"); ui->comboBox_5_1->addItem("很快"); ui->comboBox_5_1->addItem("非常快"); + ui->comboBox_5_1->setCurrentIndex(4); ui->radioButton_5_1->setChecked(true); paramIsFrame = true; ui->lineEdit_5_1->setText("100"); @@ -255,8 +256,7 @@ void GDDCdlg::mousePressEvent(QMouseEvent *event) buffer[9] = (std::byte)0x00; //发送5次 - sendCurDate(buffer,5); - pointSelectionTracking = false; + sendCurDate(buffer,3); } } } @@ -293,13 +293,13 @@ void GDDCdlg::resizeEvent(QResizeEvent *event) { double GDDCPageHeight = (double)(this->height()); double GDDCPageWidth = (double)(this->width()); - qDebug()<<"宽度,高度:"<<GDDCPageHeight<<GDDCPageWidth; + //qDebug()<<"宽度,高度:"<<GDDCPageHeight<<GDDCPageWidth; /*控制指令区域位置和大小设置*/ double cmdAreaHeight = 250; double cmdAreaWidth = GDDCPageWidth; ui->tabWidget->setGeometry(0,GDDCPageHeight-cmdAreaHeight,(int)cmdAreaWidth,(int)cmdAreaHeight); - qDebug()<<"Cmd宽度,高度:"<<cmdAreaWidth<<cmdAreaHeight; + //qDebug()<<"Cmd宽度,高度:"<<cmdAreaWidth<<cmdAreaHeight; /*视频区域位置和大小设置*/ double VideoAreaHeight = GDDCPageHeight-cmdAreaHeight; @@ -550,6 +550,7 @@ void GDDCdlg::on_pushButton_2_5_released() void GDDCdlg::on_pushButton_2_6_pressed() { TJDCCmdBuffer[0]=(std::byte)0x3B; + pointSelectionTracking = false; } void GDDCdlg::on_pushButton_2_6_released() { @@ -1147,8 +1148,8 @@ void GDDCdlg::on_pushButton_5_1_pressed() TJDCCmdBuffer[5]=(std::byte)0x70; TJDCCmdBuffer[6]=(std::byte)0x00; TJDCCmdBuffer[7]=(std::byte)0x00; - TJDCCmdBuffer[8]=(std::byte)(sel*3); - TJDCCmdBuffer[9]=(std::byte)((sel*3)>>8); + TJDCCmdBuffer[8]=(std::byte)(sel*2); + TJDCCmdBuffer[9]=(std::byte)((sel*2)>>8); } else { @@ -1173,8 +1174,8 @@ void GDDCdlg::on_pushButton_5_2_pressed() int sel = ui->comboBox_5_1->currentIndex(); sel+=1; TJDCCmdBuffer[5]=(std::byte)0x70; - TJDCCmdBuffer[6]=(std::byte)(sel*3); - TJDCCmdBuffer[7]=(std::byte)((sel*3)>>8); + TJDCCmdBuffer[6]=(std::byte)(sel*2); + TJDCCmdBuffer[7]=(std::byte)((sel*2)>>8); TJDCCmdBuffer[8]=(std::byte)0x00; TJDCCmdBuffer[9]=(std::byte)0x00; } @@ -1202,8 +1203,8 @@ void GDDCdlg::on_pushButton_5_3_pressed() TJDCCmdBuffer[5]=(std::byte)0x70; TJDCCmdBuffer[6]=(std::byte)0x00; TJDCCmdBuffer[7]=(std::byte)0x00; - TJDCCmdBuffer[8]=(std::byte)(-sel*3); - TJDCCmdBuffer[9]=(std::byte)((-sel*3)>>8); + TJDCCmdBuffer[8]=(std::byte)(-sel*2); + TJDCCmdBuffer[9]=(std::byte)((-sel*2)>>8); } else { @@ -1227,8 +1228,8 @@ void GDDCdlg::on_pushButton_5_4_pressed() int sel = ui->comboBox_5_1->currentIndex(); sel+=1; TJDCCmdBuffer[5]=(std::byte)0x70; - TJDCCmdBuffer[6]=(std::byte)(-sel*3); - TJDCCmdBuffer[7]=(std::byte)((-sel*3)>>8); + TJDCCmdBuffer[6]=(std::byte)(-sel*2); + TJDCCmdBuffer[7]=(std::byte)((-sel*2)>>8); TJDCCmdBuffer[8]=(std::byte)0x00; TJDCCmdBuffer[9]=(std::byte)0x00; } diff --git a/gddcdlg.ui b/gddcdlg.ui index 96f0f81..f837902 100644 --- a/gddcdlg.ui +++ b/gddcdlg.ui @@ -9,8 +9,8 @@ <rect> <x>0</x> <y>0</y> - <width>959</width> - <height>750</height> + <width>1165</width> + <height>759</height> </rect> </property> <property name="sizePolicy"> @@ -54,7 +54,7 @@ <rect> <x>7</x> <y>496</y> - <width>941</width> + <width>1131</width> <height>250</height> </rect> </property> @@ -1876,6 +1876,9 @@ font: 12pt "Microsoft YaHei UI";</string> </widget> </widget> <widget class="QPushButton" name="pushButton_5_10"> + <property name="enabled"> + <bool>false</bool> + </property> <property name="geometry"> <rect> <x>780</x> diff --git a/mainwindow.cpp b/mainwindow.cpp index 74620e5..ee88ede 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -81,7 +81,7 @@ void MainWindow::initWindow() palette.setColor(QPalette::Window,g_themeColor); this->setPalette(palette); this->setWindowTitle("载荷应用软件"); - this->resize(1280,720); + this->resize(1280,970); m_GDDCdlg = new GDDCdlg(this); m_HomePagedlg = new HomePageDlg(this);