- Posts: 128
- Thank you received: 0
QtDragon DRO decimal places
5 years 7 months ago #202411
by turbostew
QtDragon DRO decimal places was created by turbostew
Hello All,
Wanting to change my DROs to 3 dicimal places instead of 4.
DRO_FORMAT_MM and DRO_FORMAT_IN don't seen to have an effect in QtDragon_HD. According to the INI files docs they should...
linuxcnc.org/docs/2.8/html/config/ini-config.html
How can I change these?
Thanks,
Kent
Wanting to change my DROs to 3 dicimal places instead of 4.
DRO_FORMAT_MM and DRO_FORMAT_IN don't seen to have an effect in QtDragon_HD. According to the INI files docs they should...
linuxcnc.org/docs/2.8/html/config/ini-config.html
How can I change these?
Thanks,
Kent
Please Log in to join the conversation.
5 years 7 months ago #202419
by cmorley
Replied by cmorley on topic QtDragon DRO decimal places
That INI setting sets the DRO inbed into the graphics display/
This is how AXIS and Qtaxis display the DRO/
Qtdragon uses labels to display the DRO.
You would need to modify the .ui file.
linuxcnc.org/docs/devel/html/gui/qtvcp_w...ml#_dro_label_widget
This is how AXIS and Qtaxis display the DRO/
Qtdragon uses labels to display the DRO.
You would need to modify the .ui file.
linuxcnc.org/docs/devel/html/gui/qtvcp_w...ml#_dro_label_widget
Please Log in to join the conversation.
5 years 7 months ago #202430
by turbostew
Replied by turbostew on topic QtDragon DRO decimal places
Thanks Chris,
I see the help file but not clear. i don't see an "imperial" associated with the DRO in the QtDragon_HD.ui.
I see "setimperialtexttemplate" in dro_widget.py but find this function nowhere else...
Can you give me an example? Or another clue?
Thanks,
Kent
I see the help file but not clear. i don't see an "imperial" associated with the DRO in the QtDragon_HD.ui.
I see "setimperialtexttemplate" in dro_widget.py but find this function nowhere else...
Can you give me an example? Or another clue?
Thanks,
Kent
Please Log in to join the conversation.
5 years 7 months ago #202434
by turbostew
Replied by turbostew on topic QtDragon DRO decimal places
Well I did it like this in initialize in QtDragon_hd_handler.....
self.w["dro_axis_x"].setimperialtexttemplate('%9.3f') ##DKS
self.w["dro_axis_x"].update_units() ##DKS
self.w["dro_axis_y"].setimperialtexttemplate('%9.3f') ##DKS
self.w["dro_axis_y"].update_units() ##DKS
self.w["dro_axis_z"].setimperialtexttemplate('%9.3f') ##DKS
self.w["dro_axis_z"].update_units() ##DKS
But this didn't make changes to the tool table and offsets significant digits
Want one place to change all significant digits....
self.w["dro_axis_x"].setimperialtexttemplate('%9.3f') ##DKS
self.w["dro_axis_x"].update_units() ##DKS
self.w["dro_axis_y"].setimperialtexttemplate('%9.3f') ##DKS
self.w["dro_axis_y"].update_units() ##DKS
self.w["dro_axis_z"].setimperialtexttemplate('%9.3f') ##DKS
self.w["dro_axis_z"].update_units() ##DKS
But this didn't make changes to the tool table and offsets significant digits
Please Log in to join the conversation.
5 years 7 months ago #202471
by cmorley
Replied by cmorley on topic QtDragon DRO decimal places
Yes all a bit klunky still.
self.w.NAME OF TOOL EDITOR.imperial_text_template = '%9.4f'
self.w.NAME OF ORIGIN EDITOR.imperial_text_template = '%9.4f'
self.w.NAME OF TOOL EDITOR.imperial_text_template = '%9.4f'
self.w.NAME OF ORIGIN EDITOR.imperial_text_template = '%9.4f'
Please Log in to join the conversation.
5 years 7 months ago #202492
by turbostew
Replied by turbostew on topic QtDragon DRO decimal places
Well the origin editor works great but still see 4 decimals in tool editor. Checked tool offsetview.py and I think everything is OK.
Am I wearing out my welcome yet?, I can be less verbose if requested:) I am not sure if my testing/problems are appreciated or I am becoming a thorn....
Thank You Chris!
Am I wearing out my welcome yet?, I can be less verbose if requested:) I am not sure if my testing/problems are appreciated or I am becoming a thorn....
Thank You Chris!
Please Log in to join the conversation.
5 years 7 months ago #203201
by cmorley
Replied by cmorley on topic QtDragon DRO decimal places
I confirm and understand the problem - try to get to it tomorrow night.
Please Log in to join the conversation.
5 years 7 months ago #203669
by cmorley
Replied by cmorley on topic QtDragon DRO decimal places
Sorry for the delay.
You can use this code to modify the tool offset template:
I'll be making this a more consistent function call in the future.
You can use this code to modify the tool offset template:
Code:
self.w.tooloffsetview.tablemodel.imperial_text_template = '%9.1f'
I'll be making this a more consistent function call in the future.
Please Log in to join the conversation.
5 years 7 months ago #203681
by cmorley
Replied by cmorley on topic QtDragon DRO decimal places
I pushed some work, if you update and get an error from the above suggested change try this:
Code:
self.w.offset_table.setProperty('imperial_template', '%9.1f')
self.w.tooloffsetview.setProperty('imperial_template', '%9.1f')
Please Log in to join the conversation.
Time to create page: 0.098 seconds
