Skip to content

Commit

Permalink
Add degree as an optional unit for rotation in GzPose (#475)
Browse files Browse the repository at this point in the history
* Add degree as an optional unit for rotation in GzPose

Signed-off-by: youhy <[email protected]>
  • Loading branch information
AzulRadio authored Aug 18, 2022
1 parent c3df98d commit d27c387
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions include/ignition/gui/qml/GzPose.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import QtQuick.Controls.Styles 1.4
* GzPose {
* id: gzPose
* readOnly: false
* useRadian: true
* xValue: xValueFromCPP
* yValue: yValueFromCPP
* zValue: zValueFromCPP
Expand All @@ -49,6 +50,9 @@ Item {
// Read-only / write
property bool readOnly: false

// Radian / Degree as the unit for Rotation
property bool useRadian: true

// User input value.
property double xValue
property double yValue
Expand Down Expand Up @@ -165,7 +169,7 @@ Item {
}

Text {
text: 'Roll (rad)'
text: 'Roll ' + (useRadian ? '(rad)' : '(deg)')
leftPadding: 5
color: Material.theme == Material.Light ? "#444444" : "#bbbbbb"
font.pointSize: 12
Expand Down Expand Up @@ -207,7 +211,7 @@ Item {
}

Text {
text: 'Pitch (rad)'
text: 'Pitch ' + (useRadian ? '(rad)' : '(deg)')
leftPadding: 5
color: Material.theme == Material.Light ? "#444444" : "#bbbbbb"
font.pointSize: 12
Expand Down Expand Up @@ -249,7 +253,7 @@ Item {
}

Text {
text: 'Yaw (rad)'
text: 'Yaw ' + (useRadian ? '(rad)' : '(deg)')
leftPadding: 5
color: Material.theme == Material.Light ? "#444444" : "#bbbbbb"
font.pointSize: 12
Expand Down

0 comments on commit d27c387

Please sign in to comment.