main.cpp Example File

/**************************************************************************** ** ** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Safe Renderer module ** ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** 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. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $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. */ #include <QtCore> #include <QtGui> #include <QWindow> #include <QTime> #include <QThread> #include "events.h" #include <QtSafeRenderer/qsafelayout.h> #include <QtSafeRenderer/statemanager.h> #include "rasterwindow.h" #include "msghandler.h" using namespace SafeRenderer; int main(int argc, char **argv) { QGuiApplication app(argc, argv); if (argc > 1) { QSafeLayoutFileReader layout(argv[1U]); RasterWindow telltaleWindow(layout.size()); StateManager stateManager(telltaleWindow, layout); for (quint32 i=0U;i<layout.count(); i++) { QSafeEventVisibility visible; visible.setId(layout.item(i).id()); visible.setValue(1U); stateManager.handleEvent(visible); } MsgHandler msgHandler(&stateManager, 32112U); telltaleWindow.show(); return app.exec(); } else { qWarning() << "Give QML file as parameter."; return(-1); } }

Available under certain Qt licenses.
Find out more.