Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add degree as an optional unit for rotation in GzPose #475

Merged
merged 3 commits into from
Aug 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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