Skip to content

Commit a7acea6

Browse files
committed
qtplasmac: use new linuxcncicon_plasma.svg icon
1 parent 9c73e1f commit a7acea6

File tree

9 files changed

+26
-13
lines changed

9 files changed

+26
-13
lines changed

lib/python/qtvcp/lib/qtplasmac/set_offsets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
def dialog_show(P, W, prefs, iniPath, STATUS, ACTION, TOOL):
3131
dlg = QDialog(W)
32-
dlg.setWindowIcon(QIcon(os.path.join(P.IMAGES, 'Chips_Plasma.png')))
32+
dlg.setWindowIcon(QIcon(os.path.join(P.iconBase, P.iconPath)))
3333
dlg.setWindowTitle(_translate('Offsets', 'Set Peripheral Offsets'))
3434
dlg.setModal(False)
3535
grid = QGridLayout()
-3.51 KB
Binary file not shown.

share/qtvcp/panels/qtplasmac_sim/qtplasmac_sim_handler.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
'''
2222

2323
import os
24+
import sys
2425
import hal
2526
from subprocess import run as RUN
2627
from PyQt5 import QtCore
@@ -48,8 +49,10 @@ def __init__(self, halcomp, widgets, paths):
4849

4950
def initialized__(self):
5051
self.w.setWindowTitle('QtPlasmaC Sim')
51-
self.images = os.path.join(self.paths.IMAGEDIR, 'qtplasmac/images/')
52-
self.w.setWindowIcon(QIcon(os.path.join(self.images, 'Chips_Plasma.png')))
52+
self.iconPath = 'share/icons/hicolor/scalable/apps/linuxcnc_alt/linuxcncicon_plasma.svg'
53+
appPath = os.path.realpath(os.path.dirname(sys.argv[0]))
54+
self.iconBase = '/usr' if appPath == '/usr/bin' else appPath.replace('/bin', '/debian/extras/usr')
55+
self.w.setWindowIcon(QIcon(os.path.join(self.iconBase, self.iconPath)))
5356
self.breakPin = self.hal.newpin('sensor_breakaway', hal.HAL_BIT, hal.HAL_OUT)
5457
self.floatPin = self.hal.newpin('sensor_float', hal.HAL_BIT, hal.HAL_OUT)
5558
self.ohmicPin = self.hal.newpin('sensor_ohmic', hal.HAL_BIT, hal.HAL_OUT)

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '1.233.254'
1+
VERSION = '1.233.255'
22

33
'''
44
qtplasmac_handler.py
@@ -22,6 +22,7 @@
2222
'''
2323

2424
import os
25+
import sys
2526
from shutil import copy as COPY
2627
from shutil import move as MOVE
2728
from subprocess import Popen, PIPE
@@ -393,7 +394,10 @@ def initialized__(self):
393394
# called by qtvcp.py, can override qtvcp settings or qtvcp allowed user options (via INI)
394395
def before_loop__(self):
395396
self.w.setWindowTitle('{} - QtPlasmaC v{}, powered by QtVCP on LinuxCNC v{}'.format(self.machineName, VERSION, linuxcnc.version.split(':')[0]))
396-
self.w.setWindowIcon(QIcon(os.path.join(self.IMAGES, 'Chips_Plasma.png')))
397+
self.iconPath = 'share/icons/hicolor/scalable/apps/linuxcnc_alt/linuxcncicon_plasma.svg'
398+
appPath = os.path.realpath(os.path.dirname(sys.argv[0]))
399+
self.iconBase = '/usr' if appPath == '/usr/bin' else appPath.replace('/bin', '/debian/extras/usr')
400+
self.w.setWindowIcon(QIcon(os.path.join(self.iconBase, self.iconPath)))
397401

398402

399403
#########################################################################################################################

share/qtvcp/screens/qtplasmac/versions.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ <h2>QtPlasmaC Version History</h2>
3030
</table>
3131
<br>
3232
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
33+
<br><b><u>v1.233.255 2022 Dec 18</u></b>
34+
<ul style="margin:0;">
35+
<li>use new linuxcncicon_plasma.svg icon</li>
36+
</ul>
37+
<i>Changes submitted by snowgoer540 (Greg Carl)</i><br>
38+
3339
<br><b><u>v1.233.254 2022 Dec 14</u></b>
3440
<ul style="margin:0;">
3541
<li>Change default retry delay to 1 to match spinbox min</li>

src/emc/usr_intf/qtplasmac/pmx485-test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ def __init__(self):
5959
response.setText(msg)
6060
response.exec_()
6161
raise SystemExit
62-
self.iconPath = 'share/qtvcp/images/qtplasmac/images/Chips_Plasma.png'
62+
self.iconPath = 'share/icons/hicolor/scalable/apps/linuxcnc_alt/linuxcncicon_plasma.svg'
6363
appPath = os.path.realpath(os.path.dirname(sys.argv[0]))
64-
self.iconBase = '/usr' if appPath == '/bin' else appPath.replace('/bin', '')
64+
self.iconBase = '/usr' if appPath == '/usr/bin' else appPath.replace('/bin', '/debian/extras/usr')
6565
self.setWindowIcon(QIcon(os.path.join(self.iconBase, self.iconPath)))
6666
self.setWindowTitle('Powermax Communicator')
6767
qtRectangle = self.frameGeometry()

src/emc/usr_intf/qtplasmac/qtplasmac-cfg2prefs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def __init__(self, parent=None):
4646
self.setCentralWidget(wid)
4747
layout = QHBoxLayout()
4848
wid.setLayout(layout)
49-
iconPath = 'share/qtvcp/images/qtplasmac/images/Chips_Plasma.png'
49+
iconPath = 'share/icons/hicolor/scalable/apps/linuxcnc_alt/linuxcncicon_plasma.svg'
5050
appPath = os.path.realpath(os.path.dirname(sys.argv[0]))
51-
iconBase = '/usr' if appPath == '/bin' else appPath.replace('/bin', '')
51+
iconBase = '/usr' if appPath == '/usr/bin' else appPath.replace('/bin', '/debian/extras/usr')
5252
self.setWindowIcon(QIcon(os.path.join(iconBase, iconPath)))
5353
self.setWindowTitle('QtPlasmaC Cfg2Prefs')
5454
vBox = QVBoxLayout()

src/emc/usr_intf/qtplasmac/qtplasmac-materials.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ def __init__(self, parent=None):
3434
self.setCentralWidget(wid)
3535
self.layout = QHBoxLayout()
3636
wid.setLayout(self.layout)
37-
self.iconPath = 'share/qtvcp/images/qtplasmac/images/Chips_Plasma.png'
37+
self.iconPath = 'share/icons/hicolor/scalable/apps/linuxcnc_alt/linuxcncicon_plasma.svg'
3838
appPath = os.path.realpath(os.path.dirname(sys.argv[0]))
39-
self.iconBase = '/usr' if appPath == '/bin' else appPath.replace('/bin', '')
39+
self.iconBase = '/usr' if appPath == '/usr/bin' else appPath.replace('/bin', '/debian/extras/usr')
4040
self.setWindowIcon(QIcon(os.path.join(self.iconBase, self.iconPath)))
4141
self.setWindowTitle('QtPlasmaC Material File Creator')
4242
self.create_widgets()

src/emc/usr_intf/qtplasmac/qtplasmac-plasmac2qt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ def __init__(self, parent=None):
6161
self.setCentralWidget(wid)
6262
layout = QHBoxLayout()
6363
wid.setLayout(layout)
64-
iconPath = 'share/qtvcp/images/qtplasmac/images/Chips_Plasma.png'
64+
iconPath = 'share/icons/hicolor/scalable/apps/linuxcnc_alt/linuxcncicon_plasma.svg'
6565
appPath = os.path.realpath(os.path.dirname(sys.argv[0]))
66-
iconBase = '/usr' if appPath == '/bin' else appPath.replace('/bin', '')
66+
iconBase = '/usr' if appPath == '/usr/bin' else appPath.replace('/bin', '/debian/extras/usr')
6767
self.setWindowIcon(QIcon(os.path.join(iconBase, iconPath)))
6868
self.setWindowTitle('PlasmaC2Qt')
6969
vBox = QVBoxLayout()

0 commit comments

Comments
 (0)