Commit 56312b9abfda7a2b054529ebca94218c3a2fb8a0
1 parent
6072e58424
Exists in
master
improve GUI
Showing 1 changed file with 9 additions and 2 deletions Side-by-side Diff
datalogger-gui.py
... | ... | @@ -162,7 +162,6 @@ |
162 | 162 | self.layout.addWidget(self.chListVtypes[i], i, 2) |
163 | 163 | self.checkBoxChannels[i].stateChanged.connect(self.infoSignal) |
164 | 164 | self.chListVtypes[i].currentItemChanged.connect(self.infoSignal) |
165 | - self.chListVtypes[i].setEnabled(False) | |
166 | 165 | |
167 | 166 | self.adress.textChanged.connect(self.infoSignal) |
168 | 167 | |
... | ... | @@ -203,6 +202,8 @@ |
203 | 202 | self.comboInst.setEnabled(False) |
204 | 203 | for i in self.checkBoxChannels: |
205 | 204 | i.setEnabled(False) |
205 | + for i in self.chListVtypes: | |
206 | + i.setEnabled(False) | |
206 | 207 | self.myLog.connect() |
207 | 208 | self.myLog.start() |
208 | 209 | |
209 | 210 | |
... | ... | @@ -212,8 +213,14 @@ |
212 | 213 | self.stopButton.setEnabled(False) |
213 | 214 | self.adress.setEnabled(True) |
214 | 215 | self.comboInst.setEnabled(True) |
216 | + for i in range(len(self.checkBoxChannels)): | |
217 | + if self.checkBoxChannels[i].isChecked(): | |
218 | + self.checkBoxChannels[i].setEnabled(True) | |
219 | + self.chListVtypes[i].setEnabled(True) | |
220 | + else: | |
221 | + self.checkBoxChannels[i].setEnabled(True) | |
222 | + self.chListVtypes[i].setEnabled(False) | |
215 | 223 | self.myLog.stop() |
216 | - self.infoSignal() | |
217 | 224 | |
218 | 225 | #============================================================================== |
219 | 226 | #============================================================================== |