Ignore:
Timestamp:
Nov 7, 2016 5:50:04 AM (8 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:
49e124c
Parents:
ca8b853
Message:

Minor perspective related work

File:
1 edited

Legend:

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

    • Property mode changed from 100755 to 100644
    rd813cad8 r469b4622  
    1515 
    1616# local 
    17 from UI.TabbedInvariantUI import tabbedInvariantUI 
     17from UI.TabbedInvariantUI import Ui_tabbedInvariantUI 
    1818from InvariantDetails import DetailsDialog 
    1919from InvariantUtils import WIDGETS 
     
    3535        self._model.appendRow(item) 
    3636 
    37 class InvariantWindow(tabbedInvariantUI): 
     37class InvariantWindow(QtGui.QDialog, Ui_tabbedInvariantUI): 
    3838    # The controller which is responsible for managing signal slots connections 
    3939    # for the gui and providing an interface to the data model. 
    4040    def __init__(self, manager=None, parent=None): 
    4141        super(InvariantWindow, self).__init__(parent) 
     42        self.setupUi(self) 
     43 
    4244        self.setWindowTitle("Invariant Perspective") 
    4345 
     
    6971        self.communicate = GuiUtils.Communicate() 
    7072 
     73        self._data = None 
     74        self._path = "" 
     75 
    7176        # Mask file selector 
    7277        ################################################### 
    73         self._path = "cyl_400_20.txt" 
    74         from sas.sascalc.dataloader.loader import  Loader 
    75         loader = Loader() 
    76         try: 
    77             self._data = loader.load(self._path) 
    78         except: 
    79             raise 
     78        #self._path = "cyl_400_20.txt" 
     79        #from sas.sascalc.dataloader.loader import  Loader 
     80        #loader = Loader() 
     81        #try: 
     82        #    self._data = loader.load(self._path) 
     83        #except: 
     84        #    raise 
    8085        ################################################### 
    8186 
     
    422427 
    423428        # add Q parameters to the model 
    424         qmin = min(self._data.x) 
     429        #qmin = min(self._data.x) 
     430        qmin = 0.0 
    425431        item = QtGui.QStandardItem(str(qmin)) 
    426432        self.model.setItem(WIDGETS.W_QMIN, item) 
    427         item = QtGui.QStandardItem(str(max(self._data.x))) 
     433        qmax = 0.0 
     434        item = QtGui.QStandardItem(str(qmax)) 
    428435        self.model.setItem(WIDGETS.W_QMAX, item) 
    429436 
     
    523530        # Extract data on 1st child - this is the Data1D/2D component 
    524531        data = self._model_item.child(0).data().toPyObject() 
     532        self.model.item(WIDGETS.W_FILENAME).setData(QtCore.QVariant(self._model_item.text())) 
     533 
     534        ##### DEBUG #### 
     535        # set data in the debug tree view window 
     536        self.treeView.setModel(self.model) 
    525537 
    526538        self.calculate(data_list=[data]) 
Note: See TracChangeset for help on using the changeset viewer.