Skip to content

Commit 69be246

Browse files
committed
qtdragon/hd -add version messages to about and log
Need to keep track of what the user is running.
1 parent 1ce90ba commit 69be246

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

share/qtvcp/screens/qtdragon/qtdragon_handler.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
WARNING = 1
5757
CRITICAL = 2
5858

59+
VERSION ='1.0'
60+
5961
class HandlerClass:
6062
def __init__(self, halcomp, widgets, paths):
6163
self.h = halcomp
@@ -276,6 +278,10 @@ def initialized__(self):
276278
if flag:
277279
self.w.frame_macro_buttons.hide()
278280

281+
message = "--- QtDragon Version {} on Linuxcnc {} ---".format(
282+
VERSION, STATUS.get_linuxcnc_version())
283+
STATUS.emit('update-machine-log', message, None)
284+
279285
def init_utils(self):
280286
from qtvcp.lib.gcode_utility.facing import Facing
281287
self.facing = Facing()
@@ -974,6 +980,8 @@ def tab_utilities_changed(self, num):
974980
self.w.stackedWidget.setCurrentIndex(PAGE_GCODE)
975981

976982
def btn_about_clicked(self):
983+
self.add_status("QtDragon Version {} on Linuxcnc {} ".format(
984+
VERSION, STATUS.get_linuxcnc_version()), CRITICAL)
977985
info = ACTION.GET_ABOUT_INFO()
978986
self.w.aboutDialog_.showdialog()
979987

share/qtvcp/screens/qtdragon_hd/qtdragon_hd_handler.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
WARNING = 1
6060
CRITICAL = 2
6161

62+
VERSION ='1.0'
63+
6264
class HandlerClass:
6365
def __init__(self, halcomp, widgets, paths):
6466
self.h = halcomp
@@ -235,6 +237,10 @@ def initialized__(self):
235237
if flag:
236238
self.w.frame_macro_buttons.hide()
237239

240+
message = "--- QtDragon_hd Version {} on Linuxcnc {} ---".format(
241+
VERSION, STATUS.get_linuxcnc_version())
242+
STATUS.emit('update-machine-log', message, None)
243+
238244
#############################
239245
# SPECIAL FUNCTIONS SECTION #
240246
#############################
@@ -1045,6 +1051,8 @@ def btn_gripper_clicked(self):
10451051
AUX_PRGM.load_gcode_ripper()
10461052

10471053
def btn_about_clicked(self):
1054+
self.add_status("QtDragon_hd Version {} on Linuxcnc {} ".format(
1055+
VERSION, STATUS.get_linuxcnc_version()), CRITICAL)
10481056
info = ACTION.GET_ABOUT_INFO()
10491057
self.w.aboutDialog_.showdialog()
10501058

0 commit comments

Comments
 (0)