コード例 #1
0
    def init_view(self):
        screenMgr = kvFind(self, 'rcid', 'screens')
        
        databus = self._databus
        settings = self._settings
        
        self.initGlobalGauges()
        
        gaugeView = GaugeView(name='gaugeView', databus=databus, settings=settings)
        tachView = TachometerView(name='tachView', databus=databus, settings=settings)
        laptimeView = LaptimeView(name='laptimeView', databus=databus, settings=settings)
        #comboView = ComboView(name='comboView', databus=databus, settings=settings)
        rawChannelView = RawChannelView(name='rawchannelView', databus=databus, settings=settings)
        
        screenMgr.add_widget(gaugeView)
        screenMgr.add_widget(tachView)
        screenMgr.add_widget(laptimeView) 
        #screenMgr.add_widget(comboView)
        screenMgr.add_widget(rawChannelView)

        gauges = list(kvFindClass(self, DigitalGauge))

        for gauge in gauges:
            gauge.settings = self._settings
            gauge.data_bus = databus

        self._gaugeView = gaugeView
        self._tachView = tachView
        self._rawchannelView = rawChannelView
        self._laptimeView = laptimeView
        #self._comboView = comboView
        self._screen_mgr = screenMgr
        databus.start_update()
        Clock.schedule_once(lambda dt: self._show_last_view())
コード例 #2
0
 def __init__(self, **kwargs):
     super(LoadDialog, self).__init__(**kwargs)
     ok = kwargs.get('ok', None)
     cancel = kwargs.get('cancel', None)
     user_path = kwargs.get('user_path', '.')
         
     browser = kvFind(self, 'rcid', 'browser')
     browser.path = user_path
     browser.filters = kwargs.get('filters', ['*'])        
     if ok: browser.bind(on_success = ok)
     if cancel: browser.bind(on_canceled = cancel)
コード例 #3
0
    def __init__(self, **kwargs):
        super(LoadDialog, self).__init__(**kwargs)
        ok = kwargs.get('ok', None)
        cancel = kwargs.get('cancel', None)
        user_path = kwargs.get('user_path', '.')

        browser = kvFind(self, 'rcid', 'browser')
        browser.path = user_path
        browser.filters = kwargs.get('filters', ['*'])
        if ok: browser.bind(on_success=ok)
        if cancel: browser.bind(on_canceled=cancel)
コード例 #4
0
    def init_view(self):
        screenMgr = kvFind(self, 'rcid', 'screens')

        databus = self._databus
        settings = self._settings

        self.initGlobalGauges()

        gaugeView = GaugeView(name='gaugeView',
                              databus=databus,
                              settings=settings)
        tachView = TachometerView(name='tachView',
                                  databus=databus,
                                  settings=settings)
        laptimeView = LaptimeView(name='laptimeView',
                                  databus=databus,
                                  settings=settings)
        # comboView = ComboView(name='comboView', databus=databus, settings=settings)
        rawChannelView = RawChannelView(name='rawchannelView',
                                        databus=databus,
                                        settings=settings)

        screenMgr.add_widget(gaugeView)
        screenMgr.add_widget(tachView)
        screenMgr.add_widget(laptimeView)
        # screenMgr.add_widget(comboView)
        screenMgr.add_widget(rawChannelView)

        gauges = list(kvFindClass(self, DigitalGauge))

        for gauge in gauges:
            gauge.settings = self._settings
            gauge.data_bus = databus

        self._gaugeView = gaugeView
        self._tachView = tachView
        self._rawchannelView = rawChannelView
        self._laptimeView = laptimeView
        # self._comboView = comboView
        self._screen_mgr = screenMgr

        self._alert_widgets['pit_stop'] = PitstopTimerView(databus, 'Pit Stop')

        databus.start_update()
        self._notify_preference_listeners()
        Clock.schedule_once(lambda dt: self._show_last_view())
コード例 #5
0
    def init_view(self):
        screenMgr = kvFind(self, 'rcid', 'screens')

        dataBus = self._databus
        settings = self._settings

        self.initGlobalGauges()

        gaugeView = GaugeView(name='gaugeView',
                              dataBus=dataBus,
                              settings=settings)
        tachView = TachometerView(name='tachView',
                                  dataBus=dataBus,
                                  settings=settings)
        laptimeView = LaptimeView(name='laptimeView',
                                  dataBus=dataBus,
                                  settings=settings)
        comboView = ComboView(name='comboView',
                              dataBus=dataBus,
                              settings=settings)
        rawChannelView = RawChannelView(name='rawchannelView',
                                        dataBus=dataBus,
                                        settings=settings)

        #screenMgr.transition=WipeTransition()
        screenMgr.add_widget(gaugeView)
        screenMgr.add_widget(tachView)
        screenMgr.add_widget(laptimeView)
        #screenMgr.add_widget(comboView) #TODO add support later
        screenMgr.add_widget(rawChannelView)

        gauges = list(kvFindClass(self, DigitalGauge))

        for gauge in gauges:
            gauge.settings = self._settings
            gauge.data_bus = dataBus

        self._gaugeView = gaugeView
        self._tachView = tachView
        self._rawchannelView = rawChannelView
        self._laptimeView = laptimeView
        self._comboView = comboView
        self._screen_mgr = screenMgr
        dataBus.start_update()
コード例 #6
0
 def backgroundView(self):
     if not self._backgroundView:
         self._backgroundView = kvFind(self, "rcid", "bg")
     return self._backgroundView
コード例 #7
0
 def backgroundView(self):
     if not self._backgroundView:
         self._backgroundView = kvFind(self, 'rcid', 'bg')
     return self._backgroundView
コード例 #8
0
 def _enableNoDataStatus(self, enabled):
     statusView = kvFind(self, 'rcid', 'statusMsg')
     statusView.text = NO_DATA_MSG if enabled else DATA_MSG
コード例 #9
0
 def on_description_text(self, instance, value):
     label = kvFind(self, 'rcid', 'desc')
     label.text = value
     self.setEnabledDisabledColor(label)
コード例 #10
0
ファイル: gauge.py プロジェクト: paulbutcher/RaceCapture_App
 def on_title(self, instance, value):
     if not value == None:
         view = kvFind(self, 'rcid', 'title')
         view.text = str(value)
コード例 #11
0
ファイル: gauge.py プロジェクト: paulbutcher/RaceCapture_App
 def titleView(self):
     return kvFind(self, 'rcid', 'title')
コード例 #12
0
ファイル: gauge.py プロジェクト: paulbutcher/RaceCapture_App
 def valueView(self):
     if not self._valueView:
         self._valueView = kvFind(self, 'rcid', 'value')
     return self._valueView
コード例 #13
0
 def graphView(self):
     if not self._gaugeView:
         self._gaugeView = kvFind(self, 'rcid', 'gauge')
     return self._gaugeView
コード例 #14
0
 def _enableNoDataStatus(self, enabled):
     statusView = kvFind(self, 'rcid', 'statusMsg')
     statusView.text = NO_DATA_MSG if enabled else DATA_MSG
コード例 #15
0
 def _gridView(self):
     if self._grid == None:
         self._grid = kvFind(self, 'rcid', 'grid')
     return self._grid
コード例 #16
0
 def graphView(self):
     if not self._gaugeView:
         self._gaugeView = kvFind(self, "rcid", "gauge")
     return self._gaugeView
コード例 #17
0
 def on_icon_text(self, instance, value):
     icon = kvFind(self, 'rcid', 'icon')
     icon.text = value
     self.setEnabledDisabledColor(icon)
コード例 #18
0
 def _enable_no_data_status(self, enabled):
     statusView = kvFind(self, 'rcid', 'statusMsg')
     statusView.text = RawChannelView.NO_DATA_MSG if enabled else RawChannelView.DATA_MSG
コード例 #19
0
 def _gridView(self):
     if self._grid == None:
         self._grid = kvFind(self, 'rcid', 'grid')
     return self._grid
コード例 #20
0
 def graphView(self):
     if not self._gaugeView:
         self._gaugeView = kvFind(self, 'rcid', 'gauge')
     return self._gaugeView
コード例 #21
0
 def on_icon_text(self, instance, value):
     icon = kvFind(self, 'rcid', 'icon')
     icon.text = value
     self.setEnabledDisabledColor(icon)
コード例 #22
0
 def on_description_text(self, instance, value):
     label = kvFind(self, 'rcid', 'desc')
     label.text = value
     self.setEnabledDisabledColor(label)
コード例 #23
0
 def _enable_no_data_status(self, enabled):
     statusView = kvFind(self, 'rcid', 'statusMsg')
     statusView.text = RawChannelView.NO_DATA_MSG if enabled else RawChannelView.DATA_MSG
コード例 #24
0
 def backgroundView(self):
     if not self._backgroundView:
         self._backgroundView = kvFind(self, 'rcid', 'bg')
     return self._backgroundView