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
*'EMBED_TAB_NAME'*:: will typically be the title of the tab.
413
413
*'EMBED_TAB_LOCATION'*:: will be specific to the screen and specifies the tabWidget or stackedWidget to embed into.
414
-
*'EMBED_TAB_COMMAND'*:: is the command used to invoke loading of the panel. For native embedded panels the first word will always be 'qtvcp', the second will be the panel to load. You cannot currently add any switches to the command line. The panel will follow the debugging mode setting of the main screen.
414
+
*'EMBED_TAB_COMMAND'*:: is the command used to invoke loading of the panel. For native embedded panels the first word will always be 'qtvcp', the last will be the panel name to load. You can also pass options to the panel with -o switches in the command line between 'qtvcp' and the panel name. The panel will follow the debugging mode setting of the main screen.
415
415
416
416
=== Location of builtin Panels
417
417
There are panels available that are included with LinuxCNC. To see a list open a terminal and type 'qtvcp' and press return. +
@@ -465,5 +465,53 @@ When using Python command option in Action Button widgets of an embedded panel:
465
465
466
466
If the panel is not embedded, both refer to the panel window.
467
467
468
+
=== Handler Patching - Subclassing Builtin Panels
468
469
470
+
We can have QtVCP load a subclassed version of the standard handler file. in that file we can manipulate the original functions or add new ones. +
471
+
Subclassing just means our handler file first loads the original handler file and adds our new code on top of it - so a patch of changes. +
472
+
This is useful for changing/adding behaviour while still retaining standard handler updates from LinuxCNC repositories. +
473
+
474
+
You may still need to use the handler copy dialog to copy the original handler file to decide how to patch it.
475
+
476
+
There should be a folder in the config folder; for panel: named '<CONFIG FOLDER>/qtvcp/panels/<PANEL NAME>/' +
477
+
add the handle patch file there, named like so <ORIGINAL PANEL NAME>_handler.py +
478
+
ie for cam_align the file would be called 'cam_align_handler.py' +
479
+
480
+
Here is a sample to change the circle color in cam_align: +
481
+
482
+
[source,python]
483
+
----
484
+
import sys
485
+
import os
486
+
import importlib
487
+
from PyQt5.QtCore import Qt
488
+
from qtvcp.core import Path
489
+
490
+
PATH = Path()
491
+
492
+
# get reference to original handler file so we can subclass it
0 commit comments