Ignore:
Timestamp:
Feb 28, 2017 9:50:42 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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:
68c96d3
Parents:
60af928
Message:

Multishell parameters support - prototype SASVIEW-346

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py

    r60af928 rf46f6dc  
    1616        self.parent = parent 
    1717        self._data = data 
    18  
    19         #r = raw_input("A") 
    20         #r = 1 
    2118 
    2219        # List of active fits 
     
    4037        # Deal with signals 
    4138        self.tabCloseRequested.connect(self.tabCloses) 
    42      
     39 
    4340        self.setWindowTitle('Fit panel - Active Fitting Optimizer: %s' % self.optimizer) 
    4441 
     
    5855        page_name = "FitPage" + str(self.maxIndex) 
    5956        return page_name 
    60          
     57 
    6158    def tabCloses(self, index): 
    6259        """ 
     
    7067        self.removeTab(index) 
    7168 
     69    def allowBatch(self): 
     70        """ 
     71        Tell the caller that we accept multiple data instances 
     72        """ 
     73        return True 
     74 
     75    def setData(self, data=None): 
     76        """ 
     77        Assign new dataset to the fitting instance 
     78        """ 
     79        assert(data is not None) 
     80 
     81        # find an unassigned tab. 
     82        # if none, open a new tab. 
     83        tab_to_send = None 
     84        for tab in self.tabs: 
     85            if tab.acceptsData(): 
     86                tab_to_send = tab 
     87                break 
     88        # send data 
     89        if tab_to_send is None: 
     90            self.addFit(data) 
     91        else: 
     92            tab_to_send.data = data 
     93        pass 
     94 
    7295if __name__ == "__main__": 
    7396    app = QtGui.QApplication([]) 
Note: See TracChangeset for help on using the changeset viewer.