コード例 #1
0
 def __init__(self, **kw):
     super().__init__(**kw)
     self.app = MDApp.get_running_app()
     self.sub_title = "Welcome to Home Screen"
コード例 #2
0
ファイル: popups.py プロジェクト: yibit/katrain
 def __init__(self, **kwargs):
     super().__init__(**kwargs)
     self.bind(on_dismiss=Clock.schedule_once(
         lambda _dt: MDApp.get_running_app().gui.update_state(), 1))
コード例 #3
0
 def __init__(self, **kw):
     super().__init__(**kw)
     self.app = MDApp.get_running_app()
コード例 #4
0
 def registrar_tela(self):
     try:        
         app = MDApp.get_running_app()
         app.telas.append(str(app.root.current_screen)[14:-2])
     except AttributeError: #para que no build não dê problemas
         pass
コード例 #5
0
ファイル: popups.py プロジェクト: yibit/katrain
 def __init__(self, katrain):
     super().__init__(katrain)
     self.paths = [
         self.katrain.config("engine/model"), "katrain/models", "~/.katrain"
     ]
     MDApp.get_running_app().bind(language=self.check_models)
コード例 #6
0
 def select_plot(self):
     self.remove_all_plots()
     common_graph = MDApp.get_running_app().root.ids.graph_test
     common_graph.add_plot(self._plot)
コード例 #7
0
 def remove_all_plots(self):
     common_graph = MDApp.get_running_app().root.ids.graph_test
     for plot in common_graph.plots:
         common_graph.remove_plot(plot)
コード例 #8
0
 def select_details(self):
     ids = MDApp.get_running_app().root.ids
     ids.pd_main_label.text = self.text + f",  {T('co-output-current-l')}"
     ids.pd_mac_label.text = self.secondary_text
     self.select_plot()
     Contero.select_tab(ids.ps_tab_details)
コード例 #9
0
                            text: "      - Reparação de aparelhos"
                            pos_hint: {"center_x": .540, "center_y": .140}
                            font_style: "Caption"
                            font_size: (root.width**2 + root.height**2) / 14.9**4
                        MDLabel:
                            text: "      - etc..."
                            pos_hint: {"center_x": .540, "center_y": .1}
                            font_style: "Caption"
                            font_size: (root.width**2 + root.height**2) / 14.9**4
                            
                        MDFloatingActionButton:
                            id: back
                            icon: "arrow-left"
                            md_bg_color: app.theme_cls.primary_color
                            pos_hint: {"center_x": .8, "center_y": .1}
""")
APP = MDApp.get_running_app()


class Info(Screen):
    def __init__(self, **kw):
        super().__init__(**kw)
        self.ids.back.bind(on_release=self.back)

    def back(self, instance):
        info = APP.root.current_screen
        from home_screen import HomeScreen
        self.home_screen = HomeScreen()
        APP.root.add_widget(self.home_screen)
        APP.root.current = "home"
        APP.root.remove_widget(info)
コード例 #10
0
 def on_long_press(self, *largs):
     app = MDApp.get_running_app()
     app.root.ids['previous_workouts_screen'].show_checkbox("True")
     self.long_press = 1