source: sasview/src/sas/qtgui/Perspectives/Fitting/ConstraintWidget.py @ 676f137

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change on this file since 676f137 was 676f137, checked in by Piotr Rozyczko <rozyczko@…>, 6 years ago

Initial version of the C&S widget

  • Property mode set to 100755
File size: 2.1 KB
Line 
1import os
2import sys
3
4import sas.qtgui.Utilities.GuiUtils as GuiUtils
5from PyQt5 import QtGui, QtCore, QtWidgets
6
7import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary
8
9from sas.qtgui.Perspectives.Fitting.UI.ConstraintWidgetUI import Ui_ConstraintWidgetUI
10
11class 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
Note: See TracBrowser for help on using the repository browser.