Commit 2cc09fd2 authored by lm's avatar lm

Last usability fixes for param interface

parent 43bf1da1
......@@ -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();
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>688</width>
<height>190</height>
<width>882</width>
<height>430</height>
</rect>
</property>
<property name="windowTitle">
......@@ -26,35 +26,35 @@
<property name="bottomMargin">
<number>3</number>
</property>
<item row="5" column="0" colspan="3">
<item row="7" column="0" colspan="3">
<widget class="QComboBox" name="editCommandComboBox"/>
</item>
<item row="5" column="3">
<item row="7" column="3">
<widget class="QPushButton" name="editFinishButton">
<property name="text">
<string>Done</string>
</property>
</widget>
</item>
<item row="0" column="3">
<item row="2" column="3">
<widget class="QLineEdit" name="editButtonName">
<property name="text">
<string>&lt;Button Label&gt;</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<item row="2" column="0" colspan="3">
<widget class="QLineEdit" name="editNameLabel">
<property name="text">
<string>&lt;Button Description Label (in front of button)&gt;</string>
</property>
</widget>
</item>
<item row="2" column="3">
<item row="4" column="3">
<widget class="QPushButton" name="commandButton">
<property name="minimumSize">
<size>
<width>30</width>
<width>60</width>
<height>0</height>
</size>
</property>
......@@ -63,7 +63,7 @@
</property>
</widget>
</item>
<item row="4" column="0">
<item row="6" column="0">
<widget class="QSpinBox" name="editComponentSpinBox">
<property name="prefix">
<string>Component ID: </string>
......@@ -76,7 +76,7 @@
</property>
</widget>
</item>
<item row="4" column="2" colspan="2">
<item row="6" column="2" colspan="2">
<widget class="QCheckBox" name="editConfirmationCheckBox">
<property name="toolTip">
<string>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.</string>
......@@ -86,7 +86,7 @@
</property>
</widget>
</item>
<item row="1" column="0" colspan="4">
<item row="3" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QDoubleSpinBox" name="editParam1SpinBox">
......@@ -166,7 +166,7 @@
</item>
</layout>
</item>
<item row="2" column="0" colspan="3">
<item row="4" column="0" colspan="3">
<widget class="QLabel" name="nameLabel">
<property name="minimumSize">
<size>
......@@ -182,13 +182,39 @@
</property>
</widget>
</item>
<item row="4" column="1">
<item row="6" column="1">
<widget class="QCheckBox" name="editParamsVisibleCheckBox">
<property name="text">
<string>Keep parameters visible</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="4">
<widget class="Line" name="editLine1">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="8" column="0" colspan="4">
<widget class="Line" name="editLine2">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
......
......@@ -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();
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>839</width>
<height>179</height>
<width>789</width>
<height>155</height>
</rect>
</property>
<property name="windowTitle">
......@@ -32,29 +32,21 @@
<property name="verticalSpacing">
<number>12</number>
</property>
<item row="1" column="1" colspan="3">
<item row="1" column="1" colspan="5">
<widget class="QLineEdit" name="editNameLabel">
<property name="text">
<string>&lt;Parameter Name / Label&gt;</string>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QLabel" name="editMinLabel">
<property name="text">
<string>Min</string>
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QLabel" name="editMaxLabel">
<property name="text">
<string>Max</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="nameLabel">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Name</string>
</property>
......@@ -63,18 +55,14 @@
</property>
</widget>
</item>
<item row="2" column="3" colspan="2">
<widget class="QDoubleSpinBox" name="editMinSpinBox">
<property name="minimum">
<double>-999999999.000000000000000</double>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="5">
<item row="2" column="5" colspan="2">
<widget class="QSlider" name="valueSlider">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>250</width>
......@@ -89,23 +77,6 @@
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QDoubleSpinBox" name="editMaxSpinBox">
<property name="minimum">
<double>-999999999.000000000000000</double>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="0" column="1" colspan="6">
<widget class="QLabel" name="editInstructionsLabel">
<property name="text">
<string>Please configure the parameter slider now:</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="6">
<widget class="QLabel" name="editStatusLabel">
<property name="text">
......@@ -113,7 +84,7 @@
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<item row="3" column="1" colspan="3">
<widget class="QComboBox" name="editSelectComponentComboBox">
<property name="enabled">
<bool>false</bool>
......@@ -158,7 +129,7 @@
</property>
</widget>
</item>
<item row="3" column="7" colspan="2">
<item row="3" column="8">
<widget class="QPushButton" name="editRefreshParamsButton">
<property name="enabled">
<bool>true</bool>
......@@ -168,7 +139,7 @@
</property>
</widget>
</item>
<item row="5" column="7" colspan="2">
<item row="5" column="8">
<widget class="QPushButton" name="editDoneButton">
<property name="text">
<string>Done</string>
......@@ -192,7 +163,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>0</width>
<height>20</height>
</size>
</property>
......@@ -219,18 +190,64 @@
<string>Transmit the current slider value to the system</string>
</property>
<property name="text">
<string/>
<string>W</string>
</property>
<property name="icon">
<iconset resource="../../../mavground.qrc">
<normaloff>:/images/devices/network-wireless.svg</normaloff>:/images/devices/network-wireless.svg</iconset>
</widget>
</item>
<item row="0" column="0" colspan="9">
<widget class="Line" name="editLine1">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="6" column="0" colspan="9">
<widget class="Line" name="editLine2">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QDoubleSpinBox" name="editMinSpinBox">
<property name="prefix">
<string>MIN: </string>
</property>
<property name="minimum">
<double>-999999999.000000000000000</double>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="7" colspan="2">
<widget class="QDoubleSpinBox" name="editMaxSpinBox">
<property name="prefix">
<string>MAX: </string>
</property>
<property name="minimum">
<double>-999999999.000000000000000</double>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../../../mavground.qrc"/>
</resources>
<resources/>
<connections/>
</ui>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment