You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/gui/qtvcp-widgets.adoc
+54Lines changed: 54 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1421,6 +1421,53 @@ It is a comma separated list of keyword and data:
1421
1421
*`SAVE:yes`*::
1422
1422
Shows a save button.
1423
1423
1424
+
[[sub:qtvcp:widgets:operatorvalueline]]
1425
+
=== `OperatorValueLine` - Operator Value Line Entry Widget
1426
+
1427
+
The operator enters values into this widget, which will be applied to a template and then optionally issued to the MDI either immediately or applied at a later time. The widget supports the optional popup calculator or keyboard for touchscreen-friendly entry.
The widget supports a formatting option which is passed to Python's string `format()` to produce the final output for the MDI command. The special token `{value}` can be inserted anywhere in this format string where the value should appear. The formatting property is called `mdi_command_format_option`, e.g.:
1434
+
1435
+
* `M3 S{value}` to start the spindle at the speed entered by the operator.
1436
+
* `M6 T{value} G43 H{value}` to issue a tool change and tool length offset change from the tool number entered
1437
+
1438
+
==== Automatic vs Deferred MDI Issue
1439
+
The widget may be configured to automatically issue the MDI command upon submit when `issue_mdi_on_submit_option` is set to `True`. If `False` issuing the command may be done at a later time via a signal or function call from another widget.
1440
+
1441
+
In cases where `issue_mdi_on_submit_option` is `False`, calling the `issue_mdi()` function will issue the command. Slots attached to widgets such as PushButtons can trigger the MDI command when pressed, e.g.:
1442
+
1443
+
----
1444
+
def setSpindleSpeed(self, event):
1445
+
self.w.lineSpindleSpeed.issue_mdi()
1446
+
ACTION.SET_MANUAL_MODE()
1447
+
1448
+
def setToolNumber(self, event):
1449
+
self.w.lineToolNumber.issue_mdi()
1450
+
ACTION.SET_MANUAL_MODE()
1451
+
----
1452
+
1453
+
==== Pending State Styling Example
1454
+
1455
+
The widget tracks whether a value entered is pending and has not yet been issued via the property `isPendingValue`. This may be used to style the widget via the stylesheet. This can be used to alert the operator that they entered a value but another action must be taken to apply it.
1456
+
1457
+
The following style sheet excerpt will highlight the entry widget with a cyan background when values are pending and have not been applied.
1458
+
1459
+
----
1460
+
#lineSpindleSpeed[isPendingValue=true],
1461
+
#lineToolNumber[isPendingValue=true] {
1462
+
background: cyan;
1463
+
}
1464
+
1465
+
#lineSpindleSpeed[isPendingValue=false],
1466
+
#lineToolNumber[isPendingValue=false] {
1467
+
background: none;
1468
+
}
1469
+
----
1470
+
1424
1471
[[sub:qtvcp:widgets:mdiline]]
1425
1472
=== `MDILine` - MDI Commands Line Entry Widget
1426
1473
@@ -2658,6 +2705,13 @@ When using ``STATUS``'s `request-dialog` function, the default launch name is *`
2658
2705
2659
2706
It is based on PyQt's _QDialog_.
2660
2707
2708
+
==== INI file options for CALCULATOR
2709
+
2710
+
In the `DISPLAY` section of the INI file the following options may be set:
2711
+
2712
+
* `CALCULATOR_CONST_VALUES` - a comma-delimited list of common values you might enter, that will appear on a dedicated row of buttons at the bottom of the calculator. e.g. setting to `0.100,-0.100` would provide two buttons for +0.100 and -0.100 which are commonly used when edge-finding on inch mills. Up to six (6) values may be entered, beyond that the list will be truncated. Values must be valid floating point or integer.
2713
+
* `CALCULATOR_ON_SHOW` - optionally set to `CLEAR_ALL` to issue a "Clear All" each time the calculator is shown. This will clear any previously entered values from the last time the calculator was used and open with the display value set to `0`
0 commit comments