@@ -90,48 +90,59 @@ Rectangle {
90
90
color: " transparent"
91
91
width: parent .width
92
92
height: gzPoseInstance .height
93
- RowLayout {
94
- id: gzPoseRow
95
- width: parent .width
96
93
97
- // Left spacer
98
- Item {
99
- Layout .preferredWidth : margin + indentation
94
+ GzPose {
95
+ id: gzPoseInstance
96
+ width: parent .width - margin * 2 - indentation
97
+ x: margin + indentation
98
+ readOnly: {
99
+ var isModel = entityType == " model"
100
+ return ! (isModel) || nestedModel
100
101
}
101
102
102
- // Content
103
- GzPose {
104
- id: gzPoseInstance
105
- Layout .fillWidth : true
106
- Layout .preferredWidth : parent .width
107
-
108
- readOnly: {
109
- var isModel = entityType == " model"
110
- return ! (isModel) || nestedModel
111
- }
103
+ xValue: model .data [0 ]
104
+ yValue: model .data [1 ]
105
+ zValue: model .data [2 ]
106
+ rollValue: model .data [3 ]
107
+ pitchValue: model .data [4 ]
108
+ yawValue: model .data [5 ]
112
109
113
- xValue: model .data [0 ]
114
- yValue: model .data [1 ]
115
- zValue: model .data [2 ]
116
- rollValue: model .data [3 ]
117
- pitchValue: model .data [4 ]
118
- yawValue: model .data [5 ]
119
-
120
- onGzPoseSet: {
121
- // _x, _y, _z, _roll, _pitch, _yaw are parameters of signal gzPoseSet
122
- sendPose (_x, _y, _z, _roll, _pitch, _yaw)
123
- }
124
-
125
- // By default it is closed
126
- expand: false
110
+ onGzPoseSet : (_x , _y , _z , _roll , _pitch , _yaw ) => {
111
+ // _x, _y, _z, _roll, _pitch, _yaw are parameters of signal gzPoseSet
112
+ // from gz-gui GzPose.qml
113
+ sendPose (_x, _y, _z, _roll, _pitch, _yaw)
114
+ }
127
115
128
- } // end gzPoseInstance
116
+ // By default pose widget is collapsed
117
+ expand: false
129
118
130
- // Right spacer
131
- Item {
132
- Layout .preferredWidth : margin
119
+ // plotting
120
+ gzPlotEnabled: true
121
+ gzPlotMimeDataX: { " text/plain" : (model === null ) ? " " :
122
+ " Component," + model .entity + " ," + model .typeId + " ," +
123
+ model .dataType + " ,x," + model .shortName
124
+ }
125
+ gzPlotMimeDataY: { " text/plain" : (model === null ) ? " " :
126
+ " Component," + model .entity + " ," + model .typeId + " ," +
127
+ model .dataType + " ,y," + model .shortName
128
+ }
129
+ gzPlotMimeDataZ: { " text/plain" : (model === null ) ? " " :
130
+ " Component," + model .entity + " ," + model .typeId + " ," +
131
+ model .dataType + " ,z," + model .shortName
132
+ }
133
+ gzPlotMimeDataRoll: { " text/plain" : (model === null ) ? " " :
134
+ " Component," + model .entity + " ," + model .typeId + " ," +
135
+ model .dataType + " ,roll," + model .shortName
136
+ }
137
+ gzPlotMimeDataPitch: { " text/plain" : (model === null ) ? " " :
138
+ " Component," + model .entity + " ," + model .typeId + " ," +
139
+ model .dataType + " ,pitch," + model .shortName
140
+ }
141
+ gzPlotMimeDataYaw: { " text/plain" : (model === null ) ? " " :
142
+ " Component," + model .entity + " ," + model .typeId + " ," +
143
+ model .dataType + " ,yaw," + model .shortName
133
144
}
134
- } // end RowLayout
145
+ } // end gzPoseInstance
135
146
} // end Rectangle
136
147
} // end Column
137
148
} // end Rectangle
0 commit comments