Changeset 64b9e61 in sasview
- Timestamp:
- Nov 16, 2018 9:40:14 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 442a9ae
- Parents:
- 09e0c32
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/ConstraintWidget.py
r09e0c32 r64b9e61 23 23 """ 24 24 fitCompleteSignal = QtCore.pyqtSignal(tuple) 25 batchCompleteSignal = QtCore.pyqtSignal(tuple) 26 fitFailedSignal = QtCore.pyqtSignal(tuple) 27 25 28 def __init__(self, parent=None): 26 29 super(ConstraintWidget, self).__init__() … … 60 63 Set up various widget states 61 64 """ 65 # disable special cases until properly defined 66 self.label.setVisible(False) 67 self.cbCases.setVisible(False) 68 62 69 labels = ['FitPage', 'Model', 'Data', 'Mnemonic'] 63 70 # tab widget - headers … … 80 87 self.tblConstraints.setEnabled(False) 81 88 header = self.tblConstraints.horizontalHeaderItem(0) 82 header.setToolTip("Double click to edit.")89 header.setToolTip("Double click a row below to edit the constraint.") 83 90 84 91 self.tblConstraints.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) … … 105 112 # Internal signals 106 113 self.fitCompleteSignal.connect(self.fitComplete) 114 self.batchCompleteSignal.connect(self.batchComplete) 115 self.fitFailedSignal.connect(self.fitFailed) 107 116 108 117 # External signals … … 171 180 try: 172 181 for tab in tabs_to_fit: 182 if not self.isTabImportable(tab): continue 173 183 tab_object = ObjectLibrary.getObject(tab) 174 184 if tab_object is None: … … 229 239 230 240 #disable the Fit button 241 self.cmdFit.setStyleSheet('QPushButton {color: red;}') 231 242 self.cmdFit.setText('Running...') 232 243 self.parent.communicate.statusBarUpdateSignal.emit('Fitting started...') … … 334 345 """ 335 346 #re-enable the Fit button 347 self.cmdFit.setStyleSheet('QPushButton {color: black;}') 336 348 self.cmdFit.setText("Fit") 337 349 self.cmdFit.setEnabled(True) … … 370 382 def onBatchFitComplete(self, result): 371 383 """ 384 Send the fit complete signal to main thread 385 """ 386 self.batchCompleteSignal.emit(result) 387 388 def batchComplete(self, result): 389 """ 372 390 Respond to the successful batch fit complete signal 373 391 """ 374 392 #re-enable the Fit button 393 self.cmdFit.setStyleSheet('QPushButton {color: black;}') 375 394 self.cmdFit.setText("Fit") 376 395 self.cmdFit.setEnabled(True) … … 395 414 def onFitFailed(self, reason): 396 415 """ 416 Send the fit failed signal to main thread 417 """ 418 self.fitFailedSignal.emit(result) 419 420 def fitFailed(self, reason): 421 """ 397 422 Respond to fitting failure. 398 423 """ 399 424 #re-enable the Fit button 425 self.cmdFit.setStyleSheet('QPushButton {color: black;}') 400 426 self.cmdFit.setText("Fit") 401 427 self.cmdFit.setEnabled(True)
Note: See TracChangeset
for help on using the changeset viewer.