Changeset 416fa8f in sasview


Ignore:
Timestamp:
Dec 7, 2016 8:17:38 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:
cad617b
Parents:
64f1e93
Message:

Initial implementation of the mask editor.
Refactored plotter base to QDialog and reimplemented as local widgets.
Fixed some unit tests.

Location:
src/sas/qtgui
Files:
2 added
8 edited

Legend:

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

    r55d89f8 r416fa8f  
    2323from sas.qtgui.Plotter2D import Plotter2D 
    2424from sas.qtgui.DroppableDataLoadWidget import DroppableDataLoadWidget 
     25from sas.qtgui.MaskEditor import MaskEditor 
    2526 
    2627class DataExplorerWindow(DroppableDataLoadWidget): 
     
    801802        """ 
    802803        """ 
    803         print "showEditDataMask" 
    804         pass 
     804        index = self.treeView.selectedIndexes()[0] 
     805        model_item = self.model.itemFromIndex(self.data_proxy.mapToSource(index)) 
     806        data = GuiUtils.dataFromItem(model_item) 
     807 
     808        mask_editor = MaskEditor(self, data) 
     809 
     810        mask_editor.exec_() 
    805811 
    806812    def loadComplete(self, output): 
  • src/sas/qtgui/Plotter.py

    r6d05e1d r416fa8f  
    77from sas.qtgui.PlotterBase import PlotterBase 
    88 
    9 class Plotter(PlotterBase): 
    10     def __init__(self, parent=None, quickplot=False): 
    11         super(Plotter, self).__init__(parent, quickplot=quickplot) 
     9class PlotterWidget(PlotterBase): 
     10    def __init__(self, parent=None, manager=None, quickplot=False): 
     11        super(PlotterWidget, self).__init__(parent, manager=manager, quickplot=quickplot) 
    1212 
    1313    @property 
     
    199199        # Plot the updated chart 
    200200        self.plot(marker='o', linestyle='') 
     201 
     202 
     203class Plotter(QtGui.QDialog, PlotterWidget): 
     204    def __init__(self, parent=None, quickplot=False): 
     205 
     206        QtGui.QDialog.__init__(self) 
     207        PlotterWidget.__init__(self, manager=parent, quickplot=quickplot) 
     208 
  • src/sas/qtgui/Plotter2D.py

    r64f1e93 r416fa8f  
    1111from mpl_toolkits.mplot3d import Axes3D 
    1212 
    13 class Plotter2D(PlotterBase): 
    14     def __init__(self, parent=None, quickplot=False, dimension=2): 
     13class Plotter2DWidget(PlotterBase): 
     14    def __init__(self, parent=None, manager=None, quickplot=False, dimension=2): 
    1515        self.dimension = dimension 
    16         super(Plotter2D, self).__init__(parent, quickplot=quickplot) 
     16        super(Plotter2DWidget, self).__init__(parent, manager=manager, quickplot=quickplot) 
    1717 
    1818    @property 
     
    189189        else: 
    190190            self.figure.canvas.draw() 
     191 
     192class Plotter2D(QtGui.QDialog, Plotter2DWidget): 
     193    def __init__(self, parent=None, quickplot=False, dimension=2): 
     194 
     195        QtGui.QDialog.__init__(self) 
     196        Plotter2DWidget.__init__(self, manager=parent, quickplot=quickplot, dimension=2) 
  • src/sas/qtgui/PlotterBase.py

    r64f1e93 r416fa8f  
    1717import sas.qtgui.PlotHelper as PlotHelper 
    1818 
    19 class PlotterBase(QtGui.QDialog): 
    20     def __init__(self, parent=None, quickplot=False): 
     19class PlotterBase(QtGui.QWidget): 
     20    def __init__(self, parent=None, manager=None, quickplot=False): 
    2121        super(PlotterBase, self).__init__(parent) 
    2222 
    2323        # Required for the communicator 
    24         self.parent = parent 
     24        self.manager = manager 
    2525        self.quickplot = quickplot 
    2626 
     
    7171            self.contextMenu() 
    7272            # Notify the listeners 
    73             self.parent.communicator.activeGraphsSignal.emit(PlotHelper.currentPlots()) 
     73            self.manager.communicator.activeGraphsSignal.emit(PlotHelper.currentPlots()) 
    7474        else: 
    7575            self.contextMenuQuickPlot() 
     
    181181        PlotHelper.deletePlot(PlotHelper.idOfPlot(self)) 
    182182        # Notify the listeners 
    183         self.parent.communicator.activeGraphsSignal.emit(PlotHelper.currentPlots()) 
     183        self.manager.communicator.activeGraphsSignal.emit(PlotHelper.currentPlots()) 
    184184        event.accept() 
    185185 
  • src/sas/qtgui/UnitTesting/DensityCalculatorTest.py

    • Property mode changed from 100755 to 100644
    r31c5b58 r416fa8f  
    99 
    1010####### TEMP 
    11 import LocalSetup 
     11import path_prepare 
    1212####### 
    1313 
  • src/sas/qtgui/UnitTesting/Plotter2DTest.py

    r64f1e93 r416fa8f  
    99 
    1010####### TEMP 
    11 import LocalSetup 
     11import path_prepare 
    1212####### 
    1313from sas.sasgui.guiframe.dataFitting import Data1D 
  • src/sas/qtgui/UnitTesting/PlotterTest.py

    r64f1e93 r416fa8f  
    88 
    99####### TEMP 
    10 import LocalSetup 
     10import path_prepare 
    1111####### 
    1212from sas.sasgui.guiframe.dataFitting import Data1D 
  • src/sas/qtgui/UnitTesting/SLDCalculatorTest.py

    re4676c8 r416fa8f  
    99 
    1010####### TEMP 
    11 import LocalSetup 
     11import path_prepare 
    1212####### 
    1313 
Note: See TracChangeset for help on using the changeset viewer.