def build(self): global screens Builder.load_file("tmlayout.kv") self.sm = ScreenManager(transition=NoTransition()) screens = list() screens.append(Main_info(name="MainInfo")) screens.append(sub_new_activity(name="subNewActivity")) screens.append(activity_timer(name="activitytimer")) for i in range(len(screens)): self.sm.add_widget(screens[i]) screens[i].uxids_dict_add(screens) print("potato" + str(screens)) self.theme_cls.primary_palette = "Blue" print("0current Screen: " + str(self.sm.current_screen) + " | has the next screen? " +str(self.sm.has_screen("MainInfo"))) self.sm.switch_to(screens[0]) return self.sm
def build(self): """build: setup of the ui""" # create the media manager self.media_manager = MediaManager() # create video and image screens video_screen = VideoScreen(name='video') image_screen = ImageScreen(name='image') # set a reference of the screens in the media manager self.media_manager.video = video_screen self.media_manager.image = image_screen # create the screen manager sm = ScreenManager(transition=NoTransition()) # add the two screens to the screen manager sm.add_widget(image_screen) sm.add_widget(video_screen) # set a reference of the screen manager in the media manager self.media_manager.screen_manager = sm # return the root widget for display return sm
def SetPageEffect(self,uEffect): """ Sets the page effect for showing a page """ self.uCurrentEffect=uEffect try: if uEffect==u'': return True uType=ToUnicode(type(self.oRootSM.transition)) if uEffect==u'no': self.oRootSM.transition = NoTransition() if uEffect==u'fade': if uType.endswith(u'FadeTransition\'>'): return True self.oRootSM.transition = FadeTransition() elif uEffect==u'slide': if uType.endswith(u'SlideTransition\'>'): return True self.oRootSM.transition = SlideTransition() elif uEffect==u'wipe': if uType.endswith(u'WipeTransition\'>'): return True self.oRootSM.transition = WipeTransition() elif uEffect==u'swap': if uType.endswith(u'SwapTransition\'>'): return True self.oRootSM.transition = SwapTransition() elif uEffect==u'fallout': if uType.endswith(u'FallOutTransition\'>'): return True self.oRootSM.transition = FallOutTransition() elif uEffect==u'risein': if uType.endswith(u'RiseInTransition\'>'): return True self.oRootSM.transition = RiseInTransition() self.oRootSM.transition.bind(on_complete=self.On_Transition_Complete) self.oRootSM.transition.bind(on_progress=self.On_Transition_Started) return True except Exception as e: uMsg=LogError(u'TheScreen: Can not set page effect:' + uEffect,e) ShowErrorPopUp(uMessage=uMsg) return False
def on_touch_down(self, touch): global Bildschirmverwalter obj_Einzelwert = Bildschirmverwalter.ids.s100 if self.collide_point(*touch.pos): # Auslesen des Textelementes der Anzeige auf die geklickt wurde # Zuweisung des Textlabel für das Textlabel der Einzelbildanzeige obj_Einzelwert.ids.n1.text = self.ids.n1.text obj_Einzelwert.ids.w1.text = self.ids.w1.text obj_Einzelwert.ids.w1.font_size = 100 obj_Einzelwert.ids.e1.text = self.ids.e1.text obj_Einzelwert.ids.e1.text_ori = self.ids.e1.text_ori obj_Einzelwert.altesFenster = self.parent.parent.parent.name # Umschalten zur Einwertanzeige Bildschirmverwalter.transition = NoTransition() Bildschirmverwalter.current = 'bsew' # Stop aller Threads und Start des Threads für den angezeigten Wert Stop_CAN_Threads().stop() # formatieren fuer die Uebergabe global canbus_konfiguration if obj_Einzelwert.altesFenster == "bs1cw": a = canbus_konfiguration.id_nr[int(self.ref_nr)] if obj_Einzelwert.altesFenster == "bs2cw": a = canbus_konfiguration.id_nr[int(self.ref_nr) + 4] redu_botschaften_kurz = [[a[0], 0, a[1:5]]] global can0_exist if can0_exist == True: Can_lesen().start(redu_botschaften_kurz) # Anzeige aktualisieren fenster_id = "s100" Can_anzeigen().start(redu_botschaften_kurz, Bildschirmverwalter, fenster_id) else: #print("Outsside") super(CAN_Wert_Anzeige, self).on_touch_down(touch) pass
def GotoSettings(self): print("Settings") SettingsImage.color = White SettingsLabel.color = Black HomeLabel.color = Gray HomeImage.color = Gray PillImage.color = Gray PillLabel.color = Gray if sm.current == 'home': sm.transition.direction = 'right' sm.current = 'settings' elif sm.current == 'pill': sm.transition.direction = 'right' sm.current = 'settings' else: sm.transition = NoTransition() sm.current = 'settings' sm.transition = SlideTransition() pass
def on_start(self): try: with open("refresh_token.txt", "r") as f: refresh_token = f.read() id_token, local_id = self.firebase.exchange_refresh_token( refresh_token) self.local_id = local_id self.id_token = id_token self.root.ids["screen_manager"].transition = NoTransition() self.root.ids["screen_manager"].current = "home_screen" self.root.ids["screen_manager"].transition = SlideTransition() except requests.exceptions.ConnectionError: self.no_con() except: if os.stat("refresh_token.txt").st_size == 0: pass
def change_screen(self, screen_name, direction='forward', mode = ""): # Get the screen manager from the kv file screen_manager = self.root.ids['screen_manager'] #print(direction, mode) # If going backward, change the transition. Else make it the default # Forward/backward between pages made more sense to me than left/right if direction == 'forward': mode = "push" direction = 'left' elif direction == 'backwards': direction = 'right' mode = 'pop' elif direction == "None": screen_manager.transition = NoTransition() screen_manager.current = screen_name return screen_manager.transition = CardTransition(direction=direction, mode=mode) screen_manager.current = screen_name
def build(self): self.screenmanager = ScreenManager(transition=NoTransition()) self.mainscreenpage = MainScreenPage() screen = Screen(name='MainPage') screen.add_widget(self.mainscreenpage) self.screenmanager.add_widget(screen) self.standardscreenpage = StandardPage() screen = Screen(name='StandardPage') screen.add_widget(self.standardscreenpage) self.screenmanager.add_widget(screen) self.paymentscreen = PaymentPage() screen = Screen(name='PaymentPage') screen.add_widget(self.paymentscreen) self.screenmanager.add_widget(screen) return self.screenmanager
def on_start(self): try: with open("refresh_token.txt", "r") as f: refresh_token = f.read() # Use refresh_token to get a new idToken id_token, local_id = self.firebase.exchange_refresh_token( refresh_token) self.root.ids["manager"].transition = NoTransition() self.ChangeScreen("home") self.root.ids["manager"].transition = CardTransition() self.firebase_to_file() # self.set_message_list() self.get_message() self.render() # Clock.schedule_interval(self.firebase_to_file,10) # Clock.schedule_interval(self.get_message,10) except Exception as e: print(e)
def change_screen(self, screen_name, direction='forward', mode=""): # Get the screen manager from the kv file. screen_manager = self.root.ids.screen_manager if direction == "None": screen_manager.transition = NoTransition() screen_manager.current = screen_name return screen_manager.transition = CardTransition(direction=direction, mode=mode) screen_manager.current = screen_name if screen_name == "home_screen": self.root.ids.titlename.title = "Surge" if screen_name == "tata_screen": self.root.ids.titlename.title = "facilites" if screen_name == "route_screen": self.root.ids.titlename.title = "Route" self.root.ids.tata_screen.ids.tatatoolbar.ids.label_title.font_size = '13sp'
def build(self): if self._devel: Window.size = (800, 480) display = Display() display.transition = NoTransition() self._tow = Tow() display.add_widget(self._tow) self._calibrate = Calibrate(self._mapping) display.add_widget(self._calibrate) display.add_widget(ForceSelect()) self._service = Service() display.add_widget(self._service) self._battery = Battery() display.add_widget(self._battery) display.current = 'battery' Clock.schedule_interval(lambda *t: self.update(), 0.05) Clock.schedule_interval(lambda *t: self.update_slow(), 0.5) Clock.schedule_interval(lambda *t: self.update_battery(), 1) return display
def build(self): sm = ScreenManager(transition=NoTransition()) sm.config = ConfigParser() sm.config.read('config.ini') for section, options in self.config_defaults.items(): sm.config.setdefaults(section, options) for section, options in self.config_update.items(): for option, value in options.items(): if sm.config.get(section, option) == '': sm.config.set(section, option, value) sm.config.write() sm.config_defaults = self.config_defaults sm.add_widget(MainScreen(name='main')) sm.add_widget(SettingsScreen(name='settings')) return sm
def build(self): sm = ScreenManager(transition=NoTransition()) m = scanner_machine.ScannerMachine(sm) m.read_in_calibration_values() sm.add_widget( screen_welcome.WelcomeScreenClass(name='welcome', screen_manager=sm, scanner=m)) sm.add_widget( screen1.YowieScreen1(name='s1', screen_manager=sm, scanner=m)) sm.add_widget( screen2.YowieScreen2(name='s2', screen_manager=sm, scanner=m)) sm.add_widget( screen3.YowieScreen3(name='s3', screen_manager=sm, scanner=m)) sm.add_widget( screen4.YowieScreen4(name='s4', screen_manager=sm, scanner=m)) sm.current = 'welcome' return sm
def build(self): self.screen_manager = ScreenManager(transition=NoTransition()) self.tsc = SmartCardBehavior( 'Home', reader_added_callback=self.smart_card_reader_added_callback, reader_removed_callback=self.smart_card_reader_removed_callback, card_insert_callback=self.smart_card_inserted_callback, #card_remove_callback=self.smart_card_remove_callback, card_reinsert_callback=None, card_remove_forever_callback=None) with open(f'lib\\Loading.kv', encoding='utf8') as f: Builder.load_string(f.read()) self.loading_page = LoadingPage() screen = Screen(name='Loading') screen.on_enter = self.loading_page.load_pages screen.add_widget(self.loading_page) self.screen_manager.add_widget(screen) return self.screen_manager
def build(self) -> ScreenManager: """Initialize the GUI based on the kv file and set up events. :rtype: ScreenManager :return: Root widget specified in the kv file of the app """ sm = ScreenManager(transition=NoTransition()) sm.add_widget(stages.MainMenu(name='mainmenu')) sm.add_widget(stages.Discussion(name='discussion')) sm.add_widget(stages.Tutorial(name='tutorial')) sm.add_widget(stages.PlayerStatus(name='playerstatus')) sm.add_widget(stages.StagesTutorial(name='stagestutorial')) sm.add_widget(stages.Credits(name='credits')) sm.add_widget(stages.LoadingDT(name='loadingDT')) sm.add_widget(stages.Trial(name='trial')) sm.add_widget(stages.LoadingTN(name='loadingTN')) sm.add_widget(stages.Night(name='night')) sm.add_widget(stages.LoadingND(name='loadingND')) sm.add_widget(stages.GameOverMenu(name='gameovermenu')) return sm
def __init__(self, **kwargs): super(IshaPiScreens, self).__init__(**kwargs) self.transition = NoTransition() self.menuScreenSaver = Screen(name="blackscreen") self.menuMainScreen = Screen(name="main_menu") self.shutdownScreen = Screen(name="shutdown") tabIds = [ control_tree.selectId['system'], control_tree.selectId['videos'], control_tree.selectId['music'], control_tree.selectId['playlist'], control_tree.selectId['settings'], ] self.mainMenu = MainMenu(root=self, idList=tabIds) self.menuMainScreen.add_widget(self.mainMenu) self.add_widget(self.menuMainScreen) self.add_widget(self.menuScreenSaver) self.current = "main_menu"
def build(self): self.screenmanager = ScreenManager(transition=NoTransition()) self.startscreen = StartPage() screen = Screen(name='StartPage') screen.add_widget(self.startscreen) self.screenmanager.add_widget(screen) self.selectionscreen = SelectionPage() screen = Screen(name='SelectionPage') screen.add_widget(self.selectionscreen) self.screenmanager.add_widget(screen) self.lndpaymentscreen = LndPaymentPage() screen = Screen(name='PaymentPage') screen.add_widget(self.lndpaymentscreen) self.screenmanager.add_widget(screen) self.screenmanager.current = 'StartPage' return self.screenmanager
def setPacingModetext(mode): global pacingMode pacingMode = mode print(pacingMode) global paceLocation, sensingTrue ## check if atrium, ventrial, or dual if (pacingMode == "AOO" or pacingMode == "AAI"): paceLocation = 1 elif (pacingMode == "VOO" or pacingMode == "VVI"): paceLocation = 2 ##check sensing or not if (pacingMode == "AAI" or pacingMode == "VVI"): sensingTrue = 1 else: sensingTrue = 0 manageWin.transition = NoTransition() manageWin.current = "welcomeWin" manageWin.current = "mainWin"
def build(self): Window.minimum_height = 600 Window.minimum_width = 800 #Window.borderless = 1 sm = ScreenManager(transition=NoTransition()) self.graph = GraphScreen(name='graph') self.settings = Settings(name='settings') self.monitor = ErgMonitorBase(name='monitor') self.scores = WorkoutScores(name='scores') #self.graph.update_graphs() Clock.schedule_interval(self.graph.update_graphs, 1 / 60.) self.start_update_thread() sm.add_widget(self.monitor) sm.add_widget(self.scores) sm.add_widget(self.settings) sm.add_widget(self.graph) return sm
def build(self): """This is the main-application. The build method follows the __init__ method and has to be completed unless nothing is shown on screen. 3 screens will be created. A screen manager coordinates the transition and holds the screens. Screens will be called by their name for switching""" Window.show_cursor = False print('create Screenmanager and Screens') self.screenmanager = ScreenManager(transition=NoTransition()) # creates the welcome page and adds it to the screen manager self.startpage = page_start.StartPage() screen = Screen(name='MainPage') screen.add_widget(self.startpage) self.screenmanager.add_widget(screen) # creates a page where you can choose between lnurl and lnd # it is also added to the screen manager self.selectionpage = page_selection.SelectionPage() screen = Screen(name='SelectionPage') screen.add_widget(self.selectionpage) self.screenmanager.add_widget(screen) # creates a page for the lnurl payment process # it is also added to the screen manager self.paymentpage = page_lnd_payment.PaymentPage() screen = Screen(name='PaymentPage') screen.add_widget(self.paymentpage) self.screenmanager.add_widget(screen) print('Screens created') print('Initialize CoinAcceptor, including Pins') # sets all important basics for the raspberry pi and the coinacceptor # espacially pins and countingsystem of the pins acceptor.CoinAcceptor.setup_acceptor() return self.screenmanager
def build(self): table = TV( size=(Window.size[0], Window.size[1]), pos_hint={ 'x': 0.0, 'y': 0.0 }, do_scroll_x=True, ) table.populate("log.db") #print(str(table)) self.root.ids.sm.transition = NoTransition() self.root.ids.scr_second_box.add_widget(table) def _on_rotate(obj, *args): #print(*args) self.on_rotate(*args) Window.bind(on_rotate=_on_rotate) Window.bind(on_resize=_on_rotate) #scr2.add_widget(RV()) print("Vsykuyu hernyu delat tut")
def build(self): """Make sure I can use the database, create the tables as needed, and return the root widget. """ self.icon = 'icon_24px.png' config = self.config Logger.debug("ELiDEApp: starting with world {}, path {}".format( config['LiSE']['world'], LiSE.__path__[-1])) if config['ELiDE']['debugger'] == 'yes': import pdb pdb.set_trace() self.manager = ScreenManager(transition=NoTransition()) if config['ELiDE']['inspector'] == 'yes': from kivy.core.window import Window from kivy.modules import inspector inspector.create_inspector(Window, self.manager) self._start_subprocess() self._add_screens() return self.manager
def build(self): # Establish screens sm = ScreenManager(transition=NoTransition()) systemtools_sm = Mock() systemtools_sm.sm = sm # Localization/language object l = localization.Localization() # Initialise settings object sett = Mock() sett.ip_address = '' # Initialise 'j'ob 'd'ata object jd = Mock() calibration_db = Mock() # Initialise 'm'achine object # m = router_machine.RouterMachine(Cmport, sm, sett, l, jd) m = Mock() test_screen = OvernightTesting(name='overnight_testing', m=m, systemtools=systemtools_sm, calibration_db=calibration_db, sm=systemtools_sm.sm, l=l) sm.add_widget(test_screen) sm.current = 'overnight_testing' # Clock.schedule_once(m.s.start_services, 4) return sm
def _tick(self, *args): ret, img = self.cap.read() img = cv2.flip(img, 1) img2 = cv2.addWeighted(img, 0.7, self.art_style, 0.3, 0) """ mask = None for bg in self.bgs: diff = (np.linalg.norm(img.astype(float)-bg, axis=2)/3).astype(np.uint8) r, mask0 = cv2.threshold(diff,6,255,cv2.THRESH_BINARY) if mask is None: mask = mask0 else: mask = cv2.bitwise_or(mask, mask0) mask_inv = cv2.bitwise_not(mask) style2 = (cv2.bitwise_and(self.art_style, self.art_style, mask=mask_inv)*0.5).astype(np.uint8) img3 = cv2.bitwise_and(img, img, mask=mask) img2 = cv2.add(img3, style2) """ image = cv2.flip(img2, 0) self.video_texture.blit_buffer(image.tostring(), colorfmt='bgr', bufferfmt='ubyte') self.canvas.ask_update() img2 = img if self.state is not 'wait': if self.state == 0: print("照相") root.photo_content = img2 root.art_style = self.art_style root.transition = NoTransition() root.current = "process" if self.state % 20 == 0: self.ids.w_info.text = "倒數 %d 照相 (按鍵取消重選)" % (self.state // 30) self.ids.w_info.font_size = 32 self.state -= 1
def build(self): self.title = "Bitbot" self.app_settings_folder = os.path.join(getattr(self, 'user_data_dir'), 'database') self.app_settings = os.path.join(self.app_settings_folder, 'config.json') self.logger = Logger from screens.home import home from screens.chat import chat self.root = ScreenManager() self.home = home.Home() self.chat = chat.Chat() self.screens = { "home": self.home, "chat": self.chat, } self.screen_history = [] Window.bind(on_key_up=self.back_button) Window.softinput_mode = "below_target" self.root.transition = NoTransition() self.get_theme() self.switch_screen("home")
def build(self): self.title = 'PySchulte App' self.sm = ScreenManager(transition=NoTransition()) menu_screen = MenuScreen(name="menu") self.sm.add_widget(menu_screen) self._size = 5 settings_screen = SettingsScreen(name="settings") self.sm.add_widget(settings_screen) scores_screen = ScoresScreen(name="scores") self.sm.add_widget(scores_screen) about_screen = AboutScreen(name="about") self.sm.add_widget(about_screen) main_screen = Screen(name="table") self.table_ui = BoxLayout(orientation="vertical", padding=[20, 20, 20, 20]) main_screen.add_widget(self.table_ui) self.sm.add_widget(main_screen) return self.sm
def on_touch_down(self, touch): global Bildschirmverwalter, can0_exist, canbus_konfiguration obj_Einzelwert = Bildschirmverwalter.ids.s100 if self.collide_point(*touch.pos): # Umschalten zur Einwertanzeige Bildschirmverwalter.transition = NoTransition() Bildschirmverwalter.current = obj_Einzelwert.altesFenster # stoppt alle Threads wenn auf die Gesamtanzeige zurueck gegangen wird Stop_CAN_Threads().stop() # Start der Threads fuer die Gesamtanzeige if can0_exist == True: if obj_Einzelwert.altesFenster == "bs1cw": redu_botschaften = CANBUS().botschaften_sortieren( canbus_konfiguration.id_nr[0:4]) Can_lesen().start(redu_botschaften) # Start Anzeige fenster_id = "s1" Can_anzeigen().start(redu_botschaften, Bildschirmverwalter, fenster_id) if obj_Einzelwert.altesFenster == "bs2cw": redu_botschaften = CANBUS().botschaften_sortieren( canbus_konfiguration.id_nr[4:8]) Can_lesen().start(redu_botschaften) # Start Anzeige fenster_id = "s2" Can_anzeigen().start(redu_botschaften, Bildschirmverwalter, fenster_id) return True else: #print("Outsside") super(CAN_Wert_Anzeige, self).on_touch_down(touch) pass
class ScreenManagement(ScreenManager): # Kivy 1.10.1-dev 이상은 아래 설정이 안 먹히므로 AppMain에서 설정해야 된다. ScreenManager.transition = NoTransition()
def to_signinapoteker(self): self.parent.parent.transition = NoTransition() self.parent.parent.switch_to(self.parent.parent.parent.ids.scrn_sia)
def __init__(self, **kwargs): super(MainScreen, self).__init__(**kwargs) #Main Methods def RunAnalysis(): formatted = projectTextInput.text.split("[u'")[1] formatted = formatted.split("']")[0] pathForJArchitect = formatted print "\n\n" + "pathForJArchitect = "+ pathForJArchitect + "\n\n" formatted = formatted.split("\\") arrLength = len(formatted) #print formatted #print "\n\n" pathForMetrix = "..\\" + formatted[arrLength - 5] + "\\" + formatted[arrLength - 3] print "\n\n" + "pathForMetrix = "+ pathForMetrix + "\n\n" statusLabel.text = "Running Metrix++..." print "Running Metrix++..." L1 = get_metrix(pathForMetrix) statusLabel.text = "Running JArchitect..." print "Running JArchitect..." L2 = get_jarch_metrices(pathForJArchitect) statusLabel.text = "Parsing Data..." print "Parsing Data..." CombineAndExportData(L1, L2) statusLabel.text = "Analysis Complete!" print "Analysis Complete!" #Callback Methods def analyzeButtonCallback(instance): print('analyze button was pressed') self.current = 'Setup' def exitButtonCallback(instance): print('exit button was pressed') def browseInputButtonCallback(instance): print('browse button was pressed') self.current = 'inputscreen' def browseOutputButtonCallback(instance): self.current = 'outputscreen' def runButtonCallback(instance): self.current = 'status' RunAnalysis() def viewReportButtonCallback(instance): print "View Report Button Pressed" def fbrowser_canceled(instance): print 'cancelled, Close self.' def fbrowser_success(instance): projectTextInput.text = str(instance.selection) self.current = 'Setup' def outfbrowser_success(instance): outputPathTextInput.text = str(instance.selection) self.current = 'Setup' self.transition = NoTransition() #Labels welcomeLabel = Label(text='Clone Detective', halign='center', font_size=72, pos=(5, -10)) #Buttons analyzeButton = Button(text='New Analysis', pos=(170, 100), font_size=14, size_hint = (.2,.1)) analyzeButton.bind(on_press=analyzeButtonCallback) exitButton = Button(text='Exit', pos=(450, 100), font_size=14, size_hint = (.2,.1)) exitButton.bind(on_press=exitButtonCallback) #Welcome screen layout = BoxLayout(orientation='vertical') layout2 = BoxLayout(orientation='horizontal') layout.add_widget(welcomeLabel) layout2.add_widget(analyzeButton) layout2.add_widget(exitButton) layout.add_widget(layout2) WelcomeScreen = Screen(name='Welcome') WelcomeScreen.add_widget(layout) #Setup screen #Main Layout for the setup screen mainSetupLayout = BoxLayout(orientation='vertical') #Layout that contains the widgets for the input project browseInputLabel = Label(text='Input Project', halign='center', valign='middle', font_size=24)#, pos=(5, -10)) projectTextInput = TextInput(text="path to input project goes here") browseInputButton = Button(text='Browse', pos=(450, 100), font_size=14, size_hint = (.2,.1)) browseInputButton.bind(on_press=browseInputButtonCallback) inputlayout = BoxLayout(orientation='horizontal') inputlayout.add_widget(browseInputLabel) inputlayout.add_widget(projectTextInput) inputlayout.add_widget(browseInputButton) """#Layout that contains the widgets for the output project browseOutputLabel = Label(text='Output Folder', halign='center', valign='middle', font_size=24) outputPathTextInput = TextInput(text="path to where we will create the report .csv file") browseOutputButton = Button(text='Browse', pos=(450, 100), font_size=14, size_hint = (.2,.1)) browseOutputButton.bind(on_press=browseOutputButtonCallback) outputlayout = BoxLayout(orientation='horizontal') outputlayout.add_widget(browseOutputLabel) outputlayout.add_widget(outputPathTextInput) outputlayout.add_widget(browseOutputButton)""" #Last but not least....the run button! runButton = Button(text='RUN', pos=(450, 100), font_size=14) runButton.bind(on_press=runButtonCallback) mainSetupLayout.add_widget(inputlayout) #mainSetupLayout.add_widget(outputlayout) mainSetupLayout.add_widget(runButton) #Add the mainSetupLayout to the Setup Screen SetupScreen = Screen(name='Setup') SetupScreen.add_widget(mainSetupLayout) #InputBrowserScreen if platform=='win': user_path = dirname(expanduser('~')) + sep + 'Documents' else: user_path = expanduser('~') + sep + 'Documents' InputBrowserScreen = Screen(name='inputscreen') inputFileBrowser = FileBrowser(select_string='Select', favorites=[(user_path, 'Documents')]) inputFileBrowser.bind(on_success=fbrowser_success, on_canceled=fbrowser_canceled) InputBrowserScreen.add_widget(inputFileBrowser) OutputBrowserScreen = Screen(name='outputscreen') OutputFileBrowser = FileBrowser(select_string='Select', favorites=[(user_path, 'Documents')]) OutputFileBrowser.bind(on_success=outfbrowser_success, on_canceled=fbrowser_canceled) OutputBrowserScreen.add_widget(OutputFileBrowser) #Status Screen statusLabel = Label(text='Starting Analysis....', halign='center', font_size=72, pos=(5, -10)) reportButton = Button(text='View Report', pos=(170, 100), font_size=14) reportButton.bind(on_press=viewReportButtonCallback) statusMainLayout = BoxLayout(orientation='vertical') statusSubLayout = BoxLayout(orientation='horizontal') statusMainLayout.add_widget(statusLabel) statusMainLayout.add_widget(reportButton) StatusScreen = Screen(name='status') StatusScreen.add_widget(statusMainLayout) #Add screens to the screen manager self.add_widget(WelcomeScreen) self.add_widget(SetupScreen) self.add_widget(StatusScreen) self.add_widget(InputBrowserScreen) self.add_widget(OutputBrowserScreen) #Set the initial screen self.current = 'Welcome'