Ejemplo n.º 1
0
    def __init__(self, colour, enabled, alert, frequency, threshold, dynamic,
                 signals, periods):

        Monitor.__init__(self, colour, enabled, alert, frequency, threshold,
                         dynamic, signals, periods)

        self._isSaved = True
Ejemplo n.º 2
0
    def __init__(self,
                 colour, enabled, alert,
                 frequency, threshold, dynamic,
                 signals, periods):

        Monitor.__init__(self,
                         colour, enabled, alert,
                         frequency, threshold, dynamic,
                         signals, periods)

        self._isSaved = True
Ejemplo n.º 3
0
    def __init__(self, parent, eventHandler):
        Monitor.__init__(self, None, False, False, None, None, False, [], [])

        self._eventHandler = eventHandler
        self._isRecording = False
        self._isRunning = False
        self._isLow = True
        self._colours = []

        pre = wx.PrePanel()
        self._ui = load_ui('PanelMonitor.xrc')

        handlerNumCtrl = XrcHandlerNumCtrl()
        handlerMeter = XrcHandlerMeter()
        self._ui.AddHandler(handlerNumCtrl)
        self._ui.AddHandler(handlerMeter)

        self._ui.LoadOnPanel(pre, parent, 'PanelMonitor')
        self.PostCreate(pre)

        self._panelColour = xrc.XRCCTRL(pre, 'panelColour')
        self._checkEnable = xrc.XRCCTRL(pre, 'checkEnable')
        self._checkAlert = xrc.XRCCTRL(pre, 'checkAlert')
        self._checkDynamic = xrc.XRCCTRL(pre, 'checkDynamic')
        self._choiceFreq = xrc.XRCCTRL(pre, 'choiceFreq')
        self._textSignals = xrc.XRCCTRL(pre, 'textSignals')
        # TODO: hackish
        for child in self.GetChildren():
            if isinstance(child, WidgetMeter):
                self._meterLevel = child
        self._sliderThreshold = xrc.XRCCTRL(pre, 'sliderThreshold')
        self._buttonDel = xrc.XRCCTRL(pre, 'buttonDel')

        self.__set_records()

        self._on_del = None

        self._panelColour.Bind(wx.EVT_LEFT_UP, self.__on_colour)
        self.Bind(wx.EVT_CHECKBOX, self.__on_enable, self._checkEnable)
        self.Bind(wx.EVT_CHECKBOX, self.__on_alert, self._checkAlert)
        self.Bind(wx.EVT_CHECKBOX, self.__on_dynamic, self._checkDynamic)
        self.Bind(wx.EVT_CHOICE, self.__on_freq, self._choiceFreq)
        self.Bind(wx.EVT_SLIDER, self.__on_threshold, self._sliderThreshold)
        self.Bind(wx.EVT_BUTTON, self.__on_del, self._buttonDel)
Ejemplo n.º 4
0
    def __init__(self, parent, eventHandler):
        Monitor.__init__(self, None, False, False, None, None, False, [], [])

        self._eventHandler = eventHandler
        self._isRecording = False
        self._isRunning = False
        self._isLow = True
        self._colours = []

        pre = wx.PrePanel()
        self._ui = load_ui('PanelMonitor.xrc')

        handlerNumCtrl = XrcHandlerNumCtrl()
        handlerMeter = XrcHandlerMeter()
        self._ui.AddHandler(handlerNumCtrl)
        self._ui.AddHandler(handlerMeter)

        self._ui.LoadOnPanel(pre, parent, 'PanelMonitor')
        self.PostCreate(pre)

        self._panelColour = xrc.XRCCTRL(pre, 'panelColour')
        self._checkEnable = xrc.XRCCTRL(pre, 'checkEnable')
        self._checkAlert = xrc.XRCCTRL(pre, 'checkAlert')
        self._checkDynamic = xrc.XRCCTRL(pre, 'checkDynamic')
        self._choiceFreq = xrc.XRCCTRL(pre, 'choiceFreq')
        self._textSignals = xrc.XRCCTRL(pre, 'textSignals')
        # TODO: hackish
        for child in self.GetChildren():
            if isinstance(child, WidgetMeter):
                self._meterLevel = child
        self._sliderThreshold = xrc.XRCCTRL(pre, 'sliderThreshold')
        self._buttonDel = xrc.XRCCTRL(pre, 'buttonDel')

        self.__set_records()

        self._on_del = None

        self._panelColour.Bind(wx.EVT_LEFT_UP, self.__on_colour)
        self.Bind(wx.EVT_CHECKBOX, self.__on_enable, self._checkEnable)
        self.Bind(wx.EVT_CHECKBOX, self.__on_alert, self._checkAlert)
        self.Bind(wx.EVT_CHECKBOX, self.__on_dynamic, self._checkDynamic)
        self.Bind(wx.EVT_CHOICE, self.__on_freq, self._choiceFreq)
        self.Bind(wx.EVT_SLIDER, self.__on_threshold, self._sliderThreshold)
        self.Bind(wx.EVT_BUTTON, self.__on_del, self._buttonDel)