diff --git a/src/ui/designer/QGCCommandButton.cc b/src/ui/designer/QGCCommandButton.cc index 8803a409076c26704cc6af8192381e1b31feb11c..1068adc8b4cf9ef7037113df13d017c111303b0c 100644 --- a/src/ui/designer/QGCCommandButton.cc +++ b/src/ui/designer/QGCCommandButton.cc @@ -28,6 +28,11 @@ QGCCommandButton::QGCCommandButton(QWidget *parent) : ui->editParam2SpinBox->hide(); ui->editParam3SpinBox->hide(); ui->editParam4SpinBox->hide(); + ui->editLine1->hide(); + ui->editLine2->hide(); + + ui->editLine1->setStyleSheet("QWidget { border: 1px solid #66666B; border-radius: 3px; padding: 10px 0px 0px 0px; background: #111122; }"); + ui->editLine2->setStyleSheet("QWidget { border: 1px solid #66666B; border-radius: 3px; padding: 10px 0px 0px 0px; background: #111122; }"); // Add commands to combo box ui->editCommandComboBox->addItem("DO: Control Video", MAV_CMD_DO_CONTROL_VIDEO); @@ -83,6 +88,8 @@ void QGCCommandButton::startEditMode() ui->editParam2SpinBox->show(); ui->editParam3SpinBox->show(); ui->editParam4SpinBox->show(); + ui->editLine1->show(); + ui->editLine2->show(); //setStyleSheet("QGroupBox { border: 1px solid #66666B; border-radius: 3px; padding: 10px 0px 0px 0px; background: #111122; }"); isInEditMode = true; } @@ -96,6 +103,8 @@ void QGCCommandButton::endEditMode() ui->editConfirmationCheckBox->hide(); ui->editComponentSpinBox->hide(); ui->editParamsVisibleCheckBox->hide(); + ui->editLine1->hide(); + ui->editLine2->hide(); if (!ui->editParamsVisibleCheckBox->isChecked()) { ui->editParam1SpinBox->hide(); diff --git a/src/ui/designer/QGCCommandButton.ui b/src/ui/designer/QGCCommandButton.ui index 1814513b0493de418a742130361396a6d6c23587..5b7e4646c52ea10434fcbf33eaca7744e9ad4eb3 100644 --- a/src/ui/designer/QGCCommandButton.ui +++ b/src/ui/designer/QGCCommandButton.ui @@ -6,8 +6,8 @@ 0 0 - 688 - 190 + 882 + 430 @@ -26,35 +26,35 @@ 3 - + - + Done - + <Button Label> - + <Button Description Label (in front of button)> - + - 30 + 60 0 @@ -63,7 +63,7 @@ - + Component ID: @@ -76,7 +76,7 @@ - + Set the confirm flag for this button. Some commands require that first one command is sent without confirm flag and then a second, equal command with confirm flag. This ensures safety. @@ -86,7 +86,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -182,13 +182,39 @@ - + Keep parameters visible + + + + + 0 + 0 + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + diff --git a/src/ui/designer/QGCParamSlider.cc b/src/ui/designer/QGCParamSlider.cc index 8832bda09d2d7d2c03c079ea0d82acac968d9432..b78c3d8fbfb0c767d733a1550951433907d55a39 100644 --- a/src/ui/designer/QGCParamSlider.cc +++ b/src/ui/designer/QGCParamSlider.cc @@ -26,16 +26,19 @@ QGCParamSlider::QGCParamSlider(QWidget *parent) : scaledInt = ui->valueSlider->maximum() - ui->valueSlider->minimum(); ui->editDoneButton->hide(); - ui->editMaxLabel->hide(); - ui->editMinLabel->hide(); ui->editNameLabel->hide(); - ui->editInstructionsLabel->hide(); ui->editRefreshParamsButton->hide(); ui->editSelectParamComboBox->hide(); ui->editSelectComponentComboBox->hide(); ui->editStatusLabel->hide(); ui->editMinSpinBox->hide(); ui->editMaxSpinBox->hide(); + ui->editLine1->hide(); + ui->editLine2->hide(); + + ui->editLine1->setStyleSheet("QWidget { border: 1px solid #66666B; border-radius: 3px; padding: 10px 0px 0px 0px; background: #111122; }"); + ui->editLine2->setStyleSheet("QWidget { border: 1px solid #66666B; border-radius: 3px; padding: 10px 0px 0px 0px; background: #111122; }"); + connect(ui->editDoneButton, SIGNAL(clicked()), this, SLOT(endEditMode())); // Sending actions @@ -119,10 +122,7 @@ void QGCParamSlider::startEditMode() ui->readButton->hide(); ui->editDoneButton->show(); - ui->editMaxLabel->show(); - ui->editMinLabel->show(); ui->editNameLabel->show(); - ui->editInstructionsLabel->show(); ui->editRefreshParamsButton->show(); ui->editSelectParamComboBox->show(); ui->editSelectComponentComboBox->show(); @@ -131,6 +131,8 @@ void QGCParamSlider::startEditMode() ui->editMaxSpinBox->show(); ui->writeButton->hide(); ui->readButton->hide(); + ui->editLine1->show(); + ui->editLine2->show(); isInEditMode = true; } @@ -147,16 +149,15 @@ void QGCParamSlider::endEditMode() parameterMax = ui->editMaxSpinBox->value(); ui->editDoneButton->hide(); - ui->editMaxLabel->hide(); - ui->editMinLabel->hide(); ui->editNameLabel->hide(); - ui->editInstructionsLabel->hide(); ui->editRefreshParamsButton->hide(); ui->editSelectParamComboBox->hide(); ui->editSelectComponentComboBox->hide(); ui->editStatusLabel->hide(); ui->editMinSpinBox->hide(); ui->editMaxSpinBox->hide(); + ui->editLine1->hide(); + ui->editLine2->hide(); ui->writeButton->show(); ui->readButton->show(); ui->valueSlider->show(); diff --git a/src/ui/designer/QGCParamSlider.ui b/src/ui/designer/QGCParamSlider.ui index c4293a1af922b80e6f9e95bd7ef2e27ee2c4132c..f3509675ed412e6354e0569854ef796be802993e 100644 --- a/src/ui/designer/QGCParamSlider.ui +++ b/src/ui/designer/QGCParamSlider.ui @@ -6,8 +6,8 @@ 0 0 - 839 - 179 + 789 + 155 @@ -32,29 +32,21 @@ 12 - + <Parameter Name / Label> - - - - Min - - - - - - - Max - - - + + + 60 + 0 + + Name @@ -63,18 +55,14 @@ - - - - -999999999.000000000000000 - - - 999999999.000000000000000 - - - - + + + + 60 + 0 + + 250 @@ -89,23 +77,6 @@ - - - - -999999999.000000000000000 - - - 999999999.000000000000000 - - - - - - - Please configure the parameter slider now: - - - @@ -113,7 +84,7 @@ - + false @@ -158,7 +129,7 @@ - + true @@ -168,7 +139,7 @@ - + Done @@ -192,7 +163,7 @@ - 40 + 0 20 @@ -219,18 +190,64 @@ Transmit the current slider value to the system - + W - - - :/images/devices/network-wireless.svg:/images/devices/network-wireless.svg + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + + + + + MIN: + + + -999999999.000000000000000 + + + 999999999.000000000000000 + + + + + + + MAX: + + + -999999999.000000000000000 + + + 999999999.000000000000000 - - - +