class vtkRegistration(QtGui.QApplication): def __init__(self, imgDims, stlPath, camMatrix, sys_argv): super(vtkRegistration, self).__init__(sys_argv) self.model = MainModel(imgDims, stlPath, camMatrix) self.controller = MainController(self.model) self.view = MainView(self.model, self.controller) self.view.show()
class App(QApplication): 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()
class App(QApplication): 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()
class App(QApplication): 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()
class Application(QApplication): 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()
class Autonimo(QtGui.QApplication): 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()
class App(QtGui.QApplication): def __init__(self, sys_argv): super(App, self).__init__(sys_argv) self.model = Model() self.main_ctrl = MainController(self.model) self.main_view = MainView(self.model, self.main_ctrl) self.main_view.show() "Attempt to enable global key presses and key releases" def notify(self, receiver, event): if self.model.get_output_popup_open_status() == False: if event.type() == QtCore.QEvent.KeyPress: self.main_view.keyboard.keyPressEvent(event) elif event.type() == QtCore.QEvent.KeyRelease: self.main_view.keyboard.keyReleaseEvent(event) # Call Base Class Method to Continue Normal Event Processing return super(App, self).notify(receiver, event) def closeEvent(self, event): quit_msg = "Are you sure you want to exit the program?" reply = QtGui.QMessageBox.question(self, "Message", quit_msg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No) if reply == QtGui.QMessageBox.Yes: if self.main_ctrl.output_ctrl.midi_port_open() is True: self.main_ctrl.output_ctrl.midiout.close() event.accept() else: event.ignore()
class App(QApplication): def __init__(self, sys_argv): super(App, self).__init__(sys_argv) self.main_view = MainView() self.main_view.show()