Sample Qtvcp Screens

More
6 years 3 days ago #187720 by lllars
Replied by lllars on topic Sample Qtvcp Screens
Looks good! Thanks for the link last week also. I did test it out back then, but ran into some errors with the rate sliders being stuck in mm mode. I also started stretching it out to 1280, but it was a lot of work since most everything had broken layouts. Then, I got busy and moved on.

This would definitely be a better interface for me if it ever gets to be as polished as qtdragon. I also think a resizeable version could be made to cover a variety of resolutions (maybe 1024x768 up to 1920x1200).

I would be willing to take a stab at making it resizeable. It seems like you've been adding a lot of new features, so maybe it makes since to wait until after the feature set has stabilized a bit.

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

More
6 years 3 days ago - 6 years 3 days ago #187723 by hottabich
Replied by hottabich on topic Sample Qtvcp Screens
Thanks for attention. From the functionality, only copying files is missing, which, if desired, is possible add. Added widget for macros, camera and MPG. Everything works with both mm and inches. Of course, it is necessary to modify it for a specific machine.
Last edit: 6 years 3 days ago by hottabich.

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

More
6 years 3 days ago #187743 by cmorley
Replied by cmorley on topic Sample Qtvcp Screens
Looks good as always...
Grid layouts don't have menu bars.

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

More
6 years 2 days ago #187752 by hottabich
Replied by hottabich on topic Sample Qtvcp Screens
Difficulties in translation. How to make grid display without
Code:
TOOLBAR.configure_submenu(self.w.menuGridSize, 'grid_size_submenu')
, and with the help ACTION functions. Thanks for attention!
The following user(s) said Thank You: porshe

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

More
6 years 2 days ago #187788 by cmorley
Replied by cmorley on topic Sample Qtvcp Screens
Ahh now I understand! :)

there is the code for setting the toolbar:
Code:
def addGridSize(self,widget): def setSize(data): ACTION.SET_GRAPHICS_GRID_SIZE(data) print INFO.GRID_INCREMENTS for temp in (INFO.GRID_INCREMENTS): if temp == '0': sizeAct = QtWidgets.QAction('Off', widget) sizeAct.triggered.connect(lambda: setSize(0)) widget.addAction(sizeAct) continue i = self.parse_increment(temp) sizeAct = QtWidgets.QAction('%s'%temp, widget) # weird lambda i=i to work around 'function closure' sizeAct.triggered.connect(lambda state, i=i: setSize(i)) widget.addAction(sizeAct) # We convert INI parced increments to machine units def parse_increment(self, gridIncr): if gridIncr.endswith("mm"): scale = self.conversion(1) elif gridIncr.endswith("cm"): scale = self.conversion(10) elif gridIncr.endswith("um"): scale = self.conversion(.001) elif gridIncr.endswith("in") or gridIncr.endswith("inch"): scale = self.conversion(1., metric = False) elif gridIncr.endswith("mil"): scale = self.conversion(.001, metric = False) else: scale = 1 incr = gridIncr.rstrip(" inchmuil") if "/" in incr: p, q = incr.split("/") incr = float(p) / float(q) else: incr = float(incr) LOG.debug("parceed: text: {} Increment: {} scaled: {}".format(gridIncr, incr, (incr * scale))) return incr * scale # This does the conversion # calling function must tell us if the data is metric or not. def conversion(self, data, metric = True): if INFO.MACHINE_IS_METRIC: if metric: return INFO.convert_metric_to_machine(data) else: return INFO.convert_imperial_to_machine(data) else: if metric: return INFO.convert_metric_to_machine(data) else: return INFO.convert_imperial_to_machine(data)

it reads the raw grid increments found in the INI fle.
It then parses them, converting the text 'in' and 'mm' etc to machine units.

if the action is triggered:
ACTION.SET_GRAPHICS_GRID_SIZE(data)
sets the grid of the graphics display

Hope that helps.
Chris

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

More
6 years 2 days ago #187803 by hottabich
Replied by hottabich on topic Sample Qtvcp Screens
Thank you so much! I will definitely try a little later. I think it will work.

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

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