Changeset 469b4622 in sasview for src/sas


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

Location:
src/sas/qtgui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/DataExplorer.py

    rca8b853 r469b4622  
    311311            return 
    312312 
    313         # Dig up the item 
    314         data = selected_items 
    315  
    316313        # TODO 
    317314        # New plot or appended? 
    318315 
    319316        # Notify the GuiManager about the send request 
    320         self._perspective.setData(data_item=data) 
     317        self._perspective.setData(data_item=selected_items) 
    321318 
    322319    def freezeTheory(self, event): 
  • 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]) 
  • src/sas/qtgui/Perspectives/Invariant/UI/TabbedInvariantUI.py

    • Property mode changed from 100755 to 100644
    re540cd2 r469b4622  
    310310        self.gridLayout_6.addWidget(self.groupBox_4, 1, 0, 1, 1) 
    311311        self.tabWidget.addTab(self.tabOptions, _fromUtf8("")) 
     312        self.tab = QtGui.QWidget() 
     313        self.tab.setObjectName(_fromUtf8("tab")) 
     314        self.treeView = QtGui.QTreeView(self.tab) 
     315        self.treeView.setGeometry(QtCore.QRect(5, 11, 431, 311)) 
     316        self.treeView.setObjectName(_fromUtf8("treeView")) 
     317        self.tabWidget.addTab(self.tab, _fromUtf8("")) 
    312318        self.gridLayout_11.addWidget(self.tabWidget, 0, 0, 1, 1) 
    313319        spacerItem = QtGui.QSpacerItem(20, 2, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) 
     
    384390        self.label_19.setText(_translate("tabbedInvariantUI", "Power:", None)) 
    385391        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabOptions), _translate("tabbedInvariantUI", "Options", None)) 
     392        self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("tabbedInvariantUI", "View on model", None)) 
    386393        self.pushButton.setText(_translate("tabbedInvariantUI", "Calculate", None)) 
    387394        self.pushButton_2.setText(_translate("tabbedInvariantUI", "Status", None)) 
    388395        self.pushButton_3.setText(_translate("tabbedInvariantUI", "Help", None)) 
    389396 
    390  
    391 class tabbedInvariantUI(QtGui.QDialog, Ui_tabbedInvariantUI): 
    392     def __init__(self, parent=None, f=QtCore.Qt.WindowFlags()): 
    393         QtGui.QDialog.__init__(self, parent, f) 
    394  
    395         self.setupUi(self) 
    396  
  • src/sas/qtgui/Perspectives/Invariant/UI/TabbedInvariantUI.ui

    re540cd2 r469b4622  
    569569       </item> 
    570570      </layout> 
     571     </widget> 
     572     <widget class="QWidget" name="tab"> 
     573      <attribute name="title"> 
     574       <string>View on model</string> 
     575      </attribute> 
     576      <widget class="QTreeView" name="treeView"> 
     577       <property name="geometry"> 
     578        <rect> 
     579         <x>5</x> 
     580         <y>11</y> 
     581         <width>431</width> 
     582         <height>311</height> 
     583        </rect> 
     584       </property> 
     585      </widget> 
    571586     </widget> 
    572587    </widget> 
Note: See TracChangeset for help on using the changeset viewer.