def onLogOutButton(self): print("Log out button") # LauncherSettings.set("database_username", "") # if LauncherSettings.get("database_username") == "Foo": # LauncherSettings.set("database_username", "") # else: # LauncherSettings.set("database_username", "Foo") from system.wsopen import wsopen wsopen("SYS:Special/Logout", window=self.getWindow())
def app_main(): print("prefs") qapplication = init_qt() print("FIXME: Saira - read from proper data location") with open( os.path.expanduser( "~/openretro/git/fsemu/data/SairaCondensed-Medium.ttf" ), "rb", ) as f: QFontDatabase.addApplicationFontFromData(f.read()) with open( os.path.expanduser( "~/openretro/git/fsemu/data/SairaCondensed-Medium.ttf" ), "rb", ) as f: QFontDatabase.addApplicationFontFromData(f.read()) with open( os.path.expanduser( "~/openretro/git/fsemu/data/SairaCondensed-SemiBold.ttf" ), "rb", ) as f: QFontDatabase.addApplicationFontFromData(f.read()) with open( os.path.expanduser( "~/openretro/git/fsemu/data/SairaCondensed-Bold.ttf" ), "rb", ) as f: QFontDatabase.addApplicationFontFromData(f.read()) initialize_qt_style(qapplication) from launcher.launcherapp import LauncherApp launcherapp = LauncherApp() # from launcher.ui.launcherwindow import LauncherWindow # launcherwindow = LauncherWindow() # launcherwindow.show() # window = PrefsWindow(app) # window.show() app = Application() from system.wsopen import wsopen wsopen("SYS:Prefs/WHDLoad") qapplication.exec_()
def __on_execute(self): self._command = self.textfield.text().strip() self.close() # self.end_modal(True) from system.wsopen import wsopen command = self.command() if ":" not in command: print("FIXME: Hack, prefixing command with C: for now") command = "C:" + command wsopen(command)
def _app_main_2(qapplication, appname): launcherapp = LauncherApp() theme = get_global_theme() initialize_qt_style(qapplication, theme) # debug_sys_stdout() app = Application() if appname.lower().endswith(":launcher"): if Settings.get(WORKSPACE_ON_STARTUP) == "1": wsopen("C:LoadWB") if appname: wsopen(appname) else: wsopen("SYS:Launcher") qapplication.exec_()
def __on_database_updater(self): wsopen("SYS:Tools/DatabaseUpdater", window=self.getWindow())
def on_left_dclick(self): print("on_left_dlick") if hasattr(self, "wsopen") and self.wsopen: from system.wsopen import wsopen wsopen(self.wsopen, window=self.window, parent=self.window)
def __on_utilities(self): wsopen("SYS:Utilities")
def onLogInButton(self): print("Log in button") # LauncherSettings.set("database_username", "FooBar") from system.wsopen import wsopen wsopen("SYS:Special/Login", window=self.getWindow())
def __on_preferences(self): wsopen("SYS:Prefs")
def __on_tools(self): wsopen("SYS:Tools")
def __on_execute_command(self): wsopen("Special:Execute")
def __on_new_window(self): wsopen("SYS:Launcher")
def __on_file_scanner(self): wsopen("SYS:Tools/FileScanner", window=self.getWindow())
def __on_whdload_preferences(self): wsopen("SYS:Prefs/WHDLoad", window=self.getWindow())
def __on_utilities(self): wsopen("SYS:Utilities", window=self.getWindow())
def __on_tools(self): wsopen("SYS:Tools", window=self.getWindow())
def __on_preferences(self): wsopen("SYS:Prefs", window=self.getWindow())