Ignore:
Timestamp:
Jun 14, 2016 4:51:18 AM (8 years ago)
Author:
Piotr Rozyczko <piotr.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:
a281ab8
Parents:
488c49d
Message:

threaded file load, data object related fixes, more unit tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py

    rf721030 r5032ea68  
    1111from sas.sascalc.invariant import invariant 
    1212from sas.sasgui.guiframe.dataFitting import Data1D 
     13from sas.qtgui.GuiUtils import Communicate 
    1314 
    1415# local 
     
    4041    def __init__(self, manager=None, parent=None): 
    4142        super(InvariantWindow, self).__init__(parent) 
    42         # This controller contains the ui and doesn't inherit it directly! 
    43         # self.form = InvariantUI() 
    4443        self.setWindowTitle("Invariant Perspective") 
    4544        # initial input params 
     
    6564        self._high_power_value  = False 
    6665 
     66        self.communicate = Communicate() 
    6767 
    6868        # Mask file selector 
     
    9292        # Set up the mapper 
    9393        self.setupMapper() 
     94 
     95    def communicator(self): 
     96        """ 
     97        """ 
     98        return self.communicate 
    9499 
    95100    def updateFromModel(self): 
     
    142147            self.pushButton.setStyleSheet(self.style) 
    143148 
     149 
    144150    def plotResult(self, model): 
    145151        """ 
     
    154160        self.pushButton.setStyleSheet(self.style) 
    155161 
     162        # Send the new data to DE for keeping in the model 
     163        self.communicate.updateModelFromPerspectiveSignal.emit(self._data) 
     164 
    156165 
    157166    def calculateThread(self, extrapolation): 
    158167        """ 
     168        Perform Invariant calculations. 
     169 
     170        TODO: Create a dictionary of results to be sent to DE on completion. 
    159171        """ 
    160172        self.updateFromModel() 
     
    294306        return self.model 
    295307                 
     308    def title(self): 
     309        """ 
     310        Perspective name 
     311        """ 
     312        return "Invariant panel" 
    296313 
    297314    def status(self): 
     
    537554            #wx.PostEvent(self.parent, StatusEvent(status=msg, info='error')) 
    538555 
    539  
     556    def allowBatch(self): 
     557        """ 
     558        Tell the caller that we don't accept multiple data instances 
     559        """ 
     560        return False 
    540561 
    541562if __name__ == "__main__": 
Note: See TracChangeset for help on using the changeset viewer.