Пример #1
0
    def foreground(self):
        """Activate the application."""

        self.del_alarm_btn = widgets.Button(170, 204, 70, 35, 'DEL')
        self.hours_wid = widgets.Spinner(50, 30, 0, 23, 2)
        self.min_wid = widgets.Spinner(130, 30, 0, 59, 2)
        self.day_btns = (widgets.ToggleButton(10, 145, 40, 35, 'Mo'),
                         widgets.ToggleButton(55, 145, 40, 35, 'Tu'),
                         widgets.ToggleButton(100, 145, 40, 35, 'We'),
                         widgets.ToggleButton(145, 145, 40, 35, 'Th'),
                         widgets.ToggleButton(190, 145, 40, 35, 'Fr'),
                         widgets.ToggleButton(10, 185, 40, 35, 'Sa'),
                         widgets.ToggleButton(55, 185, 40, 35, 'Su'))
        self.alarm_checks = (widgets.Checkbox(200,
                                              57), widgets.Checkbox(200, 102),
                             widgets.Checkbox(200,
                                              147), widgets.Checkbox(200, 192))

        self._deactivate_pending_alarms()
        self._draw()

        wasp.system.request_event(wasp.EventMask.TOUCH
                                  | wasp.EventMask.SWIPE_LEFTRIGHT
                                  | wasp.EventMask.BUTTON)
        wasp.system.request_tick(1000)
Пример #2
0
    def __init__(self):
        """Initialize the application."""
        self.minutes = widgets.Spinner(50, 60, 0, 99, 2)
        self.seconds = widgets.Spinner(130, 60, 0, 60, 2)
        self.current_alarm = None

        self.minutes.value = 10
        self.state = _STOPPED
Пример #3
0
    def __init__(self):
        """Initialize the application."""
        self.active = widgets.Checkbox(104, 200)
        self.hours = widgets.Spinner(50, 60, 0, 23, 2)
        self.minutes = widgets.Spinner(130, 60, 0, 59, 2)

        self.hours.value = 7
        self.ringing = False
Пример #4
0
 def setUp(self):
     self.name = 'SpinnerWidget'
     self.pv_name = 'TESTpv'
     self.type = 'spinner'
     self.x = 10
     self.y = 12
     self.width = 14
     self.height = 15
     self.element = widgets.Spinner(self.name, self.pv_name, self.x, self.y,
                                    self.width, self.height)