Skip to content

Commit 780d70d

Browse files
committed
Merge branch '2.9'
2 parents 5bef504 + cccb41f commit 780d70d

7 files changed

Lines changed: 1083 additions & 4 deletions

File tree

247 KB
Loading
57.3 KB
Loading

docs/src/gui/qtdragon.adoc

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ The `EMBED_TAB_NAME` entry will used as the title for the new tab.(must be uniqu
176176
Tab `EMBED_TAB_LOCATION` options include: `tabWidget_utilities`, `tabWidget_setup` and `stackedWidget_mainTab`. +
177177
Tab `EMBED_TAB_COMMAND` specifies what embed-able program to run, including any of it's command line options.
178178

179+
If using the `tabWidget_utilities` or `tabWidget_setup` locations, an extra tab will appear with the panel. +
180+
If using `stackedWidget_mainTab`, a button labelled 'User' will appear. +
181+
Pressing this button will cycle through displaying all available panels (specified for this location) on the main tab area.
182+
183+
==== Embedding Vismach Mill
179184
.Sample adding a builtin panel to the utilities tab, i.e., a graphical animated machine using the vismach library.
180185
[source,{ini}]
181186
----
@@ -185,9 +190,18 @@ EMBED_TAB_COMMAND = qtvcp vismach_mill_xyz
185190
EMBED_TAB_LOCATION = tabWidget_utilities
186191
----
187192

188-
If using the `tabWidget_utilities` or `tabWidget_setup` locations, an extra tab will appear with the panel.
189-
If using `stackedWidget_mainTab`, a button labelled 'User' will appear.
190-
Pressing this button will cycle through displaying all available panels (specified for this location) on the main tab area.
193+
==== Embedding Spindle Belts Panel
194+
195+
This example panel is designed to display additional RS485 VFD data and also to configure a 4 sheave, 2 belt spindle drive via a series of buttons.
196+
197+
image::images/qtdragon_spindle_belts.png["QtDragon spindle_belts Panel - Spindle Belts VCP",align="center"]
198+
[source,{ini}]
199+
----
200+
[DISPLAY]
201+
EMBED_TAB_NAME = Spindle Belts
202+
EMBED_TAB_COMMAND = qtvcp spindle_belts
203+
EMBED_TAB_LOCATION = tabWidget_utilities
204+
----
191205

192206
=== Subroutine Paths
193207

docs/src/gui/qtvcp-libraries.adoc

Lines changed: 128 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,133 @@ def on_keycall_override(self,event,state,shift,cntrl,value):
747747
print('value = {}'.format(value))
748748
----
749749

750+
=== Key Defines
751+
752+
Here is a list of recognized key words. Use the quoted text. +
753+
Letter keys use 'Key_' with the upper or lower letter added. +
754+
ie. 'Key_a' and 'Key_A'
755+
756+
[source,python]
757+
----
758+
keys = {
759+
Qt.Key_Escape: "Key_Escape",
760+
Qt.Key_Tab: "Key_Tab",
761+
Qt.Key_Backtab: "Key_Backtab",
762+
Qt.Key_Backspace: "Key_Backspace",
763+
Qt.Key_Return: "Key_Return",
764+
Qt.Key_Enter: "Key_Enter",
765+
Qt.Key_Insert: "Key_Insert",
766+
Qt.Key_Delete: "Key_Delete",
767+
Qt.Key_Pause: "Key_Pause",
768+
Qt.Key_Print: "Key_Print",
769+
Qt.Key_SysReq: "Key_SysReq",
770+
Qt.Key_Clear: "Key_Clear",
771+
Qt.Key_Home: "Key_Home",
772+
Qt.Key_End: "Key_End",
773+
Qt.Key_Left: "Key_Left",
774+
Qt.Key_Up: "Key_Up",
775+
Qt.Key_Right: "Key_Right",
776+
Qt.Key_Down: "Key_Down",
777+
Qt.Key_PageUp: "Key_PageUp",
778+
Qt.Key_PageDown: "Key_PageDown",
779+
Qt.Key_Shift: "Key_Shift",
780+
Qt.Key_Control: "Key_Control",
781+
Qt.Key_Meta: "Key_Meta",
782+
# Qt.Key_Alt: "Key_Alt",
783+
Qt.Key_AltGr: "Key_AltGr",
784+
Qt.Key_CapsLock: "Key_CapsLock",
785+
Qt.Key_NumLock: "Key_NumLock",
786+
Qt.Key_ScrollLock: "Key_ScrollLock",
787+
Qt.Key_F1: "Key_F1",
788+
Qt.Key_F2: "Key_F2",
789+
Qt.Key_F3: "Key_F3",
790+
Qt.Key_F4: "Key_F4",
791+
Qt.Key_F5: "Key_F5",
792+
Qt.Key_F6: "Key_F6",
793+
Qt.Key_F7: "Key_F7",
794+
Qt.Key_F8: "Key_F8",
795+
Qt.Key_F9: "Key_F9",
796+
Qt.Key_F10: "Key_F10",
797+
Qt.Key_F11: "Key_F11",
798+
Qt.Key_F12: "Key_F12",
799+
Qt.Key_F13: "Key_F13",
800+
Qt.Key_F14: "Key_F14",
801+
Qt.Key_F15: "Key_F15",
802+
Qt.Key_F16: "Key_F16",
803+
Qt.Key_F17: "Key_F17",
804+
Qt.Key_F18: "Key_F18",
805+
Qt.Key_F19: "Key_F19",
806+
Qt.Key_F20: "Key_F20",
807+
Qt.Key_F21: "Key_F21",
808+
Qt.Key_F22: "Key_F22",
809+
Qt.Key_F23: "Key_F23",
810+
Qt.Key_F24: "Key_F24",
811+
Qt.Key_F25: "Key_F25",
812+
Qt.Key_F26: "Key_F26",
813+
Qt.Key_F27: "Key_F27",
814+
Qt.Key_F28: "Key_F28",
815+
Qt.Key_F29: "Key_F29",
816+
Qt.Key_F30: "Key_F30",
817+
Qt.Key_F31: "Key_F31",
818+
Qt.Key_F32: "Key_F32",
819+
Qt.Key_F33: "Key_F33",
820+
Qt.Key_F34: "Key_F34",
821+
Qt.Key_F35: "Key_F35",
822+
Qt.Key_Super_L: "Key_Super_L",
823+
Qt.Key_Super_R: "Key_Super_R",
824+
Qt.Key_Menu: "Key_Menu",
825+
Qt.Key_Hyper_L: "Key_HYPER_L",
826+
Qt.Key_Hyper_R: "Key_Hyper_R",
827+
Qt.Key_Help: "Key_Help",
828+
Qt.Key_Direction_L: "Key_Direction_L",
829+
Qt.Key_Direction_R: "Key_Direction_R",
830+
Qt.Key_Space: "Key_Space",
831+
Qt.Key_Any: "Key_Any",
832+
Qt.Key_Exclam: "Key_Exclam",
833+
Qt.Key_QuoteDbl: "Key_QuoteDdl",
834+
Qt.Key_NumberSign: "Key_NumberSign",
835+
Qt.Key_Dollar: "Key_Dollar",
836+
Qt.Key_Percent: "Key_Percent",
837+
Qt.Key_Ampersand: "Key_Ampersand",
838+
Qt.Key_Apostrophe: "Key_Apostrophe",
839+
Qt.Key_ParenLeft: "Key_ParenLeft",
840+
Qt.Key_ParenRight: "Key_ParenRight",
841+
Qt.Key_Asterisk: "Key_Asterisk",
842+
Qt.Key_Plus: "Key_Plus",
843+
Qt.Key_Comma: "Key_Comma",
844+
Qt.Key_Minus: "Key_Minus",
845+
Qt.Key_Period: "Key_Period",
846+
Qt.Key_Slash: "Key_Slash",
847+
Qt.Key_0: "Key_0",
848+
Qt.Key_1: "Key_1",
849+
Qt.Key_2: "Key_2",
850+
Qt.Key_3: "Key_3",
851+
Qt.Key_4: "Key_4",
852+
Qt.Key_5: "Key_5",
853+
Qt.Key_6: "Key_6",
854+
Qt.Key_7: "Key_7",
855+
Qt.Key_8: "Key_8",
856+
Qt.Key_9: "Key_9",
857+
Qt.Key_Colon: "Key_Colon",
858+
Qt.Key_Semicolon: "Key_Semicolon",
859+
Qt.Key_Less: "Key_Less",
860+
Qt.Key_Equal: "Key_Equal",
861+
Qt.Key_Greater: "Key_Greater",
862+
Qt.Key_Question: "Key_Question",
863+
Qt.Key_At: "Key_At",
864+
Qt.Key_BracketLeft: "Key_BracketLeft",
865+
Qt.Key_Backslash: "Key_Backslash",
866+
Qt.Key_BracketRight: "Key_BracketRight",
867+
Qt.Key_AsciiCircum: "Key_AsciiCircum",
868+
Qt.Key_Underscore: "Key_Underscore",
869+
Qt.Key_QuoteLeft: "Key_QuoteLeft",
870+
Qt.Key_BraceLeft: "Key_BraceLeft",
871+
Qt.Key_Bar: "Key_Bar",
872+
Qt.Key_BraceRight: "Key_BraceRight",
873+
Qt.Key_AsciiTilde: "Key_AsciiTilde",
874+
875+
}
876+
----
750877
== `Messages`
751878

752879
*`Messages`* module is used to *display pop up dialog messages on the screen*.
@@ -855,7 +982,7 @@ You can set the:
855982

856983
The `ScreenOptions` widget can automatically set up the preference system.
857984

858-
QtVCP searches for the `ScreenOptions` widget first and, if found, calls *`+_pref_init()+`*. +
985+
QtVCP searches for the `ScreenOptions` widget first and, if found, calls *`_pref_init()`*. +
859986
This will _create the preferences object_ and return it to QtVCP to pass to all the widgets and add it to the window object attributes. +
860987
In this case the preferences object would be accessible from the handler file's `initialized_` method as *`self.w.PREFS_`*.
861988

docs/src/gui/qtvcp-vcp-panels.adoc

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,67 @@ qtvcp copy
3636
.QtVCP `copy` Dialog - Screen, VCP Panel or QtVismach Code Copy Panel
3737
image::images/qtvcp_copy_dialog.png["QtVCP copy Dialog - Screen, Panel or Vismach Code Copy Panel",align="center"]
3838

39+
[[sub:qtvcp:panels:spindle-belts]]
40+
=== spindle_belts
41+
42+
This panel is designed to display additional RS485 VFD data and also to configure a 4 sheave, 2 belt spindle drive via a series of buttons.
43+
44+
image::images/qtvcp_spindle_belts.png["QtVCP spindle_belts Panel - Spindle Belts VCP",align="center"]
45+
46+
In addition, it is also a useful template to use for your custom panel because it includes:
47+
48+
* Display of additional hal data
49+
* Buttons and button groups
50+
* Dynamic changes to button enabled/disabled state based on the state of other buttons
51+
* Saving data to the qtdragon.prefs file
52+
* Custom button to reset the VFD
53+
54+
Modify this panel to suit your own requirements. Most common features are used.
55+
The advantage of using panels is that it separates your custom display code from the qtdragon core code so upgrading the system will not break your customization.
56+
57+
==== Additional Requirements
58+
59+
* A spindle drive (for instance VFDMOD)
60+
* A custom component that scales the VFD frequency to obtain the desired spindle speed.
61+
* A belt driven spindle that uses two belts and an intermediate idler pulley much like a drill press.
62+
* Connect the input pins qtdragon.belts.<pin-name> in your postgui hal file.
63+
64+
==== Function
65+
The belts are broken into two button groups, the front belts and the rear belts. These are numbered as per the plate on the machine. Buttons in a group are mutually exclusive. Eg. Only one can be selected in the group.
66+
67+
Additionally, it's not possible to have both belts on the same level with this kind of mechanism because you can’t fit two belts to the one idler pulley sheave.. So if a belt is selected, its opposite button is disabled. Eg. if belt 3 is selected, belt 7 is disabled.
68+
69+
==== Embedding commands
70+
Add these lines to the [DISPLAY] section in your .ini file +
71+
The example tab_location is for the QtDragon screen.
72+
----
73+
EMBED_TAB_NAME=Spindle Extras
74+
EMBED_TAB_COMMAND=qtvcp spindle_belts
75+
EMBED_TAB_LOCATION=tabWidget_utilities
76+
----
77+
78+
Here is how to load `spindle_belt` from a HAL script:
79+
80+
[source,{hal}]
81+
----
82+
loadusr qtvcp spindle_belts
83+
----
84+
85+
==== Customization Hints
86+
87+
Customizing the panel: +
88+
89+
* Copy the files located in /user/share/qtvcp/qtdragon/panels/belts to:
90+
~/linuxcnc/configs/<my_configuration_folder>/qtvcp/panels/belts (you can use the copy dialog panel to do this)
91+
92+
* Edit belts.ui with designer.
93+
* Edit belts_handler.py with a text editor
94+
* Connect the relevant pins in a postgui.hal file
95+
* Make sure your postgui file is loaded by your .ini file.
96+
97+
For information on the finer points, consult the qtvcp and qtdragon documentation
98+
The python handler file also provides a useful template for any custom panel.
99+
39100
[[sub:qtvcp:panels:test-dial]]
40101
=== `test_dial`
41102

0 commit comments

Comments
 (0)