1 from __future__ import absolute_import
\r
4 import wx, os, platform, types
\r
7 from gui import configBase
\r
8 from gui import validators
\r
9 from gui import machineCom
\r
11 class preferencesDialog(configBase.configWindowBase):
\r
12 def __init__(self, parent):
\r
13 super(preferencesDialog, self).__init__(title="Preferences")
\r
15 wx.EVT_CLOSE(self, self.OnClose)
\r
17 left, right, main = self.CreateConfigPanel(self)
\r
18 configBase.TitleRow(left, 'Machine settings')
\r
19 c = configBase.SettingRow(left, 'Steps per E', 'steps_per_e', '0', 'Amount of steps per mm filament extrusion', type = 'preference')
\r
20 validators.validFloat(c, 0.1)
\r
21 c = configBase.SettingRow(left, 'Machine width (mm)', 'machine_width', '205', 'Size of the machine in mm', type = 'preference')
\r
22 validators.validFloat(c, 10.0)
\r
23 c = configBase.SettingRow(left, 'Machine depth (mm)', 'machine_depth', '205', 'Size of the machine in mm', type = 'preference')
\r
24 validators.validFloat(c, 10.0)
\r
25 c = configBase.SettingRow(left, 'Machine height (mm)', 'machine_height', '200', 'Size of the machine in mm', type = 'preference')
\r
26 validators.validFloat(c, 10.0)
\r
28 configBase.TitleRow(left, 'Communication settings')
\r
29 c = configBase.SettingRow(left, 'Serial port', 'serial_port', ['AUTO'] + machineCom.serialList(), 'Serial port to use for communication with the printer', type = 'preference')
\r
30 c = configBase.SettingRow(left, 'Baudrate', 'serial_baud', '250000', 'Speed of the serial port communication\nNeeds to match your firmware settings\nCommon values are 250000, 115200, 57600', type = 'preference')
\r
32 configBase.TitleRow(left, 'Slicer settings')
\r
33 c = configBase.SettingRow(left, 'Slicer selection', 'slicer', ['Cura (Skeinforge based)', 'Slic3r'], 'Which slicer to use to slice objects. Usually the Cura engine produces the best results. But Slic3r is developing fast and is faster with slicing.', type = 'preference')
\r
35 self.MakeModal(True)
\r
39 def OnClose(self, e):
\r
40 self.MakeModal(False)
\r