Commit faa244fddac17e3b84776f1bf42c514c811c998f

Authored by bmarechal
1 parent 40aab67500
Exists in master

Enable/disable start/stop buttons and refresh when IP changed

Showing 1 changed file with 8 additions and 0 deletions Side-by-side Diff

... ... @@ -104,10 +104,12 @@
104 104 self.startButton = QtGui.QPushButton()
105 105 self.startButton.setText('Start log')
106 106 self.layout.addWidget(self.startButton, 99, 1)
  107 + self.startButton.setEnabled(True)
107 108  
108 109 self.stopButton = QtGui.QPushButton()
109 110 self.stopButton.setText('Stop log')
110 111 self.layout.addWidget(self.stopButton, 99, 2)
  112 + self.stopButton.setEnabled(False)
111 113  
112 114 self.textDisplay = QtGui.QLabel()
113 115 self.textDisplay.setText('>>')
... ... @@ -161,6 +163,8 @@
161 163 self.checkBoxChannels[i].stateChanged.connect(self.infoSignal)
162 164 self.chListVtypes[i].currentItemChanged.connect(self.infoSignal)
163 165  
  166 + self.adress.textChanged.connect(self.infoSignal)
  167 +
164 168 self.infoSignal()
165 169  
166 170 @pyqtSlot()
167 171  
... ... @@ -180,11 +184,15 @@
180 184  
181 185 @pyqtSlot()
182 186 def startLog(self):
  187 + self.startButton.setEnabled(False)
  188 + self.stopButton.setEnabled(True)
183 189 self.myLog.connect()
184 190 self.myLog.start()
185 191  
186 192 @pyqtSlot()
187 193 def stopLog(self):
  194 + self.startButton.setEnabled(True)
  195 + self.stopButton.setEnabled(False)
188 196 self.myLog.stop()
189 197  
190 198 #==============================================================================