C
Qt Safe Monitor: Qt Quick Ultralite Example on Bare-Metal Traveo II
// Copyright (C) 2025 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial #ifndef DEMOSTATUS_H #define DEMOSTATUS_H #ifdef __cplusplus #include <qul/eventqueue.h> #include <qul/property.h> #include <qul/singleton.h> #include <QtSafeRenderer/qsafeglobal.h> #else #include <stdbool.h> #endif #ifdef __cplusplus struct DemoStatus : public Qul::Singleton<DemoStatus>, public Qul::EventQueue<bool> { void onEvent(const bool &value) { // Dummy event queue to trigger UI updates (void) value; } Qul::Property<SafeRenderer::qint> speed; Qul::Signal<void(bool beamsState)> beamsStateChange; Qul::Signal<void(bool engineState)> engineStateChange; Qul::Signal<void(bool batteryState)> batteryStateChange; Qul::Signal<void(bool oilState)> oilStateChange; Qul::Signal<void(bool screenFailureState)> screenFailureStateChange; }; extern "C" { #endif void qul_application_set_speed(SafeRenderer::qint speed); void qul_application_set_safe_beams_state(bool state); void qul_application_set_safe_engine_state(bool state); void qul_application_set_safe_battery_state(bool state); void qul_application_set_safe_oil_state(bool state); void qul_application_set_screen_failure_state(bool state); void qul_application_send_value_change_event(void); #ifdef __cplusplus } #endif #endif // DEMOSTATUS_H