Changeset 3b3b40b in sasview for src/sas/qtgui/MainWindow
- Timestamp:
- Mar 21, 2018 4:17:04 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:
- 8b480d27
- Parents:
- e4c475b7
- git-author:
- Piotr Rozyczko <rozyczko@…> (02/08/18 04:19:04)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (03/21/18 04:17:04)
- Location:
- src/sas/qtgui/MainWindow
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
re90988c r3b3b40b 476 476 self.chkBatch.setEnabled(self.parent.perspective().allowBatch()) 477 477 478 def display Data(self, data_list):478 def displayFile(self, filename=None, is_data=True): 479 479 """ 480 480 Forces display of charts for the given filename 481 481 """ 482 plot_to_show = data_list[0] 483 484 # passed plot is used ONLY to figure out its title, 485 # so all the charts related by it can be pulled from 486 # the data explorer indices. 487 filename = plot_to_show.filename 488 model = self.model if plot_to_show.is_data else self.theory_model 489 482 model = self.model if is_data else self.theory_model 490 483 # Now query the model item for available plots 491 484 plots = GuiUtils.plotsFromFilename(filename, model) … … 506 499 if new_plots: 507 500 self.plotData(new_plots) 501 502 def displayData(self, data_list): 503 """ 504 Forces display of charts for the given data set 505 """ 506 plot_to_show = data_list[0] 507 # passed plot is used ONLY to figure out its title, 508 # so all the charts related by it can be pulled from 509 # the data explorer indices. 510 filename = plot_to_show.filename 511 self.displayFile(filename=filename, is_data=plot_to_show.is_data) 508 512 509 513 def addDataPlot2D(self, plot_set, item): -
src/sas/qtgui/MainWindow/GuiManager.py
r14ec91c5 r3b3b40b 19 19 20 20 import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary 21 from sas.qtgui.Utilities.TabbedModelEditor import TabbedModelEditor 22 from sas.qtgui.Utilities.PluginManager import PluginManager 21 23 from sas.qtgui.MainWindow.UI.AcknowledgementsUI import Ui_Acknowledgements 22 24 from sas.qtgui.MainWindow.AboutBox import AboutBox … … 358 360 self.communicate.updateTheoryFromPerspectiveSignal.connect(self.updateTheoryFromPerspective) 359 361 self.communicate.plotRequestedSignal.connect(self.showPlot) 362 self.communicate.plotFromFilenameSignal.connect(self.showPlotFromFilename) 360 363 self.communicate.updateModelFromDataOperationPanelSignal.connect(self.updateModelFromDataOperationPanel) 361 364 … … 406 409 self._workspace.actionFit_Results.triggered.connect(self.actionFit_Results) 407 410 self._workspace.actionChain_Fitting.triggered.connect(self.actionChain_Fitting) 411 self._workspace.actionAdd_Custom_Model.triggered.connect(self.actionAdd_Custom_Model) 408 412 self._workspace.actionEdit_Custom_Model.triggered.connect(self.actionEdit_Custom_Model) 413 self._workspace.actionManage_Custom_Models.triggered.connect(self.actionManage_Custom_Models) 409 414 # Window 410 415 self._workspace.actionCascade.triggered.connect(self.actionCascade) … … 662 667 pass 663 668 669 def actionAdd_Custom_Model(self): 670 """ 671 """ 672 self.model_editor = TabbedModelEditor(self) 673 self.model_editor.show() 674 664 675 def actionEdit_Custom_Model(self): 665 676 """ 666 677 """ 667 print("actionEdit_Custom_Model TRIGGERED") 668 pass 678 self.model_editor = TabbedModelEditor(self, edit_only=True) 679 self.model_editor.show() 680 681 def actionManage_Custom_Models(self): 682 """ 683 """ 684 self.model_manager = PluginManager(self) 685 self.model_manager.show() 669 686 670 687 #============ ANALYSIS ================= … … 779 796 self.filesWidget.model.appendRow(new_item) 780 797 self._data_manager.add_data(new_datalist_item) 798 799 def showPlotFromFilename(self, filename): 800 """ 801 Pass the show plot request to the data explorer 802 """ 803 if hasattr(self, "filesWidget"): 804 self.filesWidget.displayFile(filename=filename, is_data=True) 781 805 782 806 def showPlot(self, plot): -
src/sas/qtgui/MainWindow/UI/MainWindowUI.ui
r1543f0c r3b3b40b 8 8 <y>0</y> 9 9 <width>915</width> 10 <height> 527</height>10 <height>762</height> 11 11 </rect> 12 12 </property> … … 25 25 <y>0</y> 26 26 <width>915</width> 27 <height>2 1</height>27 <height>26</height> 28 28 </rect> 29 29 </property> … … 108 108 <addaction name="actionChain_Fitting"/> 109 109 <addaction name="separator"/> 110 <addaction name="actionAdd_Custom_Model"/> 110 111 <addaction name="actionEdit_Custom_Model"/> 112 <addaction name="actionManage_Custom_Models"/> 111 113 </widget> 112 114 <widget class="QMenu" name="menuWindow"> … … 505 507 </property> 506 508 </action> 509 <action name="actionAdd_Custom_Model"> 510 <property name="text"> 511 <string>Add Custom Model</string> 512 </property> 513 </action> 514 <action name="actionManage_Custom_Models"> 515 <property name="text"> 516 <string>Manage Custom Models</string> 517 </property> 518 </action> 507 519 </widget> 508 520 <resources/>
Note: See TracChangeset
for help on using the changeset viewer.