- Posts: 574
- Thank you received: 0
Error in tool_offsetview.py
4 years 3 months ago #246808
by hottabich
Replied by hottabich on topic Error in tool_offsetview.py
Hello! Please tell me how to add a tool image to the tool_offsetview .py widget. As well as switching the image through the tool selection dialog. Thank you!
Please Log in to join the conversation.
4 years 3 months ago #246820
by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
this is just experimental fun but it works pretty well. Chris once mentioned that he wanted to add tool image options. Chris will do it right.
I did it like this:
For the pictures to be displayed in the tools of the tool_offsetview.py in the file tool_offsetview.py, make such a change
, do the image files in the directory:
in the qtdragon.ui file, you need to enlarge the space for the tool image
In order for the images to update in the preview, you need to add such entries in the qtdragon_handler.py file
unfortunately the second set of vertical images in the catalog
I did it like this:
For the pictures to be displayed in the tools of the tool_offsetview.py in the file tool_offsetview.py, make such a change
Attachment not found
, do the image files in the directory:
Attachment not found
in the qtdragon.ui file, you need to enlarge the space for the tool image
Attachment not found
In order for the images to update in the preview, you need to add such entries in the qtdragon_handler.py file
Attachment not found
Attachment not found
unfortunately the second set of vertical images in the catalog
Attachment not found
Please Log in to join the conversation.
4 years 3 months ago #246825
by hottabich
Replied by hottabich on topic Error in tool_offsetview.py
Thank you very much for your attention and help! Here is my version of qtdragon, you may be interested.
Please Log in to join the conversation.
4 years 3 months ago #247235
by hottabich
Replied by hottabich on topic Error in tool_offsetview.py
Switching the tool with the command M61 or Reload Tool changes the image of the tool, but not through the dialog. Who knows how to fix it please tell me. Thank you!
Please Log in to join the conversation.
4 years 3 months ago #247273
by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
use the STATUS message 'tool-in-spindle-changed' to call a function, to change the image.
Please Log in to join the conversation.
4 years 3 months ago #247307
by hottabich
Replied by hottabich on topic Error in tool_offsetview.py
Sorry, but I don't understand how to implement this. Thank you!
Please Log in to join the conversation.
4 years 3 months ago #247351
by cmorley
Replied by cmorley on topic Error in tool_offsetview.py
In the handler file something like this:
Code:
STATUS.connect('tool-in-spindle-changed', lambda w, t: self.update_tool_image(t))
Code:
def update_tool_image(self, toolnumber):
command1 = "[{}]".format(toolnumber)
self.w.lbl_tool_image.setPixmap(QtGui.QPixmap(":/images/images/" + str(command1) + ".png"))
Please Log in to join the conversation.
4 years 3 months ago #247459
by hottabich
Replied by hottabich on topic Error in tool_offsetview.py
Thank you so much! Works great. I spread the handler with changes for my previous files.
Please Log in to join the conversation.
4 years 2 months ago #249611
by MarkoPolo
Replied by MarkoPolo on topic Error in tool_offsetview.py
not much is happening, so I made some minor adjustments in the setup tab, because the buttons didn't look right.
Two other problems:1. With manual movements of the A axis, the "fast/slow" switch does not toggle the value.2. In the "setup" tab, the link to local files in lcnc installed in the virtual machine works normally, but on a normal computer this link does not work for me, I cannot find the reason. Does it do the same for you?
Marek
The problem with the "fast / slow" switch fixed, I am sending an updated .ui file
Marek
Attachment not found
Marek
The problem with the "fast / slow" switch fixed, I am sending an updated .ui file
Marek
Please Log in to join the conversation.
4 years 2 months ago #249613
by hottabich
Replied by hottabich on topic Error in tool_offsetview.py
To switch in the designer, you need to add a signal slot or an attached file. linuxcnc installed in computer.
Please Log in to join the conversation.
Time to create page: 0.198 seconds
