Changeset 469b4622 in sasview for src/sas/qtgui/Perspectives/Invariant
- Timestamp:
- Nov 7, 2016 5:50:04 AM (8 years ago)
- 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
- Location:
- src/sas/qtgui/Perspectives/Invariant
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py
- Property mode changed from 100755 to 100644
rd813cad8 r469b4622 15 15 16 16 # local 17 from UI.TabbedInvariantUI import tabbedInvariantUI17 from UI.TabbedInvariantUI import Ui_tabbedInvariantUI 18 18 from InvariantDetails import DetailsDialog 19 19 from InvariantUtils import WIDGETS … … 35 35 self._model.appendRow(item) 36 36 37 class InvariantWindow( tabbedInvariantUI):37 class InvariantWindow(QtGui.QDialog, Ui_tabbedInvariantUI): 38 38 # The controller which is responsible for managing signal slots connections 39 39 # for the gui and providing an interface to the data model. 40 40 def __init__(self, manager=None, parent=None): 41 41 super(InvariantWindow, self).__init__(parent) 42 self.setupUi(self) 43 42 44 self.setWindowTitle("Invariant Perspective") 43 45 … … 69 71 self.communicate = GuiUtils.Communicate() 70 72 73 self._data = None 74 self._path = "" 75 71 76 # Mask file selector 72 77 ################################################### 73 self._path = "cyl_400_20.txt"74 from sas.sascalc.dataloader.loader import Loader75 loader = Loader()76 try:77 self._data = loader.load(self._path)78 except:79 raise78 #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 80 85 ################################################### 81 86 … … 422 427 423 428 # add Q parameters to the model 424 qmin = min(self._data.x) 429 #qmin = min(self._data.x) 430 qmin = 0.0 425 431 item = QtGui.QStandardItem(str(qmin)) 426 432 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)) 428 435 self.model.setItem(WIDGETS.W_QMAX, item) 429 436 … … 523 530 # Extract data on 1st child - this is the Data1D/2D component 524 531 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) 525 537 526 538 self.calculate(data_list=[data]) -
src/sas/qtgui/Perspectives/Invariant/UI/TabbedInvariantUI.py
- Property mode changed from 100755 to 100644
re540cd2 r469b4622 310 310 self.gridLayout_6.addWidget(self.groupBox_4, 1, 0, 1, 1) 311 311 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("")) 312 318 self.gridLayout_11.addWidget(self.tabWidget, 0, 0, 1, 1) 313 319 spacerItem = QtGui.QSpacerItem(20, 2, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) … … 384 390 self.label_19.setText(_translate("tabbedInvariantUI", "Power:", None)) 385 391 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)) 386 393 self.pushButton.setText(_translate("tabbedInvariantUI", "Calculate", None)) 387 394 self.pushButton_2.setText(_translate("tabbedInvariantUI", "Status", None)) 388 395 self.pushButton_3.setText(_translate("tabbedInvariantUI", "Help", None)) 389 396 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 569 569 </item> 570 570 </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> 571 586 </widget> 572 587 </widget>
Note: See TracChangeset
for help on using the changeset viewer.