Changeset 3b3b40b in sasview for src/sas/qtgui/MainWindow


Ignore:
Timestamp:
Mar 21, 2018 4:17:04 AM (7 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:
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)
Message:

Merging feature branches

Location:
src/sas/qtgui/MainWindow
Files:
3 edited

Legend:

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

    re90988c r3b3b40b  
    476476        self.chkBatch.setEnabled(self.parent.perspective().allowBatch()) 
    477477 
    478     def displayData(self, data_list): 
     478    def displayFile(self, filename=None, is_data=True): 
    479479        """ 
    480480        Forces display of charts for the given filename 
    481481        """ 
    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 
    490483        # Now query the model item for available plots 
    491484        plots = GuiUtils.plotsFromFilename(filename, model) 
     
    506499        if new_plots: 
    507500            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) 
    508512 
    509513    def addDataPlot2D(self, plot_set, item): 
  • src/sas/qtgui/MainWindow/GuiManager.py

    r14ec91c5 r3b3b40b  
    1919 
    2020import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary 
     21from sas.qtgui.Utilities.TabbedModelEditor import TabbedModelEditor 
     22from sas.qtgui.Utilities.PluginManager import PluginManager 
    2123from sas.qtgui.MainWindow.UI.AcknowledgementsUI import Ui_Acknowledgements 
    2224from sas.qtgui.MainWindow.AboutBox import AboutBox 
     
    358360        self.communicate.updateTheoryFromPerspectiveSignal.connect(self.updateTheoryFromPerspective) 
    359361        self.communicate.plotRequestedSignal.connect(self.showPlot) 
     362        self.communicate.plotFromFilenameSignal.connect(self.showPlotFromFilename) 
    360363        self.communicate.updateModelFromDataOperationPanelSignal.connect(self.updateModelFromDataOperationPanel) 
    361364 
     
    406409        self._workspace.actionFit_Results.triggered.connect(self.actionFit_Results) 
    407410        self._workspace.actionChain_Fitting.triggered.connect(self.actionChain_Fitting) 
     411        self._workspace.actionAdd_Custom_Model.triggered.connect(self.actionAdd_Custom_Model) 
    408412        self._workspace.actionEdit_Custom_Model.triggered.connect(self.actionEdit_Custom_Model) 
     413        self._workspace.actionManage_Custom_Models.triggered.connect(self.actionManage_Custom_Models) 
    409414        # Window 
    410415        self._workspace.actionCascade.triggered.connect(self.actionCascade) 
     
    662667        pass 
    663668 
     669    def actionAdd_Custom_Model(self): 
     670        """ 
     671        """ 
     672        self.model_editor = TabbedModelEditor(self) 
     673        self.model_editor.show() 
     674 
    664675    def actionEdit_Custom_Model(self): 
    665676        """ 
    666677        """ 
    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() 
    669686 
    670687    #============ ANALYSIS ================= 
     
    779796        self.filesWidget.model.appendRow(new_item) 
    780797        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) 
    781805 
    782806    def showPlot(self, plot): 
  • src/sas/qtgui/MainWindow/UI/MainWindowUI.ui

    r1543f0c r3b3b40b  
    88    <y>0</y> 
    99    <width>915</width> 
    10     <height>527</height> 
     10    <height>762</height> 
    1111   </rect> 
    1212  </property> 
     
    2525     <y>0</y> 
    2626     <width>915</width> 
    27      <height>21</height> 
     27     <height>26</height> 
    2828    </rect> 
    2929   </property> 
     
    108108    <addaction name="actionChain_Fitting"/> 
    109109    <addaction name="separator"/> 
     110    <addaction name="actionAdd_Custom_Model"/> 
    110111    <addaction name="actionEdit_Custom_Model"/> 
     112    <addaction name="actionManage_Custom_Models"/> 
    111113   </widget> 
    112114   <widget class="QMenu" name="menuWindow"> 
     
    505507   </property> 
    506508  </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> 
    507519 </widget> 
    508520 <resources/> 
Note: See TracChangeset for help on using the changeset viewer.