Indicators: Creating Safety-Critical UI

/**************************************************************************** ** ** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Safe Renderer module ** ** $QT_BEGIN_LICENSE:COMM$ ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** $QT_END_LICENSE$ ** ** ** ** ** ** ** ** ****************************************************************************/
#if defined(QSR_HOST_BUILD) #include <QGuiApplication> #endif #include <QtSafeRenderer/qsafelayout.h> #include <QtSafeRenderer/qsafelayoutresourcereader.h> #include <QtSafeRenderer/statemanager.h> #include "safewindow.h" #include "eventhandler.h" using namespace SafeRenderer; int main(int argc, char **argv) { //In desktop environment we have to initialize QGuiApplication #if defined(QSR_HOST_BUILD) QGuiApplication app(argc, argv); #else (void)argc; (void)argv; #endif static QSafeLayoutResourceReader layout("/layoutData/MainForm/MainForm.ui.srl"); SafeWindow telltaleWindow(layout.size()); static SafeRenderer::StateManager stateManager(telltaleWindow, layout); telltaleWindow.requestUpdate(); //Request is required because eventHandler is not running yet. EventHandler msgHandler(stateManager, telltaleWindow); msgHandler.handleEvents(); return 0; }