Changeset 133812c7 in sasview for src/sas/qtgui/Utilities


Ignore:
Timestamp:
Nov 12, 2018 6:47:59 AM (5 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
e5ae812
Parents:
ebcdb02
git-author:
Piotr Rozyczko <piotr.rozyczko@…> (10/31/18 06:34:14)
git-committer:
Piotr Rozyczko <piotr.rozyczko@…> (11/12/18 06:47:59)
Message:

Merged ESS_GUI

Location:
src/sas/qtgui/Utilities
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Utilities/GenericReader.py

    re7a0b2f r133812c7  
    4141        try: 
    4242            data = self.loader.read(self.path) 
    43             self.complete(data=data) 
     43            self.complete(data=[data]) 
    4444        except: 
    4545            # Thread was interrupted, just proceed and re-raise. 
  • src/sas/qtgui/Utilities/GuiUtils.py

    r17e2d502 r133812c7  
    162162    DEFAULT_PERSPECTIVE = custom_config.DEFAULT_PERSPECTIVE 
    163163    CLEANUP_PLOT = custom_config.CLEANUP_PLOT 
     164    SAS_OPENCL = custom_config.SAS_OPENCL 
    164165    # custom open_path 
    165166    open_folder = custom_config.DEFAULT_OPEN_FOLDER 
     
    182183    CLEANUP_PLOT = False 
    183184    DEFAULT_OPEN_FOLDER = PATH_APP 
     185    SAS_OPENCL = config.SAS_OPENCL 
    184186 
    185187#DEFAULT_STYLE = config.DEFAULT_STYLE 
     
    294296    # Plot fitting results (FittingWidget->GuiManager) 
    295297    resultPlotUpdateSignal = QtCore.pyqtSignal(list) 
     298 
     299    # show the plot as a regular in-workspace object 
     300    forcePlotDisplaySignal = QtCore.pyqtSignal(list) 
    296301 
    297302def updateModelItemWithPlot(item, update_data, name="", checkbox_state=None): 
  • src/sas/qtgui/Utilities/ReportDialog.py

    rcb90b65 r133812c7  
    1010 
    1111import sas.qtgui.Utilities.GuiUtils as GuiUtils 
     12import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary 
    1213 
    1314from sas.qtgui.Utilities.UI.ReportDialogUI import Ui_ReportDialogUI 
     
    2728 
    2829        self.data_html, self.data_txt, self.data_images = report_list 
     30        #self.save_location = None 
     31        #if 'ReportDialog_directory' in ObjectLibrary.listObjects(): 
     32        self.save_location = ObjectLibrary.getObject('ReportDialog_directory') 
    2933 
    3034        # Fill in the table from input data 
     
    7074        """ 
    7175        # Choose user's home directory 
    72         location = os.path.expanduser('~') 
     76        if self.save_location is None: 
     77            location = os.path.expanduser('~') 
     78        else: 
     79            location = self.save_location 
    7380        # Use a sensible filename default 
    7481        default_name = os.path.join(location, 'fit_report.pdf') 
     
    7885            'caption'  : 'Save Report', 
    7986            # don't use 'directory' in order to remember the previous user choice 
    80             #'directory': default_name, 
     87            'directory': default_name, 
    8188            'filter'   : 'PDF file (*.pdf);;HTML file (*.html);;Text file (*.txt)', 
    8289            'options'  : QtWidgets.QFileDialog.DontUseNativeDialog} 
     
    8794            return 
    8895        extension = filename_tuple[1] 
     96        self.save_location = os.path.dirname(filename) 
     97        # lifetime of this widget is short - keep the reference elsewhere 
     98        ObjectLibrary.addObject('ReportDialog_directory', self.save_location) 
    8999 
    90100        try: 
Note: See TracChangeset for help on using the changeset viewer.