Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
6760bc95
Commit
6760bc95
authored
Apr 16, 2015
by
Don Gagne
Browse files
Add property dialog
parent
cade6379
Changes
1
Show whitespace changes
Inline
Side-by-side
src/QmlControls/ParameterEditor.qml
View file @
6760bc95
...
...
@@ -27,6 +27,7 @@
import
QtQuick
2.3
import
QtQuick
.
Controls
1.3
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.2
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
...
...
@@ -174,9 +175,85 @@ Rectangle {
onTriggered
:
modelFact
.
value
=
modelFact
.
defaultValue
}
MenuItem
{
text
:
"
Set RC to Param
"
text
:
"
Set RC to Param
...
"
onTriggered
:
__controller
.
setRCToParam
(
modelData
)
}
MenuItem
{
text
:
"
Properties...
"
onTriggered
:
propertiesDialog
.
open
()
}
}
Dialog
{
id
:
propertiesDialog
visible
:
false
title
:
"
Parameter Properties
"
contentItem
:
Rectangle
{
color
:
__qgcPal
.
window
implicitWidth
:
500
implicitHeight
:
longDescription
.
y
+
longDescription
.
height
+
20
Grid
{
id
:
grid
x
:
10
y
:
10
columns
:
2
spacing
:
5
QGCLabel
{
text
:
"
Parameter:
"
}
QGCLabel
{
text
:
modelFact
.
name
}
QGCLabel
{
text
:
"
Group:
"
}
QGCLabel
{
text
:
modelFact
.
group
}
QGCLabel
{
text
:
"
Units:
"
}
QGCLabel
{
text
:
modelFact
.
units
?
modelFact
.
units
:
"
none
"
}
QGCLabel
{
text
:
"
Default value:
"
}
QGCLabel
{
text
:
modelFact
.
defaultValueAvailable
?
modelFact
.
defaultValue
:
"
none
"
}
QGCLabel
{
text
:
"
Minimum value:
"
}
QGCLabel
{
text
:
modelFact
.
min
}
QGCLabel
{
text
:
"
Maximum value:
"
}
QGCLabel
{
text
:
modelFact
.
max
}
QGCLabel
{
text
:
"
Description:
"
}
QGCLabel
{
text
:
modelFact
.
shortDescription
?
modelFact
.
shortDescription
:
"
none
"
}
QGCLabel
{
text
:
"
Description (long):
"
}
QGCLabel
{
id
:
longDescription
width
:
500
-
20
-
x
wrapMode
:
Text
.
WordWrap
text
:
modelFact
.
longDescription
?
modelFact
.
longDescription
:
"
none
"
}
}
}
}
MouseArea
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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