QtDragon feature request go_to_zero

More
4 years 10 months ago #230164 by ucancallmebob89
I figured out how to work QT designer and add a macro panel to the side of the main tab like I suggested above. I connected each button up to the MDI_COMMAND_LIST section of the INI file. The panel doesn't get enabled until the machine is powered on and homed.

 

What I'd like to do now is have a user-configurable label for each button so they can name their own macro's one at a time by just adding a line to the INI file. Something like this:
 

I think this is probably possible but I haven't dug into how to tackle it yet.

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

More
4 years 10 months ago #230201 by cmorley
if you use the 'check_state_text_option' of the action button, then you can set the text in the stylesheet with a command like this (modify the widget name to suit):

#usr_mdi1{
qproperty-false_state_string: "Go\\nThere";
}

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

More
4 years 10 months ago #230235 by ucancallmebob89
I figured out how to do it from the ini yesterday, I'll make a post showing what I did later today when I have more time.

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

More
4 years 10 months ago #230319 by ucancallmebob89
Ok here's my macro button implementation:
 

You can have up to 10 macro buttons. You define the labels for each one according to its corresponding MDI_COMMAND.


I had to add one line to qt_istat.py, so here's the git diff. The changes to origin_offsetview.py and tool_offsetview.py are just cosmetic to fix the godawful highlight color.
 

File Attachment:

File Name: git_diff_qt_istat.txt
File Size:2.07 KB


And here's my updated .ui and handler.py files. I would supply the git diff for those but my VS Code does code cleanup and it changed a lot of arbitrary things.

qtdragon_hd_handler.py: I added a few dozen lines of code at the end of the initialized__ method. It assigns each label to a macrobutton and hides the macrobuttons not in use.
 

File Attachment:

File Name: qtdragon_h...ndler.py
File Size:50.56 KB


qtdragon_hd.ui: The main change is to add the frame_macro_buttons section. It also changes the led off_colors to red.
 

File Attachment:

File Name: qtdragon_hd.ui
File Size:608.2 KB

 
The following user(s) said Thank You: tommylight, zu4lu, Nikolaj9

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

More
4 years 9 months ago #232867 by cmorley
I finally added this idea to master. thanks for the code and the feedback.
The difference is you add the label text to the MDI command line after a comma.
ie.

[MDI_COMMAND_LIST]
MDI_COMMAND = G0 Z25 X0 Y0;Z0,Goto\nZero
MDI_COMMAND = G53 G0 Z0;G53 G0 X0 Y0,Goto\nMach\nZero
The following user(s) said Thank You: ikkuh, ucancallmebob89

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

More
2 years 7 months ago #295903 by ucancallmebob89
Had to remake my config because I upgraded to a mesa card, and I ended up circling back to this thread. I like that you made it a one-line solution, it's much cleaner this way. Thanks!
The following user(s) said Thank You: cmorley

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

Moderators: cmorley
Time to create page: 0.072 seconds
Powered by Kunena Forum