Commit 2740e3fb authored by lm's avatar lm

Working on usuability improvements in the parameter interface

parent 841cfa64
......@@ -14,6 +14,18 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="100,100,50">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="nameLabel">
<property name="minimumSize">
......
......@@ -68,6 +68,10 @@ void QGCCommandButton::setCommandButtonName(QString text)
void QGCCommandButton::startEditMode()
{
// Hide elements
ui->commandButton->hide();
ui->nameLabel->hide();
ui->editCommandComboBox->show();
ui->editFinishButton->show();
ui->editNameLabel->show();
......@@ -79,6 +83,7 @@ void QGCCommandButton::startEditMode()
ui->editParam2SpinBox->show();
ui->editParam3SpinBox->show();
ui->editParam4SpinBox->show();
//setStyleSheet("QGroupBox { border: 1px solid #66666B; border-radius: 3px; padding: 10px 0px 0px 0px; background: #111122; }");
isInEditMode = true;
}
......@@ -99,9 +104,12 @@ void QGCCommandButton::endEditMode()
ui->editParam4SpinBox->hide();
}
ui->commandButton->show();
ui->nameLabel->show();
// Write to settings
emit editingFinished();
//setStyleSheet("");
isInEditMode = false;
}
......
......@@ -14,6 +14,18 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="100,0,0,0">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item row="5" column="0" colspan="3">
<widget class="QComboBox" name="editCommandComboBox"/>
</item>
......@@ -27,14 +39,14 @@
<item row="0" column="3">
<widget class="QLineEdit" name="editButtonName">
<property name="text">
<string>Unnamed</string>
<string>&lt;Button Label&gt;</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QLineEdit" name="editNameLabel">
<property name="text">
<string>Description</string>
<string>&lt;Button Description Label (in front of button)&gt;</string>
</property>
</widget>
</item>
......
......@@ -112,6 +112,12 @@ void QGCParamSlider::selectParameter(int paramIndex)
void QGCParamSlider::startEditMode()
{
ui->valueSlider->hide();
ui->valueSpinBox->hide();
ui->nameLabel->hide();
ui->writeButton->hide();
ui->readButton->hide();
ui->editDoneButton->show();
ui->editMaxLabel->show();
ui->editMinLabel->show();
......@@ -153,6 +159,9 @@ void QGCParamSlider::endEditMode()
ui->editMaxSpinBox->hide();
ui->writeButton->show();
ui->readButton->show();
ui->valueSlider->show();
ui->valueSpinBox->show();
ui->nameLabel->show();
isInEditMode = false;
emit editingFinished();
}
......
......@@ -14,6 +14,18 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="100,0,0,0,0,0,0,0,0">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<property name="horizontalSpacing">
<number>6</number>
</property>
......@@ -23,7 +35,7 @@
<item row="1" column="1" colspan="3">
<widget class="QLineEdit" name="editNameLabel">
<property name="text">
<string>Informal Name..</string>
<string>&lt;Parameter Name / Label&gt;</string>
</property>
</widget>
</item>
......
......@@ -15,8 +15,20 @@
</property>
<layout class="QVBoxLayout" name="toolLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="hintLabel">
<property name="text">
......
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