Changeset 1042dba in sasview for src/sas/qtgui/Perspectives


Ignore:
Timestamp:
Jun 17, 2016 9:56:01 AM (9 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:
9e426c1
Parents:
a281ab8
Message:

Plottables support in the data object. Additional menu items.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py

    ra281ab8 r1042dba  
    77 
    88from twisted.internet import threads 
     9from twisted.internet import reactor 
    910 
    1011# sas-global 
    1112from sas.sascalc.invariant import invariant 
    1213from sas.sasgui.guiframe.dataFitting import Data1D 
    13 from sas.qtgui.GuiUtils import Communicate 
    14 from sas.qtgui.GuiUtils import updateModelItem 
     14# from sas.qtgui.GuiUtils import * 
     15from GuiUtils import * 
    1516 
    1617# local 
     
    262263            self._plotter.plot() 
    263264 
     265            # Convert the data into plottable 
     266            extrapolated_data = self._manager.createGuiData(extrapolated_data) 
     267 
    264268            # Add the plot to the model item 
    265             variant_item = QtCore.QVariant(self._plotter) 
    266             updateModelItem(self._model_item, variant_item, title) 
     269            # variant_item = QtCore.QVariant(self._plotter) 
     270            variant_item = QtCore.QVariant(extrapolated_data) 
     271 
     272            # This needs to run in the main thread 
     273            reactor.callFromThread(updateModelItem, self._model_item, variant_item, title) 
    267274 
    268275        if self._high_extrapolate: 
     
    275282            high_out_data = inv.get_extra_data_high(q_end=qmax_plot, npts=500) 
    276283 
     284            # Convert the data into plottable 
     285            high_out_data = self._manager.createGuiData(high_out_data) 
     286 
    277287            # find how to add this plot to the existing plot for low_extrapolate 
    278288            # Plot the chart 
     
    283293 
    284294            # Add the plot to the model item 
    285             variant_item = QtCore.QVariant(self._plotter) 
    286             updateModelItem(self._model_item, variant_item, title) 
    287  
     295            # variant_item = QtCore.QVariant(self._plotter) 
     296            variant_item = QtCore.QVariant(high_out_data) 
     297            # This needs to run in the main thread 
     298            reactor.callFromThread(updateModelItem, self._model_item, variant_item, title) 
    288299 
    289300        item = QtGui.QStandardItem(str(float('%.5g'% volume_fraction))) 
Note: See TracChangeset for help on using the changeset viewer.