Changeset b10cf92 in sasview for src/sas/qtgui/MainWindow


Ignore:
Timestamp:
May 17, 2018 3:49:28 PM (7 years ago)
Author:
wojciech
Branches:
ESS_GUI, 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:
3aa3351, a0ed202
Parents:
6459916 (diff), 57be490 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'ESS_GUI' of https://github.com/SasView/sasview into ESS_GUI

File:
1 edited

Legend:

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

    rfa05c6c1 r57be490  
    2323from sas.qtgui.Utilities.GridPanel import BatchOutputPanel 
    2424 
     25from sas.qtgui.Utilities.ReportDialog import ReportDialog 
    2526from sas.qtgui.MainWindow.UI.AcknowledgementsUI import Ui_Acknowledgements 
    2627from sas.qtgui.MainWindow.AboutBox import AboutBox 
     
    6566        # Add signal callbacks 
    6667        self.addCallbacks() 
     68 
     69        # Assure model categories are available 
     70        self.addCategories() 
    6771 
    6872        # Create the data manager 
     
    142146        self.ResolutionCalculator = ResolutionCalculatorPanel(self) 
    143147        self.DataOperation = DataOperationUtilityPanel(self) 
     148 
     149    def addCategories(self): 
     150        """ 
     151        Make sure categories.json exists and if not compile it and install in ~/.sasview 
     152        """ 
     153        try: 
     154            from sas.sascalc.fit.models import ModelManager 
     155            from sas.qtgui.Utilities.CategoryInstaller import CategoryInstaller 
     156            model_list = ModelManager().cat_model_list() 
     157            CategoryInstaller.check_install(model_list=model_list) 
     158        except Exception: 
     159            logger.error("%s: could not load SasView models") 
     160            logger.error(traceback.format_exc()) 
    144161 
    145162    def statusBarSetup(self): 
     
    472489    def actionSave_Analysis(self): 
    473490        """ 
    474         """ 
    475         print("actionSave_Analysis TRIGGERED") 
    476  
    477         pass 
     491        Menu File/Save Analysis 
     492        """ 
     493        self.communicate.saveAnalysisSignal.emit() 
    478494 
    479495    def actionQuit(self): 
     
    510526    def actionReport(self): 
    511527        """ 
    512         """ 
    513         print("actionReport TRIGGERED") 
    514         pass 
     528        Show the Fit Report dialog. 
     529        """ 
     530        report_list = None 
     531        if getattr(self._current_perspective, "currentTab"): 
     532            try: 
     533                report_list = self._current_perspective.currentTab.getReport() 
     534            except Exception as ex: 
     535                logging.error("Report generation failed with: " + str(ex)) 
     536 
     537        if report_list is not None: 
     538            self.report_dialog = ReportDialog(parent=self, report_list=report_list) 
     539            self.report_dialog.show() 
    515540 
    516541    def actionReset(self): 
Note: See TracChangeset for help on using the changeset viewer.