Changeset c5a2722f in sasview for src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
- Timestamp:
- Jan 18, 2018 9:44:26 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- ba01ad1
- Parents:
- 2d466e4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r2d466e4 rc5a2722f 601 601 Return list of all parameters for the current model 602 602 """ 603 #params = []604 #for row in range(self._model_model.rowCount()):605 # params.append(self._model_model.item(row).text())606 #return params607 603 return [self._model_model.item(row).text() for row in range(self._model_model.rowCount())] 608 604 … … 625 621 self._model_model.item(row, column).setEditable(fields_enabled) 626 622 self._model_model.blockSignals(False) 623 624 def addConstraintToRow(self, constraint=None, row=0): 625 """ 626 Adds the constraint object to requested row 627 """ 628 # Create a new item and add the Constraint object as a child 629 assert(isinstance(constraint, Constraint)) 630 assert(0<=row<=self._model_model.rowCount()) 631 632 item = QtGui.QStandardItem() 633 item.setData(constraint) 634 self._model_model.item(row, 1).setChild(0, item) 635 # Set min/max to the value constrained 636 self.constraintAddedSignal.emit([row]) 637 # Show visual hints for the constraint 638 font = QtGui.QFont() 639 font.setItalic(True) 640 brush = QtGui.QBrush(QtGui.QColor('blue')) 641 self.modifyViewOnRow(row, font=font, brush=brush) 642 self.communicate.statusBarUpdateSignal.emit('Constraint added') 627 643 628 644 def addSimpleConstraint(self): … … 759 775 if func == value: 760 776 return "" 777 761 778 return model_name + "." 762 779 params = [(self._model_model.item(s, 0).text(), 763 preamble(s) +self._model_model.item(s, 1).child(0).data().func) 780 #preamble(s) +self._model_model.item(s, 1).child(0).data().func) 781 self._model_model.item(s, 1).child(0).data().func) 764 782 for s in range(param_number) if self.rowHasConstraint(s)] 765 783 return params
Note: See TracChangeset
for help on using the changeset viewer.