Ignore:
Timestamp:
Feb 2, 2009 11:51:27 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:
2cf2b87
Parents:
00d083c
Message:

add a new module containing common classes that I used often:
sans.guiframe.utils

remove event slicer and add it in sans.guicoom.events,
modified slicer for those events

File:
1 edited

Legend:

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

    r54cc36a r0d9dae8  
    77from copy import deepcopy 
    88 
    9 (SlicerEvent, EVT_SLICER)   = wx.lib.newevent.NewEvent() 
    10 (SlicerParameterEvent, EVT_SLICER_PARS)   = wx.lib.newevent.NewEvent() 
     9from sans.guiframe.utils import format_number 
     10from sans.guicomm.events import EVT_SLICER,EVT_SLICER_PARS,SlicerParameterEvent 
    1111 
    1212 
    13 def format_number(value, high=False): 
    14     """ 
    15         Return a float in a standardized, human-readable formatted string  
    16     """ 
    17     try:  
    18         value = float(value) 
    19     except: 
    20         return "NaN" 
    21      
    22     if high: 
    23         return "%-6.4g" % value 
    24     else: 
    25         return "%-5.3g" % value 
     13 
    2614 
    2715class SlicerParameterPanel(wx.Dialog): 
Note: See TracChangeset for help on using the changeset viewer.