QtPyVCP - GCodeEditor - Widget Styling - Please review and comment.

More
18 Dec 2019 20:28 #152879 by Donb9261
I am thinking you may be able to help a bit Kurt.

One issue I am finding is a simple way to do run from here. It seems I should be able to highlight a line, capture the cursor line number, set a variable, bring it into the run cmd, and press cycle start. Recognizing the danger involved a button should be included to set the line number captured and a confirmation dialog pop to ask are you sure?

What I thought might be a simple task seems a bit of a challenge.

Given that QScintilla is so undocumented I cannot isolate a mechanism to draw out the line number of the cursor. If I do find a way, how do I drop it into the runfromhere function since one is in the machine_actions file and the other gcodeditor file. Hmmm...

Would appreciate any thoughts. Thanks.

Don

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

More
18 Dec 2019 20:49 #152881 by Leon82
Big John posted in his mill touch thread that The right click and run from line It is almost ready to be merged

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

More
18 Dec 2019 20:55 #152882 by Donb9261
Understood. But, if you have a purely touch UI you have to have long press gestures incorporate which can really make your head spin. I have done it with JS. Which is the worst written language by far.. and it was enough to make me want to never program again. Especially in windows.

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

More
18 Dec 2019 22:31 - 18 Dec 2019 22:33 #152886 by TurBoss
yep run from here is almost done will be merged tomorrow if all is ok
this is the branch I'm working on
github.com/kcjengr/qtpyvcp/blob/ContextM...gets/gcode_editor.py

edit: add link
Last edit: 18 Dec 2019 22:33 by TurBoss.

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

More
23 Dec 2019 11:05 - 23 Dec 2019 11:21 #153093 by hottabich
All this is very good. Please tell me how you can see the line number 9x xxx xxx, because only 9xxx is available.
Or what to register for the Status label to see the line number.
Last edit: 23 Dec 2019 11:21 by hottabich.

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

More
23 Dec 2019 12:02 #153095 by Donb9261
Line 265 in gcodeeditor.py

self.setMarginWidth(0, fontmetrics.width("00000000") + 6)

The quantity of zeros is the mask for how many line number digits.

I 9x xxx xxx requires 8 zeros like shown.
The following user(s) said Thank You: hottabich

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

More
23 Dec 2019 12:04 #153096 by Donb9261
self.setMarginWidth(0, fontmetrics.width("00000000") + 6)

The bolded zero is the column number. Line number = column zero and so on. 0, 1, 2
The following user(s) said Thank You: hottabich

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

More
24 Dec 2019 10:01 - 24 Dec 2019 12:27 #153155 by hottabich
Thanks for attention! I did everything, but 4 columns are displayed. On the left there are others but not visible. It is necessary to expand the middle column. What did I do wrong?
Attachments:
Last edit: 24 Dec 2019 12:27 by hottabich.

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

More
26 Dec 2019 19:40 - 26 Dec 2019 19:43 #153249 by hottabich
Many thanks to everyone after updating QtPyVCP GcodeEditor earned as it should !!!
Happy New Year, everyone!!!
Last edit: 26 Dec 2019 19:43 by hottabich.

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

More
27 Dec 2019 12:30 #153261 by Donb9261
I would suggest testing using my entire code to see if it is your code. If you still have the issue then it could be an interference in the QtGui and would require you to review how you placed the editor in the UI in designer.

The other issue could be multiple copies of the gcodeeditor.py file and which is being loaded.

start linuxcnc via a terminal using:

linuxcnc yourvcp.ini inside the config folder for your vcp. (linuxcnc/configs/yourvcp/yourvcp.ini

This will launch you vcp.

in the gcodeeditor.py file add this just below super near the top.

print("Found me")

Save the file and relaunch your vcp via the terminal.

Go to the terminal and see if you can find the text "Found me". If you do not, then you are loading the wrong file.

Other than that, I cannot duplicate your issue. Sorry.

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

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