Changeset 1942f63 in sasview for src


Ignore:
Timestamp:
Nov 6, 2018 7:38:02 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:
5584dee
Parents:
b9ab979
git-author:
Piotr Rozyczko <piotr.rozyczko@…> (10/20/18 17:16:40)
git-committer:
Piotr Rozyczko <piotr.rozyczko@…> (11/06/18 07:38:02)
Message:

Merged ESS_GUI_image_viewer

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

Legend:

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

    rb9ab979 r1942f63  
    100100        self.communicator.changeDataExplorerTabSignal.connect(self.changeTabs) 
    101101        self.communicator.forcePlotDisplaySignal.connect(self.displayData) 
     102        self.communicator.updateModelFromPerspectiveSignal.connect(self.updateModelFromPerspective) 
    102103 
    103104        self.cbgraph.editTextChanged.connect(self.enableGraphCombo) 
     
    369370        Send selected item data to the current perspective and set the relevant notifiers 
    370371        """ 
    371         # Set the signal handlers 
    372         self.communicator.updateModelFromPerspectiveSignal.connect(self.updateModelFromPerspective) 
    373  
    374372        def isItemReady(index): 
    375373            item = self.model.item(index) 
     
    14431441            raise AttributeError(msg) 
    14441442 
    1445         # TODO: Assert other properties 
    1446  
    1447         # Reset the view 
    1448         ##self.model.reset() 
    1449         # Pass acting as a debugger anchor 
     1443        # send in the new item 
     1444        self.model.appendRow(model_item) 
    14501445        pass 
    14511446 
  • src/sas/qtgui/MainWindow/GuiManager.py

    r0c83303 r1942f63  
    5151 
    5252from sas.qtgui.Utilities.AddMultEditor import AddMultEditor 
     53from sas.qtgui.Utilities.ImageViewer import ImageViewer 
    5354 
    5455logger = logging.getLogger(__name__) 
     
    458459        self._workspace.actionReset.setVisible(False) 
    459460        self._workspace.actionStartup_Settings.setVisible(False) 
    460         self._workspace.actionImage_Viewer.setVisible(False) 
     461        #self._workspace.actionImage_Viewer.setVisible(False) 
    461462        self._workspace.actionCombine_Batch_Fit.setVisible(False) 
    462463        # orientation viewer set to invisible SASVIEW-1132 
     
    781782        """ 
    782783        """ 
    783         print("actionImage_Viewer TRIGGERED") 
    784         pass 
     784        try: 
     785            self.image_viewer = ImageViewer(self) 
     786            if sys.platform == "darwin": 
     787                self.image_viewer.menubar.setNativeMenuBar(False) 
     788            self.image_viewer.show() 
     789        except Exception as ex: 
     790            logging.error(str(ex)) 
     791            return 
    785792 
    786793    #============ FITTING ================= 
  • src/sas/qtgui/Plotting/Plotter2D.py

    rb9ab979 r1942f63  
    513513            self.figure.canvas.draw() 
    514514 
     515    def imageShow(self, img, origin=None): 
     516        """ 
     517        Show background image 
     518        :Param img: [imread(path) from matplotlib.pyplot] 
     519        """ 
     520        if origin is not None: 
     521            im = self.ax.imshow(img, origin=origin) 
     522        else: 
     523            im = self.ax.imshow(img) 
     524 
    515525    def update(self): 
    516526        self.figure.canvas.draw() 
Note: See TracChangeset for help on using the changeset viewer.