Сustomization QTvcp

More
12 Dec 2020 21:57 #191783 by cmorley
Replied by cmorley on topic Сustomization QTvcp
it does if you test the calculator directly.
I would guess that the font size gets overwritten from a stylesheet setting.

try something like:
Calculator QLineEdit{
  font: 25pt "Lato Heavy";
}

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

More
13 Dec 2020 06:25 - 13 Dec 2020 06:41 #191813 by hottabich
Replied by hottabich on topic Сustomization QTvcp
Super!!! Works great! Now the calculator can be edited to your liking. I also added
Calculator QPushButton{
  font: 13pt "Lato Heavy";
}
Respect and respect for you.
Thank you!
Attachments:
Last edit: 13 Dec 2020 06:41 by hottabich.
The following user(s) said Thank You: cmorley, tommylight

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

More
17 Dec 2020 15:45 #192253 by hottabich
Replied by hottabich on topic Сustomization QTvcp
Clicked action button spindle_up_action or spindle_down_action, start spindle, start fwd or revers. I think it's wrong. Your comment please.
Attachments:

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

More
17 Dec 2020 17:19 #192261 by cmorley
Replied by cmorley on topic Сustomization QTvcp
That is how it's designed.
If the spindle is not running it starts, if it's running it changes speed.

Of course you could code the button to do something else

Chris

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

More
17 Dec 2020 19:16 - 17 Dec 2020 19:22 #192269 by hottabich
Replied by hottabich on topic Сustomization QTvcp
Thank you, I see!
Last edit: 17 Dec 2020 19:22 by hottabich.

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

More
17 Dec 2020 23:27 #192279 by cmorley
Replied by cmorley on topic Сustomization QTvcp
as it is now:
CCW always sets speed down, if the spindle is already running and CW always sets the speed up, if the spindle is already running.

I could see the argument for the button that starts the spindle always being the speed up button.

Chris
The following user(s) said Thank You: hottabich

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

More
18 Dec 2020 15:52 - 18 Dec 2020 16:00 #192342 by hottabich
Replied by hottabich on topic Сustomization QTvcp
And please tell me how to programmatically disable the run in action button UP, Down function? This is for the safety of the car, I think so. Thanks for attention!
Last edit: 18 Dec 2020 16:00 by hottabich.

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

More
18 Dec 2020 17:40 - 18 Dec 2020 17:41 #192355 by cmorley
Replied by cmorley on topic Сustomization QTvcp
So this is the relevant code in action_button.py
it checks what spindle you wish to start (-1 means all spindles)
If the spindle is running it speeds them up.
If the spindle isn't running it starts it at the default spindle speed.
        elif self.spindle_up:
            if self.joint == -1:
                a = 0
                b = INFO.AVAILABLE_SPINDLES
            else:
                a = self.joint
                b = self.joint +1
            for i in range(a,b):
                if STATUS.is_spindle_on(i):
                    ACTION.SET_SPINDLE_FASTER(i)
                else:
                    ACTION.SET_SPINDLE_ROTATION(linuxcnc.SPINDLE_FORWARD,
                         INFO['DEFAULT_SPINDLE_{}_SPEED'.format(i)],i)


Here might be a function to add to the handler file to be called from a button.
You would need to use designer to connect a signal to it.
It assumes you only wish to speed up the spindle number 0
def spindle_faster(self, state):
    if state:
        if STATUS.is_spindle_on(i):
            ACTION.SET_SPINDLE_FASTER(0)

Chris
Last edit: 18 Dec 2020 17:41 by cmorley.
The following user(s) said Thank You: hottabich

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

More
18 Dec 2020 21:14 #192389 by hottabich
Replied by hottabich on topic Сustomization QTvcp
Did as in the screenshot did not change. What am I doing wrong?
Attachments:

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

More
18 Dec 2020 23:10 #192406 by cmorley
Replied by cmorley on topic Сustomization QTvcp
Did you remove all builtin actions from the action button?

This new function should used instead of any qtvcp built in actions.
In fact it could be called from a normal QPushButton.

I would also add a temporary print statement to confirm if the new function is being called.
The following user(s) said Thank You: hottabich

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

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