Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
2cc09fd2
Commit
2cc09fd2
authored
Feb 27, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Last usability fixes for param interface
parent
43bf1da1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
131 additions
and
78 deletions
+131
-78
QGCCommandButton.cc
src/ui/designer/QGCCommandButton.cc
+9
-0
QGCCommandButton.ui
src/ui/designer/QGCCommandButton.ui
+39
-13
QGCParamSlider.cc
src/ui/designer/QGCParamSlider.cc
+10
-9
QGCParamSlider.ui
src/ui/designer/QGCParamSlider.ui
+73
-56
No files found.
src/ui/designer/QGCCommandButton.cc
View file @
2cc09fd2
...
...
@@ -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
();
...
...
src/ui/designer/QGCCommandButton.ui
View file @
2cc09fd2
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
688
</width>
<height>
19
0
</height>
<width>
882
</width>
<height>
43
0
</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>
<
Button Label
>
</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>
<
Button Description Label (in front of button)
>
</string>
</property>
</widget>
</item>
<item
row=
"
2
"
column=
"3"
>
<item
row=
"
4
"
column=
"3"
>
<widget
class=
"QPushButton"
name=
"commandButton"
>
<property
name=
"minimumSize"
>
<size>
<width>
3
0
</width>
<width>
6
0
</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/>
...
...
src/ui/designer/QGCParamSlider.cc
View file @
2cc09fd2
...
...
@@ -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
();
...
...
src/ui/designer/QGCParamSlider.ui
View file @
2cc09fd2
...
...
@@ -6,8 +6,8 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
83
9
</width>
<height>
1
79
</height>
<width>
78
9
</width>
<height>
1
55
</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>
<
Parameter Name / Label
>
</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>
4
0
</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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment