41修改,基础班,发布
This commit is contained in:
@@ -316,7 +316,7 @@ void CommandUI::setCommandFile(QString File)
|
||||
btn->setFixedSize(CMDwidth,CMDheight);
|
||||
|
||||
ui->gridLayout_Command->addWidget(btn,
|
||||
info.toObject().find(_rowJsonKey_columnJsonKey).value().toInt(),
|
||||
info.toObject().find(_rowJsonKey).value().toInt(),
|
||||
info.toObject().find(_columnJsonKey).value().toInt());
|
||||
|
||||
btn->setProperty("state",state::success);
|
||||
@@ -647,23 +647,12 @@ void CommandUI::addVehicles(int sysid, int compid)
|
||||
{
|
||||
Q_UNUSED(compid)
|
||||
|
||||
if(ui->comboBox_uav->findData(sysid) == -1)
|
||||
{
|
||||
ui->comboBox_uav->addItem(QString::number(sysid),sysid);
|
||||
ui->comboBox_uav->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CommandUI::setPointCount(int num)
|
||||
{
|
||||
ui->comboBox_seq->clear();
|
||||
|
||||
for(int i = 1; i <= num;i++)
|
||||
{
|
||||
ui->comboBox_seq->addItem(QString::number(i),i);
|
||||
}
|
||||
ui->comboBox_seq->setCurrentIndex(0);
|
||||
|
||||
}
|
||||
|
||||
@@ -689,33 +678,3 @@ void CommandUI::on_groupBox_Command_clicked()
|
||||
|
||||
|
||||
|
||||
void CommandUI::on_pushButton_setSeq_clicked()
|
||||
{
|
||||
if(ui->comboBox_seq->currentIndex() != -1)
|
||||
{
|
||||
int seq = ui->comboBox_seq->currentData(Qt::UserRole).toInt();
|
||||
|
||||
missionConfirm(seq);
|
||||
}
|
||||
}
|
||||
|
||||
void CommandUI::on_pushButton_setUAV_clicked()
|
||||
{
|
||||
if(ui->comboBox_uav->currentIndex() != -1)
|
||||
{
|
||||
int seq = ui->comboBox_uav->currentData(Qt::UserRole).toInt();
|
||||
|
||||
//根据这个comfirm 确定要输入的参数
|
||||
Confirm *confirmor = new Confirm(this);
|
||||
confirmor->setGeometry(0,0,this->width(),this->height());
|
||||
|
||||
//设置警告界面
|
||||
confirmor->setNotice(tr("click confirm to set uav %1 as current").arg(seq));
|
||||
|
||||
connect(confirmor,SIGNAL(confirmValue(QVariant)),
|
||||
this,SLOT(setCurrent(QVariant)));
|
||||
|
||||
confirmor->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,10 +106,6 @@ private slots:
|
||||
|
||||
void on_groupBox_Command_clicked();
|
||||
|
||||
void on_pushButton_setSeq_clicked();
|
||||
|
||||
void on_pushButton_setUAV_clicked();
|
||||
|
||||
private:
|
||||
|
||||
static const char* _versionJsonKey;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>340</width>
|
||||
<width>418</width>
|
||||
<height>490</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -15,60 +15,6 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>无人机#</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_uav"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_setUAV">
|
||||
<property name="text">
|
||||
<string>切换无人机</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>航点#</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox_seq"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_setSeq">
|
||||
<property name="text">
|
||||
<string>切换航点</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_Command">
|
||||
<property name="title">
|
||||
<string>Command</string>
|
||||
|
||||
Reference in New Issue
Block a user