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

More
6 years 10 months ago #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 to join the conversation.

More
6 years 10 months ago #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 to join the conversation.

More
6 years 10 months ago #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 to join the conversation.

More
6 years 10 months ago #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

Please Log in to join the conversation.

More
6 years 10 months ago #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.

Please Log in to join the conversation.

More
6 years 10 months ago #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.

Please Log in to join the conversation.

More
6 years 10 months ago #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

Please Log in to join the conversation.

More
6 years 10 months ago #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?

Please Log in to join the conversation.

More
6 years 10 months ago #153249 by hottabich
Many thanks to everyone after updating QtPyVCP GcodeEditor earned as it should !!!
Happy New Year, everyone!!!

Please Log in to join the conversation.

More
6 years 10 months ago #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 to join the conversation.

Time to create page: 0.170 seconds
Powered by Kunena Forum