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 common widget for vector3 #427

Merged
merged 8 commits into from
Jul 13, 2022
Merged

Conversation

AzulRadio
Copy link
Contributor

@AzulRadio AzulRadio commented Jun 28, 2022

Signed-off-by: youhy haoyuan2019@outlook.com

New feature

Summary

Add common widget for vector3

Test it

Use the following test QML to test:

import QtQuick 2.9
import QtQuick.Layouts 1.3

GzVector3 {
  id: gzVector
  property double xModel: 120
  property double yModel: 110
  property double zModel: 100
  xName: "Red"
  yName: "Green"
  zName: "Blue"
  xSpin.value: xModel
  ySpin.value: yModel
  zSpin.value: zModel
  onGzVectorSet: {
    xModel = xSpin.value
    yModel = ySpin.value
    zModel = zSpin.value
    console.log(xModel, yModel, zModel)
  }
}

Then use

qmlscene Test.qml

to test

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: youhy <haoyuan2019@outlook.com>
@github-actions github-actions bot added the 🏰 citadel Ignition Citadel label Jun 28, 2022
@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

❗ No coverage uploaded for pull request base (ign-gui3@f1ff486). Click here to learn what that means.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             ign-gui3     #427   +/-   ##
===========================================
  Coverage            ?   66.42%           
===========================================
  Files               ?       29           
  Lines               ?     3291           
  Branches            ?        0           
===========================================
  Hits                ?     2186           
  Misses              ?     1105           
  Partials            ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1ff486...8b18673. Read the comment docs.

@chapulina chapulina added the OOBE 📦✨ Out-of-box experience label Jun 29, 2022
AzulRadio and others added 4 commits June 29, 2022 15:28
Signed-off-by: youhy <haoyuan2019@outlook.com>
Signed-off-by: youhy <haoyuan2019@outlook.com>
Signed-off-by: youhy <haoyuan2019@outlook.com>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
include/ignition/gui/qml/GzVector3.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzVector3.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzVector3.qml Outdated Show resolved Hide resolved
include/ignition/gui/qml/GzVector3.qml Show resolved Hide resolved
include/ignition/gui/qml/GzVector3.qml Outdated Show resolved Hide resolved
Signed-off-by: youhy <haoyuan2019@outlook.com>
Item {
id: gzVectorRoot

// Readn-only / write
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Readn-only / write
// Read-only / write

property string zName: "Z"

// Units, defaults to meters.
// Set to "" to omit the parentheses.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Set to "" to omit the parentheses.
// Set to "" to omit the units & parentheses.

height: gzVectorContent.height

// Maximum spinbox value
property double spinMax: Number.MAX_VALUE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be moved out of the private variables section since users can overwrite

Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
Signed-off-by: Jenn Nguyen <jenn@openrobotics.org>
@jennuine jennuine dismissed chapulina’s stale review July 13, 2022 21:14

Changes were completed

@jennuine jennuine merged commit 110321c into ign-gui3 Jul 13, 2022
@jennuine jennuine deleted the azulradio/common_widget_vector branch July 13, 2022 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel OOBE 📦✨ Out-of-box experience
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants