Preference File

More
24 May 2020 01:41 - 24 May 2020 02:32 #168755 by cmorley
Replied by cmorley on topic Preference File
Sorry for the bum steer - 'periodic' is the STATUS message that will get called every 100ms
docs for messages: linuxcnc.org/docs/2.8/html/gui/GStat.html

I'm just about to push some work in that library to make this easier.
So the command- messages are missing until i push, ( if you are impatient you could do the same by combining interp states)

but this is how one might do it (Not tested)
import time
self.startTime = 0

STATUS.connect('periodic', self.set_timestamp)
STATUS.connect('command-running', lambda w: self.get_time())
STATUS.connect('command-stopped', lambda w: self.stop_time())

def get_time(self):
    self.startTime = time.time()
    self.timerOn = True

def stop_time(self):
    self.timerOn = False

def set_timestamp(self):
    if self.timerOn:
        self.w.labelWidget.setText(time.time() - self.startTime)
    else:
         self.w.labelWidget.setText('Run Timer Off')

Chris
Last edit: 24 May 2020 02:32 by cmorley.
The following user(s) said Thank You: hottabich

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

More
24 May 2020 02:02 #168756 by persei8
Replied by persei8 on topic Preference File
I figured it must be periodic. When buildbot updates in 2 or 3 days, I will make the change.

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

More
24 May 2020 18:18 #168814 by persei8
Replied by persei8 on topic Preference File
OK - done.
The following user(s) said Thank You: hottabich

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

More
25 May 2020 05:14 #168844 by cmorley
Replied by cmorley on topic Preference File
excellent.
I just pushed some work so the styleeditor can be used to select the style to be loaded at startup. Probably not intuitive but it's a start. (the last applied style from the combobox is saved in the preference file.)
Also now if you open a saved style, it's added to the combobox.
The following user(s) said Thank You: hottabich

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

More
01 Aug 2020 12:47 #176776 by hottabich
Replied by hottabich on topic Preference File
Hello Jim !!! I suggest adding to your beautiful QtDragon interface. If there is a desire. Thank!
Attachments:

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

More
23 Aug 2020 13:34 #179098 by hottabich
Replied by hottabich on topic Preference File
Hello! In the designer, I select the dro-homed green indicator when starting qtdragon red. Prompt please why so.
Attachments:

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

More
23 Aug 2020 14:35 #179103 by persei8
Replied by persei8 on topic Preference File
The DRO labels have a dynamic property called 'homed'. The handler file sets it True or False according to whether or not the machine is homed. The colors are determined by the qss file which specifies a normal color and an unhomed color. To change the homed and unhomed colors, modify the qss file. I made the unhomed color red so it would be obvious that the machine needs homing.
The following user(s) said Thank You: hottabich

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

More
24 Aug 2020 05:08 - 24 Aug 2020 05:36 #179189 by hottabich
Replied by hottabich on topic Preference File
Many thanks! You used the machine without homing? If yes, please tell me how assign INI correctly. Changed the interface a little, if you're interested, I'll post the files. Thanks for your attention.
Attachments:
Last edit: 24 Aug 2020 05:36 by hottabich.

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

More
28 Aug 2020 07:04 #179789 by hottabich
Replied by hottabich on topic Preference File
Hello! For me, the E-Stop, Power button in the lower left corner is pretty cool. They are not active after migration.
Please tell me what I'm doing wrong.
Attachments:

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

More
29 Aug 2020 18:27 - 29 Aug 2020 18:27 #179954 by cmorley
Replied by cmorley on topic Preference File
Without more information - I could only speculate the answer.
Last edit: 29 Aug 2020 18:27 by cmorley.
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.125 seconds
Powered by Kunena Forum