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


Ignore:
Timestamp:
Oct 26, 2018 6:44:15 AM (6 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:
b1b71ad
Parents:
a3c59503 (diff), 75906a1 (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' into ESS_GUI_project_save

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

Legend:

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

    ra3c59503 rd00475d  
    14701470        self.manager.update_stored_data(deleted_names) 
    14711471 
     1472    def closeAllPlots(self): 
     1473        """ 
     1474        Close all currently displayed plots 
     1475        """ 
     1476 
     1477        for plot_id in PlotHelper.currentPlots(): 
     1478            try: 
     1479                plotter = PlotHelper.plotById(plot_id) 
     1480                plotter.close() 
     1481                self.plot_widgets[plot_id].close() 
     1482                self.plot_widgets.pop(plot_id, None) 
     1483            except AttributeError as ex: 
     1484                logging.error("Closing of %s failed:\n %s" % (plot_id, str(ex))) 
     1485 
    14721486    def closePlotsForItem(self, item): 
    14731487        """ 
  • src/sas/qtgui/MainWindow/GuiManager.py

    ra3c59503 rd00475d  
    2424from sas.qtgui.Utilities.PluginManager import PluginManager 
    2525from sas.qtgui.Utilities.GridPanel import BatchOutputPanel 
     26from sas.qtgui.Utilities.ResultPanel import ResultPanel 
    2627 
    2728from sas.qtgui.Utilities.ReportDialog import ReportDialog 
     
    147148        self.aboutWidget = AboutBox() 
    148149        self.categoryManagerWidget = CategoryManager(self._parent, manager=self) 
     150 
    149151        self.grid_window = None 
    150152        self.grid_window = BatchOutputPanel(parent=self) 
     
    154156        self.grid_subwindow.setVisible(False) 
    155157        self.grid_window.windowClosedSignal.connect(lambda: self.grid_subwindow.setVisible(False)) 
     158 
     159        self.results_panel = ResultPanel(parent=self._parent, manager=self) 
     160        self.results_frame = self._workspace.workspace.addSubWindow(self.results_panel) 
     161        self.results_frame.setVisible(False) 
     162        self.results_panel.windowClosedSignal.connect(lambda: self.results_frame.setVisible(False)) 
    156163 
    157164        self._workspace.toolBar.setVisible(LocalConfig.TOOLBAR_SHOW) 
     
    443450        """ 
    444451        # disable not yet fully implemented actions 
    445         #self._workspace.actionOpen_Analysis.setVisible(False) 
    446452        self._workspace.actionUndo.setVisible(False) 
    447453        self._workspace.actionRedo.setVisible(False) 
     
    450456        self._workspace.actionImage_Viewer.setVisible(False) 
    451457        self._workspace.actionCombine_Batch_Fit.setVisible(False) 
    452         self._workspace.actionFit_Results.setVisible(False) 
    453458        # orientation viewer set to invisible SASVIEW-1132 
    454459        self._workspace.actionOrientation_Viewer.setVisible(False) 
     
    510515        self._workspace.actionNext.triggered.connect(self.actionNext) 
    511516        self._workspace.actionPrevious.triggered.connect(self.actionPrevious) 
     517        self._workspace.actionClosePlots.triggered.connect(self.actionClosePlots) 
    512518        # Analysis 
    513519        self._workspace.actionFitting.triggered.connect(self.actionFitting) 
     
    524530 
    525531        self.communicate.sendDataToGridSignal.connect(self.showBatchOutput) 
     532        self.communicate.resultPlotUpdateSignal.connect(self.showFitResults) 
    526533 
    527534    #============ FILE ================= 
     
    853860        """ 
    854861        """ 
    855         print("actionFit_Results TRIGGERED") 
    856         pass 
     862        self.showFitResults(None) 
     863 
     864    def showFitResults(self, output_data): 
     865        """ 
     866        Show bumps convergence plots 
     867        """ 
     868        self.results_frame.setVisible(True) 
     869        if output_data: 
     870            self.results_panel.onPlotResults(output_data) 
    857871 
    858872    def actionAdd_Custom_Model(self): 
     
    945959        """ 
    946960        self._workspace.workspace.activatePreviousSubWindow() 
     961 
     962    def actionClosePlots(self): 
     963        """ 
     964        Closes all Plotters and Plotter2Ds. 
     965        """ 
     966        self.filesWidget.closeAllPlots() 
     967        pass 
    947968 
    948969    #============ HELP ================= 
  • src/sas/qtgui/MainWindow/MainWindow.py

    rb14db78 r33812c3  
    66from PyQt5.QtWidgets import QApplication 
    77from PyQt5.QtGui import QPixmap 
     8from PyQt5.QtCore import Qt 
    89import os 
    910import sys 
     
    5859    splash = SplashScreen() 
    5960    splash.show() 
    60  
     61    app.setAttribute(Qt.AA_EnableHighDpiScaling) 
    6162    # fix for pyinstaller packages app to avoid ReactorAlreadyInstalledError 
    6263    import sys 
  • src/sas/qtgui/MainWindow/UI/MainWindowUI.ui

    refaf022 r6bc0840  
    2525     <y>0</y> 
    2626     <width>915</width> 
    27      <height>21</height> 
     27     <height>26</height> 
    2828    </rect> 
    2929   </property> 
     
    128128    <addaction name="actionPrevious"/> 
    129129    <addaction name="separator"/> 
     130    <addaction name="actionClosePlots"/> 
    130131   </widget> 
    131132   <widget class="QMenu" name="menuAnalysis"> 
     
    571572   </property> 
    572573  </action> 
     574  <action name="actionClosePlots"> 
     575   <property name="text"> 
     576    <string>Close All Plots</string> 
     577   </property> 
     578  </action> 
    573579 </widget> 
    574580 <resources/> 
  • src/sas/qtgui/MainWindow/DataManager.py

    re2e5f3d r345b3b3  
    2929from sas.qtgui.Plotting.PlotterData import Data1D 
    3030from sas.qtgui.Plotting.PlotterData import Data2D 
    31 from sas.qtgui.Plotting.Plottables import Plottable 
    3231from sas.qtgui.Plotting.Plottables import PlottableTheory1D 
    3332from sas.qtgui.Plotting.Plottables import PlottableFit1D 
Note: See TracChangeset for help on using the changeset viewer.