Skip to content

Commit

Permalink
Merge branch 'LinuxCNC:master' into hm2_spix
Browse files Browse the repository at this point in the history
  • Loading branch information
BsAtHome authored Dec 5, 2024
2 parents f775e3d + 1ed894e commit 01fc661
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lib/python/qtvcp/widgets/probe_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ def probe_outside_xy_boss(self):
return 'Probe outside_xy_boss: Z clearance up failed: {}'.format(rtn)

# move X+ (2 edge_length + latch return + xy_clearance)
aa = (2 * self.data_side_edge_length) + self.data_latch_return_dist + self.data_xy_clearance
aa = 2 * (self.data_side_edge_length + self.data_latch_return_dist + self.data_xy_clearance)
s = """G91
G1 F%s X%f
G90""" % (self.data_rapid_vel, aa)
Expand Down Expand Up @@ -1151,7 +1151,7 @@ def probe_outside_xy_boss(self):
return 'Probe outside_xy_boss: Z clearance up failed: {}'.format(rtn)

# move Y+ (2 * edge_length) + latch return + xy_clearance)
aa = (2 * self.data_side_edge_length) + self.data_latch_return_dist + self.data_xy_clearance
aa = 2 * (self.data_side_edge_length + self.data_latch_return_dist + self.data_xy_clearance)
s = """G91
G1 F%s Y%f
G90""" % (self.data_rapid_vel, aa)
Expand Down
14 changes: 9 additions & 5 deletions share/qtvcp/screens/qtdragon/qtdragon_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@

class HandlerClass:
def __init__(self, halcomp, widgets, paths):
self.p = paths
self.h = halcomp
self.w = widgets
self.gcodes = GCodes(widgets)
Expand Down Expand Up @@ -145,6 +146,9 @@ def __init__(self, halcomp, widgets, paths):
STATUS.connect('graphics-gcode-properties', lambda w, d: self.update_gcode_properties(d))
STATUS.connect('status-message', lambda w, d, o: self.add_external_status(d,o))

self.swoopPath = os.path.join(paths.IMAGEDIR,'lcnc_swoop.png')
self.swoopURL = QtCore.QUrl.fromLocalFile(self.swoopPath)

txt1 = _translate("HandlerClass","Setup Tab")
txt2 = _translate("HandlerClass","If you select a file with .html as a file ending, it will be shown here.")
txt3 = _translate("HandlerClass","Documents online")
Expand All @@ -165,7 +169,7 @@ def __init__(self, halcomp, widgets, paths):
</body>
</html>
"""%( txt1, txt2, txt3, txt4, os.path.expanduser('~/linuxcnc'), txt5,
os.path.join(paths.IMAGEDIR,'lcnc_swoop.png'))
self.swoopPath)

def class_patch__(self):
# override file manager load button
Expand Down Expand Up @@ -264,7 +268,7 @@ def initialized__(self):
if os.path.exists(self.default_setup):
self.w.webwidget.load(QtCore.QUrl.fromLocalFile(self.default_setup))
else:
self.w.webwidget.setHtml(self.html)
self.w.webwidget.setHtml(self.html, self.swoopURL)
self.w.webwidget.page().urlChanged.connect(self.onLoadFinished)

except Exception as e:
Expand Down Expand Up @@ -1395,7 +1399,7 @@ def load_code(self, fname):
self.w.webwidget.loadFile(fname)
self.add_status("{} : {}".format(_translate("HandlerClass","Loaded HTML file"), fname), CRITICAL)
else:
self.w.webwidget.setHtml(self.html)
self.w.webwidget.setHtml(self.html, self.swoopURL)
except Exception as e:
self.add_status("{} {} : {}".format(_translate("HandlerClass","Error loading HTML file"), fname,e))
# look for PDF setup files
Expand Down Expand Up @@ -1648,7 +1652,7 @@ def homeWeb(self):
if os.path.exists(self.default_setup):
self.w.webwidget.load(QtCore.QUrl.fromLocalFile(self.default_setup))
else:
self.w.webwidget.setHtml(self.html)
self.w.webwidget.setHtml(self.html, self.swoopURL)
except:
pass
# setup tab's web page back button
Expand All @@ -1660,7 +1664,7 @@ def back(self):
if os.path.exists(self.default_setup):
self.w.webwidget.load(QtCore.QUrl.fromLocalFile(self.default_setup))
else:
self.w.webwidget.setHtml(self.html)
self.w.webwidget.setHtml(self.html, self.swoopURL)
except:
pass

Expand Down
14 changes: 9 additions & 5 deletions share/qtvcp/screens/qtdragon_hd/qtdragon_hd_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ def __init__(self, halcomp, widgets, paths):
txt3 = _translate("HandlerClass","Documents online")
txt4 = _translate("HandlerClass","QtDragon online")
txt5 = _translate("HandlerClass","Local files")

self.swoopPath = os.path.join(paths.IMAGEDIR,'lcnc_swoop.png')
self.swoopURL = QtCore.QUrl.fromLocalFile(self.swoopPath)

self.html = """<html>
<head>
<title>Test page for the download:// scheme</title>
Expand All @@ -165,7 +169,7 @@ def __init__(self, halcomp, widgets, paths):
</body>
</html>
"""%( txt1, txt2, txt3, txt4, os.path.expanduser('~/linuxcnc'), txt5,
os.path.join(paths.IMAGEDIR,'lcnc_swoop.png'))
self.swoopPath)

def class_patch__(self):
# override file manager load button
Expand Down Expand Up @@ -453,7 +457,7 @@ def init_widgets(self):
if os.path.exists(self.default_setup):
self.w.web_view.load(QtCore.QUrl.fromLocalFile(self.default_setup))
else:
self.w.web_view.setHtml(self.html)
self.w.web_view.setHtml(self.html, self.swoopURL)
self.w.web_view.page().urlChanged.connect(self.onLoadFinished)
except Exception as e:
print("No default setup file found - {}".format(e))
Expand Down Expand Up @@ -1461,7 +1465,7 @@ def load_code(self, fname):
self.w.web_view.load(QtCore.QUrl.fromLocalFile(fname))
self.add_status("{} : {}".format(_translate("HandlerClass","Loaded HTML file"), fname))
else:
self.w.web_view.setHtml(self.html)
self.w.web_view.setHtml(self.html, self.swoopURL)
except Exception as e:
self.add_status("{} {} :()".format(_translate("HandlerClass","Can not Load HTML file"), fname,e))
# look for PDF setup files
Expand Down Expand Up @@ -1697,7 +1701,7 @@ def homeWeb(self):
if os.path.exists(self.default_setup):
self.w.web_view.load(QtCore.QUrl.fromLocalFile(self.default_setup))
else:
self.w.web_view.setHtml(self.html)
self.w.web_view.setHtml(self.html, self.swoopURL)
except:
pass
# setup tab's web page back button
Expand All @@ -1709,7 +1713,7 @@ def back(self):
if os.path.exists(self.default_setup):
self.w.web_view.load(QtCore.QUrl.fromLocalFile(self.default_setup))
else:
self.w.web_view.setHtml(self.html)
self.w.web_view.setHtml(self.html, self.swoopURL)
except:
pass

Expand Down
14 changes: 9 additions & 5 deletions share/qtvcp/screens/qtdragon_lathe/qtdragon_lathe_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ def __init__(self, halcomp, widgets, paths):
txt3 = _translate("HandlerClass","Documents online")
txt4 = _translate("HandlerClass","QtDragon online")
txt5 = _translate("HandlerClass","Local files")

self.swoopPath = os.path.join(paths.IMAGEDIR,'lcnc_swoop.png')
self.swoopURL = QtCore.QUrl.fromLocalFile(self.swoopPath)

self.html = """<html>
<head>
<title>Test page for the download:// scheme</title>
Expand All @@ -170,7 +174,7 @@ def __init__(self, halcomp, widgets, paths):
</body>
</html>
"""%( txt1, txt2, txt3, txt4, os.path.expanduser('~/linuxcnc'), txt5,
os.path.join(paths.IMAGEDIR,'lcnc_swoop.png'))
self.swoopPath)

def class_patch__(self):
# override file manager load button
Expand Down Expand Up @@ -269,7 +273,7 @@ def initialized__(self):
if os.path.exists(self.default_setup):
self.w.webwidget.load(QtCore.QUrl.fromLocalFile(self.default_setup))
else:
self.w.webwidget.setHtml(self.html)
self.w.webwidget.setHtml(self.html, self.swoopURL)
self.w.webwidget.page().urlChanged.connect(self.onLoadFinished)

except Exception as e:
Expand Down Expand Up @@ -1403,7 +1407,7 @@ def load_code(self, fname):
self.w.webwidget.loadFile(fname)
self.add_status("{} : {}".format(_translate("HandlerClass","Loaded HTML file"), fname), CRITICAL)
else:
self.w.webwidget.setHtml(self.html)
self.w.webwidget.setHtml(self.html, self.swoopURL)
except Exception as e:
self.add_status("{} {} : {}".format(_translate("HandlerClass","Error loading HTML file"), fname,e))
# look for PDF setup files
Expand Down Expand Up @@ -1656,7 +1660,7 @@ def homeWeb(self):
if os.path.exists(self.default_setup):
self.w.webwidget.load(QtCore.QUrl.fromLocalFile(self.default_setup))
else:
self.w.webwidget.setHtml(self.html)
self.w.webwidget.setHtml(self.html, self.swoopURL)
except:
pass
# setup tab's web page back button
Expand All @@ -1668,7 +1672,7 @@ def back(self):
if os.path.exists(self.default_setup):
self.w.webwidget.load(QtCore.QUrl.fromLocalFile(self.default_setup))
else:
self.w.webwidget.setHtml(self.html)
self.w.webwidget.setHtml(self.html, self.swoopURL)
except:
pass

Expand Down
8 changes: 4 additions & 4 deletions share/qtvcp/screens/qtplasmac/languages/langlink
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ else
echo -e "\ncreating links to qtplasmac_$1.qn translation for qtplasmac_4x3 and qtplasmac_9x16\n"
mkdir -p "../../qtplasmac_4x3/languages"
mkdir -p "../../qtplasmac_9x16/languages"
ln -rs qtplasmac_sk.qm -t ../../qtplasmac_4x3/languages
ln -rs qtplasmac_sk.qm -t ../../qtplasmac_9x16/languages
mv ../../qtplasmac_4x3/languages/qtplasmac_sk.qm ../../qtplasmac_4x3/languages/qtplasmac_4x3_sk.qm
mv ../../qtplasmac_9x16/languages/qtplasmac_sk.qm ../../qtplasmac_9x16/languages/qtplasmac_9x16_sk.qm
ln -rs qtplasmac_$1.qm -t ../../qtplasmac_4x3/languages
ln -rs qtplasmac_$1.qm -t ../../qtplasmac_9x16/languages
mv ../../qtplasmac_4x3/languages/qtplasmac_$1.qm ../../qtplasmac_4x3/languages/qtplasmac_4x3_sk.qm
mv ../../qtplasmac_9x16/languages/qtplasmac_$1.qm ../../qtplasmac_9x16/languages/qtplasmac_9x16_sk.qm
fi
2 changes: 1 addition & 1 deletion share/qtvcp/screens/qtplasmac/qtplasmac_handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = '008.055'
VERSION = '008.056'
LCNCVER = '2.10'
DOCSVER = LCNCVER

Expand Down
5 changes: 5 additions & 0 deletions share/qtvcp/screens/qtplasmac/versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ <h2>QtPlasmaC Version History - LinuxCNC 2.10</h2>
</table>
<br>
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
<br><b><u>008.056 2024 Nov 30</u></b>
<ul style="margin:0;">
<li>fix paths in langlink file</li>
</ul>

<br><b><u>008.055 2024 Nov 26</u></b>
<ul style="margin:0;">
<li>fix linking and documentation for internationalization</li>
Expand Down

0 comments on commit 01fc661

Please sign in to comment.