Changeset 39551a68 in sasview for src/sas/qtgui/DataExplorer.py


Ignore:
Timestamp:
Aug 1, 2016 7:47:16 AM (8 years ago)
Author:
Piotr Rozyczko <piotr.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:
1af348e
Parents:
28a84e9
Message:

More context menu functionality + tests

File:
1 edited

Legend:

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

    r28a84e9 r39551a68  
    689689    def quickDataPlot(self): 
    690690        """ 
    691         """ 
    692         print "quickDataPlot" 
    693         pass 
     691        Frozen plot - display an image of the plot 
     692        """ 
     693        index = self.treeView.selectedIndexes()[0] 
     694        model_item = self.model.itemFromIndex(self.data_proxy.mapToSource(index)) 
     695        data = model_item.child(0).data().toPyObject() 
     696 
     697        dimension = 1 if isinstance(data, Data1D) else 2 
     698 
     699        # TODO: Replace this with the proper MaskPlotPanel from plottools 
     700        new_plot = Plotter(self) 
     701        new_plot.data(data) 
     702        new_plot.plot(marker='o', linestyle='') 
     703 
     704        # Update the global plot counter 
     705        title = "Plot " + data.name 
     706        new_plot.setWindowTitle(title) 
     707 
     708        # Show the plot 
     709        new_plot.show() 
    694710 
    695711    def quickData3DPlot(self): 
Note: See TracChangeset for help on using the changeset viewer.