Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 600 → Rev 601

/VibrationTest/trunk/VibrationTest/VibrationTestGui.py
30,6 → 30,51
 
 
 
class SettingsFrame(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: SettingsFrame.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.label_5 = wx.StaticText(self, -1, "COM Port ", style=wx.ALIGN_RIGHT)
self.comPortCtrl = wx.TextCtrl(self, -1, "")
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
 
def __set_properties(self):
# begin wxGlade: SettingsFrame.__set_properties
self.SetTitle("Settings")
# end wxGlade
 
def __do_layout(self):
# begin wxGlade: SettingsFrame.__do_layout
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)
grid_sizer_2.Add(self.label_5, 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL, 0)
grid_sizer_2.Add(self.comPortCtrl, 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
 
# end of class SettingsFrame
 
 
class MenuBar(wx.MenuBar):
def __init__(self, *args, **kwds):
# content of this block not found: did you rename this class?
90,6 → 135,8
wxglade_tmp_menu.Append(wx.NewId(), "Exit", "", wx.ITEM_NORMAL)
self.frame_1_menubar.Append(wxglade_tmp_menu, "File")
wxglade_tmp_menu = wx.Menu()
self.frame_1_menubar.Append(wxglade_tmp_menu, "Settings")
wxglade_tmp_menu = wx.Menu()
wxglade_tmp_menu.Append(wx.NewId(), "Clear", "", wx.ITEM_NORMAL)
wxglade_tmp_menu.Append(wx.NewId(), "Import", "", wx.ITEM_NORMAL)
self.frame_1_menubar.Append(wxglade_tmp_menu, "TestSet")
122,6 → 169,7
self.__set_properties()
self.__do_layout()
 
self.Bind(wx.EVT_MENU, self.onClear, id=-1)
self.Bind(wx.EVT_MENU, self.OnImport, id=-1)
self.Bind(wx.EVT_CHOICE, self.onGraphTypeChange, self.graphTypeChoice)
self.Bind(wx.EVT_CHOICE, self.onYAxisChange, self.yAxisChoice)
135,6 → 183,7
self.SetTitle("VibrationTest")
self.SetSize((850, 700))
self.Description.SetMinSize((53, 13))
self.button_4.SetMinSize((80, 80))
self.GraphPanel.SetMinSize((800,300))
self.graphTypeChoice.SetSelection(0)
self.yAxisChoice.SetSelection(1)
294,6 → 343,10
def onGraphTypeChange(self, event): # wxGlade: MainFrame.<event_handler>
self.drawGraph()
 
def onClear(self, event): # wxGlade: MainFrame.<event_handler>
print "Event handler `onClear' not implemented"
event.Skip()
 
# end of class MainFrame
 
 
/VibrationTest/trunk/VibrationTest/VibrationTestGui.wxg
1,7 → 1,7
<?xml version="1.0"?>
<!-- generated by wxGlade 0.6.3 on Thu Oct 01 16:10:40 2009 -->
<!-- generated by wxGlade 0.6.3 on Thu Oct 01 23:32:39 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">
<application path="C:\DATA\MK\SVN\Projects\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">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>VibrationTest</title>
14,9 → 14,12
<label>Exit</label>
</item>
</menu>
<menu name="" handler="OnSettings" label="Settings">
</menu>
<menu name="" label="TestSet">
<item>
<label>Clear</label>
<handler>onClear</handler>
</item>
<item>
<label>Import</label>
181,6 → 184,7
<option>0</option>
<object class="wxButton" name="button_4" base="EditButton">
<label>Start</label>
<size>80, 80</size>
</object>
</object>
</object>
311,4 → 315,114
</object>
</object>
</object>
<object class="SettingsFrame" name="SettingsFrame" base="EditFrame">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>Settings</title>
<object class="wxBoxSizer" name="sizer_5" base="EditBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<border>0</border>
<option>0</option>
<object class="spacer" name="spacer" base="EditSpacer">
<height>20</height>
<width>20</width>
</object>
</object>
<object class="sizeritem">
<flag>wxEXPAND</flag>
<border>0</border>
<option>1</option>
<object class="wxBoxSizer" name="sizer_6" base="EditBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<border>0</border>
<option>0</option>
<object class="spacer" name="spacer" base="EditSpacer">
<height>20</height>
<width>20</width>
</object>
</object>
<object class="sizeritem">
<border>0</border>
<option>0</option>
<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" 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" base="EditTextCtrl">
</object>
</object>
</object>
</object>
<object class="sizeritem">
<border>0</border>
<option>0</option>
<object class="spacer" name="spacer" base="EditSpacer">
<height>20</height>
<width>20</width>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<border>0</border>
<option>0</option>
<object class="spacer" name="spacer" base="EditSpacer">
<height>20</height>
<width>20</width>
</object>
</object>
<object class="sizeritem">
<flag>wxEXPAND</flag>
<border>0</border>
<option>0</option>
<object class="wxGridSizer" name="grid_sizer_3" base="EditGridSizer">
<hgap>0</hgap>
<rows>1</rows>
<cols>2</cols>
<vgap>0</vgap>
<object class="sizeritem">
<flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>0</border>
<option>0</option>
<object class="wxButton" name="button_5" base="EditButton">
<stockitem>CANCEL</stockitem>
<label>&amp;Cancel</label>
</object>
</object>
<object class="sizeritem">
<flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<border>0</border>
<option>0</option>
<object class="wxButton" name="button_6" base="EditButton">
<stockitem>OK</stockitem>
<label>&amp;OK</label>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<border>0</border>
<option>0</option>
<object class="spacer" name="spacer" base="EditSpacer">
<height>20</height>
<width>20</width>
</object>
</object>
</object>
</object>
</application>