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
dd0e522e
Commit
dd0e522e
authored
Apr 11, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default disabled QGCComboBox until a parameter is recieved from the AP
parent
d6a36d7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
QGCComboBox.cc
src/ui/designer/QGCComboBox.cc
+12
-0
QGCComboBox.h
src/ui/designer/QGCComboBox.h
+1
-0
No files found.
src/ui/designer/QGCComboBox.cc
View file @
dd0e522e
...
...
@@ -39,6 +39,8 @@ QGCComboBox::QGCComboBox(QWidget *parent) :
ui
->
editItemNameLabel
->
hide
();
ui
->
itemValueLabel
->
hide
();
ui
->
itemNameLabel
->
hide
();
ui
->
editOptionComboBox
->
setEnabled
(
false
);
isDisabled
=
true
;
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; }"
);
...
...
@@ -192,6 +194,10 @@ void QGCComboBox::startEditMode()
ui
->
editItemNameLabel
->
show
();
ui
->
itemValueLabel
->
show
();
ui
->
itemNameLabel
->
show
();
if
(
isDisabled
)
{
ui
->
editOptionComboBox
->
setEnabled
(
true
);
}
isInEditMode
=
true
;
}
...
...
@@ -223,6 +229,10 @@ void QGCComboBox::endEditMode()
ui
->
itemValueLabel
->
hide
();
ui
->
itemNameLabel
->
hide
();
ui
->
nameLabel
->
show
();
if
(
isDisabled
)
{
ui
->
editOptionComboBox
->
setEnabled
(
false
);
}
isInEditMode
=
false
;
emit
editingFinished
();
}
...
...
@@ -293,6 +303,8 @@ void QGCComboBox::setParameterValue(int uas, int component, int paramCount, int
if
(
component
==
this
->
component
&&
parameterName
==
this
->
parameterName
)
{
ui
->
editOptionComboBox
->
setEnabled
(
true
);
isDisabled
=
false
;
for
(
int
i
=
0
;
i
<
ui
->
editOptionComboBox
->
count
();
i
++
)
{
if
(
comboBoxTextToValMap
[
ui
->
editOptionComboBox
->
itemText
(
i
)]
==
value
.
toInt
())
...
...
src/ui/designer/QGCComboBox.h
View file @
dd0e522e
...
...
@@ -53,6 +53,7 @@ protected:
QVariant
parameterValue
;
///< Value of the parameter
double
parameterScalingFactor
;
///< Factor to scale the parameter between slider and true value
float
parameterMin
;
bool
isDisabled
;
float
parameterMax
;
int
component
;
///< ID of the MAV component to address
//double scaledInt;
...
...
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