Ignore:
Timestamp:
Jun 9, 2010 4:45:37 PM (14 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:
1b43306
Parents:
16f60cb
Message:

disable data editor

File:
1 edited

Legend:

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

    rc5dca87 r6137b150  
    2222     
    2323class CollimationDialog(wx.Dialog): 
     24    """ 
     25    """ 
    2426    def __init__(self, parent=None, manager=None, 
    2527                 collimation=[], *args, **kwds): 
     
    4042    def _define_structure(self): 
    4143        """ 
    42             define initial sizer  
     44        define initial sizer  
    4345        """ 
    4446        self.main_sizer = wx.BoxSizer(wx.VERTICAL) 
     
    6365    def _layout_collimation(self): 
    6466        """ 
    65             Do the layout for collimation related widgets 
     67        Do the layout for collimation related widgets 
    6668        """ 
    6769        collimation_name_txt = wx.StaticText(self, -1, "Collimation:")  
     
    9799    def _layout_name(self): 
    98100        """ 
    99             Do the layout for collimation name related widgets 
     101        Do the layout for collimation name related widgets 
    100102        """ 
    101103        #Collimation name [string] 
     
    107109    def _layout_length(self): 
    108110        """ 
    109             Do the  layout for length related widgets 
     111        Do the  layout for length related widgets 
    110112        """ 
    111113        #Collimation length 
     
    121123    def _layout_button(self):   
    122124        """ 
    123             Do the layout for the button widgets 
     125        Do the layout for the button widgets 
    124126        """  
    125127        self.bt_apply = wx.Button(self, -1,'Apply') 
     
    136138    def _layout_aperture(self): 
    137139        """ 
    138             Do the layout for aperture related widgets 
     140        Do the layout for aperture related widgets 
    139141        """ 
    140142        aperture_name_txt = wx.StaticText(self, -1, "Aperture:")  
     
    170172    def _do_layout(self, data=None): 
    171173        """ 
    172             Draw the current panel 
     174        Draw the current panel 
    173175        """ 
    174176        self._define_structure() 
     
    206208    def fill_collimation_combox(self): 
    207209        """ 
    208             fill the current combobox with the available collimation 
     210        fill the current combobox with the available collimation 
    209211        """ 
    210212        if self._collimation is None or self._collimation == []: 
     
    218220    def add_collimation(self, event): 
    219221        """ 
    220             Append empty collimation to data's list of collimation 
     222        Append empty collimation to data's list of collimation 
    221223        """ 
    222224         
     
    236238    def remove_collimation(self, event): 
    237239        """ 
    238             Remove collimation to data's list of collimation 
     240        Remove collimation to data's list of collimation 
    239241        """ 
    240242        if self.collimation_cbox.IsEnabled(): 
     
    263265    def on_select_collimation(self, event): 
    264266        """ 
    265            fill the control on the panel according to the current  selected collimation  
     267        fill the control on the panel according to the current  selected collimation  
    266268        """ 
    267269        self.set_values() 
     
    271273    def enable_collimation(self): 
    272274        """ 
    273             Enable /disable widgets related to collimation 
     275        Enable /disable widgets related to collimation 
    274276        """ 
    275277        if self._collimation is not None and self.collimation_cbox.GetCount() > 0: 
     
    291293    def reset_collimation_combobox(self, edited_collimation): 
    292294        """ 
    293             take all edited editor and reset clientdata of collimation combo box 
     295        take all edited editor and reset clientdata of collimation combo box 
    294296        """ 
    295297        for position in range(self.collimation_cbox.GetCount()): 
     
    303305    def add_aperture(self, event): 
    304306        """ 
    305             Append empty aperture to data's list of aperture 
     307        Append empty aperture to data's list of aperture 
    306308        """ 
    307309        collimation, _, _ = self.get_current_collimation() 
     
    317319    def edit_aperture(self, event): 
    318320        """ 
    319             Edit the selected aperture 
     321        Edit the selected aperture 
    320322        """ 
    321323        if self._collimation is None or not self.aperture_cbox.IsEnabled(): 
     
    331333    def remove_aperture(self, event): 
    332334        """ 
    333             Remove aperture to data's list of aperture 
     335        Remove aperture to data's list of aperture 
    334336        """ 
    335337        if self._collimation is None or not self._collimation: 
     
    354356    def set_aperture(self, aperture): 
    355357        """ 
    356             set aperture for data 
     358        set aperture for data 
    357359        """ 
    358360        if self._collimation is None or not self._collimation: 
     
    368370    def enable_aperture(self): 
    369371        """ 
    370             Enable /disable widgets crelated to aperture 
     372        Enable /disable widgets crelated to aperture 
    371373        """ 
    372374        collimation, _, _ = self.get_current_collimation() 
     
    390392    def reset_aperture_combobox(self, edited_aperture): 
    391393        """ 
    392             take all edited editor and reset clientdata of aperture combo box 
     394        take all edited editor and reset clientdata of aperture combo box 
    393395        """ 
    394396        for position in range(self.aperture_cbox.GetCount()): 
     
    402404    def fill_aperture_combox(self): 
    403405        """ 
    404             fill the current combobox with the available aperture 
     406        fill the current combobox with the available aperture 
    405407        """ 
    406408        self.aperture_cbox.Clear() 
     
    416418    def set_manager(self, manager): 
    417419        """     
    418             Set manager of this window 
     420        Set manager of this window 
    419421        """ 
    420422        self.manager = manager 
     
    422424    def set_values(self): 
    423425        """ 
    424             take the collimation values of the current data and display them 
    425             through the panel 
     426        take the collimation values of the current data and display them 
     427        through the panel 
    426428        """ 
    427429        collimation, _, _ = self.get_current_collimation() 
     
    441443    def get_collimation(self): 
    442444        """ 
    443             return the current collimation 
     445        return the current collimation 
    444446        """ 
    445447        return self._collimation 
     
    447449    def get_notes(self): 
    448450        """ 
    449             return notes 
     451        return notes 
    450452        """ 
    451453        return self._notes 
     
    453455    def on_change_name(self): 
    454456        """ 
    455             Change name 
     457        Change name 
    456458        """ 
    457459        collimation, collimation_name, position = self.get_current_collimation() 
     
    472474    def on_change_length(self): 
    473475        """ 
    474             Change the length 
     476        Change the length 
    475477        """ 
    476478        collimation, collimation_name, position = self.get_current_collimation() 
     
    501503    def on_click_apply(self, event): 
    502504        """ 
    503             Apply user values to the collimation 
     505        Apply user values to the collimation 
    504506        """ 
    505507        self.on_change_name() 
     
    511513    def on_click_cancel(self, event): 
    512514        """ 
    513             leave the collimation as it is and close 
     515        leave the collimation as it is and close 
    514516        """ 
    515517        self._collimation = deepcopy(self._reset_collimation) 
Note: See TracChangeset for help on using the changeset viewer.