def main():
    app = QApplication(sys.argv)
    modeler = UaModeler()
    handler = QtHandler(modeler.ui.logTextEdit)
    logging.getLogger().addHandler(handler)
    logging.getLogger("uamodeler").setLevel(logging.INFO)
    logging.getLogger("uawidgets").setLevel(logging.INFO)
    #logging.getLogger("opcua").setLevel(logging.INFO)  # to enable logging of ua server
    modeler.show()
    sys.exit(app.exec_())
Beispiel #2
0
def main():
    app = QApplication(sys.argv)
    client = Window()
    handler = QtHandler(client.ui.logTextEdit)
    logging.getLogger().addHandler(handler)
    logging.getLogger("uaclient").setLevel(logging.INFO)
    logging.getLogger("uawidgets").setLevel(logging.INFO)
    #logging.getLogger("opcua").setLevel(logging.INFO)  # to enable logging of ua client library

    client.show()
    sys.exit(app.exec_())
Beispiel #3
0
def main():
    app = QApplication(sys.argv)
    client = Window()
    handler = QtHandler(client.ui.logTextEdit)
    logging.getLogger().addHandler(handler)
    logging.getLogger("uaclient").setLevel(logging.INFO)
    logging.getLogger("uawidgets").setLevel(logging.INFO)
    #logging.getLogger("opcua").setLevel(logging.INFO)  # to enable logging of ua client library

    # set stylesheet
    if (QSettings().value("dark_mode", "false") == "true"):
        file = QFile(":/dark.qss")
        file.open(QFile.ReadOnly | QFile.Text)
        stream = QTextStream(file)
        app.setStyleSheet(stream.readAll())

    client.show()
    sys.exit(app.exec_())
Beispiel #4
0
def main():
    globvars.init_globvars()
    globvars.initMainLogger()

    globvars.logger = globvars.mainLogger

    model = CMTModel()
    globvars.controller = Controller(model)
    model.initData(globvars.controller)

    app = QApplication(sys.argv)
    view = CMTWidget(model, globvars.controller)
    client = MainWindow(view)

    qt_handler = QtHandler(client.ui.logTextEdit)
    qt_handler.setLevel(logging.INFO)
    qt_handler.setFormatter(globvars.loggingdata.formatter)
    globvars.mainLogger.addHandler(qt_handler)

    globvars.mainLogger.info("Covalyzer Startup")
    globvars.mainLogger.info("Settings at %s", client.settings.fileName())

    client.show()
    sys.exit(app.exec_())