Qt Quick Ultralite Thermostat Demo

/****************************************************************************** ** ** Copyright (C) 2023 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Ultralite 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 http://www.qt.io/terms-conditions. For further ** information use the contact form at http://www.qt.io/contact-us. ** ** $QT_END_LICENSE$ ** ******************************************************************************/
#ifndef BENCHMARKMODE_H #define BENCHMARKMODE_H #include <qul/object.h> #include <qul/property.h> #ifdef QUL_DEMO_BENCHMARK_MODE #if !(defined(QUL_ENABLE_HARDWARE_PERFORMANCE_LOGGING) && defined(QUL_ENABLE_PERFORMANCE_LOGGING)) #error \ "Benchmark mode requires defining the following macros: QUL_ENABLE_HARDWARE_PERFORMANCE_LOGGING and QUL_ENABLE_PERFORMANCE_LOGGING" #endif #endif struct BenchmarkMode : Qul::Object { BenchmarkMode() { #ifdef QUL_DEMO_BENCHMARK_MODE enabled.setValue(true); #else enabled.setValue(false); #endif } Qul::Property<bool> enabled; }; #endif // BENCHMARKMODE_H