Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 607 → Rev 608

/VibrationTest/trunk/VibrationTest/VibrationTestGui.py
37,15 → 37,25
# begin wxGlade: SettingsDialog.__init__
kwds["style"] = wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.label_5_copy = wx.StaticText(self, -1, "COM Port ", style=wx.ALIGN_RIGHT)
self.comPortCtrl_copy = wx.TextCtrl(self, -1, "")
self.button_5_copy = wx.Button(self, wx.ID_CANCEL, "")
self.button_6_copy = wx.Button(self, wx.ID_OK, "")
self.button_5 = wx.Button(self, wx.ID_CANCEL, "")
self.button_6 = wx.Button(self, wx.ID_OK, "")
 
self.__set_properties()
self.__do_layout()
# end wxGlade
 
# The first argument that is passed to the constructor is the parent
settings = args[0].app.settings
# Add text-boxes for all settings
self.grid_sizer_2.SetRows(len(settings))
for setting in settings.iteritems():
lb = wx.StaticText(self, -1, setting[1].descr, style=wx.ALIGN_RIGHT)
tb = wx.TextCtrl(self, -1, str(setting[1].value))
self.grid_sizer_2.Add(lb, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
self.grid_sizer_2.Add(tb, 0, 0, 0)
self.sizer_5.Fit(self)
self.Layout()
 
def __set_properties(self):
# begin wxGlade: SettingsDialog.__set_properties
self.SetTitle("Settings")
53,27 → 63,31
 
def __do_layout(self):
# begin wxGlade: SettingsDialog.__do_layout
sizer_5_copy = wx.BoxSizer(wx.VERTICAL)
grid_sizer_3_copy = wx.GridSizer(1, 2, 0, 0)
sizer_6_copy = wx.BoxSizer(wx.HORIZONTAL)
grid_sizer_2_copy = wx.GridSizer(1, 2, 4, 4)
sizer_5_copy.Add((20, 20), 0, 0, 0)
sizer_6_copy.Add((20, 20), 0, 0, 0)
grid_sizer_2_copy.Add(self.label_5_copy, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_2_copy.Add(self.comPortCtrl_copy, 0, 0, 0)
sizer_6_copy.Add(grid_sizer_2_copy, 0, 0, 0)
sizer_6_copy.Add((20, 20), 0, 0, 0)
sizer_5_copy.Add(sizer_6_copy, 1, wx.EXPAND, 0)
sizer_5_copy.Add((20, 20), 0, 0, 0)
grid_sizer_3_copy.Add(self.button_5_copy, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_3_copy.Add(self.button_6_copy, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
sizer_5_copy.Add(grid_sizer_3_copy, 0, wx.EXPAND, 0)
sizer_5_copy.Add((20, 20), 0, 0, 0)
self.SetSizer(sizer_5_copy)
sizer_5_copy.Fit(self)
sizer_5 = wx.BoxSizer(wx.VERTICAL)
grid_sizer_3 = wx.GridSizer(1, 2, 0, 0)
sizer_6 = wx.BoxSizer(wx.HORIZONTAL)
grid_sizer_2 = wx.GridSizer(1, 2, 4, 4)
sizer_5.Add((20, 20), 0, 0, 0)
sizer_6.Add((20, 20), 0, 0, 0)
sizer_6.Add(grid_sizer_2, 0, 0, 0)
sizer_6.Add((20, 20), 0, 0, 0)
sizer_5.Add(sizer_6, 1, wx.EXPAND, 0)
sizer_5.Add((20, 20), 0, 0, 0)
grid_sizer_3.Add(self.button_5, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_3.Add(self.button_6, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
sizer_5.Add(grid_sizer_3, 0, wx.EXPAND, 0)
sizer_5.Add((20, 20), 0, 0, 0)
self.SetSizer(sizer_5)
sizer_5.Fit(self)
self.Layout()
# end wxGlade
 
# Store some of the items, we will need them later
self.grid_sizer_2 = grid_sizer_2
self.sizer_5 = sizer_5
 
 
# end of class SettingsDialog
 
 
/VibrationTest/trunk/VibrationTest/VibrationTestGui.wxg
1,5 → 1,5
<?xml version="1.0"?>
<!-- generated by wxGlade 0.6.3 on Fri Oct 02 18:21:56 2009 -->
<!-- generated by wxGlade 0.6.3 on Fri Oct 02 19:29:53 2009 -->
 
<application path="D:\Fred\MK_Proj\VibrationTest\trunk\VibrationTest\VibrationTestGui.py" name="VibrationTestGui" class="App" option="0" language="python" top_window="frame_1" encoding="ISO-8859-15" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.6" is_template="0">
<object class="MainFrame" name="frame_1" base="EditFrame">
324,7 → 324,7
<object class="SettingsDialog" name="SettingDialog" base="EditDialog">
<style>wxDEFAULT_DIALOG_STYLE</style>
<title>Settings</title>
<object class="wxBoxSizer" name="sizer_5_copy" base="EditBoxSizer">
<object class="wxBoxSizer" name="sizer_5" base="EditBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<border>0</border>
338,7 → 338,7
<flag>wxEXPAND</flag>
<border>0</border>
<option>1</option>
<object class="wxBoxSizer" name="sizer_6_copy" base="EditBoxSizer">
<object class="wxBoxSizer" name="sizer_6" base="EditBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<border>0</border>
351,27 → 351,13
<object class="sizeritem">
<border>0</border>
<option>0</option>
<object class="wxGridSizer" name="grid_sizer_2_copy" base="EditGridSizer">
<object class="wxGridSizer" name="grid_sizer_2" base="EditGridSizer">
<hgap>4</hgap>
<rows>1</rows>
<cols>2</cols>
<vgap>4</vgap>
<object class="sizeritem">
<flag>wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL</flag>
<border>0</border>
<option>0</option>
<object class="wxStaticText" name="label_5_copy" base="EditStaticText">
<style>wxALIGN_RIGHT</style>
<attribute>1</attribute>
<label>COM Port </label>
</object>
</object>
<object class="sizeritem">
<border>0</border>
<option>0</option>
<object class="wxTextCtrl" name="comPortCtrl_copy" base="EditTextCtrl">
</object>
</object>
<object class="sizerslot" />
<object class="sizerslot" />
</object>
</object>
<object class="sizeritem">
396,7 → 382,7
<flag>wxEXPAND</flag>
<border>0</border>
<option>0</option>
<object class="wxGridSizer" name="grid_sizer_3_copy" base="EditGridSizer">
<object class="wxGridSizer" name="grid_sizer_3" base="EditGridSizer">
<hgap>0</hgap>
<rows>1</rows>
<cols>2</cols>
405,7 → 391,7
<flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>0</border>
<option>0</option>
<object class="wxButton" name="button_5_copy" base="EditButton">
<object class="wxButton" name="button_5" base="EditButton">
<stockitem>CANCEL</stockitem>
<label>&amp;Cancel</label>
</object>
414,7 → 400,7
<flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>0</border>
<option>0</option>
<object class="wxButton" name="button_6_copy" base="EditButton">
<object class="wxButton" name="button_6" base="EditButton">
<stockitem>OK</stockitem>
<label>&amp;OK</label>
</object>