Ejemplo n.º 1
0
 def errorBox(self, text):
     Dialogs.errorBox(text)
Ejemplo n.º 2
0
    try:
        controller = Pyro4.Proxy("PYRONAME:" + Controller.pyroName)

        remoteVersion = controller.getVersion()

        if remoteVersion != Controller.version:
            raise VersionMismatchError(remoteVersion, Controller.version)

        myapp = MainWindow(controller)

        client = Client(myapp)
        client.setDaemon(True)
        client.start()
        client.started.wait()
        atexit.register(lambda: controller.unregisterClient(client.uri))

        controller.registerClient(client.uri)

        if args.fullscreen:
            QApplication.setOverrideCursor(Qt.BlankCursor)
            myapp.showFullScreen()
        else:
            myapp.show()
        sys.exit(app.exec_())

    except (NamingError, CommunicationError):
        Dialogs.errorBox("Unable to connect to controller. Please check network connections and try again.")
    except VersionMismatchError as e:
        Dialogs.errorBox(str(e))