C
Qt Quick Ultralite Motorcycle Cluster Demo
Demonstrates integrating QML and C++, and handling multiple variants of the same design.
Overview
The application demonstrates a Motorcycle Instrument Cluster supporting two different screen configurations: 800x480px and 720x1280px (rotated). It's possible to switch between configurations using the SIZE_VARIANT cmake variable.
For example:
cmake .. -DSIZE_VARIANT=small
Setting this variable to small
will produce binaries supporting a resolution of 800x480px. Setting it to big
will produce binaries supporting a resolution of 720x1280px. The big
variant is rotated by 90 degrees, for example to accomodate a display natively orientated in portrait mode.
The demo shows how to connect a C++ simulation backend to the QML user interface.
The application contains:
- welcome animation
- driving cycle
- goodbye animation
- day mode (only in
small
variant) - navigation with keyboard (only in
small
variant) - warnings (only in
small
variant)
Target platforms
- MIMXRT1170 (
big
variant) - RH850-D1M1A (
small
variant) - STM32F769i-discovery (
small
variant) - Infineon/Cypress Traveo II (
small
variant)
Screenshots
Night Mode
Day Mode
Keyboard
Files:
- motor_cluster/CMakeLists.txt
- motor_cluster/imports/MotorCluster/qmldir
- motor_cluster/qmlproject/+big/motor_cluster_module.qmlproject
- motor_cluster/qmlproject/+small/+ek-ra6m3g/motor_cluster_module.qmlproject
- motor_cluster/qmlproject/+small/+rh850/motor_cluster_module.qmlproject
- motor_cluster/qmlproject/+small/+tviic2d/motor_cluster_module.qmlproject
- motor_cluster/qmlproject/+small/motor_cluster_module.qmlproject
- motor_cluster/qmlproject/motor_cluster.qmlproject
- motor_cluster/qmls/+big/Blinker.qml
- motor_cluster/qmls/+big/BottomCommonElements.qml
- motor_cluster/qmls/+big/Logo.qml
- motor_cluster/qmls/+big/MainModel.qml
- motor_cluster/qmls/+big/MathAPI.qml
- motor_cluster/qmls/+big/MotorCluster.qml
- motor_cluster/qmls/+big/OdoTextElement.qml
- motor_cluster/qmls/+big/RangeIconWithText.qml
- motor_cluster/qmls/+big/SpeedoView.qml
- motor_cluster/qmls/+big/Style.qml
- motor_cluster/qmls/+big/TachoView.qml
- motor_cluster/qmls/+big/TellTalesIndicator.qml
- motor_cluster/qmls/+big/TellTalesModel.qml
- motor_cluster/qmls/+big/TellTalesView.qml
- motor_cluster/qmls/+big/TextElement.qml
- motor_cluster/qmls/+big/TimeView.qml
- motor_cluster/qmls/+small/Background.qml
- motor_cluster/qmls/+small/Blinker.qml
- motor_cluster/qmls/+small/Logo.qml
- motor_cluster/qmls/+small/MainModel.qml
- motor_cluster/qmls/+small/MotorCluster.qml
- motor_cluster/qmls/+small/RangeIconWithText.qml
- motor_cluster/qmls/+small/RoadView.qml
- motor_cluster/qmls/+small/SpeedoView.qml
- motor_cluster/qmls/+small/Statistics.qml
- motor_cluster/qmls/+small/Style.qml
- motor_cluster/qmls/+small/Warning.qml
- motor_cluster/qmls/bottomElements/BottomCommonElements.qml
- motor_cluster/qmls/bottomElements/OdoTextElement.qml
- motor_cluster/qmls/bottomElements/TextElement.qml
- motor_cluster/qmls/bottomElements/TimeView.qml
- motor_cluster/qmls/gauges/+big/FuelGaugeView.qml
- motor_cluster/qmls/gauges/+big/GearGaugeView.qml
- motor_cluster/qmls/gauges/+big/StartupConfig.qml
- motor_cluster/qmls/gauges/+small/FuelGaugeView.qml
- motor_cluster/qmls/gauges/+small/GearGaugeView.qml
- motor_cluster/qmls/gauges/+small/StartupConfig.qml
- motor_cluster/qmls/keyboard/InputTextField.qml
- motor_cluster/qmls/keyboard/KeyBase.qml
- motor_cluster/qmls/keyboard/KeyFont20.qml
- motor_cluster/qmls/keyboard/KeyFont36.qml
- motor_cluster/qmls/keyboard/KeyWithImage.qml
- motor_cluster/qmls/keyboard/Keyboard.qml
- motor_cluster/qmls/keyboard/KeyboardView.qml
- motor_cluster/qmls/main/+big/motor_cluster.qml
- motor_cluster/qmls/main/+small/motor_cluster.qml
- motor_cluster/qmls/navigation/Arrow.qml
- motor_cluster/qmls/navigation/Navigation.qml
- motor_cluster/qmls/navigation/NavigationModel.qml
- motor_cluster/qmls/performance/empty/+big/PerformanceMetrics.qml
- motor_cluster/qmls/performance/empty/+small/PerformanceMetrics.qml
- motor_cluster/qmls/performance/full/+big/PerformanceMetricItem.qml
- motor_cluster/qmls/performance/full/+big/PerformanceMetrics.qml
- motor_cluster/qmls/performance/full/+small/PerformanceMetricItem.qml
- motor_cluster/qmls/performance/full/+small/PerformanceMetrics.qml
- motor_cluster/qmls/tacho/NumberedScaleView.qml
- motor_cluster/qmls/tacho/TachoView.qml
- motor_cluster/qmls/telltales/TellTalesIndicator.qml
- motor_cluster/qmls/telltales/TellTalesModel.qml
- motor_cluster/qmls/telltales/TellTalesView.qml
- motor_cluster/qmls/utils/ClipingItem.qml
- motor_cluster/qmls/utils/ItemWithAcivationAnimations.qml
- motor_cluster/qmls/utils/MathAPI.qml
- motor_cluster/qmls/utils/TextInRoundedBox.qml
- motor_cluster/qmls/welcome/ClipingItem.qml
- motor_cluster/qmls/welcome/NumberedScaleView.qml
- motor_cluster/qmls/welcome/RoadView.qml
- motor_cluster/src/3rdparty/etl/CMakeLists.txt
- motor_cluster/src/3rdparty/etl/include/etl/algorithm.h
- motor_cluster/src/3rdparty/etl/include/etl/alignment.h
- motor_cluster/src/3rdparty/etl/include/etl/array.h
- motor_cluster/src/3rdparty/etl/include/etl/container.h
- motor_cluster/src/3rdparty/etl/include/etl/debug_count.h
- motor_cluster/src/3rdparty/etl/include/etl/error_handler.h
- motor_cluster/src/3rdparty/etl/include/etl/exception.h
- motor_cluster/src/3rdparty/etl/include/etl/fnv_1.h
- motor_cluster/src/3rdparty/etl/include/etl/frame_check_sequence.h
- motor_cluster/src/3rdparty/etl/include/etl/function.h
- motor_cluster/src/3rdparty/etl/include/etl/hash.h
- motor_cluster/src/3rdparty/etl/include/etl/ihash.h
- motor_cluster/src/3rdparty/etl/include/etl/integral_limits.h
- motor_cluster/src/3rdparty/etl/include/etl/intrusive_forward_list.h
- motor_cluster/src/3rdparty/etl/include/etl/intrusive_links.h
- motor_cluster/src/3rdparty/etl/include/etl/iterator.h
- motor_cluster/src/3rdparty/etl/include/etl/log.h
- motor_cluster/src/3rdparty/etl/include/etl/map.h
- motor_cluster/src/3rdparty/etl/include/etl/memory.h
- motor_cluster/src/3rdparty/etl/include/etl/multimap.h
- motor_cluster/src/3rdparty/etl/include/etl/nullptr.h
- motor_cluster/src/3rdparty/etl/include/etl/optional.h
- motor_cluster/src/3rdparty/etl/include/etl/parameter_type.h
- motor_cluster/src/3rdparty/etl/include/etl/platform.h
- motor_cluster/src/3rdparty/etl/include/etl/pool.h
- motor_cluster/src/3rdparty/etl/include/etl/power.h
- motor_cluster/src/3rdparty/etl/include/etl/private/ivectorpointer.h
- motor_cluster/src/3rdparty/etl/include/etl/private/minmax_pop.h
- motor_cluster/src/3rdparty/etl/include/etl/private/minmax_push.h
- motor_cluster/src/3rdparty/etl/include/etl/private/pvoidvector.h
- motor_cluster/src/3rdparty/etl/include/etl/private/vector_base.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/arduino_arm.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/armv5.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/armv5_no_stl.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/armv6.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/armv6_no_stl.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/clang_macos.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/cpp03.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/cpp03_no_stl.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/cpp11.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/cpp11_no_stl.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/cpp14.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/cpp14_no_stl.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/cpp17.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/cpp17_no_stl.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/etl_profile.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/gcc_generic.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/gcc_linux_x86.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/gcc_windows_x86.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/ghs_v850.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/msvc_x86.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/segger_gcc_stlport.h
- motor_cluster/src/3rdparty/etl/include/etl/profiles/ticc.h
- motor_cluster/src/3rdparty/etl/include/etl/smallest.h
- motor_cluster/src/3rdparty/etl/include/etl/static_assert.h
- motor_cluster/src/3rdparty/etl/include/etl/stl/algorithm.h
- motor_cluster/src/3rdparty/etl/include/etl/stl/alternate/algorithm.h
- motor_cluster/src/3rdparty/etl/include/etl/stl/alternate/functional.h
- motor_cluster/src/3rdparty/etl/include/etl/stl/alternate/iterator.h
- motor_cluster/src/3rdparty/etl/include/etl/stl/alternate/limits.h
- motor_cluster/src/3rdparty/etl/include/etl/stl/alternate/utility.h
- motor_cluster/src/3rdparty/etl/include/etl/stl/functional.h
- motor_cluster/src/3rdparty/etl/include/etl/stl/iterator.h
- motor_cluster/src/3rdparty/etl/include/etl/stl/limits.h
- motor_cluster/src/3rdparty/etl/include/etl/stl/utility.h
- motor_cluster/src/3rdparty/etl/include/etl/type_traits.h
- motor_cluster/src/3rdparty/etl/include/etl/unordered_map.h
- motor_cluster/src/3rdparty/etl/include/etl/unordered_multimap.h
- motor_cluster/src/3rdparty/etl/include/etl/vector.h
- motor_cluster/src/mathutils.h
- motor_cluster/src/simulation/+big/drivetrain.cpp
- motor_cluster/src/simulation/+big/drivetrain.h
- motor_cluster/src/simulation/+big/normaldrivestate.cpp
- motor_cluster/src/simulation/+big/normaldrivestate.h
- motor_cluster/src/simulation/+big/simulationcontroller.cpp
- motor_cluster/src/simulation/+big/simulationcontroller.h
- motor_cluster/src/simulation/+big/states.cpp
- motor_cluster/src/simulation/+big/states.h
- motor_cluster/src/simulation/+small/drivetrain.cpp
- motor_cluster/src/simulation/+small/drivetrain.h
- motor_cluster/src/simulation/+small/normaldrivestate.cpp
- motor_cluster/src/simulation/+small/normaldrivestate.h
- motor_cluster/src/simulation/+small/simulationcontroller.cpp
- motor_cluster/src/simulation/+small/simulationcontroller.h
- motor_cluster/src/simulation/+small/states.cpp
- motor_cluster/src/simulation/+small/states.h
- motor_cluster/src/simulation/smfwd.h
- motor_cluster/src/simulation/stateid.h
- motor_cluster/src/statemachine.h
- motor_cluster/src/tviic2d/main.cpp
Images:
- motor_cluster/images/+big/qt-logo.png
- motor_cluster/images/+big/range.png
- motor_cluster/images/+big/turn-left-bottom.png
- motor_cluster/images/+big/turn-left-top.png
- motor_cluster/images/+big/turn-right-bottom.png
- motor_cluster/images/+big/turn-right-top.png
- motor_cluster/images/+big/vertical-divider.png
- motor_cluster/images/+small/qt-logo.png
- motor_cluster/images/+small/range.png
- motor_cluster/images/+small/turn-left.png
- motor_cluster/images/bg/+big/main.png
- motor_cluster/images/bg/+big/ref.jpg
- motor_cluster/images/bg/+big/tacho_frame_up.png
- motor_cluster/images/bg/+small/main-light.png
- motor_cluster/images/bg/+small/main.png
- motor_cluster/images/bg/+small/ref.jpg
- motor_cluster/images/bg/+small/ref_day.png
- motor_cluster/images/fuelGauge/+big/fuel-colored-bg.png
- motor_cluster/images/fuelGauge/+big/fuel-colored-circle.png
- motor_cluster/images/fuelGauge/+big/fuel-scale_2.png
- motor_cluster/images/fuelGauge/+big/hole-in-bg.png
- motor_cluster/images/fuelGauge/+big/range.png
- motor_cluster/images/fuelGauge/+big/ring-1.png
- motor_cluster/images/fuelGauge/+big/ring-2.png
- motor_cluster/images/fuelGauge/+big/wave-bottom-part.png
- motor_cluster/images/fuelGauge/+big/wave-shadow.png
- motor_cluster/images/fuelGauge/+big/wave-top-part.png
- motor_cluster/images/fuelGauge/+small/fuel-colored-bg.png
- motor_cluster/images/fuelGauge/+small/fuel-colored-circle-day.png
- motor_cluster/images/fuelGauge/+small/fuel-colored-circle.png
- motor_cluster/images/fuelGauge/+small/fuel-scale.png
- motor_cluster/images/fuelGauge/+small/hole-in-bg-day.png
- motor_cluster/images/fuelGauge/+small/hole-in-bg.png
- motor_cluster/images/fuelGauge/+small/ring-2.png
- motor_cluster/images/fuelGauge/+small/wave-bottom-part.png
- motor_cluster/images/fuelGauge/+small/wave-shadow.png
- motor_cluster/images/fuelGauge/+small/wave-top-part.png
- motor_cluster/images/gearGauge/oval.png
- motor_cluster/images/gearGauge/oval_2.png
- motor_cluster/images/gearGauge/oval_3.png
- motor_cluster/images/keyboard/backspace-key.png
- motor_cluster/images/keyboard/enter-key.png
- motor_cluster/images/keyboard/go-home-key.png
- motor_cluster/images/keyboard/go-work-key.png
- motor_cluster/images/keyboard/minimize-keyboard.png
- motor_cluster/images/mainScreen/left-lines-day.png
- motor_cluster/images/mainScreen/left-lines.png
- motor_cluster/images/mainScreen/right-lines-day.png
- motor_cluster/images/mainScreen/right-lines.png
- motor_cluster/images/mainScreen/road-day.png
- motor_cluster/images/mainScreen/road.png
- motor_cluster/images/mainScreen/tacho-bottom-line-day.png
- motor_cluster/images/mainScreen/tacho-bottom-line.png
- motor_cluster/images/mainScreen/tacho-top-line-day.png
- motor_cluster/images/mainScreen/tacho-top-line.png
- motor_cluster/images/navigation/destination-pin.png
- motor_cluster/images/navigation/tbt-1-arrow-left.png
- motor_cluster/images/navigation/tbt-1-arrow-stright.png
- motor_cluster/images/navigation/tbt-center-separator.png
- motor_cluster/images/status/battery-status.png
- motor_cluster/images/status/distance-status.png
- motor_cluster/images/status/engine-oil-status.png
- motor_cluster/images/status/fuel-avg-status.png
- motor_cluster/images/status/service-status.png
- motor_cluster/images/status/time-status.png
- motor_cluster/images/tacho/+big/1.png
- motor_cluster/images/tacho/+big/2.png
- motor_cluster/images/tacho/+big/3.png
- motor_cluster/images/tacho/+big/4.png
- motor_cluster/images/tacho/+big/5.png
- motor_cluster/images/tacho/+big/6.png
- motor_cluster/images/tacho/+small/1.png
- motor_cluster/images/tacho/+small/2.png
- motor_cluster/images/tacho/+small/3.png
- motor_cluster/images/tacho/+small/4.png
- motor_cluster/images/tacho/+small/5.png
- motor_cluster/images/tacho/+small/6.png
- motor_cluster/images/tacho/light/01.png
- motor_cluster/images/tacho/light/02.png
- motor_cluster/images/tacho/light/03.png
- motor_cluster/images/tacho/light/04.png
- motor_cluster/images/tacho/light/05.png
- motor_cluster/images/tacho/light/06.png
- motor_cluster/images/telltales/+big/batteryOff.png
- motor_cluster/images/telltales/+big/engine-failureOff.png
- motor_cluster/images/telltales/+big/engine-oilOff.png
- motor_cluster/images/telltales/+big/fuel.png
- motor_cluster/images/telltales/+big/high-beamsOff.png
- motor_cluster/images/telltales/+small/battery.png
- motor_cluster/images/telltales/+small/engine-failure.png
- motor_cluster/images/telltales/+small/engine-oil.png
- motor_cluster/images/telltales/+small/fuel.png
- motor_cluster/images/telltales/+small/high-beams.png
- motor_cluster/images/warnings/battery-warning.png
- motor_cluster/images/warnings/engine-failure-warning.png
- motor_cluster/images/warnings/engine-oil-warning.png
- motor_cluster/images/welcome/left-lines.png
- motor_cluster/images/welcome/right-lines.png
- motor_cluster/images/welcome/road.png
- motor_cluster/images/welcome/tacho-bottom-line.png
- motor_cluster/images/welcome/tacho-top-line.png
Available under certain Qt licenses.
Find out more.