[676f137] | 1 | import os |
---|
| 2 | import sys |
---|
| 3 | |
---|
| 4 | import sas.qtgui.Utilities.GuiUtils as GuiUtils |
---|
| 5 | from PyQt5 import QtGui, QtCore, QtWidgets |
---|
| 6 | |
---|
| 7 | import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary |
---|
| 8 | |
---|
| 9 | from sas.qtgui.Perspectives.Fitting.UI.ConstraintWidgetUI import Ui_ConstraintWidgetUI |
---|
| 10 | |
---|
| 11 | class ConstraintWidget(QtWidgets.QWidget, Ui_ConstraintWidgetUI): |
---|
| 12 | """ |
---|
| 13 | Constraints Dialog to select the desired parameter/model constraints |
---|
| 14 | """ |
---|
| 15 | |
---|
| 16 | def __init__(self, parent=None): |
---|
| 17 | super(ConstraintWidget, self).__init__() |
---|
| 18 | self.parent = parent |
---|
| 19 | self.setupUi(self) |
---|
| 20 | self.currentType = "FitPage" |
---|
| 21 | |
---|
| 22 | # Set up signals/slots |
---|
| 23 | self.initializeSignals() |
---|
| 24 | |
---|
| 25 | # Create the list of tabs |
---|
| 26 | self.updateFitList() |
---|
| 27 | |
---|
| 28 | def initializeSignals(self): |
---|
| 29 | """ |
---|
| 30 | Set up signals/slots for this widget |
---|
| 31 | """ |
---|
| 32 | self.btnSingle.toggled.connect(self.onFitTypeChange) |
---|
| 33 | self.btnBatch.toggled.connect(self.onFitTypeChange) |
---|
| 34 | self.cbSeries.indexChanged.connect(self.onSpecialCaseChange) |
---|
| 35 | self.cmdFit.clicked.connect(self.onFit) |
---|
| 36 | self.cmdHelp.clicked.connect(self.onHelp) |
---|
| 37 | |
---|
| 38 | def onFitTypeChange(self, checked): |
---|
| 39 | """ |
---|
| 40 | Respond to the fit type change |
---|
| 41 | single fit/batch fit |
---|
| 42 | """ |
---|
| 43 | pass |
---|
| 44 | |
---|
| 45 | def onSpecialCaseChange(self, index): |
---|
| 46 | """ |
---|
| 47 | Respond to the combobox change for special case constraint sets |
---|
| 48 | """ |
---|
| 49 | pass |
---|
| 50 | |
---|
| 51 | def onFit(self): |
---|
| 52 | """ |
---|
| 53 | Perform the constrained/simultaneous fit |
---|
| 54 | """ |
---|
| 55 | pass |
---|
| 56 | |
---|
| 57 | def onHelp(self): |
---|
| 58 | """ |
---|
| 59 | Display the help page |
---|
| 60 | """ |
---|
| 61 | pass |
---|
| 62 | |
---|
| 63 | def updateFitList(self): |
---|
| 64 | """ |
---|
| 65 | Fill the list of model/data sets for fitting/constraining |
---|
| 66 | """ |
---|
| 67 | # look at the object library to find all fit tabs |
---|
| 68 | objects = ObjectLibrary.listObjects() |
---|
| 69 | if not objects: |
---|
| 70 | return |
---|
| 71 | tabs = [tab for tab in ObjectLibrary.listObjects() if self.currentType in tab] |
---|
| 72 | |
---|
| 73 | pass |
---|
| 74 | |
---|
| 75 | def updateConstraintList(self): |
---|
| 76 | """ |
---|
| 77 | Fill the list of constraints for the current selection of model/data sets |
---|
| 78 | """ |
---|
| 79 | pass |
---|
| 80 | |
---|
| 81 | |
---|