工具界面布局

This commit is contained in:
hm
2022-01-22 15:28:20 +08:00
parent 26c2c26653
commit 21f448b3ff
16 changed files with 2006 additions and 1866 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ Chart::Chart(QChart *chart, QWidget *parent)
QValueAxis *axisY = new QValueAxis();
axisY->setRange(-3, 3);
axisY->setTickCount(7);
axisY->setLabelFormat("%.1f");
axisY->setLabelFormat("%.2f");
chart->addAxis(axisY, Qt::AlignLeft);
setParent(parent);
@@ -68,7 +68,7 @@ Chart::Chart(QWidget *parent)
QValueAxis *axisY = new QValueAxis();
axisY->setRange(-1, 1);
axisY->setTickCount(7);
axisY->setLabelFormat("%.1f");
axisY->setLabelFormat("%.2f");
chart()->addAxis(axisY, Qt::AlignLeft);
//chart()->setPos(0,0);
+3 -1
View File
@@ -185,7 +185,9 @@ void Diagram::setFloat(void)
{
this->setParent(m_parent);
this->move(0,0);
this->hide();
//this->hide();
this->show();
this->resize(m_parent->size());
//qDebug() << m_parent->children();
}
+10 -3
View File
@@ -128,6 +128,12 @@ PowerSystem::PowerSystem(QWidget *parent) :
ScopeTemp->setRenderHint(QPainter::Antialiasing);
ScopeAlt->setRenderHint(QPainter::Antialiasing);
ScopeMa->setRenderHint(QPainter::Antialiasing);
//设置默认大小
ScopeRPM->setGeometry(0,0,ui->frame_RPM->width(),ui->frame_RPM->height());
ScopeTemp->setGeometry(0,0,ui->frame_Temp->width(),ui->frame_Temp->height());
ScopeAlt->setGeometry(0,0,ui->frame_Alt->width(),ui->frame_Alt->height());
ScopeMa->setGeometry(0,0,ui->frame_Ma->width(),ui->frame_Ma->height());
}
PowerSystem::~PowerSystem()
@@ -137,12 +143,11 @@ PowerSystem::~PowerSystem()
void PowerSystem::resizeEvent(QResizeEvent *event)
{
qDebug() << "resize event";
ScopeRPM->setGeometry(0,0,ui->frame_RPM->width(),ui->frame_RPM->height());
ScopeTemp->setGeometry(0,0,ui->frame_Temp->width(),ui->frame_Temp->height());
ScopeAlt->setGeometry(0,0,ui->frame_Alt->width(),ui->frame_Alt->height());
ScopeMa->setGeometry(0,0,ui->frame_Ma->width(),ui->frame_Ma->height());
}
void PowerSystem::mousePressEvent(QMouseEvent *event)
@@ -189,7 +194,9 @@ void PowerSystem::setFloat(void)
{
this->setParent(m_parent);
this->move(0,0);
this->hide();
//this->hide();
this->show();
this->resize(m_parent->size());
//qDebug() << m_parent->children();
}
File diff suppressed because it is too large Load Diff
+44 -7
View File
@@ -15,28 +15,53 @@ Senser::Senser(QWidget *parent) :
this->setStyleSheet(stylesheet);
file.close();
this->setWindowTitle(tr("sensor"));
attChart = new Chart(ui->frame_Attitude);
gyroChart = new Chart(ui->frame_Gyro);
accChart = new Chart(ui->frame_Accelerate);
servoChart = new Chart(ui->frame_Servo);
altChart = new Chart(ui->frame_Altitude);
speedChart = new Chart(ui->frame_Speed);
attChart->setGeometry(0,0,ui->frame_Attitude->width(),ui->frame_Attitude->height());
gyroChart->setGeometry(0,0,ui->frame_Gyro->width(),ui->frame_Gyro->height());
accChart->setGeometry(0,0,ui->frame_Accelerate->width(),ui->frame_Accelerate->height());
servoChart->setGeometry(0,0,ui->frame_Servo->width(),ui->frame_Servo->height());
altChart->setGeometry(0,0,ui->frame_Altitude->width(),ui->frame_Altitude->height());
speedChart->setGeometry(0,0,ui->frame_Speed->width(),ui->frame_Speed->height());
attChart->chart()->legend()->setAlignment(Qt::AlignRight);
gyroChart->chart()->legend()->setAlignment(Qt::AlignRight);
accChart->chart()->legend()->setAlignment(Qt::AlignRight);
servoChart->chart()->legend()->setAlignment(Qt::AlignRight);
altChart->chart()->legend()->setAlignment(Qt::AlignRight);
speedChart->chart()->legend()->setAlignment(Qt::AlignRight);
attChart->setOperation(false);
gyroChart->setOperation(false);
accChart->setOperation(false);
servoChart->setOperation(false);
altChart->setOperation(false);
speedChart->setOperation(false);
attChart->setRenderHint(QPainter::Antialiasing);
gyroChart->setRenderHint(QPainter::Antialiasing);
accChart->setRenderHint(QPainter::Antialiasing);
//ui->label->setFixedSize(w,h);
servoChart->setRenderHint(QPainter::Antialiasing);
altChart->setRenderHint(QPainter::Antialiasing);
speedChart->setRenderHint(QPainter::Antialiasing);
@@ -44,6 +69,10 @@ Senser::Senser(QWidget *parent) :
gyroChart->setRubberBand(QChartView::RectangleRubberBand);
accChart->setRubberBand(QChartView::RectangleRubberBand);
servoChart->setRubberBand(QChartView::RectangleRubberBand);
altChart->setRubberBand(QChartView::RectangleRubberBand);
speedChart->setRubberBand(QChartView::RectangleRubberBand);
//=======================================================
/*
connect(ui->checkBox_ins_ax,&QCheckBox::stateChanged,
@@ -115,10 +144,6 @@ Senser::Senser(QWidget *parent) :
*/
}
Senser::~Senser()
@@ -143,15 +168,24 @@ void Senser::setValue(QLabel *w,QString s)
void Senser::resizeEvent(QResizeEvent *event)
{
qDebug() << "resi";
attChart->setGeometry(0,0,ui->frame_Attitude->width(),ui->frame_Attitude->height());
gyroChart->setGeometry(0,0,ui->frame_Gyro->width(),ui->frame_Gyro->height());
accChart->setGeometry(0,0,ui->frame_Accelerate->width(),ui->frame_Accelerate->height());
servoChart->setGeometry(0,0,ui->frame_Servo->width(),ui->frame_Servo->height());
altChart->setGeometry(0,0,ui->frame_Altitude->width(),ui->frame_Altitude->height());
speedChart->setGeometry(0,0,ui->frame_Speed->width(),ui->frame_Speed->height());
}
void Senser::closeEvent(QCloseEvent *event)
{
setFloat();
event->ignore();
}
void Senser::setFloat(void)
@@ -159,7 +193,7 @@ void Senser::setFloat(void)
if(this->parent())
{
this->setParent(nullptr);
QScreen *screen=QGuiApplication::primaryScreen ();;
QScreen *screen=QGuiApplication::primaryScreen ();
this->move((screen->availableGeometry().width()-this->width())/2,(screen->availableGeometry().height()-this->height())/2);
this->show();
}
@@ -167,7 +201,10 @@ void Senser::setFloat(void)
{
this->setParent(m_parent);
this->move(0,0);
this->hide();
//this->hide();
this->show();
this->resize(m_parent->size());
//qDebug() << m_parent->children();
}
+3 -2
View File
@@ -53,8 +53,9 @@ public:
Chart *attChart = nullptr;
Chart *gyroChart = nullptr;
Chart *accChart = nullptr;
Chart *asChart = nullptr;
Chart *vzChart = nullptr;
Chart *speedChart = nullptr;
Chart *servoChart = nullptr;
Chart *altChart = nullptr;
private slots:
+11 -10
View File
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>901</width>
<width>1227</width>
<height>866</height>
</rect>
</property>
@@ -76,10 +76,11 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_8"/>
</widget>
</item>
<item row="0" column="1">
<widget class="QFrame" name="frame">
<widget class="QFrame" name="frame_Servo">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
@@ -99,7 +100,7 @@
</widget>
</item>
<item row="1" column="1">
<widget class="QFrame" name="frame_2">
<widget class="QFrame" name="frame_Altitude">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
@@ -125,7 +126,7 @@
</widget>
</item>
<item row="2" column="1">
<widget class="QFrame" name="frame_3">
<widget class="QFrame" name="frame_Speed">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
@@ -144,7 +145,7 @@
<widget class="QFrame" name="frame_4">
<property name="maximumSize">
<size>
<width>400</width>
<width>450</width>
<height>16777215</height>
</size>
</property>
@@ -217,7 +218,7 @@
<widget class="QLabel" name="label_2_static">
<property name="minimumSize">
<size>
<width>120</width>
<width>150</width>
<height>20</height>
</size>
</property>
@@ -267,7 +268,7 @@
<widget class="QLabel" name="label_1_static">
<property name="minimumSize">
<size>
<width>120</width>
<width>150</width>
<height>20</height>
</size>
</property>
@@ -463,7 +464,7 @@
<widget class="QGroupBox" name="groupBox_2">
<property name="maximumSize">
<size>
<width>400</width>
<width>450</width>
<height>16777215</height>
</size>
</property>
@@ -789,7 +790,7 @@
<widget class="QLabel" name="label_2_svn">
<property name="minimumSize">
<size>
<width>120</width>
<width>150</width>
<height>20</height>
</size>
</property>
@@ -1391,7 +1392,7 @@
<widget class="QLabel" name="label_1_svn">
<property name="minimumSize">
<size>
<width>120</width>
<width>150</width>
<height>20</height>
</size>
</property>
+3 -1
View File
@@ -191,7 +191,9 @@ void ServoSystem::setFloat(void)
{
this->setParent(m_parent);
this->move(0,0);
this->hide();
//this->hide();
this->show();
this->resize(m_parent->size());
}
//
}
+854 -854
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>1574</width>
<height>679</height>
<height>734</height>
</rect>
</property>
<property name="windowTitle">
@@ -750,6 +750,849 @@
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_25">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_15">
<property name="title">
<string>版本信息</string>
</property>
<layout class="QGridLayout" name="gridLayout_26">
<item row="0" column="0">
<widget class="QLabel" name="label_28">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>飞控固件版本号:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_29">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_31">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>HIL模式状态:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_32">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>舵机</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="2" column="1">
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
<string>右升降</string>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="1" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_ele_r_curr">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_RE_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ele_r_cmd">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_RE_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_RE_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>左副翼</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="1" column="1">
<widget class="QLabel" name="label_ail_l_curr">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_20">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_LA_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_LA_ZERO">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ail_l_cmd">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_LA_SBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>左升降</string>
</property>
<layout class="QGridLayout" name="gridLayout_9">
<item row="1" column="0">
<widget class="QLabel" name="label_37">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_LE_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_LE_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ele_l_cmd">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_LE_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_34">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_ele_l_curr">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>方向舵</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="2" column="2">
<widget class="QLabel" name="label_RU_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_RU_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_rud_cmd">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_rud_curr">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_RU_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_8">
<property name="title">
<string>右副翼</string>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ail_r_cmd">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_RA_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_30">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_ail_r_curr">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_RA_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_RA_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout_23">
<item row="0" column="0">
@@ -1156,861 +1999,18 @@
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>舵机</string>
<item row="3" column="0">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="2" column="1">
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
<string>右升降</string>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="1" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_ele_r_curr">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_RE_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ele_r_cmd">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_RE_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_RE_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_8">
<property name="title">
<string>右副翼</string>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ail_r_cmd">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_RA_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_30">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_ail_r_curr">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_RA_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_RA_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>左升降</string>
</property>
<layout class="QGridLayout" name="gridLayout_9">
<item row="1" column="0">
<widget class="QLabel" name="label_37">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_LE_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_LE_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ele_l_cmd">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_LE_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_34">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_ele_l_curr">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>方向舵</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="2" column="2">
<widget class="QLabel" name="label_RU_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_RU_ZERO">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_rud_cmd">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_rud_curr">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_RU_SBIT">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>左副翼</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="1" column="1">
<widget class="QLabel" name="label_ail_l_curr">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_20">
<property name="text">
<string>指令位</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_LA_GBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>地面自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>当前位</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_LA_ZERO">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>找零</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_ail_l_cmd">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_LA_SBIT">
<property name="minimumSize">
<size>
<width>150</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>上电自检</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_15">
<property name="title">
<string>版本信息</string>
</property>
<layout class="QGridLayout" name="gridLayout_26">
<item row="0" column="0">
<widget class="QLabel" name="label_28">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>飞控固件版本号:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_29">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_31">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>HIL模式状态:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_32">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(205, 205, 205);</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
</layout>
</widget>
</spacer>
</item>
</layout>
</widget>
+3
View File
@@ -98,6 +98,9 @@ ToolsUI::ToolsUI(QWidget *parent) :
setPushButtonState(ui->pushButton_Senser,
state::unSelected);
}
ToolsUI::~ToolsUI()
+3 -1
View File
@@ -70,7 +70,9 @@ void Tools_Index0::setFloat(void)
this->setParent(m_parent);
this->setGeometry(m_parent->geometry());
this->move(0,0);
this->hide();
//this->hide();
this->show();
this->resize(m_parent->size());
}
}
+3 -1
View File
@@ -61,7 +61,9 @@ void Tools_Index1::setFloat(void)
this->setParent(m_parent);
this->setGeometry(m_parent->geometry());
this->move(0,0);
this->hide();
//this->hide();
this->show();
this->resize(m_parent->size());
}
}
+5 -2
View File
@@ -30,6 +30,7 @@ Tools_Index2::Tools_Index2(QWidget *parent) :
ui->doubleSpinBox_setPercent->setFixedSize(150,50);
ui->comboBox_MultiSpeed->setFixedSize(150,50);
ui->label_percent->setFixedSize(150,50);
ui->pushButton_CSV->setFixedHeight(50);
ui->comboBox_MultiSpeed->addItem("X1",1);
@@ -71,7 +72,7 @@ void Tools_Index2::setFloat(void)
this->setParent(nullptr);
QScreen *screen=QGuiApplication::primaryScreen ();;
this->move((screen->availableGeometry().width()-this->width())/2,(screen->availableGeometry().height()-this->height())/2);
this->resize(800,480);
this->resize(400,380);
this->show();
}
else
@@ -79,7 +80,9 @@ void Tools_Index2::setFloat(void)
this->setParent(m_parent);
this->move(0,0);
this->hide();
//this->hide();
this->show();
this->resize(m_parent->size());
update();
}
}
+2 -2
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>391</width>
<height>325</height>
<width>286</width>
<height>247</height>
</rect>
</property>
<property name="windowTitle">
+3 -1
View File
@@ -132,7 +132,9 @@ void Tools_Index3::setFloat(void)
this->setParent(m_parent);
this->move(0,0);
this->hide();
//this->hide();
this->show();
this->resize(m_parent->size());
update();
}
}
+10 -7
View File
@@ -57,14 +57,14 @@ QSize GetDesktopSize() {
int screen_height = mm.height();
qDebug()<<"availableGeometry:" << screen_width<<screen_height;
if(screen_width >= 1900)
if(screen_width >= 1600)
{
screen_width = 1900;
screen_width = 1600;
}
if(screen_height >= 1060)
if(screen_height >= 860)
{
screen_height = 1060;
screen_height = 860;
}
return QSize(screen_width, screen_height);//最大1366*768
@@ -158,16 +158,19 @@ int main(int argc, char *argv[])
w.setWindowTitle(QString("KB3A GCS Qt%1 %2").arg(QT_VERSION_STR).arg(APP_VERSION));//with version
//w.setWindowTitle(QString("KB3A-V1.00 %1").arg(APP_VERSION));//with version
// 主要是控制HDMI输出,如果是LCD显示,此行无关紧要
w.resize(GetDesktopSize());
//w.resize(GetDesktopSize());
QScreen *screen=QGuiApplication::primaryScreen ();;
w.move((screen->availableGeometry().width()-w.width())/2,(screen->availableGeometry().height()-w.height())/2);
//qDebug() << screen;
//w.setWindowState(Qt::WindowMaximized);
w.show();
w.resize(GetDesktopSize());
QScreen *screen=QGuiApplication::primaryScreen ();;
w.move((screen->availableGeometry().width()-w.width())/2,(screen->availableGeometry().height()-w.height())/2);
return a.exec();
}