Changeset 6e58f2f in sasview for src/sas/qtgui/Perspectives/Fitting
- Timestamp:
- Feb 14, 2018 4:34:31 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:
- 06234fc
- Parents:
- c736154
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rc736154 r6e58f2f 558 558 """ 559 559 selected_rows = self.lstParams.selectionModel().selectedRows() 560 # There have to be only two rows selected. The caller takes care of that 561 # but let's check the correctness. 560 562 assert(len(selected_rows)==2) 561 563 … … 573 575 # Function should have the model name preamble 574 576 constraint.func = c_text 575 576 # Create a new item and add the Constraint object as a child577 item = QtGui.QStandardItem()578 item.setData(constraint)579 580 577 # Which row is the constrained parameter in? 581 578 row = self.getRowFromName(constraint.param) 582 self._model_model.item(row, 1).setChild(0, item) 583 self.constraintAddedSignal.emit([row]) 584 585 # Show visual hints for the constraint 586 font = QtGui.QFont() 587 font.setItalic(True) 588 brush = QtGui.QBrush(QtGui.QColor('blue')) 589 self.modifyViewOnRow(row, font=font, brush=brush) 590 591 # Notify the user 592 self.communicate.statusBarUpdateSignal.emit('Constraints added') 579 580 # Create a new item and add the Constraint object as a child 581 self.addConstraintToRow(constraint=constraint, row=row) 593 582 594 583 def getRowFromName(self, name): … … 679 668 self.modifyViewOnRow(row, font=font, brush=brush) 680 669 self.communicate.statusBarUpdateSignal.emit('Constraint added') 681 pass682 670 683 671 def deleteConstraint(self): … … 718 706 719 707 self.communicate.statusBarUpdateSignal.emit('Constraint removed') 720 pass721 722 708 723 709 def getConstraintForRow(self, row): … … 791 777 for row in self.selectedParameters(): 792 778 self._model_model.item(row, 0).setCheckState(status) 793 pass # debugger hook794 779 795 780 def getConstraintsForModel(self): … … 799 784 e.g. [('sld','5*sld_solvent')] 800 785 """ 801 model_name = self.kernel_module.name802 786 param_number = self._model_model.rowCount() 803 787 params = [(self._model_model.item(s, 0).text(), … … 813 797 Only for constraints with defined VALUE 814 798 """ 815 model_name = self.kernel_module.name816 799 param_number = self._model_model.rowCount() 817 800 params = [(self._model_model.item(s, 0).text(), … … 900 883 new_func = func.replace(old_name, new_name) 901 884 self._model_model.item(row, 1).child(0).data().func = new_func 902 903 pass904 885 905 886 def updateData(self):
Note: See TracChangeset
for help on using the changeset viewer.