Flexible GUI

More
2 years 3 months ago #306512 by JT
Replied by JT on topic Flexible GUI


JT
The following user(s) said Thank You: tommylight, MennilTossFlykune

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

More
2 years 3 months ago #306581 by MennilTossFlykune
Replied by MennilTossFlykune on topic Flexible GUI
This should all work:
Code:
    view_controls = {         'view_rotate_up_pb': ('rotateView', 0, -10),         'view_rotate_down_pb': ('rotateView', 0, 10),         'view_rotate_left_pb': ('rotateView', 10, 0),         'view_rotate_right_pb': ('rotateView', -10, 0),         'view_pan_up_pb': ('panView', 0, 10),         'view_pan_down_pb': ('panView', 0, -10),         'view_pan_left_pb': ('panView', 10, 0),         'view_pan_right_pb': ('panView', -10, 0),         'view_zoom_in_pb': ('zoomin',),         'view_zoom_out_pb': ('zoomout',),         'view_clear_pb': ('clear_live_plotter',)     }     for key, value in view_controls.items():         if key in parent.children:             button = getattr(parent, key)             if len(value) == 3:                 method, vertical, horizontal = value                 button.clicked.connect(lambda _, m=method, v=vertical, h=horizontal: (                     getattr(parent.plotter, m)(vertical=v, horizontal=h)                 ))             elif len(value) == 1:                 method = value[0]                 button.clicked.connect(lambda _, m=method: (                     getattr(parent.plotter, m)()                 ))                     views = {         'view_p_pb': 'p',         'view_x_pb': 'x',         'view_y_pb': 'y',         'view_y2_pb': 'y2',         'view_z_pb': 'z',         'view_z2_pb': 'z2'     }     for key, value in views.items():         if key in parent.children:             button = getattr(parent, key)             button.clicked.connect(lambda _, v=value: (                 parent.plotter.makeCurrent(),                 setattr(parent.plotter, 'current_view', v),                 parent.plotter.set_current_view()             ))
The following user(s) said Thank You: JT

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

More
2 years 3 months ago #306593 by JT
Replied by JT on topic Flexible GUI
Thank you so much that is a HUGE help.

JT

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

More
2 years 3 months ago #306620 by JT
Replied by JT on topic Flexible GUI
@MennilTossFlykune do you know if it's possible to zoom to the machine extents (the red box) with a pushbutton?

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

More
2 years 2 months ago #307365 by JT
Replied by JT on topic Flexible GUI


JT

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

More
2 years 2 months ago #307480 by stefan63
Replied by stefan63 on topic Flexible GUI
Looking great, I'm following this project with interest!
Thank you for your efforts!
/Stefan
The following user(s) said Thank You: JT

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

Moderators: JT
Time to create page: 0.121 seconds
Powered by Kunena Forum