Changeset 31a5842 in sasview for guiframe


Ignore:
Timestamp:
Nov 5, 2008 10:03:36 AM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
415bc97
Parents:
58eac5d
Message:

new panel added for model 2D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/plotting.py

    r58eac5d r31a5842  
    443443                   self.ymax_2D,self.zmin_2D ,self.zmax_2D ) 
    444444        wx.PostEvent(self.parent, StatusEvent(status="Image is in %s scale"%self.scale)) 
    445        
     445         
     446class View1DModelPanel2D( View1DPanel2D): 
     447    """ 
     448        Plot panel for use with the GUI manager 
     449    """ 
     450     
     451    ## Internal name for the AUI manager 
     452    window_name = "plotpanel" 
     453    ## Title to appear on top of the window 
     454    window_caption = "Plot Panel" 
     455    ## Flag to tell the GUI manager that this panel is not 
     456    #  tied to any perspective 
     457    ALWAYS_ON = True 
     458    ## Group ID 
     459    group_id = None 
     460     
     461    def __init__(self, parent, id = -1, color = None,\ 
     462        dpi = None, style = wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs): 
     463        """ 
     464            Initialize the panel 
     465        """ 
     466        View1DPanel2D.__init__(self, parent, id = id, style = style, **kwargs) 
     467         
     468        
    446469class Plugin: 
    447470    """ 
     
    542565        # Create a new plot panel if none was available         
    543566        if not is_available: 
    544             if not hasattr(event.plot,'image'): 
     567            if event.plot.__class__.__name__=='Data1D': 
    545568                new_panel = View1DPanel1D(self.parent, -1, style=wx.RAISED_BORDER) 
    546             else: 
     569            if event.plot.__class__.__name__=='Data2D': 
    547570                new_panel = View1DPanel2D(self.parent, -1, style=wx.RAISED_BORDER) 
     571            if event.plot.__class__.__name__=='Theory2D': 
     572                new_panel = View1DModelPanel2D(self.parent, -1, style=wx.RAISED_BORDER) 
    548573            # Set group ID if available 
    549574            group_id_str = '' 
Note: See TracChangeset for help on using the changeset viewer.