Changeset 8ac3551 in sasview
- Timestamp:
- Mar 21, 2018 10:26:17 AM (7 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:
- 3790f7f, fca1f50
- Parents:
- 8b480d27
- Location:
- src/sas/qtgui/MainWindow
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
r3b3b40b r8ac3551 473 473 Notify the gui manager about the new perspective chosen. 474 474 """ 475 self.communicator.perspectiveChangedSignal.emit(self.cbFitting. currentText())475 self.communicator.perspectiveChangedSignal.emit(self.cbFitting.itemText(index)) 476 476 self.chkBatch.setEnabled(self.parent.perspective().allowBatch()) 477 477 … … 1031 1031 pass 1032 1032 1033 def onAnalysisUpdate(self, new_perspective=""): 1034 """ 1035 Update the perspective combo index based on passed string 1036 """ 1037 assert new_perspective in Perspectives.PERSPECTIVES.keys() 1038 self.cbFitting.blockSignals(True) 1039 self.cbFitting.setCurrentIndex(self.cbFitting.findText(new_perspective)) 1040 self.cbFitting.blockSignals(False) 1041 pass 1042 1033 1043 def loadComplete(self, output): 1034 1044 """ -
src/sas/qtgui/MainWindow/GuiManager.py
r3b3b40b r8ac3551 49 49 Main SasView window functionality 50 50 """ 51 52 51 def __init__(self, parent=None): 53 52 """ … … 184 183 Respond to change of the perspective signal 185 184 """ 186 187 # Save users from themselves...188 #if isinstance(self._current_perspective, Perspectives.PERSPECTIVES[str(perspective_name)]):189 self.setupPerspectiveMenubarOptions(self._current_perspective)190 # return191 192 185 # Close the previous perspective 193 186 self.clearPerspectiveMenubarOptions(self._current_perspective) … … 199 192 # Default perspective 200 193 self._current_perspective = Perspectives.PERSPECTIVES[str(perspective_name)](parent=self) 194 195 self.setupPerspectiveMenubarOptions(self._current_perspective) 201 196 202 197 subwindow = self._workspace.workspace.addSubWindow(self._current_perspective) … … 422 417 self._workspace.actionInversion.triggered.connect(self.actionInversion) 423 418 self._workspace.actionInvariant.triggered.connect(self.actionInvariant) 419 self._workspace.actionCorfunc.triggered.connect(self.actionCorfunc) 424 420 # Help 425 421 self._workspace.actionDocumentation.triggered.connect(self.actionDocumentation) … … 691 687 """ 692 688 self.perspectiveChanged("Fitting") 689 # Notify other widgets 690 self.filesWidget.onAnalysisUpdate("Fitting") 693 691 694 692 def actionInversion(self): … … 696 694 Change to the Inversion perspective 697 695 """ 698 # For now we'll just update the analysis menu status but when the inversion is implemented delete from here699 self.checkAnalysisOption(self._workspace.actionInversion)700 # to here and uncomment the following line701 696 self.perspectiveChanged("Inversion") 697 self.filesWidget.onAnalysisUpdate("Inversion") 702 698 703 699 def actionInvariant(self): … … 706 702 """ 707 703 self.perspectiveChanged("Invariant") 704 self.filesWidget.onAnalysisUpdate("Invariant") 705 706 def actionCorfunc(self): 707 """ 708 Change to the Corfunc perspective 709 """ 710 self.perspectiveChanged("Corfunc") 711 self.filesWidget.onAnalysisUpdate("Corfunc") 708 712 709 713 #============ WINDOW ================= … … 852 856 elif isinstance(perspective, Perspectives.PERSPECTIVES["Invariant"]): 853 857 self.checkAnalysisOption(self._workspace.actionInvariant) 854 # elif isinstance(perspective, Perspectives.PERSPECTIVES["Inversion"]): 855 # self.checkAnalysisOption(self._workspace.actionInversion) 858 elif isinstance(perspective, Perspectives.PERSPECTIVES["Inversion"]): 859 self.checkAnalysisOption(self._workspace.actionInversion) 860 elif isinstance(perspective, Perspectives.PERSPECTIVES["Corfunc"]): 861 self.checkAnalysisOption(self._workspace.actionCorfunc) -
src/sas/qtgui/MainWindow/MainWindow.py
r8353d90 r8ac3551 30 30 except Exception as ex: 31 31 import logging 32 logging.error("Application failed with: " , ex)32 logging.error("Application failed with: " + str(ex)) 33 33 print("Application failed with: ", ex) 34 34 -
src/sas/qtgui/MainWindow/UI/MainWindowUI.ui
r3b3b40b r8ac3551 128 128 <string>Analysis</string> 129 129 </property> 130 <addaction name="actionCorfunc"/> 130 131 <addaction name="actionFitting"/> 132 <addaction name="actionInvariant"/> 131 133 <addaction name="actionInversion"/> 132 <addaction name="actionInvariant"/>133 134 </widget> 134 135 <widget class="QMenu" name="menuHelp"> … … 517 518 </property> 518 519 </action> 520 <action name="actionCorfunc"> 521 <property name="checkable"> 522 <bool>true</bool> 523 </property> 524 <property name="text"> 525 <string>Correlation Function</string> 526 </property> 527 </action> 519 528 </widget> 520 529 <resources/>
Note: See TracChangeset
for help on using the changeset viewer.