当前位置: 首页>>代码示例>>Python>>正文


Python app.Builder类代码示例

本文整理汇总了Python中kivy.app.Builder的典型用法代码示例。如果您正苦于以下问题:Python Builder类的具体用法?Python Builder怎么用?Python Builder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Builder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, **kwargs):
        Builder.load_file(WIRELESS_CONFIG_VIEW_KV)
        super(WirelessConfigView, self).__init__(**kwargs)
        self.register_event_type("on_config_updated")
        self.base_dir = kwargs.get("base_dir")

        btEnable = kvFind(self, "rcid", "btEnable")
        btEnable.bind(on_setting=self.on_bt_enable)
        btEnable.setControl(SettingsSwitch())

        # btConfig = kvFind(self, 'rcid', 'btconfig')
        # btConfig.bind(on_setting=self.on_bt_configure)
        # btConfig.setControl(SettingsButton(text='Configure', disabled=True))

        cellEnable = kvFind(self, "rcid", "cellEnable")
        cellEnable.bind(on_setting=self.on_cell_enable)
        cellEnable.setControl(SettingsSwitch())

        cellProvider = kvFind(self, "rcid", "cellprovider")
        cellProvider.bind(on_setting=self.on_cell_provider)
        apnSpinner = SettingsMappedSpinner()
        self.loadApnSettingsSpinner(apnSpinner)
        self.apnSpinner = apnSpinner
        cellProvider.setControl(apnSpinner)

        self.apnHostField = kvFind(self, "rcid", "apnHost")
        self.apnUserField = kvFind(self, "rcid", "apnUser")
        self.apnPassField = kvFind(self, "rcid", "apnPass")
开发者ID:aishwaryaMandyam,项目名称:RaceCapture_App,代码行数:28,代码来源:wirelessconfigview.py

示例2: __init__

 def __init__(self, **kwargs):
     Builder.load_file(DASHBOARD_VIEW_KV)
     super(DashboardView, self).__init__(**kwargs)
     self.register_event_type('on_tracks_updated')
     self._databus = kwargs.get('dataBus')
     self._settings = kwargs.get('settings')
     self.init_view()
开发者ID:Acidburn0zzz,项目名称:RaceCapture_App,代码行数:7,代码来源:dashboardview.py

示例3: __init__

 def __init__(self, **kwargs):
     Builder.load_string(FLYIN_PANEL_LAYOUT)
     super(FlyinPanel, self).__init__(**kwargs)
     self.hide_decay = Clock.create_trigger(lambda dt: self.hide(), self.SESSION_HIDE_DELAY)
     Window.bind(mouse_pos=self.on_mouse_pos)
     Window.bind(on_motion=self.on_motion)
     Clock.schedule_once(lambda dt: self.show())
开发者ID:ryandoherty,项目名称:RaceCapture_App,代码行数:7,代码来源:flyinpanel.py

示例4: __init__

 def __init__(self, **kwargs):    
     Builder.load_file(CAN_CONFIG_VIEW_KV)
     super(CANConfigView, self).__init__(**kwargs)
     
     self.register_event_type('on_config_updated')    
     btEnable = self.ids.can_enabled 
     btEnable.bind(on_setting=self.on_can_enabled)
     btEnable.setControl(SettingsSwitch())
开发者ID:aishwaryaMandyam,项目名称:RaceCapture_App,代码行数:8,代码来源:canconfigview.py

示例5: __init__

 def __init__(self, **kwargs):
     Builder.load_file(ANALYSIS_VIEW_KV)
     super(AnalysisView, self).__init__(**kwargs)
     self.register_event_type('on_tracks_updated')
     self._databus = kwargs.get('dataBus')
     self._settings = kwargs.get('settings')
     self._trackmanager = kwargs.get('trackmanager')
     self.init_view()
开发者ID:aishwaryaMandyam,项目名称:RaceCapture_App,代码行数:8,代码来源:analysisview.py

示例6: __init__

 def __init__(self, track_manager, status_pump, **kwargs):
     Builder.load_file(STATUS_KV_FILE)
     super(StatusView, self).__init__(**kwargs)
     self.track_manager = track_manager
     self.register_event_type("on_tracks_updated")
     self._menu_node = self.ids.menu
     self._menu_node.bind(selected_node=self._on_menu_select)
     status_pump.add_listener(self.status_updated)
开发者ID:brentpicasso,项目名称:RaceCapture_App,代码行数:8,代码来源:statusview.py

示例7: __init__

 def __init__(self, **kwargs):
     Builder.load_file(LAPSTATS_VIEW_KV)
     super(LapStatsView, self).__init__(**kwargs)
     self.register_event_type("on_config_updated")
     self.ids.lapstats.setControl(SettingsSwitch())
     self.ids.lapstats.bind(on_setting=self.on_lapstats_enabled)
     self.ids.predtime.setControl(SettingsSwitch())
     self.ids.predtime.bind(on_setting=self.on_predtime_enabled)
开发者ID:aishwaryaMandyam,项目名称:RaceCapture_App,代码行数:8,代码来源:lapstatsview.py

示例8: __init__

    def __init__(self, **kwargs):
        Builder.load_file(IMU_CHANNELS_VIEW_KV)
        super(ImuChannelsView, self).__init__(**kwargs)
        self.register_event_type('on_config_updated')

        imu_container = self.ids.imu_channels
        self.appendImuChannels(imu_container, self.editors, IMU_ACCEL_CHANNEL_IDS)
        self.appendImuChannels(imu_container, self.editors, IMU_GYRO_CHANNEL_IDS)
        self.ids.sr.bind(on_sample_rate = self.on_sample_rate)
开发者ID:ryandoherty,项目名称:RaceCapture_App,代码行数:9,代码来源:imuchannelsview.py

示例9: __init__

    def __init__(self, settings, **kwargs):
        Builder.load_file(PREFERENCES_KV_FILE)
        super(PreferencesView, self).__init__(**kwargs)
        self.settings = settings
        self.base_dir = kwargs.get('base_dir')

        self.settings_view = SettingsWithNoMenu()
        self.settings_view.add_json_panel('Preferences', self.settings.userPrefs.config, os.path.join(self.base_dir, 'resource', 'settings', 'settings.json'))

        self.content = kvFind(self, 'rcid', 'preferences')
        self.content.add_widget(self.settings_view)
开发者ID:ryandoherty,项目名称:RaceCapture_App,代码行数:11,代码来源:preferences.py

示例10: __init__

 def __init__(self, **kwargs):
     Builder.load_file(SCRIPT_VIEW_KV)
     super(LuaScriptingView, self).__init__(**kwargs)
     self.register_event_type('on_config_updated')
     self.register_event_type('on_run_script')
     self.register_event_type('on_poll_logfile')
     self.register_event_type('on_logfile')
     self.register_event_type('on_set_logfile_level')
     self.logfileView = kvFind(self, 'rcid', 'logfile')
     self.script_view = kvFind(self, 'rcid', 'script')
     self.logfileScrollView = kvFind(self, 'rcid', 'logfileSv') 
开发者ID:aishwaryaMandyam,项目名称:RaceCapture_App,代码行数:11,代码来源:scriptview.py

示例11: __init__

 def __init__(self, **kwargs):    
     Builder.load_file(TELEMETRY_CONFIG_VIEW_KV)
     super(TelemetryConfigView, self).__init__(**kwargs)
     self.register_event_type('on_config_updated')
 
     deviceId = kvFind(self, 'rcid', 'deviceId') 
     deviceId.bind(on_setting=self.on_device_id)
     deviceId.setControl(SettingsTextField())
     
     bgStream = kvFind(self, 'rcid', 'bgStream')
     bgStream.bind(on_setting=self.on_bg_stream)
     bgStream.setControl(SettingsSwitch())
开发者ID:aishwaryaMandyam,项目名称:RaceCapture_App,代码行数:12,代码来源:telemetryconfigview.py

示例12: __init__

    def __init__(self, **kwargs):
        Builder.load_file(OBD2_CHANNELS_VIEW_KV)
        super(OBD2ChannelsView, self).__init__(**kwargs)
        self.register_event_type("on_config_updated")
        self.obd2_grid = self.ids.obd2grid
        obd2_enable = self.ids.obd2enable
        obd2_enable.bind(on_setting=self.on_obd2_enabled)
        obd2_enable.setControl(SettingsSwitch())
        self.base_dir = kwargs.get("base_dir")

        self.obd2_settings = OBD2Settings(base_dir=self.base_dir)

        self.update_view_enabled()
开发者ID:aishwaryaMandyam,项目名称:RaceCapture_App,代码行数:13,代码来源:obd2channelsview.py

示例13: __init__

 def __init__(self, **kwargs):
     Builder.load_file(ANALYSIS_VIEW_KV)
     super(AnalysisView, self).__init__(**kwargs)
     self._datastore = CachingAnalysisDatastore()
     self.register_event_type('on_tracks_updated')
     self._databus = kwargs.get('dataBus')
     self._settings = kwargs.get('settings') 
     self._track_manager = kwargs.get('track_manager')
     self.ids.sessions_view.bind(on_lap_selected=self.lap_selected)
     self.ids.channelvalues.color_sequence = self._color_sequence
     self.ids.mainchart.color_sequence = self._color_sequence
     self.stream_connecting = False
     self.init_view()
开发者ID:imstimpy,项目名称:RaceCapture_App,代码行数:13,代码来源:analysisview.py

示例14: __init__

    def __init__(self, **kwargs):
        Builder.load_file(CONFIG_VIEW_KV)
        super(ConfigView, self).__init__(**kwargs)

        self._databus = kwargs.get('databus')
        self.rc_config = kwargs.get('rcpConfig', None)
        self.rc_api = kwargs.get('rc_api', None)
        self._settings = kwargs.get('settings')
        self.base_dir = kwargs.get('base_dir')

        self.register_event_type('on_config_updated')
        self.register_event_type('on_channels_updated')
        self.register_event_type('on_config_written')
        self.register_event_type('on_tracks_updated')
        self.register_event_type('on_config_modified')
        self.register_event_type('on_read_config')
        self.register_event_type('on_write_config')
开发者ID:ryandoherty,项目名称:RaceCapture_App,代码行数:17,代码来源:configview.py

示例15: __init__

 def __init__(self, **kwargs):
     Builder.load_file(TRACK_CONFIG_VIEW_KV)
     super(TrackConfigView, self).__init__(**kwargs)
     self._databus = kwargs.get('databus')
     self.register_event_type('on_config_updated')
     
     self.manualTrackConfigView = ManualTrackConfigScreen(name='manual', databus=self._databus)
     self.manualTrackConfigView.bind(on_modified=self.on_modified)
     
     self.autoConfigView = AutomaticTrackConfigScreen(name='auto')
     self.autoConfigView.bind(on_modified=self.on_modified)
     
     screenMgr = kvFind(self, 'rcid', 'screenmgr')
     screenMgr.add_widget(self.manualTrackConfigView)
     self.screenManager = screenMgr
     
     autoDetect = kvFind(self, 'rcid', 'autoDetect')
     autoDetect.bind(on_setting=self.on_auto_detect)
     autoDetect.setControl(SettingsSwitch())
     
     self.autoConfigView.track_manager = kwargs.get('track_manager')
开发者ID:imstimpy,项目名称:RaceCapture_App,代码行数:21,代码来源:trackconfigview.py


注:本文中的kivy.app.Builder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。