def on_start(self): self.theme_cls.primary_palette = "Indigo" #GPS GpsHelper().run() #Конект базы данных self.connection = sqlite3.connect("Navigator.sqlite") self.cursor = self.connection.cursor() #Поисковое меню self.search_menu = SearchPopupMenu()
def on_start(self): self.theme_cls.primary_palllete = "BlueGray" # Initialize GPS GpsHelper().run() # Connect to database self.connection = sqlite3.connect("markets.db") self.cursor = self.connection.cursor() # Instantiate SearchPopupMenu self.search_menu = SearchPopupMenu()
def build(self): #Accessing settings database cur.execute("SELECT mode from settings where attribute='darkmode' ") GpsHelper().run() #App theme and UI color schemes darkmode_opt_list = cur.fetchall() darkmode_opt = darkmode_opt_list[0][0] self.theme_cls.primary_palette = "Cyan" self.theme_cls.primary_hue = "800" self.theme_cls.accent_palette = "Gray" self.theme_cls.accent_hue = "50" self.search_menu = SearchPopupMenu() self.tap_target_view = MDTapTargetView( widget=self.root.ids.button, title_text="Click here to locate you.", description_text="Make sure we are right over you", widget_position="left_bottom", ) if darkmode_opt == "on": print("dark mode on") self.theme_cls.theme_style = "Dark" self.root.ids.darkmode_switch.active = True else: print("light mode on") self.theme_cls.theme_style = "Light" self.root.ids.darkmode_switch.active = False if logged_in == True: self.root.ids.manager.current = "Home" self.root.ids.ecomap.add_marker(MapMarker(lat=60, lon=30)) myloc = MapMarker(lat=30.3433, lon=77.8839) self.root.ids.ecomap.add_marker(myloc) def repos(button): self.root.ids.ecomap.center_on(31.901303405681098, 76.5568) self.root.ids.ecomap.zoom = 18 self.tap_target_view.bind(on_close=repos) def drop_marker_db(button): pass # temp_marker = MapMarker(lat=val[0], lon=val[1]) # screen.ids.ecomap.add_marker(temp_marker) try: self.start_anim.cancel() except: pass self.start_anim = Clock.schedule_once(self.start_tp_anim, 3.5) elif logged_in == False: self.root.ids.parent_manager.current = "account_setup"
def on_start(self): icons_item = { "account": "Account Details", "city-variant-outline": "Form", "login": "******", "help": "Help", } for icon_name in icons_item.keys(): self.root.ids.content_drawer.ids.md_list.add_widget( ItemDrawer(icon=icon_name, text=icons_item[icon_name]) ) # Initialize GPS GpsHelper().run()
def on_start(self): self.theme_cls.primary_palette = 'BlueGray' GpsHelper().run() self.give_results = GiveResultsMenu()
def on_start(self): #gps başlat GpsHelper().run()