├── IMG-20180606-WA0001.jpg ├── IMG-20180606-WA0002.jpg ├── IMG_20180606_000444.jpg ├── README.md ├── Screenshot from 2018-06-06 00-18-32.png ├── VID-20180606-WA0004.mp4 ├── build-dashboard-rpi3-Debug ├── Makefile ├── dashboard ├── main.o ├── qrc_dashboard.cpp └── qrc_dashboard.o └── dashboard ├── dashboard.pro ├── dashboard.pro.user ├── dashboard.qrc ├── fonts ├── DejaVuSans.ttf └── LICENSE ├── images ├── fuel-icon.png └── temperature-icon.png ├── main.cpp └── qml ├── DashboardGaugeStyle.qml ├── IconGaugeStyle.qml ├── TachometerStyle.qml ├── TurnIndicator.qml ├── ValueSource.qml └── dashboard.qml /IMG-20180606-WA0001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/IMG-20180606-WA0001.jpg -------------------------------------------------------------------------------- /IMG-20180606-WA0002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/IMG-20180606-WA0002.jpg -------------------------------------------------------------------------------- /IMG_20180606_000444.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/IMG_20180606_000444.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3,CPP-and-QT-QML 2 | 3 | ![alt text](https://github.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/blob/master/IMG-20180606-WA0001.jpg) 4 | ![alt text](https://github.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/blob/master/IMG-20180606-WA0002.jpg) 5 | ![alt text](https://github.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/blob/master/Screenshot%20from%202018-06-06%2000-18-32.png) 6 | ![alt text](https://github.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/blob/master/IMG_20180606_000444.jpg) 7 | 8 | 9 | This is a freelance project developed by me when i got a chance to work with a very early startup as a freelancer. Those guys were developing a two wheeler electric sports bike and wanted someone to build a fully digital instrument cluster! This is a fully Digital touch screen based vehicle instrument cluster. Features of the cluster involves a circular gauge based design, Turn indicators, fuel meter, RPM meter and engine temperature. The project is not yet completed and still tons of things are left to be added, bugs fixed and calibrated. I'll keep updating as i keep adding new things to it. I used a Raspberry Pi 3, 4-inch Touch screen panel, QT Creator and C++. I'll explain everything, right from the start! There are 3 major steps in this project:- 10 | 1) Installing raspbian and add support for Touch screen 11 | 2) Cross compiling QT for Raspberry pi 3 12 | 3) Building and deploying the actual app onto Pi 3 13 | 14 | 15 | 2) For Cross compiling QT5 apps for raspberry pi 3, visit my other repository at this link-> 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Screenshot from 2018-06-06 00-18-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/Screenshot from 2018-06-06 00-18-32.png -------------------------------------------------------------------------------- /VID-20180606-WA0004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/VID-20180606-WA0004.mp4 -------------------------------------------------------------------------------- /build-dashboard-rpi3-Debug/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # Makefile for building: dashboard 3 | # Generated by qmake (3.0) (Qt 5.7.0) 4 | # Project: ../dashboard/dashboard.pro 5 | # Template: app 6 | # Command: /opt/qtrpi/raspi/qt5/bin/qmake -spec devices/linux-rpi3-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile ../dashboard/dashboard.pro 7 | ############################################################################# 8 | 9 | MAKEFILE = Makefile 10 | 11 | ####### Compiler, tools and options 12 | 13 | CC = /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc 14 | CXX = /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ 15 | DEFINES = -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB 16 | CFLAGS = -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -mfloat-abi=hard --sysroot=/opt/qtrpi/raspbian/sysroot -g -Wall -W -D_REENTRANT -fPIC $(DEFINES) 17 | CXXFLAGS = -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -std=c++11 -mfloat-abi=hard --sysroot=/opt/qtrpi/raspbian/sysroot -g -Wall -W -D_REENTRANT -fPIC $(DEFINES) 18 | INCPATH = -I../dashboard -I. -I/opt/qtrpi/raspbian/sysroot/opt/vc/include -I/opt/qtrpi/raspbian/sysroot/opt/vc/include/interface/vcos -I/opt/qtrpi/raspbian/sysroot/opt/vc/include/interface/vcos/pthreads -I/opt/qtrpi/raspbian/sysroot/opt/vc/include/interface/vmcs_host/linux -I../dashboard -I/opt/qtrpi/raspi/qt5pi/include -I/opt/qtrpi/raspi/qt5pi/include/QtQuick -I/opt/qtrpi/raspi/qt5pi/include/QtGui -I/opt/qtrpi/raspi/qt5pi/include/QtQml -I/opt/qtrpi/raspi/qt5pi/include/QtNetwork -I/opt/qtrpi/raspi/qt5pi/include/QtCore -I. -I=/opt/vc/include -I=/opt/vc/include/interface/vcos/pthreads -I=/opt/vc/include/interface/vmcs_host/linux -I/opt/qtrpi/raspi/qt5/mkspecs/devices/linux-rpi3-g++ 19 | QMAKE = /opt/qtrpi/raspi/qt5/bin/qmake 20 | DEL_FILE = rm -f 21 | CHK_DIR_EXISTS= test -d 22 | MKDIR = mkdir -p 23 | COPY = cp -f 24 | COPY_FILE = cp -f 25 | COPY_DIR = cp -f -R 26 | INSTALL_FILE = install -m 644 -p 27 | INSTALL_PROGRAM = install -m 755 -p 28 | INSTALL_DIR = cp -f -R 29 | DEL_FILE = rm -f 30 | SYMLINK = ln -f -s 31 | DEL_DIR = rmdir 32 | MOVE = mv -f 33 | TAR = tar -cf 34 | COMPRESS = gzip -9f 35 | DISTNAME = dashboard1.0.0 36 | DISTDIR = /home/pratik/build-dashboard-rpi3-Debug/.tmp/dashboard1.0.0 37 | LINK = /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ 38 | LFLAGS = -Wl,-rpath-link,/opt/qtrpi/raspbian/sysroot/opt/vc/lib -Wl,-rpath-link,/opt/qtrpi/raspbian/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/opt/qtrpi/raspbian/sysroot/lib/arm-linux-gnueabihf -mfloat-abi=hard --sysroot=/opt/qtrpi/raspbian/sysroot -Wl,-rpath,/usr/local/qt5pi/lib 39 | LIBS = $(SUBLIBS) -L=/opt/vc/lib -L/opt/qtrpi/raspi/qt5pi/lib -lQt5Quick -L/opt/qtrpi/raspbian/sysroot/usr/lib/arm-linux-gnueabihf -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -Wl,-rpath-link,/opt/qtrpi/raspbian/sysroot/opt/vc/lib -lGLESv2 -lpthread 40 | AR = /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-ar cqs 41 | RANLIB = 42 | SED = sed 43 | STRIP = /opt/qtrpi/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-strip 44 | 45 | ####### Output directory 46 | 47 | OBJECTS_DIR = ./ 48 | 49 | ####### Files 50 | 51 | SOURCES = ../dashboard/main.cpp qrc_dashboard.cpp 52 | OBJECTS = main.o \ 53 | qrc_dashboard.o 54 | DIST = /opt/qtrpi/raspi/qt5/mkspecs/features/spec_pre.prf \ 55 | /opt/qtrpi/raspi/qt5/mkspecs/common/unix.conf \ 56 | /opt/qtrpi/raspi/qt5/mkspecs/common/linux.conf \ 57 | /opt/qtrpi/raspi/qt5/mkspecs/common/sanitize.conf \ 58 | /opt/qtrpi/raspi/qt5/mkspecs/common/gcc-base.conf \ 59 | /opt/qtrpi/raspi/qt5/mkspecs/common/gcc-base-unix.conf \ 60 | /opt/qtrpi/raspi/qt5/mkspecs/common/g++-base.conf \ 61 | /opt/qtrpi/raspi/qt5/mkspecs/common/g++-unix.conf \ 62 | /opt/qtrpi/raspi/qt5/mkspecs/qdevice.pri \ 63 | /opt/qtrpi/raspi/qt5/mkspecs/features/device_config.prf \ 64 | /opt/qtrpi/raspi/qt5/mkspecs/devices/common/linux_device_pre.conf \ 65 | /opt/qtrpi/raspi/qt5/mkspecs/devices/common/linux_device_post.conf \ 66 | /opt/qtrpi/raspi/qt5/mkspecs/devices/common/linux_arm_device_post.conf \ 67 | /opt/qtrpi/raspi/qt5/mkspecs/qconfig.pri \ 68 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dcore.pri \ 69 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dcore_private.pri \ 70 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dextras.pri \ 71 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dextras_private.pri \ 72 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dinput.pri \ 73 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dinput_private.pri \ 74 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dlogic.pri \ 75 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dlogic_private.pri \ 76 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquick.pri \ 77 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquick_private.pri \ 78 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickextras.pri \ 79 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickextras_private.pri \ 80 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickinput.pri \ 81 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickinput_private.pri \ 82 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickrender.pri \ 83 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickrender_private.pri \ 84 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3drender.pri \ 85 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3drender_private.pri \ 86 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \ 87 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_concurrent.pri \ 88 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \ 89 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_core.pri \ 90 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_core_private.pri \ 91 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_dbus.pri \ 92 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_dbus_private.pri \ 93 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_eglfs_device_lib_private.pri \ 94 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \ 95 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_gui.pri \ 96 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_gui_private.pri \ 97 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimedia.pri \ 98 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimedia_private.pri \ 99 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \ 100 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimediawidgets_private.pri \ 101 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_network.pri \ 102 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_network_private.pri \ 103 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_opengl.pri \ 104 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_opengl_private.pri \ 105 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_openglextensions.pri \ 106 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \ 107 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_packetprotocol_private.pri \ 108 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_platformsupport_private.pri \ 109 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_printsupport.pri \ 110 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \ 111 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qml.pri \ 112 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qml_private.pri \ 113 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmldebug_private.pri \ 114 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmldevtools_private.pri \ 115 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmltest.pri \ 116 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmltest_private.pri \ 117 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri \ 118 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quick.pri \ 119 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quick_private.pri \ 120 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickcontrols2.pri \ 121 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickcontrols2_private.pri \ 122 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickparticles_private.pri \ 123 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quicktemplates2_private.pri \ 124 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \ 125 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickwidgets_private.pri \ 126 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_serialport.pri \ 127 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_serialport_private.pri \ 128 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_sql.pri \ 129 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_sql_private.pri \ 130 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_svg.pri \ 131 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_svg_private.pri \ 132 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_testlib.pri \ 133 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_testlib_private.pri \ 134 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_widgets.pri \ 135 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_widgets_private.pri \ 136 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \ 137 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_xml.pri \ 138 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_xml_private.pri \ 139 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_zlib_private.pri \ 140 | /opt/qtrpi/raspi/qt5/mkspecs/features/qt_functions.prf \ 141 | /opt/qtrpi/raspi/qt5/mkspecs/features/qt_config.prf \ 142 | /opt/qtrpi/raspi/qt5/mkspecs/devices/linux-rpi3-g++/qmake.conf \ 143 | /opt/qtrpi/raspi/qt5/mkspecs/features/spec_post.prf \ 144 | /opt/qtrpi/raspi/qt5/mkspecs/features/exclusive_builds.prf \ 145 | /opt/qtrpi/raspi/qt5/mkspecs/features/default_pre.prf \ 146 | /opt/qtrpi/raspi/qt5/mkspecs/features/resolve_config.prf \ 147 | /opt/qtrpi/raspi/qt5/mkspecs/features/default_post.prf \ 148 | /opt/qtrpi/raspi/qt5/mkspecs/features/qml_debug.prf \ 149 | /opt/qtrpi/raspi/qt5/mkspecs/features/warn_on.prf \ 150 | /opt/qtrpi/raspi/qt5/mkspecs/features/qt.prf \ 151 | /opt/qtrpi/raspi/qt5/mkspecs/features/resources.prf \ 152 | /opt/qtrpi/raspi/qt5/mkspecs/features/moc.prf \ 153 | /opt/qtrpi/raspi/qt5/mkspecs/features/unix/opengl.prf \ 154 | /opt/qtrpi/raspi/qt5/mkspecs/features/unix/thread.prf \ 155 | /opt/qtrpi/raspi/qt5/mkspecs/features/file_copies.prf \ 156 | /opt/qtrpi/raspi/qt5/mkspecs/features/testcase_targets.prf \ 157 | /opt/qtrpi/raspi/qt5/mkspecs/features/exceptions.prf \ 158 | /opt/qtrpi/raspi/qt5/mkspecs/features/yacc.prf \ 159 | /opt/qtrpi/raspi/qt5/mkspecs/features/lex.prf \ 160 | ../dashboard/dashboard.pro ../dashboard/main.cpp 161 | QMAKE_TARGET = dashboard 162 | DESTDIR = 163 | TARGET = dashboard 164 | 165 | 166 | first: all 167 | ####### Build rules 168 | 169 | $(TARGET): $(OBJECTS) 170 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) 171 | 172 | Makefile: ../dashboard/dashboard.pro /opt/qtrpi/raspi/qt5/mkspecs/devices/linux-rpi3-g++/qmake.conf /opt/qtrpi/raspi/qt5/mkspecs/features/spec_pre.prf \ 173 | /opt/qtrpi/raspi/qt5/mkspecs/common/unix.conf \ 174 | /opt/qtrpi/raspi/qt5/mkspecs/common/linux.conf \ 175 | /opt/qtrpi/raspi/qt5/mkspecs/common/sanitize.conf \ 176 | /opt/qtrpi/raspi/qt5/mkspecs/common/gcc-base.conf \ 177 | /opt/qtrpi/raspi/qt5/mkspecs/common/gcc-base-unix.conf \ 178 | /opt/qtrpi/raspi/qt5/mkspecs/common/g++-base.conf \ 179 | /opt/qtrpi/raspi/qt5/mkspecs/common/g++-unix.conf \ 180 | /opt/qtrpi/raspi/qt5/mkspecs/qdevice.pri \ 181 | /opt/qtrpi/raspi/qt5/mkspecs/features/device_config.prf \ 182 | /opt/qtrpi/raspi/qt5/mkspecs/devices/common/linux_device_pre.conf \ 183 | /opt/qtrpi/raspi/qt5/mkspecs/devices/common/linux_device_post.conf \ 184 | /opt/qtrpi/raspi/qt5/mkspecs/devices/common/linux_arm_device_post.conf \ 185 | /opt/qtrpi/raspi/qt5/mkspecs/qconfig.pri \ 186 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dcore.pri \ 187 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dcore_private.pri \ 188 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dextras.pri \ 189 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dextras_private.pri \ 190 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dinput.pri \ 191 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dinput_private.pri \ 192 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dlogic.pri \ 193 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dlogic_private.pri \ 194 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquick.pri \ 195 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquick_private.pri \ 196 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickextras.pri \ 197 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickextras_private.pri \ 198 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickinput.pri \ 199 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickinput_private.pri \ 200 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickrender.pri \ 201 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickrender_private.pri \ 202 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3drender.pri \ 203 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3drender_private.pri \ 204 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \ 205 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_concurrent.pri \ 206 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \ 207 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_core.pri \ 208 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_core_private.pri \ 209 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_dbus.pri \ 210 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_dbus_private.pri \ 211 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_eglfs_device_lib_private.pri \ 212 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \ 213 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_gui.pri \ 214 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_gui_private.pri \ 215 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimedia.pri \ 216 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimedia_private.pri \ 217 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \ 218 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimediawidgets_private.pri \ 219 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_network.pri \ 220 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_network_private.pri \ 221 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_opengl.pri \ 222 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_opengl_private.pri \ 223 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_openglextensions.pri \ 224 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \ 225 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_packetprotocol_private.pri \ 226 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_platformsupport_private.pri \ 227 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_printsupport.pri \ 228 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \ 229 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qml.pri \ 230 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qml_private.pri \ 231 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmldebug_private.pri \ 232 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmldevtools_private.pri \ 233 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmltest.pri \ 234 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmltest_private.pri \ 235 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri \ 236 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quick.pri \ 237 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quick_private.pri \ 238 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickcontrols2.pri \ 239 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickcontrols2_private.pri \ 240 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickparticles_private.pri \ 241 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quicktemplates2_private.pri \ 242 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \ 243 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickwidgets_private.pri \ 244 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_serialport.pri \ 245 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_serialport_private.pri \ 246 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_sql.pri \ 247 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_sql_private.pri \ 248 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_svg.pri \ 249 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_svg_private.pri \ 250 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_testlib.pri \ 251 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_testlib_private.pri \ 252 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_widgets.pri \ 253 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_widgets_private.pri \ 254 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \ 255 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_xml.pri \ 256 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_xml_private.pri \ 257 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_zlib_private.pri \ 258 | /opt/qtrpi/raspi/qt5/mkspecs/features/qt_functions.prf \ 259 | /opt/qtrpi/raspi/qt5/mkspecs/features/qt_config.prf \ 260 | /opt/qtrpi/raspi/qt5/mkspecs/devices/linux-rpi3-g++/qmake.conf \ 261 | /opt/qtrpi/raspi/qt5/mkspecs/features/spec_post.prf \ 262 | /opt/qtrpi/raspi/qt5/mkspecs/features/exclusive_builds.prf \ 263 | /opt/qtrpi/raspi/qt5/mkspecs/features/default_pre.prf \ 264 | /opt/qtrpi/raspi/qt5/mkspecs/features/resolve_config.prf \ 265 | /opt/qtrpi/raspi/qt5/mkspecs/features/default_post.prf \ 266 | /opt/qtrpi/raspi/qt5/mkspecs/features/qml_debug.prf \ 267 | /opt/qtrpi/raspi/qt5/mkspecs/features/warn_on.prf \ 268 | /opt/qtrpi/raspi/qt5/mkspecs/features/qt.prf \ 269 | /opt/qtrpi/raspi/qt5/mkspecs/features/resources.prf \ 270 | /opt/qtrpi/raspi/qt5/mkspecs/features/moc.prf \ 271 | /opt/qtrpi/raspi/qt5/mkspecs/features/unix/opengl.prf \ 272 | /opt/qtrpi/raspi/qt5/mkspecs/features/unix/thread.prf \ 273 | /opt/qtrpi/raspi/qt5/mkspecs/features/file_copies.prf \ 274 | /opt/qtrpi/raspi/qt5/mkspecs/features/testcase_targets.prf \ 275 | /opt/qtrpi/raspi/qt5/mkspecs/features/exceptions.prf \ 276 | /opt/qtrpi/raspi/qt5/mkspecs/features/yacc.prf \ 277 | /opt/qtrpi/raspi/qt5/mkspecs/features/lex.prf \ 278 | ../dashboard/dashboard.pro \ 279 | ../dashboard/dashboard.qrc \ 280 | /opt/qtrpi/raspi/qt5pi/lib/libQt5Quick.prl \ 281 | /opt/qtrpi/raspi/qt5pi/lib/libQt5Gui.prl \ 282 | /opt/qtrpi/raspi/qt5pi/lib/libQt5Qml.prl \ 283 | /opt/qtrpi/raspi/qt5pi/lib/libQt5Network.prl \ 284 | /opt/qtrpi/raspi/qt5pi/lib/libQt5Core.prl 285 | $(QMAKE) -spec devices/linux-rpi3-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile ../dashboard/dashboard.pro 286 | /opt/qtrpi/raspi/qt5/mkspecs/features/spec_pre.prf: 287 | /opt/qtrpi/raspi/qt5/mkspecs/common/unix.conf: 288 | /opt/qtrpi/raspi/qt5/mkspecs/common/linux.conf: 289 | /opt/qtrpi/raspi/qt5/mkspecs/common/sanitize.conf: 290 | /opt/qtrpi/raspi/qt5/mkspecs/common/gcc-base.conf: 291 | /opt/qtrpi/raspi/qt5/mkspecs/common/gcc-base-unix.conf: 292 | /opt/qtrpi/raspi/qt5/mkspecs/common/g++-base.conf: 293 | /opt/qtrpi/raspi/qt5/mkspecs/common/g++-unix.conf: 294 | /opt/qtrpi/raspi/qt5/mkspecs/qdevice.pri: 295 | /opt/qtrpi/raspi/qt5/mkspecs/features/device_config.prf: 296 | /opt/qtrpi/raspi/qt5/mkspecs/devices/common/linux_device_pre.conf: 297 | /opt/qtrpi/raspi/qt5/mkspecs/devices/common/linux_device_post.conf: 298 | /opt/qtrpi/raspi/qt5/mkspecs/devices/common/linux_arm_device_post.conf: 299 | /opt/qtrpi/raspi/qt5/mkspecs/qconfig.pri: 300 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dcore.pri: 301 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dcore_private.pri: 302 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dextras.pri: 303 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dextras_private.pri: 304 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dinput.pri: 305 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dinput_private.pri: 306 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dlogic.pri: 307 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dlogic_private.pri: 308 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquick.pri: 309 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquick_private.pri: 310 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickextras.pri: 311 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickextras_private.pri: 312 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickinput.pri: 313 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickinput_private.pri: 314 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickrender.pri: 315 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3dquickrender_private.pri: 316 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3drender.pri: 317 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_3drender_private.pri: 318 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri: 319 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_concurrent.pri: 320 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_concurrent_private.pri: 321 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_core.pri: 322 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_core_private.pri: 323 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_dbus.pri: 324 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_dbus_private.pri: 325 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_eglfs_device_lib_private.pri: 326 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri: 327 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_gui.pri: 328 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_gui_private.pri: 329 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimedia.pri: 330 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimedia_private.pri: 331 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri: 332 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_multimediawidgets_private.pri: 333 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_network.pri: 334 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_network_private.pri: 335 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_opengl.pri: 336 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_opengl_private.pri: 337 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_openglextensions.pri: 338 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri: 339 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_packetprotocol_private.pri: 340 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_platformsupport_private.pri: 341 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_printsupport.pri: 342 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_printsupport_private.pri: 343 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qml.pri: 344 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qml_private.pri: 345 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmldebug_private.pri: 346 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmldevtools_private.pri: 347 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmltest.pri: 348 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qmltest_private.pri: 349 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri: 350 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quick.pri: 351 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quick_private.pri: 352 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickcontrols2.pri: 353 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickcontrols2_private.pri: 354 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickparticles_private.pri: 355 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quicktemplates2_private.pri: 356 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickwidgets.pri: 357 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_quickwidgets_private.pri: 358 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_serialport.pri: 359 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_serialport_private.pri: 360 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_sql.pri: 361 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_sql_private.pri: 362 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_svg.pri: 363 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_svg_private.pri: 364 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_testlib.pri: 365 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_testlib_private.pri: 366 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_widgets.pri: 367 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_widgets_private.pri: 368 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri: 369 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_xml.pri: 370 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_xml_private.pri: 371 | /opt/qtrpi/raspi/qt5/mkspecs/modules/qt_lib_zlib_private.pri: 372 | /opt/qtrpi/raspi/qt5/mkspecs/features/qt_functions.prf: 373 | /opt/qtrpi/raspi/qt5/mkspecs/features/qt_config.prf: 374 | /opt/qtrpi/raspi/qt5/mkspecs/devices/linux-rpi3-g++/qmake.conf: 375 | /opt/qtrpi/raspi/qt5/mkspecs/features/spec_post.prf: 376 | /opt/qtrpi/raspi/qt5/mkspecs/features/exclusive_builds.prf: 377 | /opt/qtrpi/raspi/qt5/mkspecs/features/default_pre.prf: 378 | /opt/qtrpi/raspi/qt5/mkspecs/features/resolve_config.prf: 379 | /opt/qtrpi/raspi/qt5/mkspecs/features/default_post.prf: 380 | /opt/qtrpi/raspi/qt5/mkspecs/features/qml_debug.prf: 381 | /opt/qtrpi/raspi/qt5/mkspecs/features/warn_on.prf: 382 | /opt/qtrpi/raspi/qt5/mkspecs/features/qt.prf: 383 | /opt/qtrpi/raspi/qt5/mkspecs/features/resources.prf: 384 | /opt/qtrpi/raspi/qt5/mkspecs/features/moc.prf: 385 | /opt/qtrpi/raspi/qt5/mkspecs/features/unix/opengl.prf: 386 | /opt/qtrpi/raspi/qt5/mkspecs/features/unix/thread.prf: 387 | /opt/qtrpi/raspi/qt5/mkspecs/features/file_copies.prf: 388 | /opt/qtrpi/raspi/qt5/mkspecs/features/testcase_targets.prf: 389 | /opt/qtrpi/raspi/qt5/mkspecs/features/exceptions.prf: 390 | /opt/qtrpi/raspi/qt5/mkspecs/features/yacc.prf: 391 | /opt/qtrpi/raspi/qt5/mkspecs/features/lex.prf: 392 | ../dashboard/dashboard.pro: 393 | ../dashboard/dashboard.qrc: 394 | /opt/qtrpi/raspi/qt5pi/lib/libQt5Quick.prl: 395 | /opt/qtrpi/raspi/qt5pi/lib/libQt5Gui.prl: 396 | /opt/qtrpi/raspi/qt5pi/lib/libQt5Qml.prl: 397 | /opt/qtrpi/raspi/qt5pi/lib/libQt5Network.prl: 398 | /opt/qtrpi/raspi/qt5pi/lib/libQt5Core.prl: 399 | qmake: FORCE 400 | @$(QMAKE) -spec devices/linux-rpi3-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile ../dashboard/dashboard.pro 401 | 402 | qmake_all: FORCE 403 | 404 | 405 | all: Makefile $(TARGET) 406 | 407 | dist: distdir FORCE 408 | (cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR) 409 | 410 | distdir: FORCE 411 | @test -d $(DISTDIR) || mkdir -p $(DISTDIR) 412 | $(COPY_FILE) --parents $(DIST) $(DISTDIR)/ 413 | $(COPY_FILE) --parents ../dashboard/dashboard.qrc $(DISTDIR)/ 414 | $(COPY_FILE) --parents ../dashboard/main.cpp $(DISTDIR)/ 415 | 416 | 417 | clean: compiler_clean 418 | -$(DEL_FILE) $(OBJECTS) 419 | -$(DEL_FILE) *~ core *.core 420 | 421 | 422 | distclean: clean 423 | -$(DEL_FILE) $(TARGET) 424 | -$(DEL_FILE) .qmake.stash 425 | -$(DEL_FILE) Makefile 426 | 427 | 428 | ####### Sub-libraries 429 | 430 | mocclean: compiler_moc_header_clean compiler_moc_source_clean 431 | 432 | mocables: compiler_moc_header_make_all compiler_moc_source_make_all 433 | 434 | check: first 435 | 436 | benchmark: first 437 | 438 | compiler_rcc_make_all: qrc_dashboard.cpp 439 | compiler_rcc_clean: 440 | -$(DEL_FILE) qrc_dashboard.cpp 441 | qrc_dashboard.cpp: ../dashboard/dashboard.qrc \ 442 | /opt/qtrpi/raspi/qt5/bin/rcc \ 443 | ../dashboard/qml/TurnIndicator.qml \ 444 | ../dashboard/qml/dashboard.qml \ 445 | ../dashboard/qml/IconGaugeStyle.qml \ 446 | ../dashboard/qml/DashboardGaugeStyle.qml \ 447 | ../dashboard/qml/TachometerStyle.qml \ 448 | ../dashboard/qml/ValueSource.qml \ 449 | ../dashboard/images/temperature-icon.png \ 450 | ../dashboard/images/fuel-icon.png \ 451 | ../dashboard/fonts/DejaVuSans.ttf 452 | /opt/qtrpi/raspi/qt5/bin/rcc -name dashboard ../dashboard/dashboard.qrc -o qrc_dashboard.cpp 453 | 454 | compiler_moc_header_make_all: 455 | compiler_moc_header_clean: 456 | compiler_moc_source_make_all: 457 | compiler_moc_source_clean: 458 | compiler_yacc_decl_make_all: 459 | compiler_yacc_decl_clean: 460 | compiler_yacc_impl_make_all: 461 | compiler_yacc_impl_clean: 462 | compiler_lex_make_all: 463 | compiler_lex_clean: 464 | compiler_clean: compiler_rcc_clean 465 | 466 | ####### Compile 467 | 468 | main.o: ../dashboard/main.cpp /opt/qtrpi/raspi/qt5pi/include/QtGui/QGuiApplication \ 469 | /opt/qtrpi/raspi/qt5pi/include/QtGui/qguiapplication.h \ 470 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qcoreapplication.h \ 471 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qglobal.h \ 472 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qconfig.h \ 473 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qfeatures.h \ 474 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qsystemdetection.h \ 475 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qprocessordetection.h \ 476 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qcompilerdetection.h \ 477 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qtypeinfo.h \ 478 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qtypetraits.h \ 479 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qisenum.h \ 480 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qsysinfo.h \ 481 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qlogging.h \ 482 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qflags.h \ 483 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qatomic.h \ 484 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qbasicatomic.h \ 485 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qatomic_bootstrap.h \ 486 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qgenericatomic.h \ 487 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qatomic_cxx11.h \ 488 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qatomic_msvc.h \ 489 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qglobalstatic.h \ 490 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qmutex.h \ 491 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qnumeric.h \ 492 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qversiontagging.h \ 493 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qstring.h \ 494 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qchar.h \ 495 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qbytearray.h \ 496 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qrefcount.h \ 497 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qnamespace.h \ 498 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qarraydata.h \ 499 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qstringbuilder.h \ 500 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qobject.h \ 501 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qobjectdefs.h \ 502 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qobjectdefs_impl.h \ 503 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qlist.h \ 504 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qalgorithms.h \ 505 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qiterator.h \ 506 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qhashfunctions.h \ 507 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qpair.h \ 508 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qbytearraylist.h \ 509 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qstringlist.h \ 510 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qregexp.h \ 511 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qstringmatcher.h \ 512 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qcoreevent.h \ 513 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qscopedpointer.h \ 514 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qmetatype.h \ 515 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qvarlengtharray.h \ 516 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qcontainerfwd.h \ 517 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qobject_impl.h \ 518 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qeventloop.h \ 519 | /opt/qtrpi/raspi/qt5pi/include/QtGui/qwindowdefs.h \ 520 | /opt/qtrpi/raspi/qt5pi/include/QtGui/qwindowdefs_win.h \ 521 | /opt/qtrpi/raspi/qt5pi/include/QtGui/qinputmethod.h \ 522 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qlocale.h \ 523 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qvariant.h \ 524 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qmap.h \ 525 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qdebug.h \ 526 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qhash.h \ 527 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qtextstream.h \ 528 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qiodevice.h \ 529 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qvector.h \ 530 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qpoint.h \ 531 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qset.h \ 532 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qcontiguouscache.h \ 533 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qsharedpointer.h \ 534 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qshareddata.h \ 535 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qsharedpointer_impl.h \ 536 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qsize.h \ 537 | /opt/qtrpi/raspi/qt5pi/include/QtQml/QQmlApplicationEngine \ 538 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qqmlapplicationengine.h \ 539 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qqmlengine.h \ 540 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qurl.h \ 541 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qurlquery.h \ 542 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qjsengine.h \ 543 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qjsvalue.h \ 544 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qtqmlglobal.h \ 545 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qqml.h \ 546 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qqmlprivate.h \ 547 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qqmlparserstatus.h \ 548 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qqmlpropertyvaluesource.h \ 549 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qqmllist.h \ 550 | /opt/qtrpi/raspi/qt5pi/include/QtCore/qmetaobject.h \ 551 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qqmlerror.h \ 552 | /opt/qtrpi/raspi/qt5pi/include/QtQml/qqmldebug.h \ 553 | /opt/qtrpi/raspi/qt5pi/include/QtGui/QFont \ 554 | /opt/qtrpi/raspi/qt5pi/include/QtGui/qfont.h \ 555 | /opt/qtrpi/raspi/qt5pi/include/QtGui/QFontDatabase \ 556 | /opt/qtrpi/raspi/qt5pi/include/QtGui/qfontdatabase.h 557 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o ../dashboard/main.cpp 558 | 559 | qrc_dashboard.o: qrc_dashboard.cpp 560 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_dashboard.o qrc_dashboard.cpp 561 | 562 | ####### Install 563 | 564 | install_target: first FORCE 565 | @test -d $(INSTALL_ROOT)/opt/qtrpi/raspi/qt5pi/examples/quickcontrols/extras/dashboard || mkdir -p $(INSTALL_ROOT)/opt/qtrpi/raspi/qt5pi/examples/quickcontrols/extras/dashboard 566 | -$(INSTALL_PROGRAM) $(QMAKE_TARGET) $(INSTALL_ROOT)/opt/qtrpi/raspi/qt5pi/examples/quickcontrols/extras/dashboard/$(QMAKE_TARGET) 567 | 568 | uninstall_target: FORCE 569 | -$(DEL_FILE) $(INSTALL_ROOT)/opt/qtrpi/raspi/qt5pi/examples/quickcontrols/extras/dashboard/$(QMAKE_TARGET) 570 | -$(DEL_DIR) $(INSTALL_ROOT)/opt/qtrpi/raspi/qt5pi/examples/quickcontrols/extras/dashboard/ 571 | 572 | 573 | install: install_target FORCE 574 | 575 | uninstall: uninstall_target FORCE 576 | 577 | FORCE: 578 | 579 | -------------------------------------------------------------------------------- /build-dashboard-rpi3-Debug/dashboard: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/build-dashboard-rpi3-Debug/dashboard -------------------------------------------------------------------------------- /build-dashboard-rpi3-Debug/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/build-dashboard-rpi3-Debug/main.o -------------------------------------------------------------------------------- /build-dashboard-rpi3-Debug/qrc_dashboard.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/build-dashboard-rpi3-Debug/qrc_dashboard.o -------------------------------------------------------------------------------- /dashboard/dashboard.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = app 2 | TARGET = dashboard 3 | INCLUDEPATH += . 4 | QT += quick 5 | 6 | SOURCES += \ 7 | main.cpp 8 | 9 | RESOURCES += \ 10 | dashboard.qrc 11 | 12 | OTHER_FILES += \ 13 | qml/dashboard.qml \ 14 | qml/DashboardGaugeStyle.qml \ 15 | qml/IconGaugeStyle.qml \ 16 | qml/TachometerStyle.qml \ 17 | qml/TurnIndicator.qml \ 18 | qml/ValueSource.qml 19 | 20 | target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols/extras/dashboard 21 | INSTALLS += target 22 | -------------------------------------------------------------------------------- /dashboard/dashboard.pro.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EnvironmentId 7 | {34eef9b6-dbee-4c97-a3da-27219ecec4ce} 8 | 9 | 10 | ProjectExplorer.Project.ActiveTarget 11 | 1 12 | 13 | 14 | ProjectExplorer.Project.EditorSettings 15 | 16 | true 17 | false 18 | true 19 | 20 | Cpp 21 | 22 | CppGlobal 23 | 24 | 25 | 26 | QmlJS 27 | 28 | QmlJSGlobal 29 | 30 | 31 | 2 32 | UTF-8 33 | false 34 | 4 35 | false 36 | 80 37 | true 38 | true 39 | 1 40 | true 41 | false 42 | 0 43 | true 44 | true 45 | 0 46 | 8 47 | true 48 | 1 49 | true 50 | true 51 | true 52 | false 53 | 54 | 55 | 56 | ProjectExplorer.Project.PluginSettings 57 | 58 | 59 | 60 | ProjectExplorer.Project.Target.0 61 | 62 | Desktop Qt 5.10.0 GCC 64bit 63 | Desktop Qt 5.10.0 GCC 64bit 64 | qt.qt5.5100.gcc_64_kit 65 | 0 66 | 0 67 | 0 68 | 69 | /home/pratik/build-dashboard-Desktop_Qt_5_10_0_GCC_64bit-Debug 70 | 71 | 72 | true 73 | qmake 74 | 75 | QtProjectManager.QMakeBuildStep 76 | true 77 | 78 | false 79 | false 80 | false 81 | 82 | 83 | true 84 | Make 85 | 86 | Qt4ProjectManager.MakeStep 87 | 88 | -w 89 | -r 90 | 91 | false 92 | 93 | 94 | 95 | 2 96 | Build 97 | 98 | ProjectExplorer.BuildSteps.Build 99 | 100 | 101 | 102 | true 103 | Make 104 | 105 | Qt4ProjectManager.MakeStep 106 | 107 | -w 108 | -r 109 | 110 | true 111 | clean 112 | 113 | 114 | 1 115 | Clean 116 | 117 | ProjectExplorer.BuildSteps.Clean 118 | 119 | 2 120 | false 121 | 122 | Debug 123 | 124 | Qt4ProjectManager.Qt4BuildConfiguration 125 | 2 126 | true 127 | 128 | 129 | /home/pratik/build-dashboard-Desktop_Qt_5_10_0_GCC_64bit-Release 130 | 131 | 132 | true 133 | qmake 134 | 135 | QtProjectManager.QMakeBuildStep 136 | false 137 | 138 | false 139 | false 140 | false 141 | 142 | 143 | true 144 | Make 145 | 146 | Qt4ProjectManager.MakeStep 147 | 148 | -w 149 | -r 150 | 151 | false 152 | 153 | 154 | 155 | 2 156 | Build 157 | 158 | ProjectExplorer.BuildSteps.Build 159 | 160 | 161 | 162 | true 163 | Make 164 | 165 | Qt4ProjectManager.MakeStep 166 | 167 | -w 168 | -r 169 | 170 | true 171 | clean 172 | 173 | 174 | 1 175 | Clean 176 | 177 | ProjectExplorer.BuildSteps.Clean 178 | 179 | 2 180 | false 181 | 182 | Release 183 | 184 | Qt4ProjectManager.Qt4BuildConfiguration 185 | 0 186 | true 187 | 188 | 189 | /home/pratik/build-dashboard-Desktop_Qt_5_10_0_GCC_64bit-Profile 190 | 191 | 192 | true 193 | qmake 194 | 195 | QtProjectManager.QMakeBuildStep 196 | true 197 | 198 | false 199 | true 200 | false 201 | 202 | 203 | true 204 | Make 205 | 206 | Qt4ProjectManager.MakeStep 207 | 208 | -w 209 | -r 210 | 211 | false 212 | 213 | 214 | 215 | 2 216 | Build 217 | 218 | ProjectExplorer.BuildSteps.Build 219 | 220 | 221 | 222 | true 223 | Make 224 | 225 | Qt4ProjectManager.MakeStep 226 | 227 | -w 228 | -r 229 | 230 | true 231 | clean 232 | 233 | 234 | 1 235 | Clean 236 | 237 | ProjectExplorer.BuildSteps.Clean 238 | 239 | 2 240 | false 241 | 242 | Profile 243 | 244 | Qt4ProjectManager.Qt4BuildConfiguration 245 | 0 246 | true 247 | 248 | 3 249 | 250 | 251 | 0 252 | Deploy 253 | 254 | ProjectExplorer.BuildSteps.Deploy 255 | 256 | 1 257 | Deploy locally 258 | 259 | ProjectExplorer.DefaultDeployConfiguration 260 | 261 | 1 262 | 263 | 264 | false 265 | false 266 | 1000 267 | 268 | true 269 | 270 | false 271 | false 272 | false 273 | false 274 | true 275 | 0.01 276 | 10 277 | true 278 | 1 279 | 25 280 | 281 | 1 282 | true 283 | false 284 | true 285 | valgrind 286 | 287 | 0 288 | 1 289 | 2 290 | 3 291 | 4 292 | 5 293 | 6 294 | 7 295 | 8 296 | 9 297 | 10 298 | 11 299 | 12 300 | 13 301 | 14 302 | 303 | 2 304 | 305 | dashboard 306 | 307 | Qt4ProjectManager.Qt4RunConfiguration:/home/pratik/dashboard/dashboard.pro 308 | true 309 | 310 | dashboard.pro 311 | false 312 | 313 | /home/pratik/build-dashboard-rpi3-Debug 314 | 3768 315 | false 316 | true 317 | false 318 | false 319 | true 320 | 321 | 1 322 | 323 | 324 | 325 | ProjectExplorer.Project.Target.1 326 | 327 | rpi3 328 | rpi3 329 | {0dd0d8a9-7ce5-46f5-a466-5ceecae7b775} 330 | 0 331 | 0 332 | 0 333 | 334 | /home/pratik/build-dashboard-rpi3-Debug 335 | 336 | 337 | true 338 | qmake 339 | 340 | QtProjectManager.QMakeBuildStep 341 | true 342 | 343 | false 344 | false 345 | false 346 | 347 | 348 | true 349 | Make 350 | 351 | Qt4ProjectManager.MakeStep 352 | 353 | -w 354 | -r 355 | 356 | false 357 | 358 | 359 | 360 | 2 361 | Build 362 | 363 | ProjectExplorer.BuildSteps.Build 364 | 365 | 366 | 367 | true 368 | Make 369 | 370 | Qt4ProjectManager.MakeStep 371 | 372 | -w 373 | -r 374 | 375 | true 376 | clean 377 | 378 | 379 | 1 380 | Clean 381 | 382 | ProjectExplorer.BuildSteps.Clean 383 | 384 | 2 385 | false 386 | 387 | Debug 388 | 389 | Qt4ProjectManager.Qt4BuildConfiguration 390 | 2 391 | true 392 | 393 | 394 | /home/pratik/build-dashboard-rpi3-Release 395 | 396 | 397 | true 398 | qmake 399 | 400 | QtProjectManager.QMakeBuildStep 401 | false 402 | 403 | false 404 | false 405 | false 406 | 407 | 408 | true 409 | Make 410 | 411 | Qt4ProjectManager.MakeStep 412 | 413 | -w 414 | -r 415 | 416 | false 417 | 418 | 419 | 420 | 2 421 | Build 422 | 423 | ProjectExplorer.BuildSteps.Build 424 | 425 | 426 | 427 | true 428 | Make 429 | 430 | Qt4ProjectManager.MakeStep 431 | 432 | -w 433 | -r 434 | 435 | true 436 | clean 437 | 438 | 439 | 1 440 | Clean 441 | 442 | ProjectExplorer.BuildSteps.Clean 443 | 444 | 2 445 | false 446 | 447 | Release 448 | 449 | Qt4ProjectManager.Qt4BuildConfiguration 450 | 0 451 | true 452 | 453 | 454 | /home/pratik/build-dashboard-rpi3-Profile 455 | 456 | 457 | true 458 | qmake 459 | 460 | QtProjectManager.QMakeBuildStep 461 | true 462 | 463 | false 464 | true 465 | false 466 | 467 | 468 | true 469 | Make 470 | 471 | Qt4ProjectManager.MakeStep 472 | 473 | -w 474 | -r 475 | 476 | false 477 | 478 | 479 | 480 | 2 481 | Build 482 | 483 | ProjectExplorer.BuildSteps.Build 484 | 485 | 486 | 487 | true 488 | Make 489 | 490 | Qt4ProjectManager.MakeStep 491 | 492 | -w 493 | -r 494 | 495 | true 496 | clean 497 | 498 | 499 | 1 500 | Clean 501 | 502 | ProjectExplorer.BuildSteps.Clean 503 | 504 | 2 505 | false 506 | 507 | Profile 508 | 509 | Qt4ProjectManager.Qt4BuildConfiguration 510 | 0 511 | true 512 | 513 | 3 514 | 515 | 516 | 517 | true 518 | Check for free disk space 519 | 520 | RemoteLinux.CheckForFreeDiskSpaceStep 521 | 522 | 523 | 524 | 525 | 526 | / 527 | 5242880 528 | 529 | 530 | true 531 | Upload files via SFTP 532 | 533 | RemoteLinux.DirectUploadStep 534 | 535 | /home/pratik/build-dashboard-rpi3-Debug/dashboard 536 | 537 | 538 | 192.168.1.102 539 | 540 | 541 | /usr/local/qt5pi/examples/quickcontrols/extras/dashboard 542 | 543 | 544 | /opt/qtrpi/raspbian/sysroot 545 | 546 | 547 | 2018-06-06T00:03:02 548 | 549 | false 550 | true 551 | 552 | 2 553 | Deploy 554 | 555 | ProjectExplorer.BuildSteps.Deploy 556 | 557 | 1 558 | Deploy to Remote Linux Host 559 | 560 | DeployToGenericLinux 561 | 562 | 1 563 | 564 | 565 | false 566 | false 567 | 1000 568 | 569 | true 570 | 571 | false 572 | false 573 | false 574 | false 575 | true 576 | 0.01 577 | 10 578 | true 579 | 1 580 | 25 581 | 582 | 1 583 | true 584 | false 585 | true 586 | valgrind 587 | 588 | 0 589 | 1 590 | 2 591 | 3 592 | 4 593 | 5 594 | 6 595 | 7 596 | 8 597 | 9 598 | 10 599 | 11 600 | 12 601 | 13 602 | 14 603 | 604 | 1 605 | 606 | dashboard (on Remote Device) 607 | 608 | RemoteLinuxRunConfiguration:dashboard 609 | 610 | dashboard 611 | 1 612 | 613 | false 614 | 615 | 3768 616 | false 617 | true 618 | false 619 | false 620 | true 621 | 622 | 1 623 | 624 | 625 | 626 | ProjectExplorer.Project.TargetCount 627 | 2 628 | 629 | 630 | ProjectExplorer.Project.Updater.FileVersion 631 | 18 632 | 633 | 634 | Version 635 | 18 636 | 637 | 638 | -------------------------------------------------------------------------------- /dashboard/dashboard.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | fonts/DejaVuSans.ttf 4 | images/fuel-icon.png 5 | images/temperature-icon.png 6 | qml/dashboard.qml 7 | qml/DashboardGaugeStyle.qml 8 | qml/IconGaugeStyle.qml 9 | qml/TachometerStyle.qml 10 | qml/TurnIndicator.qml 11 | qml/ValueSource.qml 12 | 13 | 14 | -------------------------------------------------------------------------------- /dashboard/fonts/DejaVuSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/dashboard/fonts/DejaVuSans.ttf -------------------------------------------------------------------------------- /dashboard/fonts/LICENSE: -------------------------------------------------------------------------------- 1 | Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. 2 | Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) 3 | 4 | Bitstream Vera Fonts Copyright 5 | ------------------------------ 6 | 7 | Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is 8 | a trademark of Bitstream, Inc. 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of the fonts accompanying this license ("Fonts") and associated 12 | documentation files (the "Font Software"), to reproduce and distribute the 13 | Font Software, including without limitation the rights to use, copy, merge, 14 | publish, distribute, and/or sell copies of the Font Software, and to permit 15 | persons to whom the Font Software is furnished to do so, subject to the 16 | following conditions: 17 | 18 | The above copyright and trademark notices and this permission notice shall 19 | be included in all copies of one or more of the Font Software typefaces. 20 | 21 | The Font Software may be modified, altered, or added to, and in particular 22 | the designs of glyphs or characters in the Fonts may be modified and 23 | additional glyphs or characters may be added to the Fonts, only if the fonts 24 | are renamed to names not containing either the words "Bitstream" or the word 25 | "Vera". 26 | 27 | This License becomes null and void to the extent applicable to Fonts or Font 28 | Software that has been modified and is distributed under the "Bitstream 29 | Vera" names. 30 | 31 | The Font Software may be sold as part of a larger software package but no 32 | copy of one or more of the Font Software typefaces may be sold by itself. 33 | 34 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 35 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, 36 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, 37 | TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME 38 | FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING 39 | ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 40 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 41 | THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE 42 | FONT SOFTWARE. 43 | 44 | Except as contained in this notice, the names of Gnome, the Gnome 45 | Foundation, and Bitstream Inc., shall not be used in advertising or 46 | otherwise to promote the sale, use or other dealings in this Font Software 47 | without prior written authorization from the Gnome Foundation or Bitstream 48 | Inc., respectively. For further information, contact: fonts at gnome dot 49 | org. 50 | 51 | Arev Fonts Copyright 52 | ------------------------------ 53 | 54 | Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. 55 | 56 | Permission is hereby granted, free of charge, to any person obtaining 57 | a copy of the fonts accompanying this license ("Fonts") and 58 | associated documentation files (the "Font Software"), to reproduce 59 | and distribute the modifications to the Bitstream Vera Font Software, 60 | including without limitation the rights to use, copy, merge, publish, 61 | distribute, and/or sell copies of the Font Software, and to permit 62 | persons to whom the Font Software is furnished to do so, subject to 63 | the following conditions: 64 | 65 | The above copyright and trademark notices and this permission notice 66 | shall be included in all copies of one or more of the Font Software 67 | typefaces. 68 | 69 | The Font Software may be modified, altered, or added to, and in 70 | particular the designs of glyphs or characters in the Fonts may be 71 | modified and additional glyphs or characters may be added to the 72 | Fonts, only if the fonts are renamed to names not containing either 73 | the words "Tavmjong Bah" or the word "Arev". 74 | 75 | This License becomes null and void to the extent applicable to Fonts 76 | or Font Software that has been modified and is distributed under the 77 | "Tavmjong Bah Arev" names. 78 | 79 | The Font Software may be sold as part of a larger software package but 80 | no copy of one or more of the Font Software typefaces may be sold by 81 | itself. 82 | 83 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 84 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 85 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 86 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL 87 | TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 88 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 89 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 90 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 91 | OTHER DEALINGS IN THE FONT SOFTWARE. 92 | 93 | Except as contained in this notice, the name of Tavmjong Bah shall not 94 | be used in advertising or otherwise to promote the sale, use or other 95 | dealings in this Font Software without prior written authorization 96 | from Tavmjong Bah. For further information, contact: tavmjong @ free 97 | . fr. 98 | 99 | $Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $ 100 | -------------------------------------------------------------------------------- /dashboard/images/fuel-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/dashboard/images/fuel-icon.png -------------------------------------------------------------------------------- /dashboard/images/temperature-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pratikfarkase94/Touch-Screen-based-fully-Digital-Instrument-cluster-Using-Raspberry-Pi-3-and-CPP-QT-QML/1e6160ed08f1ffa74e2f86d4d5e7fc355ebeb3bf/dashboard/images/temperature-icon.png -------------------------------------------------------------------------------- /dashboard/main.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the examples of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | 51 | #include 52 | #include 53 | #include 54 | #include 55 | 56 | int main(int argc, char *argv[]) 57 | { 58 | QGuiApplication app(argc, argv); 59 | 60 | QFontDatabase::addApplicationFont(":/fonts/DejaVuSans.ttf"); 61 | app.setFont(QFont("DejaVu Sans")); 62 | 63 | QQmlApplicationEngine engine(QUrl("qrc:/qml/dashboard.qml")); 64 | if (engine.rootObjects().isEmpty()) 65 | return -1; 66 | return app.exec(); 67 | } 68 | -------------------------------------------------------------------------------- /dashboard/qml/DashboardGaugeStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the examples of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | 51 | import QtQuick 2.2 52 | import QtQuick.Controls.Styles 1.4 53 | 54 | CircularGaugeStyle { 55 | tickmarkInset: toPixels(0.04) 56 | minorTickmarkInset: tickmarkInset 57 | labelStepSize: 20 58 | labelInset: toPixels(0.23) 59 | 60 | property real xCenter: outerRadius 61 | property real yCenter: outerRadius 62 | property real needleLength: outerRadius - tickmarkInset * 1.25 63 | property real needleTipWidth: toPixels(0.02) 64 | property real needleBaseWidth: toPixels(0.06) 65 | property bool halfGauge: false 66 | 67 | function toPixels(percentage) { 68 | return percentage * outerRadius; 69 | } 70 | 71 | function degToRad(degrees) { 72 | return degrees * (Math.PI / 180); 73 | } 74 | 75 | function radToDeg(radians) { 76 | return radians * (180 / Math.PI); 77 | } 78 | 79 | function paintBackground(ctx) { 80 | if (halfGauge) { 81 | ctx.beginPath(); 82 | ctx.rect(0, 0, ctx.canvas.width, ctx.canvas.height / 2); 83 | ctx.clip(); 84 | } 85 | 86 | ctx.beginPath(); 87 | ctx.fillStyle = "black"; 88 | ctx.ellipse(0, 0, ctx.canvas.width, ctx.canvas.height); 89 | ctx.fill(); 90 | 91 | ctx.beginPath(); 92 | ctx.lineWidth = tickmarkInset; 93 | ctx.strokeStyle = "black"; 94 | ctx.arc(xCenter, yCenter, outerRadius - ctx.lineWidth / 2, outerRadius - ctx.lineWidth / 2, 0, Math.PI * 2); 95 | ctx.stroke(); 96 | 97 | ctx.beginPath(); 98 | ctx.lineWidth = tickmarkInset / 2; 99 | ctx.strokeStyle = "#222"; 100 | ctx.arc(xCenter, yCenter, outerRadius - ctx.lineWidth / 2, outerRadius - ctx.lineWidth / 2, 0, Math.PI * 2); 101 | ctx.stroke(); 102 | 103 | ctx.beginPath(); 104 | var gradient = ctx.createRadialGradient(xCenter, yCenter, outerRadius * 0.8, xCenter, yCenter, outerRadius); 105 | gradient.addColorStop(0, Qt.rgba(1, 1, 1, 0)); 106 | gradient.addColorStop(0.7, Qt.rgba(1, 1, 1, 0.13)); 107 | gradient.addColorStop(1, Qt.rgba(1, 1, 1, 1)); 108 | ctx.fillStyle = gradient; 109 | ctx.arc(xCenter, yCenter, outerRadius - tickmarkInset, outerRadius - tickmarkInset, 0, Math.PI * 2); 110 | ctx.fill(); 111 | } 112 | 113 | background: Canvas { 114 | onPaint: { 115 | var ctx = getContext("2d"); 116 | ctx.reset(); 117 | paintBackground(ctx); 118 | } 119 | 120 | Text { 121 | id: speedText 122 | font.pixelSize: toPixels(0.3) 123 | text: kphInt 124 | color: "white" 125 | horizontalAlignment: Text.AlignRight 126 | anchors.horizontalCenter: parent.horizontalCenter 127 | anchors.top: parent.verticalCenter 128 | anchors.topMargin: toPixels(0.1) 129 | 130 | readonly property int kphInt: control.value 131 | } 132 | Text { 133 | text: "km/h" 134 | color: "white" 135 | font.pixelSize: toPixels(0.09) 136 | anchors.top: speedText.bottom 137 | anchors.horizontalCenter: parent.horizontalCenter 138 | } 139 | } 140 | 141 | needle: Canvas { 142 | implicitWidth: needleBaseWidth 143 | implicitHeight: needleLength 144 | 145 | property real xCenter: width / 2 146 | property real yCenter: height / 2 147 | 148 | onPaint: { 149 | var ctx = getContext("2d"); 150 | ctx.reset(); 151 | 152 | ctx.beginPath(); 153 | ctx.moveTo(xCenter, height); 154 | ctx.lineTo(xCenter - needleBaseWidth / 2, height - needleBaseWidth / 2); 155 | ctx.lineTo(xCenter - needleTipWidth / 2, 0); 156 | ctx.lineTo(xCenter, yCenter - needleLength); 157 | ctx.lineTo(xCenter, 0); 158 | ctx.closePath(); 159 | ctx.fillStyle = Qt.rgba(0.66, 0, 0, 0.66); 160 | ctx.fill(); 161 | 162 | ctx.beginPath(); 163 | ctx.moveTo(xCenter, height) 164 | ctx.lineTo(width, height - needleBaseWidth / 2); 165 | ctx.lineTo(xCenter + needleTipWidth / 2, 0); 166 | ctx.lineTo(xCenter, 0); 167 | ctx.closePath(); 168 | ctx.fillStyle = Qt.lighter(Qt.rgba(0.66, 0, 0, 0.66)); 169 | ctx.fill(); 170 | } 171 | } 172 | 173 | foreground: null 174 | } 175 | -------------------------------------------------------------------------------- /dashboard/qml/IconGaugeStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the examples of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | 51 | import QtQuick 2.2 52 | import QtQuick.Controls.Styles 1.4 53 | import QtQuick.Extras 1.4 54 | 55 | DashboardGaugeStyle { 56 | id: fuelGaugeStyle 57 | minimumValueAngle: -60 58 | maximumValueAngle: 60 59 | tickmarkStepSize: 1 60 | labelStepSize: 1 61 | labelInset: toPixels(-0.25) 62 | minorTickmarkCount: 3 63 | 64 | needleLength: toPixels(0.85) 65 | needleBaseWidth: toPixels(0.08) 66 | needleTipWidth: toPixels(0.03) 67 | 68 | halfGauge: true 69 | 70 | property string icon: "" 71 | property color minWarningColor: "transparent" 72 | property color maxWarningColor: "transparent" 73 | readonly property real minWarningStartAngle: minimumValueAngle - 90 74 | readonly property real maxWarningStartAngle: maximumValueAngle - 90 75 | 76 | tickmark: Rectangle { 77 | implicitWidth: toPixels(0.06) 78 | antialiasing: true 79 | implicitHeight: toPixels(0.2) 80 | color: "#c8c8c8" 81 | } 82 | 83 | minorTickmark: Rectangle { 84 | implicitWidth: toPixels(0.03) 85 | antialiasing: true 86 | implicitHeight: toPixels(0.15) 87 | color: "#c8c8c8" 88 | } 89 | 90 | background: Item { 91 | Canvas { 92 | anchors.fill: parent 93 | onPaint: { 94 | var ctx = getContext("2d"); 95 | ctx.reset(); 96 | 97 | paintBackground(ctx); 98 | 99 | if (minWarningColor != "transparent") { 100 | ctx.beginPath(); 101 | ctx.lineWidth = fuelGaugeStyle.toPixels(0.08); 102 | ctx.strokeStyle = minWarningColor; 103 | ctx.arc(outerRadius, outerRadius, 104 | // Start the line in from the decorations, and account for the width of the line itself. 105 | outerRadius - tickmarkInset - ctx.lineWidth / 2, 106 | degToRad(minWarningStartAngle), 107 | degToRad(minWarningStartAngle + angleRange / (minorTickmarkCount + 1)), false); 108 | ctx.stroke(); 109 | } 110 | if (maxWarningColor != "transparent") { 111 | ctx.beginPath(); 112 | ctx.lineWidth = fuelGaugeStyle.toPixels(0.08); 113 | ctx.strokeStyle = maxWarningColor; 114 | ctx.arc(outerRadius, outerRadius, 115 | // Start the line in from the decorations, and account for the width of the line itself. 116 | outerRadius - tickmarkInset - ctx.lineWidth / 2, 117 | degToRad(maxWarningStartAngle - angleRange / (minorTickmarkCount + 1)), 118 | degToRad(maxWarningStartAngle), false); 119 | ctx.stroke(); 120 | } 121 | } 122 | } 123 | 124 | Image { 125 | source: icon 126 | anchors.bottom: parent.verticalCenter 127 | anchors.bottomMargin: toPixels(0.3) 128 | anchors.horizontalCenter: parent.horizontalCenter 129 | width: toPixels(0.3) 130 | height: width 131 | fillMode: Image.PreserveAspectFit 132 | } 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /dashboard/qml/TachometerStyle.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the examples of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | 51 | import QtQuick 2.2 52 | import QtQuick.Controls.Styles 1.4 53 | import QtQuick.Extras 1.4 54 | 55 | DashboardGaugeStyle { 56 | id: tachometerStyle 57 | tickmarkStepSize: 1 58 | labelStepSize: 1 59 | needleLength: toPixels(0.85) 60 | needleBaseWidth: toPixels(0.08) 61 | needleTipWidth: toPixels(0.03) 62 | 63 | tickmark: Rectangle { 64 | implicitWidth: toPixels(0.03) 65 | antialiasing: true 66 | implicitHeight: toPixels(0.08) 67 | color: styleData.index === 7 || styleData.index === 8 ? Qt.rgba(0.5, 0, 0, 1) : "#c8c8c8" 68 | } 69 | 70 | minorTickmark: null 71 | 72 | tickmarkLabel: Text { 73 | font.pixelSize: Math.max(6, toPixels(0.12)) 74 | text: styleData.value 75 | color: styleData.index === 7 || styleData.index === 8 ? Qt.rgba(0.5, 0, 0, 1) : "#c8c8c8" 76 | antialiasing: true 77 | } 78 | 79 | background: Canvas { 80 | onPaint: { 81 | var ctx = getContext("2d"); 82 | ctx.reset(); 83 | paintBackground(ctx); 84 | 85 | ctx.beginPath(); 86 | ctx.lineWidth = tachometerStyle.toPixels(0.08); 87 | ctx.strokeStyle = Qt.rgba(0.5, 0, 0, 1); 88 | var warningCircumference = maximumValueAngle - minimumValueAngle * 0.1; 89 | var startAngle = maximumValueAngle - 90; 90 | ctx.arc(outerRadius, outerRadius, 91 | // Start the line in from the decorations, and account for the width of the line itself. 92 | outerRadius - tickmarkInset - ctx.lineWidth / 2, 93 | degToRad(startAngle - angleRange / 8 + angleRange * 0.015), 94 | degToRad(startAngle - angleRange * 0.015), false); 95 | ctx.stroke(); 96 | } 97 | 98 | Text { 99 | id: rpmText 100 | font.pixelSize: tachometerStyle.toPixels(0.3) 101 | text: rpmInt 102 | color: "white" 103 | horizontalAlignment: Text.AlignRight 104 | anchors.horizontalCenter: parent.horizontalCenter 105 | anchors.top: parent.verticalCenter 106 | anchors.topMargin: 20 107 | 108 | readonly property int rpmInt: valueSource.rpm 109 | } 110 | Text { 111 | text: "x1000" 112 | color: "white" 113 | font.pixelSize: tachometerStyle.toPixels(0.1) 114 | anchors.top: parent.top 115 | anchors.topMargin: parent.height / 4 116 | anchors.horizontalCenter: parent.horizontalCenter 117 | } 118 | Text { 119 | text: "RPM" 120 | color: "white" 121 | font.pixelSize: tachometerStyle.toPixels(0.1) 122 | anchors.top: rpmText.bottom 123 | anchors.horizontalCenter: parent.horizontalCenter 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /dashboard/qml/TurnIndicator.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the examples of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | 51 | import QtQuick 2.2 52 | 53 | Item { 54 | // This enum is actually keyboard-related, but it serves its purpose 55 | // as an indication of direction for us. 56 | property int direction: Qt.LeftArrow 57 | property bool on: false 58 | 59 | property bool flashing: false 60 | 61 | scale: direction === Qt.LeftArrow ? 1 : -1 62 | //! [1] 63 | Timer { 64 | id: flashTimer 65 | interval: 500 66 | running: on 67 | repeat: true 68 | onTriggered: flashing = !flashing 69 | } 70 | //! [1] 71 | //! [2] 72 | function paintOutlinePath(ctx) { 73 | ctx.beginPath(); 74 | ctx.moveTo(0, height * 0.5); 75 | ctx.lineTo(0.6 * width, 0); 76 | ctx.lineTo(0.6 * width, height * 0.28); 77 | ctx.lineTo(width, height * 0.28); 78 | ctx.lineTo(width, height * 0.72); 79 | ctx.lineTo(0.6 * width, height * 0.72); 80 | ctx.lineTo(0.6 * width, height); 81 | ctx.lineTo(0, height * 0.5); 82 | } 83 | //! [2] 84 | Canvas { 85 | id: backgroundCanvas 86 | anchors.fill: parent 87 | 88 | onPaint: { 89 | var ctx = getContext("2d"); 90 | ctx.reset(); 91 | 92 | paintOutlinePath(ctx); 93 | 94 | ctx.lineWidth = 1; 95 | ctx.strokeStyle = "black"; 96 | ctx.stroke(); 97 | } 98 | } 99 | //! [3] 100 | Canvas { 101 | id: foregroundCanvas 102 | anchors.fill: parent 103 | visible: on && flashing 104 | 105 | onPaint: { 106 | var ctx = getContext("2d"); 107 | ctx.reset(); 108 | 109 | paintOutlinePath(ctx); 110 | 111 | ctx.fillStyle = "green"; 112 | ctx.fill(); 113 | } 114 | } 115 | //! [3] 116 | } 117 | -------------------------------------------------------------------------------- /dashboard/qml/ValueSource.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the examples of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | 51 | import QtQuick 2.2 52 | //! [0] 53 | Item { 54 | id: valueSource 55 | property real kph: 0 56 | property real rpm: 1 57 | property real fuel: 0.85 58 | property string gear: { 59 | var g; 60 | if (kph == 0) { 61 | return "P"; 62 | } 63 | if (kph < 30) { 64 | return "1"; 65 | } 66 | if (kph < 50) { 67 | return "2"; 68 | } 69 | if (kph < 80) { 70 | return "3"; 71 | } 72 | if (kph < 120) { 73 | return "4"; 74 | } 75 | if (kph < 160) { 76 | return "5"; 77 | } 78 | } 79 | property int turnSignal: gear == "P" && !start ? randomDirection() : -1 80 | property real temperature: 0.6 81 | property bool start: true 82 | //! [0] 83 | 84 | function randomDirection() { 85 | return Math.random() > 0.5 ? Qt.LeftArrow : Qt.RightArrow; 86 | } 87 | 88 | SequentialAnimation { 89 | running: true 90 | loops: 1 91 | 92 | // We want a small pause at the beginning, but we only want it to happen once. 93 | PauseAnimation { 94 | duration: 1000 95 | } 96 | 97 | PropertyAction { 98 | target: valueSource 99 | property: "start" 100 | value: false 101 | } 102 | 103 | SequentialAnimation { 104 | loops: Animation.Infinite 105 | //! [1] 106 | ParallelAnimation { 107 | NumberAnimation { 108 | target: valueSource 109 | property: "kph" 110 | easing.type: Easing.InOutSine 111 | from: 0 112 | to: 30 113 | duration: 3000 114 | } 115 | NumberAnimation { 116 | target: valueSource 117 | property: "rpm" 118 | easing.type: Easing.InOutSine 119 | from: 1 120 | to: 6.1 121 | duration: 3000 122 | } 123 | } 124 | //! [1] 125 | ParallelAnimation { 126 | // We changed gears so we lost a bit of speed. 127 | NumberAnimation { 128 | target: valueSource 129 | property: "kph" 130 | easing.type: Easing.InOutSine 131 | from: 30 132 | to: 26 133 | duration: 600 134 | } 135 | NumberAnimation { 136 | target: valueSource 137 | property: "rpm" 138 | easing.type: Easing.InOutSine 139 | from: 6 140 | to: 2.4 141 | duration: 600 142 | } 143 | } 144 | ParallelAnimation { 145 | NumberAnimation { 146 | target: valueSource 147 | property: "kph" 148 | easing.type: Easing.InOutSine 149 | to: 60 150 | duration: 3000 151 | } 152 | NumberAnimation { 153 | target: valueSource 154 | property: "rpm" 155 | easing.type: Easing.InOutSine 156 | to: 5.6 157 | duration: 3000 158 | } 159 | } 160 | ParallelAnimation { 161 | // We changed gears so we lost a bit of speed. 162 | NumberAnimation { 163 | target: valueSource 164 | property: "kph" 165 | easing.type: Easing.InOutSine 166 | to: 56 167 | duration: 600 168 | } 169 | NumberAnimation { 170 | target: valueSource 171 | property: "rpm" 172 | easing.type: Easing.InOutSine 173 | to: 2.3 174 | duration: 600 175 | } 176 | } 177 | ParallelAnimation { 178 | NumberAnimation { 179 | target: valueSource 180 | property: "kph" 181 | easing.type: Easing.InOutSine 182 | to: 100 183 | duration: 3000 184 | } 185 | NumberAnimation { 186 | target: valueSource 187 | property: "rpm" 188 | easing.type: Easing.InOutSine 189 | to: 5.1 190 | duration: 3000 191 | } 192 | } 193 | ParallelAnimation { 194 | // We changed gears so we lost a bit of speed. 195 | NumberAnimation { 196 | target: valueSource 197 | property: "kph" 198 | easing.type: Easing.InOutSine 199 | to: 96 200 | duration: 600 201 | } 202 | NumberAnimation { 203 | target: valueSource 204 | property: "rpm" 205 | easing.type: Easing.InOutSine 206 | to: 2.2 207 | duration: 600 208 | } 209 | } 210 | 211 | ParallelAnimation { 212 | NumberAnimation { 213 | target: valueSource 214 | property: "kph" 215 | easing.type: Easing.InOutSine 216 | to: 140 217 | duration: 3000 218 | } 219 | NumberAnimation { 220 | target: valueSource 221 | property: "rpm" 222 | easing.type: Easing.InOutSine 223 | to: 6.2 224 | duration: 3000 225 | } 226 | } 227 | 228 | // Start downshifting. 229 | 230 | // Fifth to fourth gear. 231 | ParallelAnimation { 232 | NumberAnimation { 233 | target: valueSource 234 | property: "kph" 235 | easing.type: Easing.Linear 236 | to: 100 237 | duration: 5000 238 | } 239 | 240 | NumberAnimation { 241 | target: valueSource 242 | property: "rpm" 243 | easing.type: Easing.InOutSine 244 | to: 3.1 245 | duration: 5000 246 | } 247 | } 248 | 249 | // Fourth to third gear. 250 | NumberAnimation { 251 | target: valueSource 252 | property: "rpm" 253 | easing.type: Easing.InOutSine 254 | to: 5.5 255 | duration: 600 256 | } 257 | 258 | ParallelAnimation { 259 | NumberAnimation { 260 | target: valueSource 261 | property: "kph" 262 | easing.type: Easing.InOutSine 263 | to: 60 264 | duration: 5000 265 | } 266 | NumberAnimation { 267 | target: valueSource 268 | property: "rpm" 269 | easing.type: Easing.InOutSine 270 | to: 2.6 271 | duration: 5000 272 | } 273 | } 274 | 275 | // Third to second gear. 276 | NumberAnimation { 277 | target: valueSource 278 | property: "rpm" 279 | easing.type: Easing.InOutSine 280 | to: 6.3 281 | duration: 600 282 | } 283 | 284 | ParallelAnimation { 285 | NumberAnimation { 286 | target: valueSource 287 | property: "kph" 288 | easing.type: Easing.InOutSine 289 | to: 30 290 | duration: 5000 291 | } 292 | NumberAnimation { 293 | target: valueSource 294 | property: "rpm" 295 | easing.type: Easing.InOutSine 296 | to: 2.6 297 | duration: 5000 298 | } 299 | } 300 | 301 | NumberAnimation { 302 | target: valueSource 303 | property: "rpm" 304 | easing.type: Easing.InOutSine 305 | to: 6.5 306 | duration: 600 307 | } 308 | 309 | // Second to first gear. 310 | ParallelAnimation { 311 | NumberAnimation { 312 | target: valueSource 313 | property: "kph" 314 | easing.type: Easing.InOutSine 315 | to: 0 316 | duration: 5000 317 | } 318 | NumberAnimation { 319 | target: valueSource 320 | property: "rpm" 321 | easing.type: Easing.InOutSine 322 | to: 1 323 | duration: 4500 324 | } 325 | } 326 | 327 | PauseAnimation { 328 | duration: 5000 329 | } 330 | } 331 | } 332 | } 333 | -------------------------------------------------------------------------------- /dashboard/qml/dashboard.qml: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2016 The Qt Company Ltd. 4 | ** Contact: https://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the examples of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:BSD$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see https://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at https://www.qt.io/contact-us. 16 | ** 17 | ** BSD License Usage 18 | ** Alternatively, you may use this file under the terms of the BSD license 19 | ** as follows: 20 | ** 21 | ** "Redistribution and use in source and binary forms, with or without 22 | ** modification, are permitted provided that the following conditions are 23 | ** met: 24 | ** * Redistributions of source code must retain the above copyright 25 | ** notice, this list of conditions and the following disclaimer. 26 | ** * Redistributions in binary form must reproduce the above copyright 27 | ** notice, this list of conditions and the following disclaimer in 28 | ** the documentation and/or other materials provided with the 29 | ** distribution. 30 | ** * Neither the name of The Qt Company Ltd nor the names of its 31 | ** contributors may be used to endorse or promote products derived 32 | ** from this software without specific prior written permission. 33 | ** 34 | ** 35 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 36 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 37 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 38 | ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 39 | ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 41 | ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 42 | ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 43 | ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 44 | ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 45 | ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." 46 | ** 47 | ** $QT_END_LICENSE$ 48 | ** 49 | ****************************************************************************/ 50 | 51 | import QtQuick 2.2 52 | import QtQuick.Window 2.1 53 | import QtQuick.Controls 1.4 54 | import QtQuick.Controls.Styles 1.4 55 | import QtQuick.Extras 1.4 56 | 57 | Window { 58 | id: root 59 | visible: true 60 | width: 800 61 | height: 480 62 | 63 | color: "#161616" 64 | title: "Qt Quick Extras Demo" 65 | 66 | ValueSource { 67 | id: valueSource 68 | } 69 | 70 | // Dashboards are typically in a landscape orientation, so we need to ensure 71 | // our height is never greater than our width. 72 | Item { 73 | id: container 74 | width: root.width 75 | height: Math.min(root.width, root.height) 76 | anchors.centerIn: parent 77 | 78 | Row { 79 | id: gaugeRow 80 | width: 814 81 | spacing: container.width * 0.02 82 | anchors.centerIn: parent 83 | 84 | TurnIndicator { 85 | id: leftIndicator 86 | anchors.verticalCenter: parent.verticalCenter 87 | width: height 88 | height: container.height * 0.1 - gaugeRow.spacing 89 | 90 | direction: Qt.LeftArrow 91 | on: valueSource.turnSignal == Qt.LeftArrow 92 | } 93 | 94 | Item { 95 | width: height 96 | height: container.height * 0.25 - gaugeRow.spacing 97 | anchors.verticalCenter: parent.verticalCenter 98 | 99 | CircularGauge { 100 | id: fuelGauge 101 | x: -20 102 | y: -150 103 | width: 150 104 | height: 150 105 | value: valueSource.fuel 106 | maximumValue: 1 107 | 108 | style: IconGaugeStyle { 109 | id: fuelGaugeStyle 110 | 111 | icon: "qrc:/images/fuel-icon.png" 112 | minWarningColor: Qt.rgba(0.5, 0, 0, 1) 113 | 114 | tickmarkLabel: Text { 115 | color: "white" 116 | visible: styleData.value === 0 || styleData.value === 1 117 | font.pixelSize: fuelGaugeStyle.toPixels(0.225) 118 | text: styleData.value === 0 ? "E" : (styleData.value === 1 ? "F" : "") 119 | } 120 | } 121 | } 122 | 123 | CircularGauge { 124 | x: -20 125 | y: 150 126 | width: 150 127 | height: 150 128 | value: valueSource.temperature 129 | maximumValue: 1 130 | 131 | style: IconGaugeStyle { 132 | id: tempGaugeStyle 133 | 134 | icon: "qrc:/images/temperature-icon.png" 135 | maxWarningColor: Qt.rgba(0.5, 0, 0, 1) 136 | 137 | tickmarkLabel: Text { 138 | color: "white" 139 | visible: styleData.value === 0 || styleData.value === 1 140 | font.pixelSize: tempGaugeStyle.toPixels(0.225) 141 | text: styleData.value === 0 ? "C" : (styleData.value === 1 ? "H" : "") 142 | } 143 | } 144 | } 145 | } 146 | 147 | CircularGauge { 148 | id: speedometer 149 | width: 480 150 | height: 480 151 | value: valueSource.kph 152 | anchors.verticalCenter: parent.verticalCenter 153 | maximumValue: 280 154 | // We set the width to the height, because the height will always be 155 | // the more limited factor. Also, all circular controls letterbox 156 | // their contents to ensure that they remain circular. However, we 157 | // don't want to extra space on the left and right of our gauges, 158 | // because they're laid out horizontally, and that would create 159 | // large horizontal gaps between gauges on wide screens. 160 | 161 | style: DashboardGaugeStyle {} 162 | } 163 | 164 | CircularGauge { 165 | id: tachometer 166 | width: height 167 | height: container.height * 0.25 - gaugeRow.spacing 168 | value: valueSource.rpm 169 | maximumValue: 8 170 | anchors.verticalCenter: parent.verticalCenter 171 | 172 | style: TachometerStyle {} 173 | } 174 | 175 | TurnIndicator { 176 | id: rightIndicator 177 | anchors.verticalCenter: parent.verticalCenter 178 | width: height 179 | height: container.height * 0.1 - gaugeRow.spacing 180 | 181 | direction: Qt.RightArrow 182 | on: valueSource.turnSignal == Qt.RightArrow 183 | } 184 | 185 | } 186 | } 187 | } 188 | --------------------------------------------------------------------------------