Changeset b500652 in sasview


Ignore:
Timestamp:
Mar 30, 2010 4:44:30 PM (15 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:
328c328
Parents:
378d2eb
Message:

add hint on slit length editor

Location:
calculatorview/perspectives/calculator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/perspectives/calculator/calculator.py

    r378d2eb rb500652  
    109109        slit_length_help = "Provides computation related to Scattering Length density" 
    110110        return [("SLD Calculator", sld_help, self.on_calculate_sld), 
    111                 ("Slit Side Calculator", slit_length_help, 
     111                ("Slit Size Calculator", slit_length_help, 
    112112                     self.on_calculate_slit_size)] 
    113113               
  • calculatorview/perspectives/calculator/slit_length_calculator_panel.py

    r378d2eb rb500652  
    2222if sys.platform.count("win32") > 0: 
    2323    PANEL_WIDTH = 500 
    24     PANEL_HEIGHT = 190 
     24    PANEL_HEIGHT = 200 
    2525    FONT_VARIANT = 0 
    2626else: 
    2727    PANEL_WIDTH = 530 
    28     PANEL_HEIGHT = 220 
     28    PANEL_HEIGHT = 230 
    2929    FONT_VARIANT = 1 
    3030     
     
    3535    """ 
    3636    ## Internal nickname for the window, used by the AUI manager 
    37     window_name = "Slit Length Calculator" 
     37    window_name = "Slit Size Calculator" 
    3838    ## Name to appear on the window title bar 
    39     window_caption = "Slit Length Calculator" 
     39    window_caption = "Slit Size Calculator" 
    4040    ## Flag to tell the AUI manager to put this panel in the center pane 
    4141    CENTER_PANE = True 
     
    6363        self.data_name_sizer = wx.BoxSizer(wx.HORIZONTAL) 
    6464        self.slit_size_sizer = wx.BoxSizer(wx.HORIZONTAL) 
     65        self.hint_sizer = wx.BoxSizer(wx.HORIZONTAL) 
    6566        self.button_sizer = wx.BoxSizer(wx.HORIZONTAL) 
    6667        
     
    8485            Fill the sizer containing slit size information 
    8586        """ 
    86         slit_size_txt = wx.StaticText(self, -1, 'Slit Size: ') 
     87        slit_size_txt = wx.StaticText(self, -1, 'Full Slit Size: ') 
    8788        self.slit_size_tcl = OutputTextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 
    8889        slit_size_hint = " Estimated slit size" 
     
    9798                                      (self.slit_size_unit_tcl, 0, wx.LEFT, 10)]) 
    9899     
     100    def _layout_hint(self): 
     101        """ 
     102            Fill the sizer containing hint  
     103        """ 
     104        hint_msg = "This calculation works only for  SAXSess beam profile data." 
     105        self.hint_txt = wx.StaticText(self, -1, hint_msg) 
     106        self.hint_sizer.AddMany([(self.hint_txt, 0, wx.LEFT, 15)]) 
     107     
    99108    def _layout_button(self):   
    100109        """ 
     
    103112        self.bt_close = wx.Button(self, wx.ID_CANCEL,'Close') 
    104113        self.bt_close.Bind(wx.EVT_BUTTON, self.on_close) 
    105         self.bt_close.SetToolTipString("Apply current changes to the source.") 
     114        self.bt_close.SetToolTipString("Close this window.") 
    106115        self.button_sizer.AddMany([(self.bt_close, 0, wx.LEFT, 390)]) 
    107116         
     
    113122        self._layout_data_name() 
    114123        self._layout_slit_size() 
     124        self._layout_hint() 
    115125        self._layout_button() 
    116126        self.boxsizer_source.AddMany([(self.data_name_sizer, 0, 
    117127                                          wx.EXPAND|wx.TOP|wx.BOTTOM, 5), 
    118128                                   (self.slit_size_sizer, 0, 
     129                                     wx.EXPAND|wx.TOP|wx.BOTTOM, 5), 
     130                                     (self.hint_sizer, 0, 
    119131                                     wx.EXPAND|wx.TOP|wx.BOTTOM, 5)]) 
    120132        self.main_sizer.AddMany([(self.boxsizer_source, 0, wx.ALL, 10), 
    121133                                  (self.button_sizer, 0, 
    122134                                    wx.EXPAND|wx.TOP|wx.BOTTOM, 5)]) 
    123          
    124135        self.SetSizer(self.main_sizer) 
    125136        self.SetAutoLayout(True) 
     
    203214            if self.parent.parent is None: 
    204215                return  
    205             msg = "Slit Length Calculator: %s"%(sys.exc_value) 
     216            msg = "Slit Size Calculator: %s"%(sys.exc_value) 
    206217            wx.PostEvent(self.parent.parent, StatusEvent(status=msg, type='stop')) 
    207218            return  
     
    215226     
    216227class SlitLengthCalculatorWindow(wx.Frame): 
    217     def __init__(self, parent=None, id=1, title="Slit Length Calculator"): 
     228    def __init__(self, parent=None, id=1, title="Slit Size Calculator"): 
    218229        wx.Frame.__init__(self, parent, id, title, size=(PANEL_WIDTH,PANEL_HEIGHT)) 
    219230        self.parent = parent 
Note: See TracChangeset for help on using the changeset viewer.