Couple questions about QTPYVCP

More
12 Mar 2019 18:50 #128461 by KCJ
Replied by KCJ on topic Couple questions about QTPYVCP
Ah, so you are editing the file in pluma, but when you reload after your changes the gcode edit widget does not update?

I probably need to add a file watcher so that if the file is edited outside of the VCP it will notice and reload with changes.
The following user(s) said Thank You: Leon82

Please Log in or Create an account to join the conversation.

More
12 Mar 2019 18:56 - 12 Mar 2019 18:56 #128462 by Leon82
I'll double check when I'm home

Yes, I did edit in pluma
Last edit: 12 Mar 2019 18:56 by Leon82.
The following user(s) said Thank You: KCJ

Please Log in or Create an account to join the conversation.

More
12 Mar 2019 19:49 - 12 Mar 2019 20:33 #128468 by Leon82
The widget is GcodeEditor. I don't see any other editor besides plain text edit

I played around with the plain text edit and looking at the probe basic ui and got it to display the program in the plain text edit.

I don't see any signals that would save the altered file
Last edit: 12 Mar 2019 20:33 by Leon82.

Please Log in or Create an account to join the conversation.

More
03 Dec 2019 06:33 #151820 by Gnevko
Hi,
one questions about the ToolTable Widget:

Is it possible to get the tool number (or let say generally the value from defined column(s)) from selected row?

The goal is to make manually tool change more comfortable (at least for me): select a tool in the tool table and press the button "Change Tool" (as MDIButton with M6 and G43 commands).

Thank you in advance!

Please Log in or Create an account to join the conversation.

More
03 Dec 2019 10:11 #151828 by Leon82
I'm not sure if you can get a specific signal like that from a click.

On mine I made a line of MDI buttons for t1m6 t2M6 etc

Please Log in or Create an account to join the conversation.

More
03 Dec 2019 10:50 #151835 by Gnevko
It works in Probe_Basic GUI, but the solution is not very comfortable: you need at first write a tool number into the input field (VCPLineEdit) and then press M6 and G43 MDIButtons.

The MDI Property for M6 Button looks like that:

"T#<atc_tool_number_entry_box_2> M6"

atc_tool_number_entry_box_2 - is the name of input field (implemented as VCPLineEdit).

If the tool table widget could get the selected tool id (from a selected row) - that would be just great.

Please Log in or Create an account to join the conversation.

More
03 Dec 2019 10:54 #151836 by Leon82
What if you click the tool number on the atc graphic?
I wonder if you can make those MDI buttons and then they'd serve the function as tool number and if you click it it would change to that tool.

The button would be t2m6g43

Please Log in or Create an account to join the conversation.

More
05 Dec 2019 04:01 #152042 by KCJ
Replied by KCJ on topic Couple questions about QTPYVCP


Is it possible to get the tool number (or let say generally the value from defined column(s)) from selected row?


Yes it is! you can use the ToolTable.selectedRow() and ToolModel.toolDataFromRow() methods to get a dictionary of values for the currently selected tool in the table.

Here is a quick example:
current_row = tool_table.selectedRow()
if current_row != -1: #make sure a row is selected
    tdata = tool_table.tool_model.toolDataFromRow(current_row)
    print "Selected Tool Number:", tdata['T']
    print "Selected Tool Diameter:", tdata['D']

I can provide a full working example if you would like.

Being able to load the currently selected tools is a great idea and should be standard feature. I will add a slot to the ToolTable widget for this. Thanks for the suggestion!

Cheers,
Kurt
The following user(s) said Thank You: Leon82

Please Log in or Create an account to join the conversation.

More
05 Dec 2019 04:25 #152043 by KCJ
Replied by KCJ on topic Couple questions about QTPYVCP
Done! You can connect a button to the new slot in designer and then you can use it to load the selected tool. I updated the examples/tool-table.ui file to show how.

github.com/kcjengr/qtpyvcp/commit/811e9d...9fb21df1c3ab2590037e
The following user(s) said Thank You: Leon82

Please Log in or Create an account to join the conversation.

More
05 Dec 2019 06:13 #152047 by Gnevko
Gut news, thank you for the quick response :)

Some other problems/ideas:

1) FileList Widget: my be I do something wrong (as usual actually :) ) but the FileList Widget in my own GUI (and also in Probe_Basic) doesn't wont to save the last selected folder. Each time I start LinuxCNC I need to do the same: go to the folder where my gcode files are stored. It take not much time, but each time ... it is not very bequem.

2) VCP Plot Widget: these are two types of zooming (at least in Probe_basic GUI): machine zoom and program zoom. The machine zoom works ok, but program zoom doesn't. It happens just nothing if I click on it. Expectation is: it should zoom the Plot Widget so that I can see let say the whole/all GCode paths (I hope you understand what I mean).

3) VCP Plot Widget "PAN" Button (again in Probe_basic) has general no functionality connected to it.

Please Log in or Create an account to join the conversation.

Moderators: KCJLcvette
Time to create page: 0.098 seconds
Powered by Kunena Forum