21 from .widgets import TempGauge |
21 from .widgets import TempGauge |
22 from wx.lib.agw.floatspin import FloatSpin |
22 from wx.lib.agw.floatspin import FloatSpin |
23 |
23 |
24 from .utils import make_button, make_custom_button |
24 from .utils import make_button, make_custom_button |
25 |
25 |
|
26 from .widgets import PronterOptions |
|
27 |
26 class XYZControlsSizer(wx.GridBagSizer): |
28 class XYZControlsSizer(wx.GridBagSizer): |
27 |
29 |
28 def __init__(self, root, parentpanel = None): |
30 def __init__(self, root, parentpanel = None): |
29 super(XYZControlsSizer, self).__init__() |
31 super(XYZControlsSizer, self).__init__() |
30 if not parentpanel: parentpanel = root.panel |
32 if not parentpanel: parentpanel = root.panel |
47 tempdisp_line = gauges_base_line + (2 if root.display_gauges else 0) |
49 tempdisp_line = gauges_base_line + (2 if root.display_gauges else 0) |
48 if mini_mode and root.display_graph: |
50 if mini_mode and root.display_graph: |
49 e_base_line = base_line + 3 |
51 e_base_line = base_line + 3 |
50 else: |
52 else: |
51 e_base_line = base_line + 2 |
53 e_base_line = base_line + 2 |
|
54 |
|
55 lasercut_base_line = 11 |
52 |
56 |
53 pos_mapping = { |
57 pos_mapping = { |
54 "htemp_label": (base_line + 0, 0), |
58 "htemp_label": (base_line + 0, 0), |
55 "htemp_off": (base_line + 0, 2), |
59 "htemp_off": (base_line + 0, 2), |
56 "htemp_val": (base_line + 0, 3), |
60 "htemp_val": (base_line + 0, 3), |
66 "htemp_gauge": (gauges_base_line + 0, 0), |
70 "htemp_gauge": (gauges_base_line + 0, 0), |
67 "btemp_gauge": (gauges_base_line + 1, 0), |
71 "btemp_gauge": (gauges_base_line + 1, 0), |
68 "tempdisp": (tempdisp_line, 0), |
72 "tempdisp": (tempdisp_line, 0), |
69 "extrude": (3, 0), |
73 "extrude": (3, 0), |
70 "reverse": (3, 2), |
74 "reverse": (3, 2), |
|
75 "lasercut": (lasercut_base_line, 0), |
71 } |
76 } |
72 |
77 |
73 span_mapping = { |
78 span_mapping = { |
74 "htemp_label": (1, 2), |
79 "htemp_label": (1, 2), |
75 "htemp_off": (1, 1), |
80 "htemp_off": (1, 1), |
296 |
301 |
297 if root.display_graph: |
302 if root.display_graph: |
298 root.graph = Graph(parentpanel, wx.ID_ANY, root) |
303 root.graph = Graph(parentpanel, wx.ID_ANY, root) |
299 add("tempgraph", root.graph, flag = wx.EXPAND | wx.ALL, border = 5) |
304 add("tempgraph", root.graph, flag = wx.EXPAND | wx.ALL, border = 5) |
300 root.graph.Bind(wx.EVT_LEFT_DOWN, root.graph.show_graph_window) |
305 root.graph.Bind(wx.EVT_LEFT_DOWN, root.graph.show_graph_window) |
|
306 |
|
307 # Lasercutter quick controls # |
|
308 |
|
309 root.lc_optionsbtn = make_button(parentpanel, _("Lasercutter options"), lambda e: PronterOptions(root, "Laser"), _("Open Lasercutter options"), style = wx.BU_EXACTFIT) |
|
310 root.printerControls.append(root.lc_optionsbtn) |
|
311 add("lasercut", root.lc_optionsbtn, flag = wx.EXPAND) |
|
312 |
301 |
313 |
302 # Extrusion controls # |
314 # Extrusion controls # |
303 |
315 |
304 # Extrusion settings |
316 # Extrusion settings |
305 esettingspanel = root.newPanel(parentpanel) |
317 esettingspanel = root.newPanel(parentpanel) |