| 54 | | [wxID_MAINFRAME, wxID_SPLITTERWINDOW1, wxID_PUSHPACKETBTN, wxID_ISOURCECHOICE, wxID_IFILENAMEEDITOR, wxID_QSOURCECHOICE, wxID_QFILENAMEEDITOR, wxID_IFILESTATICTEXT,wxID_QFILESTATICTEXT] = [wx.NewId() for _init_ctrls in range(9)] |
| | 54 | [wxID_MAINFRAME, wxID_SPLITTERWINDOW1, wxID_PUSHPACKETBTN, wxID_ISOURCECHOICE, wxID_IFILENAMEEDITOR, wxID_QSOURCECHOICE, wxID_QFILENAMEEDITOR, wxID_ISOURCESTATICTEXT, wxID_QSOURCESTATICTEXT, wxID_IFILESTATICTEXT,wxID_QFILESTATICTEXT] = [wx.NewId() for _init_ctrls in range(11)] |
| 140 | | size=wx.Size(200, 30), style=0, value=u'') |
| 141 | | |
| | 140 | size=wx.Size(250, 30), style=0, value=u'') |
| | 141 | |
| | 142 | self.iSourceStaticText = wx.StaticText(id=wxID_ISOURCESTATICTEXT, |
| | 143 | label=u'I channel source:', name='qSourceStaticText', parent=self.splitterWindow1, |
| | 144 | pos=wx.Point(55, 50), size= wx.Size(100, 20), style=0) |
| | 145 | self.iSourceStaticText.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.BOLD,True,u'Sans')) |
| | 146 | |
| | 147 | self.qSourceStaticText = wx.StaticText(id=wxID_QSOURCESTATICTEXT, |
| | 148 | label=u'Q channel Source:', name='qSourceStaticText', parent=self.splitterWindow1, |
| | 149 | pos=wx.Point(55, 100), size= wx.Size(100, 20), style=0) |
| | 150 | self.qSourceStaticText.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.BOLD,True,u'Sans')) |
| | 151 | |
| | 152 | |
| | 153 | self.iFileStaticText = wx.StaticText(id=wxID_IFILESTATICTEXT, |
| | 154 | label=u'I channel file:', name='qFileStaticText', parent=self.splitterWindow1, |
| | 155 | pos=wx.Point(55, 150), size= wx.Size(100, 20), style=0) |
| | 156 | self.iFileStaticText.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.BOLD,True,u'Sans')) |
| | 157 | |
| | 158 | self.qFileStaticText = wx.StaticText(id=wxID_QFILESTATICTEXT, |
| | 159 | label=u'Q channel file:', name='qFileStaticText', parent=self.splitterWindow1, |
| | 160 | pos=wx.Point(55, 200), size= wx.Size(100, 20), style=0) |
| | 161 | self.qFileStaticText.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.BOLD,True,u'Sans')) |
| | 162 | |
| | 163 | |
| 144 | | # #TODO: move this suff to push packet button method |
| 145 | | # if i_source_selected == 'file' or q_source_selected == 'file': |
| 146 | | # pass #wait for push packet to be pressed |
| 147 | | # else: |
| 148 | | # AWG_instance = AWG(self) |
| 149 | | # self.I = AWG_instance.get_signal(i_source_selected, 'none') #'none' is no file name |
| 150 | | # self.Q = AWG_instance.get_signal(q_source_selected, 'none') #'none' is no file name |
| 151 | | pass |
| | 166 | '''If a source option other than "file" is selected, "grey out" the file input field''' |
| | 167 | |
| | 168 | i_source = self.iSourceChoice.GetStringSelection() |
| | 169 | if i_source == 'file': |
| | 170 | self.iFileNameEditor.Enable(True) |
| | 171 | else: |
| | 172 | self.iFileNameEditor.Enable(False) |
| | 173 | |
| | 174 | q_source = self.qSourceChoice.GetStringSelection() |
| | 175 | if q_source == 'file': |
| | 176 | self.qFileNameEditor.Enable(True) |
| | 177 | else: |
| | 178 | self.qFileNameEditor.Enable(False) |
| | 179 | |