光电吊舱页面bug修复;主页面界面调整

pull/6/head^2
caoyuhui 7 months ago
parent deb121f667
commit a95cb2c121

@ -86,7 +86,8 @@ void GDDCdlg::initWindow()
m_DlgGDDCSet = new GDDCSet(); m_DlgGDDCSet = new GDDCSet();
m_GDDCCmdDlg = new GDDCCmdDlg(this); m_GDDCCmdDlg = new GDDCCmdDlg(this);
m_GDDCStateDlg = new GDDCStateInfo(this); m_GDDCStateDlg = new GDDCStateInfo(this);
ui->pushButShowStatePage->setIcon(QIcon(":/res/right.png"));
ui->pushButShowCmdPage->setIcon(QIcon(":/res/down.png"));
} }
//初始化参数 //初始化参数
@ -99,8 +100,6 @@ void GDDCdlg::initParam()
m_DCcmdBuffer.resize(cmdLength); m_DCcmdBuffer.resize(cmdLength);
detectionAreaSetting = false; detectionAreaSetting = false;
connectFlag.resize(12,false); connectFlag.resize(12,false);
ui->pushButShowCmdPage->setIcon(QIcon(":/res/down.png"));
ui->pushButShowStatePage->setIcon(QIcon(":/res/right.png"));
} }
@ -292,9 +291,9 @@ void GDDCdlg::resizeUI()
/******控制区位置和大小设置*****/ /******控制区位置和大小设置*****/
double cmdAreaHeight; double cmdAreaHeight;
double cmdAreaWidth; double cmdAreaWidth;
if(m_GDDCStateDlg->isVisible()){cmdAreaWidth = GDDCPageWidth-STATEPAGEWIDTH;} if(isStatePageShow){cmdAreaWidth = GDDCPageWidth-STATEPAGEWIDTH;}
else{cmdAreaWidth = GDDCPageWidth;} else{cmdAreaWidth = GDDCPageWidth;}
if(m_GDDCCmdDlg->isVisible()){cmdAreaHeight = CMDPAGEHIGHT;} if(isCmdPageShow){cmdAreaHeight = CMDPAGEHIGHT;}
else{cmdAreaHeight = 0;} else{cmdAreaHeight = 0;}
m_GDDCCmdDlg->setGeometry(0,GDDCPageHeight-cmdAreaHeight,(int)cmdAreaWidth,(int)cmdAreaHeight); m_GDDCCmdDlg->setGeometry(0,GDDCPageHeight-cmdAreaHeight,(int)cmdAreaWidth,(int)cmdAreaHeight);
m_GDDCCmdDlg->ui->tabWidget->setGeometry(0,0,(int)cmdAreaWidth,(int)cmdAreaHeight); m_GDDCCmdDlg->ui->tabWidget->setGeometry(0,0,(int)cmdAreaWidth,(int)cmdAreaHeight);
@ -303,7 +302,7 @@ void GDDCdlg::resizeUI()
/*********状态区位置和大小设置***********/ /*********状态区位置和大小设置***********/
double stateAreaHeight = GDDCPageHeight; double stateAreaHeight = GDDCPageHeight;
double stateAreaWidth; double stateAreaWidth;
if(m_GDDCStateDlg->isVisible()){stateAreaWidth = STATEPAGEWIDTH;} if(isStatePageShow){stateAreaWidth = STATEPAGEWIDTH;}
else{stateAreaWidth = 0;} else{stateAreaWidth = 0;}
m_GDDCStateDlg->setGeometry(GDDCPageWidth-stateAreaWidth,0,stateAreaWidth,stateAreaHeight); m_GDDCStateDlg->setGeometry(GDDCPageWidth-stateAreaWidth,0,stateAreaWidth,stateAreaHeight);
m_GDDCStateDlg->ui->tableViewShowIState->setGeometry(0,0,stateAreaWidth,stateAreaHeight); m_GDDCStateDlg->ui->tableViewShowIState->setGeometry(0,0,stateAreaWidth,stateAreaHeight);

@ -70,7 +70,7 @@ void HomePageDlg::initButton()
{ {
QIcon icon; QIcon icon;
icon.addFile(":/res/settings.png"); icon.addFile(":/res/settings.png");
QPushButton* btn = new QPushButton; btn = new QPushButton;
btn->setParent(this); btn->setParent(this);
btn->setMinimumSize(40,40); btn->setMinimumSize(40,40);
btn->setMaximumSize(40,40); btn->setMaximumSize(40,40);
@ -91,4 +91,11 @@ void HomePageDlg::on_pushButton_clicked()
{ {
emit sendUrl(_urlMap); emit sendUrl(_urlMap);
} }
//区域重绘
void HomePageDlg::resizeEvent(QResizeEvent *event)
{
double GDDCPageHeight = (double)(this->height());
double GDDCPageWidth = (double)(this->width());
btn->setGeometry(GDDCPageWidth-40,0,40,40);
}

@ -4,7 +4,7 @@
#include <QWidget> #include <QWidget>
#include <unordered_map> #include <unordered_map>
#include "Src/HomePage/homepagesetingwidget.h" #include "Src/HomePage/homepagesetingwidget.h"
#include "QPushButton"
namespace Ui { namespace Ui {
class HomePageDlg; class HomePageDlg;
} }
@ -29,6 +29,10 @@ private:
QString _adHocNetwork; QString _adHocNetwork;
QString _satelliteComm; QString _satelliteComm;
std::unordered_map<QString,QString> _urlMap; std::unordered_map<QString,QString> _urlMap;
QPushButton* btn;
protected:
void resizeEvent(QResizeEvent *event);
signals: signals:
void sendUrl(std::unordered_map<QString,QString> urlMap); void sendUrl(std::unordered_map<QString,QString> urlMap);
private slots: private slots:

@ -20,21 +20,7 @@
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>GroupBox</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>GroupBox</string>
</property>
</widget>
</item>
<item row="0" column="3">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QWidget" name="widget" native="true"> <widget class="QWidget" name="widget" native="true">
@ -55,28 +41,11 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QWidget" name="widget_2" native="true"/>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>GroupBox</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>GroupBox</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<resources/> <resources/>

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>725</width> <width>725</width>
<height>443</height> <height>404</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,15 +17,9 @@
<iconset resource="../../mainwindow.qrc"> <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">
<item>
<widget class="QFrame" name="frame_2"> <widget class="QFrame" name="frame_2">
<property name="geometry">
<rect>
<x>30</x>
<y>10</y>
<width>661</width>
<height>181</height>
</rect>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum> <enum>QFrame::Shape::StyledPanel</enum>
</property> </property>
@ -41,27 +35,27 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum> <enum>QFrame::Shadow::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QGroupBox" name="lLinkGroupBox"> <widget class="QGroupBox" name="netGroupBox_2">
<property name="title"> <property name="title">
<string>L链</string> <string>卫通</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>IP:</string> <string>IP:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLineEdit" name="lLinkLineEdit"/> <widget class="QLineEdit" name="sateliteLineEdit"/>
</item> </item>
<item row="4" column="1"> <item row="0" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Orientation::Horizontal</enum> <enum>Qt::Orientation::Horizontal</enum>
</property> </property>
@ -70,17 +64,29 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>60</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="lLinkButton"> <widget class="QPushButton" name="sateliteButton">
<property name="maximumSize"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>100</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -100,7 +106,17 @@
<string>宽带自组网</string> <string>宽带自组网</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="4" column="1"> <item row="0" column="1">
<widget class="QLineEdit" name="netLineEdit"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>IP:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer_2">
@ -112,7 +128,7 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>60</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
@ -120,9 +136,21 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="netButton"> <widget class="QPushButton" name="netButton">
<property name="maximumSize"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>100</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -133,39 +161,29 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>IP:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="netLineEdit"/>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="netGroupBox_2"> <widget class="QGroupBox" name="lLinkGroupBox">
<property name="title"> <property name="title">
<string>卫通</string> <string>L链</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>IP:</string> <string>IP:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLineEdit" name="sateliteLineEdit"/> <widget class="QLineEdit" name="lLinkLineEdit"/>
</item> </item>
<item row="4" column="1"> <item row="0" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<spacer name="horizontalSpacer_3"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Orientation::Horizontal</enum> <enum>Qt::Orientation::Horizontal</enum>
</property> </property>
@ -174,17 +192,29 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>60</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="sateliteButton"> <widget class="QPushButton" name="lLinkButton">
<property name="maximumSize"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>100</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -258,6 +288,8 @@
</item> </item>
</layout> </layout>
</widget> </widget>
</item>
</layout>
</widget> </widget>
<resources> <resources>
<include location="../../mainwindow.qrc"/> <include location="../../mainwindow.qrc"/>

@ -83,7 +83,6 @@ void MainWindow::initWindow()
m_SDFPDlg = new SDFPDlg(this); m_SDFPDlg = new SDFPDlg(this);
m_GDDCdlg = new GDDCdlg(this); m_GDDCdlg = new GDDCdlg(this);
m_HomePagedlg = new HomePageDlg(this); m_HomePagedlg = new HomePageDlg(this);
m_ModelCameraDlg = new ModelCameraDlg(this); m_ModelCameraDlg = new ModelCameraDlg(this);
m_rescueLoadWidget = new RescueLoadWidget(this); m_rescueLoadWidget = new RescueLoadWidget(this);

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1113</width> <width>829</width>
<height>572</height> <height>497</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -257,7 +257,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">
@ -269,7 +269,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">
@ -343,6 +343,8 @@
</property> </property>
</action> </action>
</widget> </widget>
<resources/> <resources>
<include location="mainwindow.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>

Loading…
Cancel
Save