Changeset 2d466e4 in sasview
- Timestamp:
- Jan 17, 2018 9:44:35 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:
- c5a2722f
- Parents:
- 47d7d2d
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/ConstraintWidget.py
- Property mode changed from 100755 to 100644
r47d7d2d r2d466e4 9 9 from sas.qtgui.Perspectives.Fitting.UI.ConstraintWidgetUI import Ui_ConstraintWidgetUI 10 10 from sas.qtgui.Perspectives.Fitting.FittingWidget import FittingWidget 11 from sas.qtgui.Perspectives.Fitting.ComplexConstraint import ComplexConstraint 11 12 12 13 class ConstraintWidget(QtWidgets.QWidget, Ui_ConstraintWidgetUI): … … 434 435 Invoke the complex constraint editor 435 436 """ 436 pass 437 selected_rows = self.selectedParameters(self.tblTabList) 438 assert(len(selected_rows)==2) 439 440 tab_list = [ObjectLibrary.getObject(self.tblTabList.item(s, 0).data(0)) for s in selected_rows] 441 # Create and display the widget for param1 and param2 442 cc_widget = ComplexConstraint(self, tabs=tab_list) 443 if cc_widget.exec_() != QtWidgets.QDialog.Accepted: 444 return 445 446 #constraint = Constraint() 447 #c_text = cc_widget.txtConstraint.text() 448 pass -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r47d7d2d r2d466e4 567 567 constraint.param = mc_widget.params[0] 568 568 # Function should have the model name preamble 569 #model_name = self.kernel_module.name570 #constraint.func = model_name + ":" + c_text571 569 constraint.func = c_text 572 570 … … 576 574 577 575 # Which row is the constrained parameter in? 578 row = self. rowFromName(constraint.param)576 row = self.getRowFromName(constraint.param) 579 577 self._model_model.item(row, 1).setChild(0, item) 580 578 self.constraintAddedSignal.emit([row]) … … 589 587 self.communicate.statusBarUpdateSignal.emit('Constraints added') 590 588 591 def rowFromName(self, name):589 def getRowFromName(self, name): 592 590 """ 593 591 Given parameter name get the row number in self._model_model … … 598 596 return row 599 597 return None 598 599 def getParamNames(self): 600 """ 601 Return list of all parameters for the current model 602 """ 603 #params = [] 604 #for row in range(self._model_model.rowCount()): 605 # params.append(self._model_model.item(row).text()) 606 #return params 607 return [self._model_model.item(row).text() for row in range(self._model_model.rowCount())] 600 608 601 609 def modifyViewOnRow(self, row, font=None, brush=None):
Note: See TracChangeset
for help on using the changeset viewer.