Rev 590 | Rev 592 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 590 | Rev 591 | ||
---|---|---|---|
Line 114... | Line 114... | ||
114 | self.label_4 = wx.StaticText(self, -1, "Speed(s)") |
114 | self.label_4 = wx.StaticText(self, -1, "Speed(s)") |
115 | self.text_ctrl_4 = wx.TextCtrl(self, -1, "") |
115 | self.text_ctrl_4 = wx.TextCtrl(self, -1, "") |
116 | self.label_8 = wx.StaticText(self, -1, "label_8") |
116 | self.label_8 = wx.StaticText(self, -1, "label_8") |
117 | self.text_ctrl_8 = wx.TextCtrl(self, -1, "") |
117 | self.text_ctrl_8 = wx.TextCtrl(self, -1, "") |
118 | self.button_1 = wx.Button(self, -1, "button_1") |
118 | self.button_1 = wx.Button(self, -1, "button_1") |
- | 119 | self.GraphPanel = wx.Panel(self, -1, style=wx.DOUBLE_BORDER|wx.TAB_TRAVERSAL) |
|
- | 120 | self.choice_3 = wx.Choice(self, -1, choices=[]) |
|
119 | self.GraphFanel = wx.Panel(self, -1) |
121 | self.choice_4 = wx.Choice(self, -1, choices=[]) |
120 | self.TestListCtrl = wx.ListCtrl(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER) |
122 | self.TestListCtrl = wx.ListCtrl(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER) |
Line 121... | Line 123... | ||
121 | 123 | ||
122 | self.__set_properties() |
124 | self.__set_properties() |
Line 129... | Line 131... | ||
129 | self.app = app |
131 | self.app = app |
Line 130... | Line 132... | ||
130 | 132 | ||
131 | def __set_properties(self): |
133 | def __set_properties(self): |
132 | # begin wxGlade: MainFrame.__set_properties |
134 | # begin wxGlade: MainFrame.__set_properties |
133 | self.SetTitle("VibrationTest") |
135 | self.SetTitle("VibrationTest") |
134 | self.GraphFanel.SetMinSize((800,300)) |
136 | self.GraphPanel.SetMinSize((800,300)) |
Line 135... | Line 137... | ||
135 | # end wxGlade |
137 | # end wxGlade |
136 | 138 | ||
137 | def __do_layout(self): |
139 | def __do_layout(self): |
138 | # begin wxGlade: MainFrame.__do_layout |
140 | # begin wxGlade: MainFrame.__do_layout |
- | 141 | sizer_1 = wx.BoxSizer(wx.VERTICAL) |
|
139 | sizer_1 = wx.BoxSizer(wx.VERTICAL) |
142 | grid_sizer_2 = wx.GridSizer(2, 1, 4, 4) |
- | 143 | sizer_2 = wx.BoxSizer(wx.HORIZONTAL) |
|
140 | grid_sizer_2 = wx.GridSizer(2, 1, 4, 4) |
144 | grid_sizer_1 = wx.GridSizer(5, 4, 4, 4) |
141 | grid_sizer_1 = wx.GridSizer(5, 4, 4, 4) |
145 | sizer_1.Add((20, 20), 0, 0, 0) |
142 | grid_sizer_1.Add(self.Port, 0, wx.ALIGN_RIGHT, 0) |
146 | grid_sizer_1.Add(self.Port, 0, wx.ALIGN_RIGHT, 0) |
143 | grid_sizer_1.Add(self.text_ctrl_1, 0, 0, 0) |
147 | grid_sizer_1.Add(self.text_ctrl_1, 0, 0, 0) |
144 | grid_sizer_1.Add(self.label_5, 0, wx.ALIGN_RIGHT, 0) |
148 | grid_sizer_1.Add(self.label_5, 0, wx.ALIGN_RIGHT, 0) |
Line 155... | Line 159... | ||
155 | grid_sizer_1.Add(self.text_ctrl_4, 0, 0, 0) |
159 | grid_sizer_1.Add(self.text_ctrl_4, 0, 0, 0) |
156 | grid_sizer_1.Add(self.label_8, 0, wx.ALIGN_RIGHT, 0) |
160 | grid_sizer_1.Add(self.label_8, 0, wx.ALIGN_RIGHT, 0) |
157 | grid_sizer_1.Add(self.text_ctrl_8, 0, 0, 0) |
161 | grid_sizer_1.Add(self.text_ctrl_8, 0, 0, 0) |
158 | grid_sizer_1.Add(self.button_1, 0, 0, 0) |
162 | grid_sizer_1.Add(self.button_1, 0, 0, 0) |
159 | sizer_1.Add(grid_sizer_1, 0, 0, 2) |
163 | sizer_1.Add(grid_sizer_1, 0, 0, 2) |
- | 164 | sizer_1.Add((20, 20), 0, 0, 0) |
|
- | 165 | sizer_1.Add(self.GraphPanel, 1, wx.ALIGN_CENTER_HORIZONTAL, 0) |
|
- | 166 | sizer_2.Add(self.choice_3, 0, 0, 0) |
|
- | 167 | sizer_2.Add(self.choice_4, 0, 0, 0) |
|
160 | sizer_1.Add(self.GraphFanel, 0, wx.EXPAND, 0) |
168 | sizer_1.Add(sizer_2, 0, wx.EXPAND, 0) |
- | 169 | sizer_1.Add((20, 20), 0, 0, 0) |
|
161 | grid_sizer_2.Add(self.TestListCtrl, 1, wx.ALL|wx.EXPAND, 0) |
170 | grid_sizer_2.Add(self.TestListCtrl, 1, wx.ALL|wx.EXPAND, 0) |
162 | sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0) |
171 | sizer_1.Add(grid_sizer_2, 1, wx.EXPAND, 0) |
163 | self.SetSizer(sizer_1) |
172 | self.SetSizer(sizer_1) |
164 | sizer_1.Fit(self) |
173 | sizer_1.Fit(self) |
165 | self.Layout() |
174 | self.Layout() |
Line 167... | Line 176... | ||
167 | 176 | ||
168 | # List events |
177 | # List events |
Line 169... | Line 178... | ||
169 | self.TestListCtrl.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnTestSelected, self.TestListCtrl) |
178 | self.TestListCtrl.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnTestSelected, self.TestListCtrl) |
170 | 179 | ||
171 | # Configure Graph |
180 | # Configure Graph |
Line 172... | Line 181... | ||
172 | self.client = wx.lib.plot.PlotCanvas(self.GraphFanel) |
181 | self.client = wx.lib.plot.PlotCanvas(self.GraphPanel) |
173 | self.client.SetPointLabelFunc(self.DrawPointLabel) |
182 | self.client.SetPointLabelFunc(self.DrawPointLabel) |
174 | 183 |