Telltales: Rendering 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$ ** ** ** ** ** ** ** ** ****************************************************************************/
/* Purpose of this example is to enable development of Qt Safe Renderer in desktop environment (Windows and Linux). Note that this example is NOT implemented according Misra C++ 2008 nor ISO26262 functional safety standards and it depends on Qt classes. You should not use this example in production environment. */ #if defined(QSR_HOST_BUILD) #include <QGuiApplication> #endif #include "events.h" #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("/qtcluster/layoutData/DashboardForm/DashboardForm.ui.srl"); SafeWindow telltaleWindow(layout.size()); static SafeRenderer::StateManager stateManager(telltaleWindow, layout); EventHandler msgHandler(stateManager, telltaleWindow); msgHandler.handleEvents(); #if defined(QSR_HOST_BUILD) return app.exec(); #else return 0; #endif }