Skip to content
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
81 changes: 46 additions & 35 deletions src/gui/plugins/component_inspector/Pose3d.qml
Original file line number Diff line number Diff line change
Expand Up @@ -90,48 +90,59 @@ Rectangle {
color: "transparent"
width: parent.width
height: gzPoseInstance.height
RowLayout {
id: gzPoseRow
width: parent.width

// Left spacer
Item {
Layout.preferredWidth: margin + indentation
GzPose {
id: gzPoseInstance
width: parent.width - margin * 2 - indentation
x: margin + indentation
readOnly: {
var isModel = entityType == "model"
return !(isModel) || nestedModel
}

// Content
GzPose {
id: gzPoseInstance
Layout.fillWidth: true
Layout.preferredWidth: parent.width

readOnly: {
var isModel = entityType == "model"
return !(isModel) || nestedModel
}
xValue: model.data[0]
yValue: model.data[1]
zValue: model.data[2]
rollValue: model.data[3]
pitchValue: model.data[4]
yawValue: model.data[5]

xValue: model.data[0]
yValue: model.data[1]
zValue: model.data[2]
rollValue: model.data[3]
pitchValue: model.data[4]
yawValue: model.data[5]

onGzPoseSet: {
// _x, _y, _z, _roll, _pitch, _yaw are parameters of signal gzPoseSet
sendPose(_x, _y, _z, _roll, _pitch, _yaw)
}

// By default it is closed
expand: false
onGzPoseSet: (_x, _y, _z, _roll, _pitch, _yaw) => {
// _x, _y, _z, _roll, _pitch, _yaw are parameters of signal gzPoseSet
// from gz-gui GzPose.qml
sendPose(_x, _y, _z, _roll, _pitch, _yaw)
}

} // end gzPoseInstance
// By default pose widget is collapsed
expand: false

// Right spacer
Item {
Layout.preferredWidth: margin
// plotting
gzPlotEnabled: true
gzPlotMimeDataX: { "text/plain" : (model === null) ? "" :
"Component," + model.entity + "," + model.typeId + "," +
model.dataType + ",x," + model.shortName
}
gzPlotMimeDataY: { "text/plain" : (model === null) ? "" :
"Component," + model.entity + "," + model.typeId + "," +
model.dataType + ",y," + model.shortName
}
gzPlotMimeDataZ: { "text/plain" : (model === null) ? "" :
"Component," + model.entity + "," + model.typeId + "," +
model.dataType + ",z," + model.shortName
}
gzPlotMimeDataRoll: { "text/plain" : (model === null) ? "" :
"Component," + model.entity + "," + model.typeId + "," +
model.dataType + ",roll," + model.shortName
}
gzPlotMimeDataPitch: { "text/plain" : (model === null) ? "" :
"Component," + model.entity + "," + model.typeId + "," +
model.dataType + ",pitch," + model.shortName
}
gzPlotMimeDataYaw: { "text/plain" : (model === null) ? "" :
"Component," + model.entity + "," + model.typeId + "," +
model.dataType + ",yaw," + model.shortName
}
} // end RowLayout
} // end gzPoseInstance
} // end Rectangle
} // end Column
} // end Rectangle
Loading