Changeset 7b21c05 in sasview for src/sas/qtgui/Perspectives
- Timestamp:
- Oct 24, 2017 12:15:21 PM (7 years ago)
- Children:
- cadd595a
- Parents:
- 1bb879d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Corfunc/CorfuncPerspective.py
r1bb879d r7b21c05 151 151 if item.row() == W.W_QMIN: 152 152 value = float(self.model.item(W.W_QMIN).text()) 153 self._calculator.lowerq = value154 153 self._canvas.qmin = value 155 elif item.row() == W.W_QMAX: 156 value = float(self.model.item(W.W_QMAX).text()) 157 self._calculator.upperq = (value, self._calculator.upperq[1]) 158 self._canvas.qmax1 = value 159 elif item.row() == W.W_QCUTOFF: 160 value = float(self.model.item(W.W_QCUTOFF).text()) 161 self._calculator.upperq = (self._calculator.upperq[0], value) 162 self._canvas.qmax2 = value 163 elif item.row() == W.W_BACKGROUND: 164 value = float(self.model.item(W.W_BACKGROUND).text()) 165 self._calculator.background = value 154 elif item.row() == W.W_QMAX or item.row() == W.W_QCUTOFF: 155 a = float(self.model.item(W.W_QMAX).text()) 156 b = float(self.model.item(W.W_QCUTOFF).text()) 157 self._canvas.qmax1 = a 158 self._canvas.qmax2 = b 166 159 else: 167 160 print("{} Changed".format(item)) 168 161 162 self._update_calculator() 169 163 self.mapper.toFirst() 170 164 self._canvas.drawQSpace() 171 165 166 def _update_calculator(self): 167 self._calculator.lowerq = float(self.model.item(W.W_QMIN).text()) 168 qmax1 = float(self.model.item(W.W_QMAX).text()) 169 qmax2 = float(self.model.item(W.W_QCUTOFF).text()) 170 self._calculator.upperq = (qmax1, qmax2) 171 self._calculator.background = float(self.model.item(W.W_BACKGROUND).text()) 172 172 173 173 def extrapolate(self): … … 190 190 191 191 extrap = self._canvas.extrap 192 bg = self._calculator.background192 bg = float(self.model.item(W.W_BACKGROUND).text()) 193 193 def updatefn(*args, **kwargs): 194 194 pass
Note: See TracChangeset
for help on using the changeset viewer.