def __init__(self, sys_argv): super(App,self).__init__(sys_argv) self._model =Model() self._main_controller = MainController(self._model) self._main_view = MainView(self._model,self._main_controller) self._main_view.show()
def __init__(self, sys_argv): super(App, self).__init__(sys_argv) # Connect everything together self.model = Model() self.main_ctrl = MainController(self.model) self.main_view = MainView(self.model, self.main_ctrl) self.main_view.show()
def __init__(self): self.ca = None self.rules = Rules() root = Tk() self.main_view = MainView(root, self) self.reload() root.mainloop()
def __init__(self, argv): super(App, self).__init__(argv) self.setStyle('Macintosh') self.model = Model() self.file_table_model = fileTableModel(data=[], header=[ "File path", "Has segmentation mask?", "Segmentation mask path", "Scale" ]) self.filter_table_model = filterTableModel( data=[], header=["Object", "Function", "Value"]) self.main_controller = ImageDisplayController(self.model) self.image_manager_controller = ImageManagerController( self.file_table_model) self.filter_controller = FilterController( self.model, self.filter_table_model, self.model.current_image_model) self.main_view = MainView(self.model, self.file_table_model, self.filter_table_model, self.main_controller, self.image_manager_controller, self.filter_controller) self.main_view.show()
def __init__(self, argv): super(QApplication,self).__init__(argv) self.model = MainModel() self.controller = MainController(self.model) self.mainView = MainView(self.model,self.controller) self.mainView.show()
def main(): try: MainView().main() except EOFError: print() print("Bye!") except KeyboardInterrupt: pass
def __init__(self): super().__init__() if not Config.exists(): Config.set_defaults() self.watch_only_wallet = WatchOnlyWallet() self.main_controller = MainController(self.watch_only_wallet) self.main_view = MainView(self.main_controller, self.watch_only_wallet) self.main_controller.sync_to_blockchain_loop_async() self.main_controller.sync_to_hardware_wallet_loop_async()
def __init__(self, sys_argv): super(Autonimo, self).__init__(sys_argv) # model self.model = Model(self) # controllers self.comp_ctrl = ComponentController(self.model) self.task_ctrl = TaskController(self.model) # self.task_ctrl.import_tasks('tasks') # views self.main_view = MainView(self.model, self.comp_ctrl, self.task_ctrl) self.main_view.show()
def show_main_view(self, from_main): """Shows the main window depending on where the application comes from. If the from_main flag is true, the configuration comes from the previous GUI views. Otherwise, the configuration comes from a configuration file. Eitherway, the main view will be shown with the proper configuration. Arguments: from_main {bool} -- tells if the configuration comes from either configuration file or GUI. """ if not from_main: layout_configuration = self.layout_selector.get_config() delete_widgets_from(self.parent.main_layout) else: layout_configuration = None self.main_view = MainView(layout_configuration, self.configuration, self.controller, self.parent) self.parent.main_layout.addWidget(self.main_view) self.fadein_animation() self.start_thread()
def __init__(self, window, *a, **kw): super(Application, self).__init__(*a, **kw) self._window = window # Create and start an audio thread. # It's going to communicate with the main thread through a thread-safe queue. self._notes_queue = Queue(maxsize=1) self._rompler = Rompler(name="AudioThread", notes_queue=self._notes_queue) self._rompler.start() # Create the app's GUI self._view = MainView(window, self._rompler) # Stop the audio thread when the app is closing window.protocol("WM_DELETE_WINDOW", self._on_closing) window.bind("<Key>", self._handle_keypress) window.bind("<KeyRelease>", self._handle_keyrelease)
def __init__(self): window = tk.Tk() MainController(MainView(window),MasterTransceiverInterface()) window.mainloop()
from tools.framebuffer import Framebuffer from views.main_view import MainView import traceback try: framebuffer = Framebuffer() surface = framebuffer.get_framebuffer_suface() v = MainView(surface) while True: v.update(surface) except Exception: print(traceback.format_exc(Exception))
def demo(): app = QApplication(sys.argv) app_window = MainView() sys.exit(app.exec_())
def __init__(self, sys_argv): super(App, self).__init__(sys_argv) self.main_view = MainView() self.main_view.show()