GraphicViewer.py
changeset 640 c32c169b8f63
parent 632 3ea55a5db68e
child 642 f2325ebd67f4
equal deleted inserted replaced
639:1334238d4863 640:c32c169b8f63
    39 SECOND = 1000000000
    39 SECOND = 1000000000
    40 MINUTE = 60 * SECOND
    40 MINUTE = 60 * SECOND
    41 HOUR = 60 * MINUTE
    41 HOUR = 60 * MINUTE
    42 
    42 
    43 RANGE_VALUES = [(str(25 * 2 ** i), 25 * 2 ** i) for i in xrange(6)]
    43 RANGE_VALUES = [(str(25 * 2 ** i), 25 * 2 ** i) for i in xrange(6)]
    44 TIME_RANGE_VALUES = [("%ds" % i, i * SECOND) for i in (10, 20, 30)] + \
    44 TIME_RANGE_VALUES = [("%ds" % i, i * SECOND) for i in (1, 2, 5, 10, 20, 30)] + \
    45                     [("%dm" % i, i * MINUTE) for i in (1, 2, 5, 10, 20, 30)] + \
    45                     [("%dm" % i, i * MINUTE) for i in (1, 2, 5, 10, 20, 30)] + \
    46                     [("%dh" % i, i * HOUR) for i in (1, 2, 3, 6, 12, 24)]
    46                     [("%dh" % i, i * HOUR) for i in (1, 2, 3, 6, 12, 24)]
    47 
    47 
    48 [ID_GRAPHICVIEWER, ID_GRAPHICVIEWERCANVAS,
    48 [ID_GRAPHICVIEWER, ID_GRAPHICVIEWERCANVAS,
    49  ID_GRAPHICVIEWERCANVASRANGE, ID_GRAPHICVIEWERCANVASPOSITION,
    49  ID_GRAPHICVIEWERCANVASRANGE, ID_GRAPHICVIEWERCANVASPOSITION,
   112               label=_('Range:'), name='staticText1', parent=self.Editor,
   112               label=_('Range:'), name='staticText1', parent=self.Editor,
   113               pos=wx.Point(0, 0), size=wx.DefaultSize, style=0)
   113               pos=wx.Point(0, 0), size=wx.DefaultSize, style=0)
   114         
   114         
   115         self.CanvasRange = wx.ComboBox(id=ID_GRAPHICVIEWERCANVASRANGE,
   115         self.CanvasRange = wx.ComboBox(id=ID_GRAPHICVIEWERCANVASRANGE,
   116               name='CanvasRange', parent=self.Editor, pos=wx.Point(0, 0),
   116               name='CanvasRange', parent=self.Editor, pos=wx.Point(0, 0),
   117               size=wx.Size(100, 28), style=0)
   117               size=wx.Size(100, 28), style=wx.CB_READONLY)
   118         self.Bind(wx.EVT_COMBOBOX, self.OnRangeChanged, id=ID_GRAPHICVIEWERCANVASRANGE)
   118         self.Bind(wx.EVT_COMBOBOX, self.OnRangeChanged, id=ID_GRAPHICVIEWERCANVASRANGE)
   119         self.Bind(wx.EVT_TEXT_ENTER, self.OnRangeChanged, id=ID_GRAPHICVIEWERCANVASRANGE)
       
   120         
   119         
   121         self.staticText2 = wx.StaticText(id=ID_GRAPHICVIEWERSTATICTEXT2,
   120         self.staticText2 = wx.StaticText(id=ID_GRAPHICVIEWERSTATICTEXT2,
   122               label=_('Position:'), name='staticText2', parent=self.Editor,
   121               label=_('Position:'), name='staticText2', parent=self.Editor,
   123               pos=wx.Point(0, 0), size=wx.DefaultSize, style=0)
   122               pos=wx.Point(0, 0), size=wx.DefaultSize, style=0)
   124 
   123