@@ -39,6 +39,19 @@ Rectangle
3939 id: fxSelector
4040 }
4141
42+ Connections
43+ {
44+ target: widgetRef
45+
46+ /* Switching units rebuilds the fixture list from scratch, so the
47+ previous selection no longer refers to anything */
48+ function onDisplayModeChanged ()
49+ {
50+ if (widgetRef)
51+ fxSelector .resetSelection (widgetRef .fixtureList )
52+ }
53+ }
54+
4255 CustomPopupDialog
4356 {
4457 id: rangePopup
@@ -179,72 +192,23 @@ Rectangle
179192 checked: widgetRef ? widgetRef .invertedAppearance : false
180193 onClicked: if (widgetRef) widgetRef .invertedAppearance = checked
181194 }
182- } // GridLayout
183- } // SectionBox
184-
185- SectionBox
186- {
187- sectionLabel: qsTr (" Range Display Mode" )
188-
189- sectionContents:
190- GridLayout
191- {
192- width: parent .width
193- columns: 6
194- columnSpacing: 5
195- rowSpacing: 4
196-
197- ButtonGroup { id: rangeModeGroup }
198-
199- // row 1
200- CustomCheckBox
201- {
202- implicitWidth: UISettings .iconSizeMedium
203- implicitHeight: implicitWidth
204- ButtonGroup .group : rangeModeGroup
205- checked: widgetRef ? widgetRef .displayMode === VCXYPad .Degrees : true
206- onClicked: if (checked && widgetRef) widgetRef .displayMode = VCXYPad .Degrees
207- }
208195
196+ // row 2
209197 RobotoText
210198 {
211199 height: gridItemsHeight
212200 Layout .fillWidth : true
213- label: qsTr (" Degrees " )
201+ label: qsTr (" Floor control " )
214202 }
215203
216204 CustomCheckBox
217205 {
218206 implicitWidth: UISettings .iconSizeMedium
219207 implicitHeight: implicitWidth
220- ButtonGroup .group : rangeModeGroup
221- checked: widgetRef ? widgetRef .displayMode === VCXYPad .Percentage : true
222- onClicked: if (checked && widgetRef) widgetRef .displayMode = VCXYPad .Percentage
223- }
224-
225- RobotoText
226- {
227- height: gridItemsHeight
228- Layout .fillWidth : true
229- label: qsTr (" Percentage" )
208+ checked: widgetRef ? widgetRef .floorControl : false
209+ tooltip: qsTr (" Point the fixtures at a position on the stage floor" )
210+ onClicked: if (widgetRef) widgetRef .floorControl = checked
230211 }
231-
232- CustomCheckBox
233- {
234- implicitWidth: UISettings .iconSizeMedium
235- implicitHeight: implicitWidth
236- ButtonGroup .group : rangeModeGroup
237- checked: widgetRef ? widgetRef .displayMode === VCXYPad .DMX : true
238- onClicked: if (checked && widgetRef) widgetRef .displayMode = VCXYPad .DMX
239- }
240-
241- RobotoText
242- {
243- height: gridItemsHeight
244- Layout .fillWidth : true
245- label: qsTr (" DMX" )
246- }
247-
248212 } // GridLayout
249213 } // SectionBox
250214
@@ -269,6 +233,67 @@ Rectangle
269233 color: UISettings .bgMedium
270234 height: UISettings .listItemHeight
271235
236+ /* Cycles the units used to show and edit the
237+ per-fixture Pan/Tilt ranges: degrees, percentage
238+ and DMX values */
239+ Rectangle
240+ {
241+ id: displayModeButton
242+ anchors .left : parent .left
243+ anchors .verticalCenter : parent .verticalCenter
244+ anchors .leftMargin : 3
245+ width: UISettings .iconSizeDefault * 1.4
246+ height: parent .height - 2
247+ border .width : 2
248+ border .color : " white"
249+ radius: 5
250+ color: UISettings .sectionHeader
251+
252+ RobotoText
253+ {
254+ height: parent .height
255+ anchors .horizontalCenter : parent .horizontalCenter
256+ label: widgetRef ? (widgetRef .displayMode === VCXYPad .Percentage ? " %" :
257+ widgetRef .displayMode === VCXYPad .DMX ? " DMX" : " °" )
258+ : " °"
259+ fontSize: UISettings .textSizeDefault
260+ fontBold: true
261+ }
262+
263+ MouseArea
264+ {
265+ id: displayModeMouse
266+ anchors .fill : parent
267+ hoverEnabled: true
268+ onClicked:
269+ {
270+ if (! widgetRef)
271+ return
272+
273+ switch (widgetRef .displayMode )
274+ {
275+ case VCXYPad .Degrees :
276+ widgetRef .displayMode = VCXYPad .Percentage
277+ break
278+ case VCXYPad .Percentage :
279+ widgetRef .displayMode = VCXYPad .DMX
280+ break
281+ default :
282+ widgetRef .displayMode = VCXYPad .Degrees
283+ break
284+ }
285+ }
286+ }
287+
288+ ToolTip
289+ {
290+ visible: displayModeMouse .containsMouse
291+ text: qsTr (" Show the Pan/Tilt ranges in degrees, percentage or DMX values" )
292+ delay: 1000
293+ timeout: 5000
294+ }
295+ }
296+
272297 IconButton
273298 {
274299 id: addFixture
@@ -280,7 +305,7 @@ Rectangle
280305 faSource: FontAwesome .fa_plus
281306 faColor: " limegreen"
282307 checkable: true
283- tooltip: qsTr (" Add a fixture/head" )
308+ tooltip: qsTr (" Add a fixture/head or a group. A dropped group also gets its own preset " )
284309 onCheckedChanged:
285310 {
286311 if (checked)
@@ -308,6 +333,7 @@ Rectangle
308333 height: parent .height
309334 faSource: FontAwesome .fa_pencil
310335 faColor: UISettings .fgMain
336+ enabled: fxSelector .itemsCount > 0
311337 tooltip: qsTr (" Set the Pan/Tilt range of the selected fixture head(s)" )
312338 onClicked:
313339 {
@@ -326,6 +352,7 @@ Rectangle
326352 height: parent .height
327353 faSource: FontAwesome .fa_minus
328354 faColor: " crimson"
355+ enabled: fxSelector .itemsCount > 0
329356 tooltip: qsTr (" Remove the selected fixture head(s)" )
330357 onClicked: widgetRef .removeHeads (fxSelector .itemsList ())
331358 }
@@ -420,12 +447,13 @@ Rectangle
420447 // width: fixtureListView.width
421448 height: UISettings .listItemHeight
422449
423- /* Head name */
424- RobotoText
450+ /* Head or group name */
451+ IconTextEntry
425452 {
426453 width: fxNameCol .width
427454 height: UISettings .listItemHeight
428- label: model .name
455+ iSrc: model .isGroup ? " qrc:/group.svg" : " qrc:/movinghead.svg"
456+ tLabel: model .name
429457
430458 Rectangle
431459 {
@@ -487,7 +515,7 @@ Rectangle
487515 id: ntText
488516 visible: false
489517 anchors .centerIn : parent
490- label: qsTr (" Add a new fixture" )
518+ label: qsTr (" Add a new fixture or group " )
491519 }
492520
493521 DropArea
0 commit comments