def main(): main_app = QApplication(sys.argv) main_app.main_window = MainWindow() main_app.main_window.show() main_app.setStyle('fusion') main_app.controller = MainController(main_app) sys.exit(main_app.exec_())
def show_main_window(app: QApplication, args): options = Options.with_default_data_dir() options.load_from_disk() from randovania.gui.main_window import MainWindow main_window = MainWindow(options, getattr(args, "preview", False)) app.main_window = main_window main_window.show()
def main_gui(): main_app = QApplication(sys.argv) QThread.currentThread().setPriority(QThread.HighPriority) main_app.setStyle('fusion') main_app.main_window = MainWindow() main_app.main_window.show() # main_app.controller = MainController(main_app) sys.exit(main_app.exec_())
def show_main_window(app: QApplication, args): options = Options.with_default_data_dir() if not load_options_from_disk(options): raise SystemExit(1) from randovania.gui.main_window import MainWindow main_window = MainWindow(options, getattr(args, "preview", False)) app.main_window = main_window main_window.show() main_window.request_new_data()
async def show_main_window(app: QApplication, options, is_preview: bool): from randovania.interface_common.preset_manager import PresetManager preset_manager = PresetManager(options.data_dir) await preset_manager.load_user_presets() from randovania.gui.main_window import MainWindow main_window = MainWindow(options, preset_manager, app.network_client, is_preview) app.main_window = main_window main_window.show() await main_window.request_new_data()
async def show_main_window(app: QtWidgets.QApplication, options, is_preview: bool): from randovania.interface_common.preset_manager import PresetManager preset_manager = PresetManager(options.data_dir) logger.info("Loading user presets...") await preset_manager.load_user_presets() logger.info("Finished loading presets!") from randovania.gui.main_window import MainWindow logger.info("Preparing main window...") main_window = MainWindow(options, preset_manager, app.network_client, is_preview) app.main_window = main_window logger.info("Displaying main window") main_window.show() await main_window.request_new_data()
def show_main_window(app: QApplication, is_preview: bool): options = Options.with_default_data_dir() preset_manager = PresetManager(options.data_dir) for old_preset in options.data_dir.joinpath("presets").glob( "*.randovania_preset"): old_preset.rename( old_preset.with_name( f"{old_preset.stem}.{Preset.file_extension()}")) if not load_options_from_disk(options): raise SystemExit(1) if not load_user_presets(preset_manager): raise SystemExit(2) from randovania.gui.main_window import MainWindow main_window = MainWindow(options, preset_manager, is_preview) app.main_window = main_window main_window.show() main_window.request_new_data()