From f8ca548fa047968383e9275ead76eacce90fd0a8 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Wed, 30 Nov 2016 20:11:48 +0900 Subject: Add sample qml application It is sample application(HVAC). This app is used for debuging, for reference of HomeScreen API use and so on. Signed-off-by: Kazumasa Mitsunari --- HomeScreen.pro | 3 +- sample-qml/MainForm.ui.qml | 82 ++ sample-qml/README | 16 + sample-qml/agl-image.png | Bin 0 -> 6501 bytes sample-qml/apps/HVAC/ClimateButton.qml | 34 + sample-qml/apps/HVAC/FanControl.qml | 54 + sample-qml/apps/HVAC/HVAC.qml | 93 ++ sample-qml/apps/HVAC/HazardButton.qml | 37 + sample-qml/apps/HVAC/MiddleColumn.qml | 33 + sample-qml/apps/HVAC/SeatHeatButton.qml | 41 + sample-qml/apps/HVAC/TempSlider.qml | 61 ++ sample-qml/apps/HVAC/TemperatureWheel.qml | 56 ++ sample-qml/apps/HVAC/images/defrost_front_off.png | Bin 0 -> 3972 bytes sample-qml/apps/HVAC/images/defrost_front_off.svg | 94 ++ sample-qml/apps/HVAC/images/defrost_front_on.png | Bin 0 -> 15311 bytes sample-qml/apps/HVAC/images/defrost_front_on.svg | 247 +++++ sample-qml/apps/HVAC/images/defrost_max_off.png | Bin 0 -> 10833 bytes sample-qml/apps/HVAC/images/defrost_max_off.svg | 189 ++++ sample-qml/apps/HVAC/images/defrost_max_on.png | Bin 0 -> 16751 bytes sample-qml/apps/HVAC/images/defrost_max_on.svg | 267 +++++ sample-qml/apps/HVAC/images/defrost_rear_off.png | Bin 0 -> 3298 bytes sample-qml/apps/HVAC/images/defrost_rear_off.svg | 80 ++ sample-qml/apps/HVAC/images/defrost_rear_on.png | Bin 0 -> 13514 bytes sample-qml/apps/HVAC/images/defrost_rear_on.svg | 244 +++++ sample-qml/apps/HVAC/images/drag_knob.svg | 13 + sample-qml/apps/HVAC/images/fan_bar_off.png | Bin 0 -> 1238 bytes sample-qml/apps/HVAC/images/fan_bar_on.png | Bin 0 -> 1638 bytes sample-qml/apps/HVAC/images/fan_bar_on.svg | 39 + sample-qml/apps/HVAC/images/fan_control_ac_off.png | Bin 0 -> 1869 bytes sample-qml/apps/HVAC/images/fan_control_ac_off.svg | 68 ++ sample-qml/apps/HVAC/images/fan_control_ac_on.png | Bin 0 -> 11527 bytes sample-qml/apps/HVAC/images/fan_control_ac_on.svg | 275 ++++++ .../apps/HVAC/images/fan_control_auto_off.png | Bin 0 -> 2043 bytes .../apps/HVAC/images/fan_control_auto_off.svg | 63 ++ .../apps/HVAC/images/fan_control_auto_on.png | Bin 0 -> 7572 bytes .../apps/HVAC/images/fan_control_auto_on.svg | 282 ++++++ .../apps/HVAC/images/fan_control_circ_off.png | Bin 0 -> 2519 bytes .../apps/HVAC/images/fan_control_circ_off.svg | 70 ++ .../apps/HVAC/images/fan_control_circ_on.png | Bin 0 -> 13733 bytes .../apps/HVAC/images/fan_control_circ_on.svg | 173 ++++ sample-qml/apps/HVAC/images/fan_dir_down_off.png | Bin 0 -> 5972 bytes sample-qml/apps/HVAC/images/fan_dir_down_off.svg | 196 ++++ sample-qml/apps/HVAC/images/fan_dir_down_on.png | Bin 0 -> 16004 bytes sample-qml/apps/HVAC/images/fan_dir_down_on.svg | 201 ++++ sample-qml/apps/HVAC/images/fan_dir_right_off.png | Bin 0 -> 2208 bytes sample-qml/apps/HVAC/images/fan_dir_right_off.svg | 67 ++ sample-qml/apps/HVAC/images/fan_dir_right_on.png | Bin 0 -> 9662 bytes sample-qml/apps/HVAC/images/fan_dir_right_on.svg | 227 +++++ sample-qml/apps/HVAC/images/fan_dir_up_off.png | Bin 0 -> 2229 bytes sample-qml/apps/HVAC/images/fan_dir_up_off.svg | 64 ++ sample-qml/apps/HVAC/images/fan_dir_up_on.png | Bin 0 -> 12961 bytes sample-qml/apps/HVAC/images/fan_dir_up_on.svg | 244 +++++ sample-qml/apps/HVAC/images/fan_icon_off.png | Bin 0 -> 2178 bytes sample-qml/apps/HVAC/images/hazard_blink.png | Bin 0 -> 3441 bytes sample-qml/apps/HVAC/images/hazard_blink.svg | 14 + sample-qml/apps/HVAC/images/hazard_off.png | Bin 0 -> 3572 bytes sample-qml/apps/HVAC/images/hazard_off.svg | 40 + sample-qml/apps/HVAC/images/hazard_on.png | Bin 0 -> 15998 bytes sample-qml/apps/HVAC/images/hazard_on.svg | 174 ++++ sample-qml/apps/HVAC/images/left_heat_seat_off.png | Bin 0 -> 12313 bytes sample-qml/apps/HVAC/images/left_heat_seat_off.svg | 27 + sample-qml/apps/HVAC/images/left_heat_seat_on.png | Bin 0 -> 1614 bytes sample-qml/apps/HVAC/images/left_heat_seat_on.svg | 66 ++ sample-qml/apps/HVAC/images/left_number_bg.svg | 35 + sample-qml/apps/HVAC/images/left_number_cover.svg | 19 + .../apps/HVAC/images/right_heat_seat_off.png | Bin 0 -> 12275 bytes .../apps/HVAC/images/right_heat_seat_off.svg | 52 + sample-qml/apps/HVAC/images/right_heat_seat_on.png | Bin 0 -> 1712 bytes sample-qml/apps/HVAC/images/right_heat_seat_on.svg | 117 +++ sample-qml/apps/HVAC/images/right_number_bg.svg | 37 + sample-qml/apps/HVAC/images/right_number_cover.svg | 40 + sample-qml/apps/HVAC/images/separator.png | Bin 0 -> 3645 bytes sample-qml/apps/HVAC/images/static_parts_bg.svg | 1031 ++++++++++++++++++++ sample-qml/apps/HVAC/images/temp_bar_on_left.svg | 271 +++++ sample-qml/apps/HVAC/images/temp_bar_on_right.svg | 282 ++++++ sample-qml/apps/HVAC/models/HVACModel.qml | 47 + sample-qml/apps/HVAC/models/TemperatureModel.qml | 28 + sample-qml/apps/HVAC/models/qmldir | 8 + sample-qml/apps/HVAC_org/ClimateButton.qml | 30 + sample-qml/apps/HVAC_org/FanControl.qml | 54 + sample-qml/apps/HVAC_org/HVAC.qml | 89 ++ sample-qml/apps/HVAC_org/HazardButton.qml | 37 + sample-qml/apps/HVAC_org/MiddleColumn.qml | 33 + sample-qml/apps/HVAC_org/SeatHeatButton.qml | 39 + sample-qml/apps/HVAC_org/TempSlider.qml | 61 ++ sample-qml/apps/HVAC_org/TemperatureWheel.qml | 56 ++ .../apps/HVAC_org/images/defrost_front_off.png | Bin 0 -> 9832 bytes .../apps/HVAC_org/images/defrost_front_off.svg | 94 ++ .../apps/HVAC_org/images/defrost_front_on.png | Bin 0 -> 15576 bytes .../apps/HVAC_org/images/defrost_front_on.svg | 247 +++++ .../apps/HVAC_org/images/defrost_max_off.png | Bin 0 -> 10958 bytes .../apps/HVAC_org/images/defrost_max_off.svg | 189 ++++ sample-qml/apps/HVAC_org/images/defrost_max_on.png | Bin 0 -> 17034 bytes sample-qml/apps/HVAC_org/images/defrost_max_on.svg | 267 +++++ .../apps/HVAC_org/images/defrost_rear_off.png | Bin 0 -> 6949 bytes .../apps/HVAC_org/images/defrost_rear_off.svg | 80 ++ .../apps/HVAC_org/images/defrost_rear_on.png | Bin 0 -> 13723 bytes .../apps/HVAC_org/images/defrost_rear_on.svg | 244 +++++ sample-qml/apps/HVAC_org/images/drag_knob.svg | 13 + sample-qml/apps/HVAC_org/images/fan_bar_off.png | Bin 0 -> 1694 bytes sample-qml/apps/HVAC_org/images/fan_bar_on.png | Bin 0 -> 18765 bytes sample-qml/apps/HVAC_org/images/fan_bar_on.svg | 39 + .../apps/HVAC_org/images/fan_control_ac_off.png | Bin 0 -> 3332 bytes .../apps/HVAC_org/images/fan_control_ac_off.svg | 68 ++ .../apps/HVAC_org/images/fan_control_ac_on.png | Bin 0 -> 11685 bytes .../apps/HVAC_org/images/fan_control_ac_on.svg | 275 ++++++ .../apps/HVAC_org/images/fan_control_auto_off.png | Bin 0 -> 3702 bytes .../apps/HVAC_org/images/fan_control_auto_off.svg | 63 ++ .../apps/HVAC_org/images/fan_control_auto_on.png | Bin 0 -> 7717 bytes .../apps/HVAC_org/images/fan_control_auto_on.svg | 282 ++++++ .../apps/HVAC_org/images/fan_control_circ_off.png | Bin 0 -> 5149 bytes .../apps/HVAC_org/images/fan_control_circ_off.svg | 70 ++ .../apps/HVAC_org/images/fan_control_circ_on.png | Bin 0 -> 13892 bytes .../apps/HVAC_org/images/fan_control_circ_on.svg | 173 ++++ .../apps/HVAC_org/images/fan_dir_down_off.png | Bin 0 -> 6050 bytes .../apps/HVAC_org/images/fan_dir_down_off.svg | 196 ++++ .../apps/HVAC_org/images/fan_dir_down_on.png | Bin 0 -> 16220 bytes .../apps/HVAC_org/images/fan_dir_down_on.svg | 201 ++++ .../apps/HVAC_org/images/fan_dir_right_off.png | Bin 0 -> 4396 bytes .../apps/HVAC_org/images/fan_dir_right_off.svg | 67 ++ .../apps/HVAC_org/images/fan_dir_right_on.png | Bin 0 -> 9849 bytes .../apps/HVAC_org/images/fan_dir_right_on.svg | 227 +++++ sample-qml/apps/HVAC_org/images/fan_dir_up_off.png | Bin 0 -> 4419 bytes sample-qml/apps/HVAC_org/images/fan_dir_up_off.svg | 64 ++ sample-qml/apps/HVAC_org/images/fan_dir_up_on.png | Bin 0 -> 13095 bytes sample-qml/apps/HVAC_org/images/fan_dir_up_on.svg | 244 +++++ sample-qml/apps/HVAC_org/images/fan_icon_off.png | Bin 0 -> 3867 bytes sample-qml/apps/HVAC_org/images/hazard_blink.png | Bin 0 -> 6517 bytes sample-qml/apps/HVAC_org/images/hazard_blink.svg | 14 + sample-qml/apps/HVAC_org/images/hazard_off.png | Bin 0 -> 7614 bytes sample-qml/apps/HVAC_org/images/hazard_off.svg | 40 + sample-qml/apps/HVAC_org/images/hazard_on.png | Bin 0 -> 16182 bytes sample-qml/apps/HVAC_org/images/hazard_on.svg | 174 ++++ .../apps/HVAC_org/images/left_heat_seat_off.png | Bin 0 -> 12426 bytes .../apps/HVAC_org/images/left_heat_seat_off.svg | 27 + .../apps/HVAC_org/images/left_heat_seat_on.png | Bin 0 -> 1883 bytes .../apps/HVAC_org/images/left_heat_seat_on.svg | 66 ++ sample-qml/apps/HVAC_org/images/left_number_bg.svg | 35 + .../apps/HVAC_org/images/left_number_cover.svg | 19 + .../apps/HVAC_org/images/right_heat_seat_off.png | Bin 0 -> 12372 bytes .../apps/HVAC_org/images/right_heat_seat_off.svg | 52 + .../apps/HVAC_org/images/right_heat_seat_on.png | Bin 0 -> 1973 bytes .../apps/HVAC_org/images/right_heat_seat_on.svg | 117 +++ .../apps/HVAC_org/images/right_number_bg.svg | 37 + .../apps/HVAC_org/images/right_number_cover.svg | 40 + sample-qml/apps/HVAC_org/images/separator.png | Bin 0 -> 5633 bytes .../apps/HVAC_org/images/static_parts_bg.svg | 1031 ++++++++++++++++++++ .../apps/HVAC_org/images/temp_bar_on_left.svg | 271 +++++ .../apps/HVAC_org/images/temp_bar_on_right.svg | 282 ++++++ sample-qml/apps/HVAC_org/models/HVACModel.qml | 47 + .../apps/HVAC_org/models/TemperatureModel.qml | 28 + sample-qml/apps/HVAC_org/models/qmldir | 8 + sample-qml/calledbyqml.cpp | 38 + sample-qml/calledbyqml.h | 22 + sample-qml/config.xml | 9 + sample-qml/deployment.pri | 13 + .../dummyimports/amb/AutomotivePropertyItem.qml | 7 + sample-qml/dummyimports/amb/qmldir | 2 + .../com/pelagicore/qmldevinfo/DevInfo.qml | 18 + .../dummyimports/com/pelagicore/qmldevinfo/qmldir | 7 + sample-qml/dummyimports/radio/Radio.qml | 6 + sample-qml/dummyimports/radio/qmldir | 2 + sample-qml/imports/components/AwesomeIcon.qml | 26 + sample-qml/imports/components/Box.qml | 49 + sample-qml/imports/components/BoxButton.qml | 36 + sample-qml/imports/components/BoxHeading.qml | 37 + sample-qml/imports/components/Button.qml | 30 + sample-qml/imports/components/DateTime.qml | 35 + sample-qml/imports/components/HexGrid.qml | 32 + sample-qml/imports/components/HexSwitch.qml | 80 ++ sample-qml/imports/components/InShadow.qml | 33 + sample-qml/imports/components/InsetShadow.qml | 40 + sample-qml/imports/components/Label.qml | 27 + sample-qml/imports/components/NumberPad.qml | 101 ++ sample-qml/imports/components/OutShadow.qml | 41 + sample-qml/imports/components/Switch.qml | 13 + sample-qml/imports/components/qmldir | 16 + sample-qml/imports/radio/Radio.qml | 6 + sample-qml/imports/radio/qmldir | 2 + sample-qml/imports/system/App.qml | 35 + sample-qml/imports/system/App.qml.org | 29 + sample-qml/imports/system/System.qml | 15 + sample-qml/imports/system/qmldir | 8 + sample-qml/imports/utils/Marker.qml | 60 ++ sample-qml/imports/utils/Style.qml | 37 + sample-qml/imports/utils/qmldir | 8 + sample-qml/imports/vehicle/ClimateModel.qml | 44 + sample-qml/imports/vehicle/FuelModel.qml | 46 + sample-qml/imports/vehicle/PositionModel.qml | 33 + sample-qml/imports/vehicle/SpeedModel.qml | 38 + sample-qml/imports/vehicle/TemperatureModel.qml | 26 + sample-qml/imports/vehicle/qmldir | 11 + sample-qml/main.cpp | 75 ++ sample-qml/main.qml | 38 + sample-qml/main2.qml | 27 + sample-qml/qml.qrc | 22 + sample-qml/sample-qml | Bin 0 -> 685048 bytes sample-qml/sample-qml.pro | 22 + sample-qml/zip-command | 1 + 199 files changed, 12993 insertions(+), 1 deletion(-) create mode 100644 sample-qml/MainForm.ui.qml create mode 100644 sample-qml/README create mode 100644 sample-qml/agl-image.png create mode 100644 sample-qml/apps/HVAC/ClimateButton.qml create mode 100644 sample-qml/apps/HVAC/FanControl.qml create mode 100644 sample-qml/apps/HVAC/HVAC.qml create mode 100644 sample-qml/apps/HVAC/HazardButton.qml create mode 100644 sample-qml/apps/HVAC/MiddleColumn.qml create mode 100644 sample-qml/apps/HVAC/SeatHeatButton.qml create mode 100644 sample-qml/apps/HVAC/TempSlider.qml create mode 100644 sample-qml/apps/HVAC/TemperatureWheel.qml create mode 100644 sample-qml/apps/HVAC/images/defrost_front_off.png create mode 100644 sample-qml/apps/HVAC/images/defrost_front_off.svg create mode 100644 sample-qml/apps/HVAC/images/defrost_front_on.png create mode 100644 sample-qml/apps/HVAC/images/defrost_front_on.svg create mode 100644 sample-qml/apps/HVAC/images/defrost_max_off.png create mode 100644 sample-qml/apps/HVAC/images/defrost_max_off.svg create mode 100644 sample-qml/apps/HVAC/images/defrost_max_on.png create mode 100644 sample-qml/apps/HVAC/images/defrost_max_on.svg create mode 100644 sample-qml/apps/HVAC/images/defrost_rear_off.png create mode 100644 sample-qml/apps/HVAC/images/defrost_rear_off.svg create mode 100644 sample-qml/apps/HVAC/images/defrost_rear_on.png create mode 100644 sample-qml/apps/HVAC/images/defrost_rear_on.svg create mode 100644 sample-qml/apps/HVAC/images/drag_knob.svg create mode 100644 sample-qml/apps/HVAC/images/fan_bar_off.png create mode 100755 sample-qml/apps/HVAC/images/fan_bar_on.png create mode 100644 sample-qml/apps/HVAC/images/fan_bar_on.svg create mode 100644 sample-qml/apps/HVAC/images/fan_control_ac_off.png create mode 100644 sample-qml/apps/HVAC/images/fan_control_ac_off.svg create mode 100644 sample-qml/apps/HVAC/images/fan_control_ac_on.png create mode 100644 sample-qml/apps/HVAC/images/fan_control_ac_on.svg create mode 100644 sample-qml/apps/HVAC/images/fan_control_auto_off.png create mode 100644 sample-qml/apps/HVAC/images/fan_control_auto_off.svg create mode 100644 sample-qml/apps/HVAC/images/fan_control_auto_on.png create mode 100644 sample-qml/apps/HVAC/images/fan_control_auto_on.svg create mode 100644 sample-qml/apps/HVAC/images/fan_control_circ_off.png create mode 100644 sample-qml/apps/HVAC/images/fan_control_circ_off.svg create mode 100644 sample-qml/apps/HVAC/images/fan_control_circ_on.png create mode 100644 sample-qml/apps/HVAC/images/fan_control_circ_on.svg create mode 100644 sample-qml/apps/HVAC/images/fan_dir_down_off.png create mode 100644 sample-qml/apps/HVAC/images/fan_dir_down_off.svg create mode 100644 sample-qml/apps/HVAC/images/fan_dir_down_on.png create mode 100644 sample-qml/apps/HVAC/images/fan_dir_down_on.svg create mode 100644 sample-qml/apps/HVAC/images/fan_dir_right_off.png create mode 100644 sample-qml/apps/HVAC/images/fan_dir_right_off.svg create mode 100644 sample-qml/apps/HVAC/images/fan_dir_right_on.png create mode 100644 sample-qml/apps/HVAC/images/fan_dir_right_on.svg create mode 100644 sample-qml/apps/HVAC/images/fan_dir_up_off.png create mode 100644 sample-qml/apps/HVAC/images/fan_dir_up_off.svg create mode 100644 sample-qml/apps/HVAC/images/fan_dir_up_on.png create mode 100644 sample-qml/apps/HVAC/images/fan_dir_up_on.svg create mode 100644 sample-qml/apps/HVAC/images/fan_icon_off.png create mode 100644 sample-qml/apps/HVAC/images/hazard_blink.png create mode 100644 sample-qml/apps/HVAC/images/hazard_blink.svg create mode 100644 sample-qml/apps/HVAC/images/hazard_off.png create mode 100644 sample-qml/apps/HVAC/images/hazard_off.svg create mode 100644 sample-qml/apps/HVAC/images/hazard_on.png create mode 100644 sample-qml/apps/HVAC/images/hazard_on.svg create mode 100644 sample-qml/apps/HVAC/images/left_heat_seat_off.png create mode 100644 sample-qml/apps/HVAC/images/left_heat_seat_off.svg create mode 100644 sample-qml/apps/HVAC/images/left_heat_seat_on.png create mode 100644 sample-qml/apps/HVAC/images/left_heat_seat_on.svg create mode 100644 sample-qml/apps/HVAC/images/left_number_bg.svg create mode 100644 sample-qml/apps/HVAC/images/left_number_cover.svg create mode 100644 sample-qml/apps/HVAC/images/right_heat_seat_off.png create mode 100644 sample-qml/apps/HVAC/images/right_heat_seat_off.svg create mode 100644 sample-qml/apps/HVAC/images/right_heat_seat_on.png create mode 100644 sample-qml/apps/HVAC/images/right_heat_seat_on.svg create mode 100644 sample-qml/apps/HVAC/images/right_number_bg.svg create mode 100644 sample-qml/apps/HVAC/images/right_number_cover.svg create mode 100644 sample-qml/apps/HVAC/images/separator.png create mode 100644 sample-qml/apps/HVAC/images/static_parts_bg.svg create mode 100644 sample-qml/apps/HVAC/images/temp_bar_on_left.svg create mode 100644 sample-qml/apps/HVAC/images/temp_bar_on_right.svg create mode 100644 sample-qml/apps/HVAC/models/HVACModel.qml create mode 100644 sample-qml/apps/HVAC/models/TemperatureModel.qml create mode 100644 sample-qml/apps/HVAC/models/qmldir create mode 100644 sample-qml/apps/HVAC_org/ClimateButton.qml create mode 100644 sample-qml/apps/HVAC_org/FanControl.qml create mode 100644 sample-qml/apps/HVAC_org/HVAC.qml create mode 100644 sample-qml/apps/HVAC_org/HazardButton.qml create mode 100644 sample-qml/apps/HVAC_org/MiddleColumn.qml create mode 100644 sample-qml/apps/HVAC_org/SeatHeatButton.qml create mode 100644 sample-qml/apps/HVAC_org/TempSlider.qml create mode 100644 sample-qml/apps/HVAC_org/TemperatureWheel.qml create mode 100644 sample-qml/apps/HVAC_org/images/defrost_front_off.png create mode 100644 sample-qml/apps/HVAC_org/images/defrost_front_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/defrost_front_on.png create mode 100644 sample-qml/apps/HVAC_org/images/defrost_front_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/defrost_max_off.png create mode 100644 sample-qml/apps/HVAC_org/images/defrost_max_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/defrost_max_on.png create mode 100644 sample-qml/apps/HVAC_org/images/defrost_max_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/defrost_rear_off.png create mode 100644 sample-qml/apps/HVAC_org/images/defrost_rear_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/defrost_rear_on.png create mode 100644 sample-qml/apps/HVAC_org/images/defrost_rear_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/drag_knob.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_bar_off.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_bar_on.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_bar_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_ac_off.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_ac_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_ac_on.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_ac_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_auto_off.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_auto_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_auto_on.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_auto_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_circ_off.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_circ_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_circ_on.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_control_circ_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_down_off.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_down_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_down_on.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_down_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_right_off.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_right_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_right_on.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_right_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_up_off.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_up_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_up_on.png create mode 100644 sample-qml/apps/HVAC_org/images/fan_dir_up_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/fan_icon_off.png create mode 100644 sample-qml/apps/HVAC_org/images/hazard_blink.png create mode 100644 sample-qml/apps/HVAC_org/images/hazard_blink.svg create mode 100644 sample-qml/apps/HVAC_org/images/hazard_off.png create mode 100644 sample-qml/apps/HVAC_org/images/hazard_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/hazard_on.png create mode 100644 sample-qml/apps/HVAC_org/images/hazard_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/left_heat_seat_off.png create mode 100644 sample-qml/apps/HVAC_org/images/left_heat_seat_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/left_heat_seat_on.png create mode 100644 sample-qml/apps/HVAC_org/images/left_heat_seat_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/left_number_bg.svg create mode 100644 sample-qml/apps/HVAC_org/images/left_number_cover.svg create mode 100644 sample-qml/apps/HVAC_org/images/right_heat_seat_off.png create mode 100644 sample-qml/apps/HVAC_org/images/right_heat_seat_off.svg create mode 100644 sample-qml/apps/HVAC_org/images/right_heat_seat_on.png create mode 100644 sample-qml/apps/HVAC_org/images/right_heat_seat_on.svg create mode 100644 sample-qml/apps/HVAC_org/images/right_number_bg.svg create mode 100644 sample-qml/apps/HVAC_org/images/right_number_cover.svg create mode 100644 sample-qml/apps/HVAC_org/images/separator.png create mode 100644 sample-qml/apps/HVAC_org/images/static_parts_bg.svg create mode 100644 sample-qml/apps/HVAC_org/images/temp_bar_on_left.svg create mode 100644 sample-qml/apps/HVAC_org/images/temp_bar_on_right.svg create mode 100644 sample-qml/apps/HVAC_org/models/HVACModel.qml create mode 100644 sample-qml/apps/HVAC_org/models/TemperatureModel.qml create mode 100644 sample-qml/apps/HVAC_org/models/qmldir create mode 100644 sample-qml/calledbyqml.cpp create mode 100644 sample-qml/calledbyqml.h create mode 100644 sample-qml/config.xml create mode 100644 sample-qml/deployment.pri create mode 100644 sample-qml/dummyimports/amb/AutomotivePropertyItem.qml create mode 100644 sample-qml/dummyimports/amb/qmldir create mode 100644 sample-qml/dummyimports/com/pelagicore/qmldevinfo/DevInfo.qml create mode 100644 sample-qml/dummyimports/com/pelagicore/qmldevinfo/qmldir create mode 100644 sample-qml/dummyimports/radio/Radio.qml create mode 100644 sample-qml/dummyimports/radio/qmldir create mode 100644 sample-qml/imports/components/AwesomeIcon.qml create mode 100644 sample-qml/imports/components/Box.qml create mode 100644 sample-qml/imports/components/BoxButton.qml create mode 100644 sample-qml/imports/components/BoxHeading.qml create mode 100644 sample-qml/imports/components/Button.qml create mode 100644 sample-qml/imports/components/DateTime.qml create mode 100644 sample-qml/imports/components/HexGrid.qml create mode 100644 sample-qml/imports/components/HexSwitch.qml create mode 100644 sample-qml/imports/components/InShadow.qml create mode 100644 sample-qml/imports/components/InsetShadow.qml create mode 100644 sample-qml/imports/components/Label.qml create mode 100644 sample-qml/imports/components/NumberPad.qml create mode 100644 sample-qml/imports/components/OutShadow.qml create mode 100644 sample-qml/imports/components/Switch.qml create mode 100644 sample-qml/imports/components/qmldir create mode 100644 sample-qml/imports/radio/Radio.qml create mode 100644 sample-qml/imports/radio/qmldir create mode 100644 sample-qml/imports/system/App.qml create mode 100644 sample-qml/imports/system/App.qml.org create mode 100644 sample-qml/imports/system/System.qml create mode 100644 sample-qml/imports/system/qmldir create mode 100644 sample-qml/imports/utils/Marker.qml create mode 100644 sample-qml/imports/utils/Style.qml create mode 100644 sample-qml/imports/utils/qmldir create mode 100644 sample-qml/imports/vehicle/ClimateModel.qml create mode 100644 sample-qml/imports/vehicle/FuelModel.qml create mode 100644 sample-qml/imports/vehicle/PositionModel.qml create mode 100644 sample-qml/imports/vehicle/SpeedModel.qml create mode 100644 sample-qml/imports/vehicle/TemperatureModel.qml create mode 100644 sample-qml/imports/vehicle/qmldir create mode 100644 sample-qml/main.cpp create mode 100644 sample-qml/main.qml create mode 100644 sample-qml/main2.qml create mode 100644 sample-qml/qml.qrc create mode 100755 sample-qml/sample-qml create mode 100644 sample-qml/sample-qml.pro create mode 100644 sample-qml/zip-command diff --git a/HomeScreen.pro b/HomeScreen.pro index 0ad6867..ec20600 100644 --- a/HomeScreen.pro +++ b/HomeScreen.pro @@ -27,7 +27,8 @@ SUBDIRS = interfaces \ WindowManager \ SampleHomeScreenInterfaceApp \ SampleNavigationApp \ - SampleMediaApp + SampleMediaApp \ + sample-qml \ HomeScreen.depends = interfaces HomeScreenSimulator.depends = interfaces diff --git a/sample-qml/MainForm.ui.qml b/sample-qml/MainForm.ui.qml new file mode 100644 index 0000000..23f26fb --- /dev/null +++ b/sample-qml/MainForm.ui.qml @@ -0,0 +1,82 @@ +import QtQuick 2.6 + +Rectangle { + id: rectangle1 + property alias mouseArea: mouseArea + + width: 360 + height: 360 + color: "#dfe259" + property alias layout_permission: layout_permission + z: 2147483646 + property alias image1: image1 + + MouseArea { + id: mouseArea + anchors.rightMargin: 0 + anchors.bottomMargin: 0 + anchors.leftMargin: 0 + anchors.topMargin: 0 + anchors.fill: parent + + Rectangle { + id: layout_permission + x: 35 + y: 53 + width: 160 + height: 47 + gradient: Gradient { + GradientStop { + position: 0 + color: "#ffffff" + } + + GradientStop { + position: 1 + color: "#ecfcec" + } + } + signal buttonClick() + + + Text { + id: text1 + x: 5 + y: 9 + width: 151 + height: 30 + color: "#f25728" + text: qsTr("Ask layout permission") + style: Text.Normal + styleColor: "#86ecae" + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + wrapMode: Text.NoWrap + font.pixelSize: 12 + } + } + + Image { + id: image1 + x: -2 + y: 90 + width: 360 + height: 267 + opacity: 0.2 + z: 0 + source: "agl-image.png" + } + } + + Text { + text: "AGL sample app" + anchors.bottom: parent.bottom + anchors.bottomMargin: 326 + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: 17 + font.italic: true + font.bold: true + anchors.horizontalCenterOffset: -104 + } +} diff --git a/sample-qml/README b/sample-qml/README new file mode 100644 index 0000000..9ff6d67 --- /dev/null +++ b/sample-qml/README @@ -0,0 +1,16 @@ +How to create and install sample qml application + +$ cd ${sample-qml-build-directory} // in build directory +Copy appropriate file to build-directory. See following example +$ ls ${sample-qml-build-directory} +MainForm.ui.qml apps dummyimports main.qml sample-qml +agl-image.png config.xml imports main2.qml + +$ zip -q -r sample-qml.wgt . +$ cp sample-qml.wgt ${SDCARD}/home/root + +then boot sd card +# afm-util install sample-qml.wgt +reboot +# afm-util start sample-qml@0.1 +or Click and start from HomeScreen diff --git a/sample-qml/agl-image.png b/sample-qml/agl-image.png new file mode 100644 index 0000000..799ae6f Binary files /dev/null and b/sample-qml/agl-image.png differ diff --git a/sample-qml/apps/HVAC/ClimateButton.qml b/sample-qml/apps/HVAC/ClimateButton.qml new file mode 100644 index 0000000..9a59202 --- /dev/null +++ b/sample-qml/apps/HVAC/ClimateButton.qml @@ -0,0 +1,34 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import "models" + +Rectangle { + id: root + + width: imageItem.width + height: imageItem.height + color: "#aa000000" + + property string target: "" + property string image: "" + property bool value: HVACModel[target] + + Image { + id: imageItem + source: "images/" + image + "_" + (value ? "on" : "off") + ".png" + } + + MouseArea { + anchors.fill: parent + onClicked: { + HVACModel[target] = !HVACModel[target] + hsa.consoleout() + hsa.refresh() + } + } +} diff --git a/sample-qml/apps/HVAC/FanControl.qml b/sample-qml/apps/HVAC/FanControl.qml new file mode 100644 index 0000000..00e6f9e --- /dev/null +++ b/sample-qml/apps/HVAC/FanControl.qml @@ -0,0 +1,54 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import "models" + +Item { + width: childrenRect.width + height: childrenRect.height + + property real value: 0 + + Image { + y: 15 + source: "images/fan_icon_off.png" + } + + Image { + id: fanBar + x: 100 + source: "images/fan_bar_off.png" + } + + Image { + x: 100 + width: value * fanBar.width + fillMode: Image.PreserveAspectCrop + horizontalAlignment: Image.AlignLeft + source: "images/fan_bar_on.png" + + Image { + width: 20 + height: width + anchors.verticalCenter: parent.bottom + anchors.verticalCenterOffset: -1 + anchors.horizontalCenter: parent.right + source: "images/drag_knob.svg" + } + } + + MouseArea { + x: 100 + width: fanBar.width + height: parent.height + + onPositionChanged: { + value = Math.min(Math.max(mouse.x / fanBar.width, 0), 1) + HVACModel.fanSpeed = value; + } + } +} diff --git a/sample-qml/apps/HVAC/HVAC.qml b/sample-qml/apps/HVAC/HVAC.qml new file mode 100644 index 0000000..bde9889 --- /dev/null +++ b/sample-qml/apps/HVAC/HVAC.qml @@ -0,0 +1,93 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import system 1.0 +import utils 1.0 +import "models" + +App { + appId: "hvac" + + HazardButton { + id: hazardButton + y: 100 + anchors.horizontalCenter: parent.horizontalCenter + } + + TempSlider { + id: lTempSlider + x: 30 + anchors.top: hazardButton.bottom + anchors.topMargin: 115 + side: "left" + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: hazardButton.bottom + anchors.topMargin: 90 + spacing: 200 + + + MiddleColumn { side: "left" } + MiddleColumn { side: "right" } + } + + TempSlider { + id: rTempSlider + anchors.top: hazardButton.bottom + anchors.topMargin: 115 + anchors.right: parent.right + anchors.rightMargin: 30 + side: "right" + } + + Image { + y: 1057 + source: "images/separator.png" + } + + FanControl { + x: 259 + y: 1092 + } + + Item { + anchors.horizontalCenter: parent.horizontalCenter + width: childrenRect.width + height: childrenRect.height + anchors.bottom: parent.bottom + anchors.bottomMargin: 40 + + Row { + spacing: 20 + + Column { + spacing: 10 + + ClimateButton { image: "fan_dir_down"; target: "fanDown" } + ClimateButton { image: "fan_dir_right"; target: "fanRight" } + ClimateButton { image: "fan_dir_up"; target: "fanUp" } + } + + ClimateButton { + y: 156 + image: "fan_control_ac"; target: "fanAC" + } + ClimateButton { y: 156; image: "fan_control_auto"; target: "fanAuto" } + ClimateButton { y: 156; image: "fan_control_circ"; target: "fanRecirc" } + + Column { + spacing: 10 + + ClimateButton { image: "defrost_max"; target: "defrostMax" } + ClimateButton { image: "defrost_rear"; target: "defrostRear" } + ClimateButton { image: "defrost_front"; target: "defrostFront" } + } + } + } +} diff --git a/sample-qml/apps/HVAC/HazardButton.qml b/sample-qml/apps/HVAC/HazardButton.qml new file mode 100644 index 0000000..ffae370 --- /dev/null +++ b/sample-qml/apps/HVAC/HazardButton.qml @@ -0,0 +1,37 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Rectangle { + id: hazardButton + width: 624 + height: 122 + color: "#aa000000" + border.color: "#ff53b5ce" + + property bool value: false + property bool flash: false + + Image { + id: image + source: "./images/hazard_" + (value ? (flash ? "blink" : "on") : "off") + ".png" + } + + MouseArea { + anchors.fill: parent + onClicked: value = !value + } + + Timer { + id: timer + interval: 500 + repeat: true + running: value + + onTriggered: flash = !flash + } +} diff --git a/sample-qml/apps/HVAC/MiddleColumn.qml b/sample-qml/apps/HVAC/MiddleColumn.qml new file mode 100644 index 0000000..89f0ebe --- /dev/null +++ b/sample-qml/apps/HVAC/MiddleColumn.qml @@ -0,0 +1,33 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import components 1.0 +import utils 1.0 + +Item { + id: root + + width: 239 + height: 800 + + property string side: "left" + + Column { + spacing: 50 + + BoxHeading { + color: Style.orangeViv + boxWidth: 45 + boxHeight: 19 + fontSize: 27 + text: (side === "left" ? "L" : "R" ) + " CLIMATE" + } + + SeatHeatButton { side: root.side } + TemperatureWheel { side: root.side } + } +} diff --git a/sample-qml/apps/HVAC/SeatHeatButton.qml b/sample-qml/apps/HVAC/SeatHeatButton.qml new file mode 100644 index 0000000..fc5a2eb --- /dev/null +++ b/sample-qml/apps/HVAC/SeatHeatButton.qml @@ -0,0 +1,41 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import "models" + +Rectangle { + width: 239 + height: 194 + color: "#aa000000" + border.color: "#ff53b5ce" + + property string side: "left" + property string propertyName: side + "SeatHeat" + property int seatHeat: HVACModel[propertyName] + + Image { + source: "./images/" + side + "_heat_seat_off.png" + } + + Image { + y: 150 - seatHeat*40 + height: implicitHeight - y + fillMode: Image.Tile + verticalAlignment: Image.AlignBottom + source: "./images/" + side + "_heat_seat_on.png" + } + + MouseArea { + anchors.fill: parent + onClicked: { + var value = HVACModel[propertyName] + HVACModel[propertyName] = value > 0 ? value - 1 : 3 + console.log("seatheatButton is pushed") + hsa.showup() + } + } +} diff --git a/sample-qml/apps/HVAC/TempSlider.qml b/sample-qml/apps/HVAC/TempSlider.qml new file mode 100644 index 0000000..f5500e4 --- /dev/null +++ b/sample-qml/apps/HVAC/TempSlider.qml @@ -0,0 +1,61 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import utils 1.0 +import "models" + +Item { + id: root + width: 64 + height: 716 + + property real value: HVACModel[propertyName] + property string propertyName: side + "Temperature" + property string side: "left" + + function setProperty(v) { + HVACModel[propertyName] = Math.min(Math.max(v, 0), 1) + } + + Rectangle { + anchors.fill: parent + color: "#4a53b5ce" + } + + Rectangle { + width: parent.width + height: value * parent.height + color: Style.orangeViv + anchors.bottom: parent.bottom + } + + Rectangle { + x: side === "left" ? parent.width + 30 : -30 + width: 2 + height: value * parent.height + anchors.bottom: parent.bottom + color: Style.orangeLt + + Image { + width: 30 + height: width + anchors.verticalCenter: parent.top + anchors.horizontalCenter: parent.horizontalCenter + source: "images/drag_knob.svg" + } + } + + MouseArea { + x: side === "left" ? 0 : -45 + width: parent.width + 45 + height: parent.height + + onPressed: setProperty(1 - mouse.y / height) + onPositionChanged: setProperty(1 - mouse.y / height) + } +} + diff --git a/sample-qml/apps/HVAC/TemperatureWheel.qml b/sample-qml/apps/HVAC/TemperatureWheel.qml new file mode 100644 index 0000000..7a59dde --- /dev/null +++ b/sample-qml/apps/HVAC/TemperatureWheel.qml @@ -0,0 +1,56 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import "models" + +Rectangle { + width: 237 + height: 350 + color: "#aa000000" + + property string side: "left" + property string propertyName: side + "Temperature" + property real value: HVACModel[propertyName] + + ListView { + anchors.fill: parent + clip: true + snapMode: ListView.SnapToItem + model: TemperatureModel + header: Item { height: 120 } + footer: Item { height: 120 } + currentIndex: Math.min(value * count, count - 1) + flickDeceleration: 5000 + onContentYChanged: { + if (dragging || flicking) { + var item = Math.round((contentY + 120) / 110) + item = Math.max(Math.min(item, count - 1), 0) + if (item != currentIndex) { + var temperature = item / (count - 1) + HVACModel[propertyName] = temperature + } + } + } + highlightMoveDuration: 100 + interactive: true + + delegate: Text { + x: side === "right" ? 40 : 10 + height: 110 + verticalAlignment: Text.AlignVCenter + color: "white" + font.pixelSize: 70 + text: model.text + } + } + + Image { + mirror: side === "left" + source: "./images/right_number_cover.svg" + anchors.fill: parent + } +} diff --git a/sample-qml/apps/HVAC/images/defrost_front_off.png b/sample-qml/apps/HVAC/images/defrost_front_off.png new file mode 100644 index 0000000..fe7e5ac Binary files /dev/null and b/sample-qml/apps/HVAC/images/defrost_front_off.png differ diff --git a/sample-qml/apps/HVAC/images/defrost_front_off.svg b/sample-qml/apps/HVAC/images/defrost_front_off.svg new file mode 100644 index 0000000..d2f0a6a --- /dev/null +++ b/sample-qml/apps/HVAC/images/defrost_front_off.svg @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FRONT + + + diff --git a/sample-qml/apps/HVAC/images/defrost_front_on.png b/sample-qml/apps/HVAC/images/defrost_front_on.png new file mode 100644 index 0000000..5e5bf27 Binary files /dev/null and b/sample-qml/apps/HVAC/images/defrost_front_on.png differ diff --git a/sample-qml/apps/HVAC/images/defrost_front_on.svg b/sample-qml/apps/HVAC/images/defrost_front_on.svg new file mode 100644 index 0000000..c4ed46a --- /dev/null +++ b/sample-qml/apps/HVAC/images/defrost_front_on.svg @@ -0,0 +1,247 @@ + + + +image/svg+xmlFRONT + \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/defrost_max_off.png b/sample-qml/apps/HVAC/images/defrost_max_off.png new file mode 100644 index 0000000..1ded238 Binary files /dev/null and b/sample-qml/apps/HVAC/images/defrost_max_off.png differ diff --git a/sample-qml/apps/HVAC/images/defrost_max_off.svg b/sample-qml/apps/HVAC/images/defrost_max_off.svg new file mode 100644 index 0000000..a027d25 --- /dev/null +++ b/sample-qml/apps/HVAC/images/defrost_max_off.svg @@ -0,0 +1,189 @@ + + + +image/svg+xmlMAX + \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/defrost_max_on.png b/sample-qml/apps/HVAC/images/defrost_max_on.png new file mode 100644 index 0000000..620d176 Binary files /dev/null and b/sample-qml/apps/HVAC/images/defrost_max_on.png differ diff --git a/sample-qml/apps/HVAC/images/defrost_max_on.svg b/sample-qml/apps/HVAC/images/defrost_max_on.svg new file mode 100644 index 0000000..9385c42 --- /dev/null +++ b/sample-qml/apps/HVAC/images/defrost_max_on.svg @@ -0,0 +1,267 @@ + + + +image/svg+xmlMAX + \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/defrost_rear_off.png b/sample-qml/apps/HVAC/images/defrost_rear_off.png new file mode 100644 index 0000000..d648a67 Binary files /dev/null and b/sample-qml/apps/HVAC/images/defrost_rear_off.png differ diff --git a/sample-qml/apps/HVAC/images/defrost_rear_off.svg b/sample-qml/apps/HVAC/images/defrost_rear_off.svg new file mode 100644 index 0000000..0f5142e --- /dev/null +++ b/sample-qml/apps/HVAC/images/defrost_rear_off.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +REAR + + + + + diff --git a/sample-qml/apps/HVAC/images/defrost_rear_on.png b/sample-qml/apps/HVAC/images/defrost_rear_on.png new file mode 100644 index 0000000..205ec2a Binary files /dev/null and b/sample-qml/apps/HVAC/images/defrost_rear_on.png differ diff --git a/sample-qml/apps/HVAC/images/defrost_rear_on.svg b/sample-qml/apps/HVAC/images/defrost_rear_on.svg new file mode 100644 index 0000000..a44e246 --- /dev/null +++ b/sample-qml/apps/HVAC/images/defrost_rear_on.svg @@ -0,0 +1,244 @@ + + + +image/svg+xmlREAR + \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/drag_knob.svg b/sample-qml/apps/HVAC/images/drag_knob.svg new file mode 100644 index 0000000..774c1b6 --- /dev/null +++ b/sample-qml/apps/HVAC/images/drag_knob.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/fan_bar_off.png b/sample-qml/apps/HVAC/images/fan_bar_off.png new file mode 100644 index 0000000..29e71e2 Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_bar_off.png differ diff --git a/sample-qml/apps/HVAC/images/fan_bar_on.png b/sample-qml/apps/HVAC/images/fan_bar_on.png new file mode 100755 index 0000000..774897a Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_bar_on.png differ diff --git a/sample-qml/apps/HVAC/images/fan_bar_on.svg b/sample-qml/apps/HVAC/images/fan_bar_on.svg new file mode 100644 index 0000000..f65fe74 --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_bar_on.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + 16° + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/fan_control_ac_off.png b/sample-qml/apps/HVAC/images/fan_control_ac_off.png new file mode 100644 index 0000000..e109810 Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_control_ac_off.png differ diff --git a/sample-qml/apps/HVAC/images/fan_control_ac_off.svg b/sample-qml/apps/HVAC/images/fan_control_ac_off.svg new file mode 100644 index 0000000..13af676 --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_control_ac_off.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + 16° + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A/C + + diff --git a/sample-qml/apps/HVAC/images/fan_control_ac_on.png b/sample-qml/apps/HVAC/images/fan_control_ac_on.png new file mode 100644 index 0000000..4a778bb Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_control_ac_on.png differ diff --git a/sample-qml/apps/HVAC/images/fan_control_ac_on.svg b/sample-qml/apps/HVAC/images/fan_control_ac_on.svg new file mode 100644 index 0000000..040fa44 --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_control_ac_on.svg @@ -0,0 +1,275 @@ + + + +image/svg+xml20° +21° +19° +18° +17° +16° +A/C + \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/fan_control_auto_off.png b/sample-qml/apps/HVAC/images/fan_control_auto_off.png new file mode 100644 index 0000000..a98dae7 Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_control_auto_off.png differ diff --git a/sample-qml/apps/HVAC/images/fan_control_auto_off.svg b/sample-qml/apps/HVAC/images/fan_control_auto_off.svg new file mode 100644 index 0000000..f560a54 --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_control_auto_off.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + 16° + + + + + + + + + + + + + + + + + + + + + + +AUTO + diff --git a/sample-qml/apps/HVAC/images/fan_control_auto_on.png b/sample-qml/apps/HVAC/images/fan_control_auto_on.png new file mode 100644 index 0000000..65a799a Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_control_auto_on.png differ diff --git a/sample-qml/apps/HVAC/images/fan_control_auto_on.svg b/sample-qml/apps/HVAC/images/fan_control_auto_on.svg new file mode 100644 index 0000000..2cdc613 --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_control_auto_on.svg @@ -0,0 +1,282 @@ + + + +image/svg+xml20° +21° +19° +18° +17° +16° +AUTO + \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/fan_control_circ_off.png b/sample-qml/apps/HVAC/images/fan_control_circ_off.png new file mode 100644 index 0000000..27745f7 Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_control_circ_off.png differ diff --git a/sample-qml/apps/HVAC/images/fan_control_circ_off.svg b/sample-qml/apps/HVAC/images/fan_control_circ_off.svg new file mode 100644 index 0000000..d37814b --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_control_circ_off.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/fan_control_circ_on.png b/sample-qml/apps/HVAC/images/fan_control_circ_on.png new file mode 100644 index 0000000..5d19029 Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_control_circ_on.png differ diff --git a/sample-qml/apps/HVAC/images/fan_control_circ_on.svg b/sample-qml/apps/HVAC/images/fan_control_circ_on.svg new file mode 100644 index 0000000..a55b0aa --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_control_circ_on.svg @@ -0,0 +1,173 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/fan_dir_down_off.png b/sample-qml/apps/HVAC/images/fan_dir_down_off.png new file mode 100644 index 0000000..cbbc22a Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_dir_down_off.png differ diff --git a/sample-qml/apps/HVAC/images/fan_dir_down_off.svg b/sample-qml/apps/HVAC/images/fan_dir_down_off.svg new file mode 100644 index 0000000..616162b --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_dir_down_off.svg @@ -0,0 +1,196 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/fan_dir_down_on.png b/sample-qml/apps/HVAC/images/fan_dir_down_on.png new file mode 100644 index 0000000..71407e6 Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_dir_down_on.png differ diff --git a/sample-qml/apps/HVAC/images/fan_dir_down_on.svg b/sample-qml/apps/HVAC/images/fan_dir_down_on.svg new file mode 100644 index 0000000..f5e5771 --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_dir_down_on.svg @@ -0,0 +1,201 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/fan_dir_right_off.png b/sample-qml/apps/HVAC/images/fan_dir_right_off.png new file mode 100644 index 0000000..90a0acf Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_dir_right_off.png differ diff --git a/sample-qml/apps/HVAC/images/fan_dir_right_off.svg b/sample-qml/apps/HVAC/images/fan_dir_right_off.svg new file mode 100644 index 0000000..7df2d2a --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_dir_right_off.svg @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/fan_dir_right_on.png b/sample-qml/apps/HVAC/images/fan_dir_right_on.png new file mode 100644 index 0000000..7f59d9e Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_dir_right_on.png differ diff --git a/sample-qml/apps/HVAC/images/fan_dir_right_on.svg b/sample-qml/apps/HVAC/images/fan_dir_right_on.svg new file mode 100644 index 0000000..585dc61 --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_dir_right_on.svg @@ -0,0 +1,227 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/fan_dir_up_off.png b/sample-qml/apps/HVAC/images/fan_dir_up_off.png new file mode 100644 index 0000000..f5a0189 Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_dir_up_off.png differ diff --git a/sample-qml/apps/HVAC/images/fan_dir_up_off.svg b/sample-qml/apps/HVAC/images/fan_dir_up_off.svg new file mode 100644 index 0000000..a89f804 --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_dir_up_off.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/fan_dir_up_on.png b/sample-qml/apps/HVAC/images/fan_dir_up_on.png new file mode 100644 index 0000000..e6dcb48 Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_dir_up_on.png differ diff --git a/sample-qml/apps/HVAC/images/fan_dir_up_on.svg b/sample-qml/apps/HVAC/images/fan_dir_up_on.svg new file mode 100644 index 0000000..e17278b --- /dev/null +++ b/sample-qml/apps/HVAC/images/fan_dir_up_on.svg @@ -0,0 +1,244 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/fan_icon_off.png b/sample-qml/apps/HVAC/images/fan_icon_off.png new file mode 100644 index 0000000..a579c25 Binary files /dev/null and b/sample-qml/apps/HVAC/images/fan_icon_off.png differ diff --git a/sample-qml/apps/HVAC/images/hazard_blink.png b/sample-qml/apps/HVAC/images/hazard_blink.png new file mode 100644 index 0000000..bda2c88 Binary files /dev/null and b/sample-qml/apps/HVAC/images/hazard_blink.png differ diff --git a/sample-qml/apps/HVAC/images/hazard_blink.svg b/sample-qml/apps/HVAC/images/hazard_blink.svg new file mode 100644 index 0000000..983c8e1 --- /dev/null +++ b/sample-qml/apps/HVAC/images/hazard_blink.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/hazard_off.png b/sample-qml/apps/HVAC/images/hazard_off.png new file mode 100644 index 0000000..923bfb5 Binary files /dev/null and b/sample-qml/apps/HVAC/images/hazard_off.png differ diff --git a/sample-qml/apps/HVAC/images/hazard_off.svg b/sample-qml/apps/HVAC/images/hazard_off.svg new file mode 100644 index 0000000..e9ad198 --- /dev/null +++ b/sample-qml/apps/HVAC/images/hazard_off.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + 53b5ce + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/hazard_on.png b/sample-qml/apps/HVAC/images/hazard_on.png new file mode 100644 index 0000000..7c5e314 Binary files /dev/null and b/sample-qml/apps/HVAC/images/hazard_on.png differ diff --git a/sample-qml/apps/HVAC/images/hazard_on.svg b/sample-qml/apps/HVAC/images/hazard_on.svg new file mode 100644 index 0000000..f2ba8e0 --- /dev/null +++ b/sample-qml/apps/HVAC/images/hazard_on.svg @@ -0,0 +1,174 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/left_heat_seat_off.png b/sample-qml/apps/HVAC/images/left_heat_seat_off.png new file mode 100644 index 0000000..ee3444b Binary files /dev/null and b/sample-qml/apps/HVAC/images/left_heat_seat_off.png differ diff --git a/sample-qml/apps/HVAC/images/left_heat_seat_off.svg b/sample-qml/apps/HVAC/images/left_heat_seat_off.svg new file mode 100644 index 0000000..5823221 --- /dev/null +++ b/sample-qml/apps/HVAC/images/left_heat_seat_off.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/left_heat_seat_on.png b/sample-qml/apps/HVAC/images/left_heat_seat_on.png new file mode 100644 index 0000000..02627f9 Binary files /dev/null and b/sample-qml/apps/HVAC/images/left_heat_seat_on.png differ diff --git a/sample-qml/apps/HVAC/images/left_heat_seat_on.svg b/sample-qml/apps/HVAC/images/left_heat_seat_on.svg new file mode 100644 index 0000000..4cd0841 --- /dev/null +++ b/sample-qml/apps/HVAC/images/left_heat_seat_on.svg @@ -0,0 +1,66 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/left_number_bg.svg b/sample-qml/apps/HVAC/images/left_number_bg.svg new file mode 100644 index 0000000..cdba6d5 --- /dev/null +++ b/sample-qml/apps/HVAC/images/left_number_bg.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + 16° + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/left_number_cover.svg b/sample-qml/apps/HVAC/images/left_number_cover.svg new file mode 100644 index 0000000..6bcfc16 --- /dev/null +++ b/sample-qml/apps/HVAC/images/left_number_cover.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/right_heat_seat_off.png b/sample-qml/apps/HVAC/images/right_heat_seat_off.png new file mode 100644 index 0000000..b803ea0 Binary files /dev/null and b/sample-qml/apps/HVAC/images/right_heat_seat_off.png differ diff --git a/sample-qml/apps/HVAC/images/right_heat_seat_off.svg b/sample-qml/apps/HVAC/images/right_heat_seat_off.svg new file mode 100644 index 0000000..a260e8a --- /dev/null +++ b/sample-qml/apps/HVAC/images/right_heat_seat_off.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + + + + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/right_heat_seat_on.png b/sample-qml/apps/HVAC/images/right_heat_seat_on.png new file mode 100644 index 0000000..60fb43b Binary files /dev/null and b/sample-qml/apps/HVAC/images/right_heat_seat_on.png differ diff --git a/sample-qml/apps/HVAC/images/right_heat_seat_on.svg b/sample-qml/apps/HVAC/images/right_heat_seat_on.svg new file mode 100644 index 0000000..893a546 --- /dev/null +++ b/sample-qml/apps/HVAC/images/right_heat_seat_on.svg @@ -0,0 +1,117 @@ + + + +image/svg+xml20° +21° +19° +18° +17° + \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/right_number_bg.svg b/sample-qml/apps/HVAC/images/right_number_bg.svg new file mode 100644 index 0000000..f9b7d71 --- /dev/null +++ b/sample-qml/apps/HVAC/images/right_number_bg.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/right_number_cover.svg b/sample-qml/apps/HVAC/images/right_number_cover.svg new file mode 100644 index 0000000..370acd3 --- /dev/null +++ b/sample-qml/apps/HVAC/images/right_number_cover.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC/images/separator.png b/sample-qml/apps/HVAC/images/separator.png new file mode 100644 index 0000000..02466ff Binary files /dev/null and b/sample-qml/apps/HVAC/images/separator.png differ diff --git a/sample-qml/apps/HVAC/images/static_parts_bg.svg b/sample-qml/apps/HVAC/images/static_parts_bg.svg new file mode 100644 index 0000000..f850fcb --- /dev/null +++ b/sample-qml/apps/HVAC/images/static_parts_bg.svg @@ -0,0 +1,1031 @@ + + + +image/svg+xml20° +21° +19° +18° +17° +16° +20° +21° +19° +18° +17° +MAX + \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/temp_bar_on_left.svg b/sample-qml/apps/HVAC/images/temp_bar_on_left.svg new file mode 100644 index 0000000..66cac81 --- /dev/null +++ b/sample-qml/apps/HVAC/images/temp_bar_on_left.svg @@ -0,0 +1,271 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC/images/temp_bar_on_right.svg b/sample-qml/apps/HVAC/images/temp_bar_on_right.svg new file mode 100644 index 0000000..95bd894 --- /dev/null +++ b/sample-qml/apps/HVAC/images/temp_bar_on_right.svg @@ -0,0 +1,282 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC/models/HVACModel.qml b/sample-qml/apps/HVAC/models/HVACModel.qml new file mode 100644 index 0000000..e737af4 --- /dev/null +++ b/sample-qml/apps/HVAC/models/HVACModel.qml @@ -0,0 +1,47 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton + +import QtQuick 2.0 +import vehicle 1.0 + +Item { + property bool fanUp: false + property bool fanRight: false + property bool fanDown: false + + property bool fanAC: false + property bool fanAuto: false + property bool fanRecirc: false + + property real fanSpeed: 0 + + property bool defrostMax: false + property bool defrostFront: false + property bool defrostRear: false + + property real leftTemperature: 0 + property real rightTemperature: 0 + + property int leftSeatHeat: 0 + property int rightSeatHeat: 0 + + onFanSpeedChanged: { + var currentFan = ClimateModel.getRangeValue(fanSpeed,ClimateModel.fanStepSize); + ClimateModel.fanSpeed = currentFan; + } + + onLeftTemperatureChanged: { + var temperature = ClimateModel.getRangeValue(leftTemperature,ClimateModel.temperatureStepSize); + ClimateModel.leftTemp = temperature; + } + + onRightTemperatureChanged: { + var temperature = ClimateModel.getRangeValue(rightTemperature,ClimateModel.temperatureStepSize); + ClimateModel.rightTemp = temperature; + } +} diff --git a/sample-qml/apps/HVAC/models/TemperatureModel.qml b/sample-qml/apps/HVAC/models/TemperatureModel.qml new file mode 100644 index 0000000..85ca415 --- /dev/null +++ b/sample-qml/apps/HVAC/models/TemperatureModel.qml @@ -0,0 +1,28 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton + +import QtQuick 2.0 + +ListModel { + ListElement { text: "LO" } + ListElement { text: "16\u00b0" } + ListElement { text: "17\u00b0" } + ListElement { text: "18\u00b0" } + ListElement { text: "19\u00b0" } + ListElement { text: "20\u00b0" } + ListElement { text: "21\u00b0" } + ListElement { text: "22\u00b0" } + ListElement { text: "23\u00b0" } + ListElement { text: "24\u00b0" } + ListElement { text: "25\u00b0" } + ListElement { text: "26\u00b0" } + ListElement { text: "27\u00b0" } + ListElement { text: "28\u00b0" } + ListElement { text: "29\u00b0" } + ListElement { text: "HI" } +} diff --git a/sample-qml/apps/HVAC/models/qmldir b/sample-qml/apps/HVAC/models/qmldir new file mode 100644 index 0000000..d757168 --- /dev/null +++ b/sample-qml/apps/HVAC/models/qmldir @@ -0,0 +1,8 @@ +#/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. +# * +# * This Source Code Form is subject to the terms of the Mozilla Public +# * License, v. 2.0. If a copy of the MPL was not distributed with this +# * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +singleton HVACModel 1.0 HVACModel.qml +singleton TemperatureModel 1.0 TemperatureModel.qml diff --git a/sample-qml/apps/HVAC_org/ClimateButton.qml b/sample-qml/apps/HVAC_org/ClimateButton.qml new file mode 100644 index 0000000..24802c7 --- /dev/null +++ b/sample-qml/apps/HVAC_org/ClimateButton.qml @@ -0,0 +1,30 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import "models" + +Rectangle { + id: root + + width: imageItem.width + height: imageItem.height + color: "#aa000000" + + property string target: "" + property string image: "" + property bool value: HVACModel[target] + + Image { + id: imageItem + source: "images/" + image + "_" + (value ? "on" : "off") + ".png" + } + + MouseArea { + anchors.fill: parent + onClicked: HVACModel[target] = !HVACModel[target] + } +} diff --git a/sample-qml/apps/HVAC_org/FanControl.qml b/sample-qml/apps/HVAC_org/FanControl.qml new file mode 100644 index 0000000..00e6f9e --- /dev/null +++ b/sample-qml/apps/HVAC_org/FanControl.qml @@ -0,0 +1,54 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import "models" + +Item { + width: childrenRect.width + height: childrenRect.height + + property real value: 0 + + Image { + y: 15 + source: "images/fan_icon_off.png" + } + + Image { + id: fanBar + x: 100 + source: "images/fan_bar_off.png" + } + + Image { + x: 100 + width: value * fanBar.width + fillMode: Image.PreserveAspectCrop + horizontalAlignment: Image.AlignLeft + source: "images/fan_bar_on.png" + + Image { + width: 20 + height: width + anchors.verticalCenter: parent.bottom + anchors.verticalCenterOffset: -1 + anchors.horizontalCenter: parent.right + source: "images/drag_knob.svg" + } + } + + MouseArea { + x: 100 + width: fanBar.width + height: parent.height + + onPositionChanged: { + value = Math.min(Math.max(mouse.x / fanBar.width, 0), 1) + HVACModel.fanSpeed = value; + } + } +} diff --git a/sample-qml/apps/HVAC_org/HVAC.qml b/sample-qml/apps/HVAC_org/HVAC.qml new file mode 100644 index 0000000..8ca981e --- /dev/null +++ b/sample-qml/apps/HVAC_org/HVAC.qml @@ -0,0 +1,89 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import system 1.0 +import utils 1.0 +import "models" + +App { + appId: "hvac" + + HazardButton { + id: hazardButton + y: 100 + anchors.horizontalCenter: parent.horizontalCenter + } + + TempSlider { + id: lTempSlider + x: 30 + anchors.top: hazardButton.bottom + anchors.topMargin: 115 + side: "left" + } + + Row { + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: hazardButton.bottom + anchors.topMargin: 90 + spacing: 200 + + MiddleColumn { side: "left" } + MiddleColumn { side: "right" } + } + + TempSlider { + id: rTempSlider + anchors.top: hazardButton.bottom + anchors.topMargin: 115 + anchors.right: parent.right + anchors.rightMargin: 30 + side: "right" + } + + Image { + y: 1057 + source: "images/separator.png" + } + + FanControl { + x: 259 + y: 1092 + } + + Item { + anchors.horizontalCenter: parent.horizontalCenter + width: childrenRect.width + height: childrenRect.height + anchors.bottom: parent.bottom + anchors.bottomMargin: 40 + + Row { + spacing: 20 + + Column { + spacing: 10 + + ClimateButton { image: "fan_dir_down"; target: "fanDown" } + ClimateButton { image: "fan_dir_right"; target: "fanRight" } + ClimateButton { image: "fan_dir_up"; target: "fanUp" } + } + + ClimateButton { y: 156; image: "fan_control_ac"; target: "fanAC" } + ClimateButton { y: 156; image: "fan_control_auto"; target: "fanAuto" } + ClimateButton { y: 156; image: "fan_control_circ"; target: "fanRecirc" } + + Column { + spacing: 10 + + ClimateButton { image: "defrost_max"; target: "defrostMax" } + ClimateButton { image: "defrost_rear"; target: "defrostRear" } + ClimateButton { image: "defrost_front"; target: "defrostFront" } + } + } + } +} diff --git a/sample-qml/apps/HVAC_org/HazardButton.qml b/sample-qml/apps/HVAC_org/HazardButton.qml new file mode 100644 index 0000000..ffae370 --- /dev/null +++ b/sample-qml/apps/HVAC_org/HazardButton.qml @@ -0,0 +1,37 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Rectangle { + id: hazardButton + width: 624 + height: 122 + color: "#aa000000" + border.color: "#ff53b5ce" + + property bool value: false + property bool flash: false + + Image { + id: image + source: "./images/hazard_" + (value ? (flash ? "blink" : "on") : "off") + ".png" + } + + MouseArea { + anchors.fill: parent + onClicked: value = !value + } + + Timer { + id: timer + interval: 500 + repeat: true + running: value + + onTriggered: flash = !flash + } +} diff --git a/sample-qml/apps/HVAC_org/MiddleColumn.qml b/sample-qml/apps/HVAC_org/MiddleColumn.qml new file mode 100644 index 0000000..89f0ebe --- /dev/null +++ b/sample-qml/apps/HVAC_org/MiddleColumn.qml @@ -0,0 +1,33 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import components 1.0 +import utils 1.0 + +Item { + id: root + + width: 239 + height: 800 + + property string side: "left" + + Column { + spacing: 50 + + BoxHeading { + color: Style.orangeViv + boxWidth: 45 + boxHeight: 19 + fontSize: 27 + text: (side === "left" ? "L" : "R" ) + " CLIMATE" + } + + SeatHeatButton { side: root.side } + TemperatureWheel { side: root.side } + } +} diff --git a/sample-qml/apps/HVAC_org/SeatHeatButton.qml b/sample-qml/apps/HVAC_org/SeatHeatButton.qml new file mode 100644 index 0000000..43645fb --- /dev/null +++ b/sample-qml/apps/HVAC_org/SeatHeatButton.qml @@ -0,0 +1,39 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import "models" + +Rectangle { + width: 239 + height: 194 + color: "#aa000000" + border.color: "#ff53b5ce" + + property string side: "left" + property string propertyName: side + "SeatHeat" + property int seatHeat: HVACModel[propertyName] + + Image { + source: "./images/" + side + "_heat_seat_off.png" + } + + Image { + y: 150 - seatHeat*40 + height: implicitHeight - y + fillMode: Image.Tile + verticalAlignment: Image.AlignBottom + source: "./images/" + side + "_heat_seat_on.png" + } + + MouseArea { + anchors.fill: parent + onClicked: { + var value = HVACModel[propertyName] + HVACModel[propertyName] = value > 0 ? value - 1 : 3 + } + } +} diff --git a/sample-qml/apps/HVAC_org/TempSlider.qml b/sample-qml/apps/HVAC_org/TempSlider.qml new file mode 100644 index 0000000..f5500e4 --- /dev/null +++ b/sample-qml/apps/HVAC_org/TempSlider.qml @@ -0,0 +1,61 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import utils 1.0 +import "models" + +Item { + id: root + width: 64 + height: 716 + + property real value: HVACModel[propertyName] + property string propertyName: side + "Temperature" + property string side: "left" + + function setProperty(v) { + HVACModel[propertyName] = Math.min(Math.max(v, 0), 1) + } + + Rectangle { + anchors.fill: parent + color: "#4a53b5ce" + } + + Rectangle { + width: parent.width + height: value * parent.height + color: Style.orangeViv + anchors.bottom: parent.bottom + } + + Rectangle { + x: side === "left" ? parent.width + 30 : -30 + width: 2 + height: value * parent.height + anchors.bottom: parent.bottom + color: Style.orangeLt + + Image { + width: 30 + height: width + anchors.verticalCenter: parent.top + anchors.horizontalCenter: parent.horizontalCenter + source: "images/drag_knob.svg" + } + } + + MouseArea { + x: side === "left" ? 0 : -45 + width: parent.width + 45 + height: parent.height + + onPressed: setProperty(1 - mouse.y / height) + onPositionChanged: setProperty(1 - mouse.y / height) + } +} + diff --git a/sample-qml/apps/HVAC_org/TemperatureWheel.qml b/sample-qml/apps/HVAC_org/TemperatureWheel.qml new file mode 100644 index 0000000..7a59dde --- /dev/null +++ b/sample-qml/apps/HVAC_org/TemperatureWheel.qml @@ -0,0 +1,56 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import "models" + +Rectangle { + width: 237 + height: 350 + color: "#aa000000" + + property string side: "left" + property string propertyName: side + "Temperature" + property real value: HVACModel[propertyName] + + ListView { + anchors.fill: parent + clip: true + snapMode: ListView.SnapToItem + model: TemperatureModel + header: Item { height: 120 } + footer: Item { height: 120 } + currentIndex: Math.min(value * count, count - 1) + flickDeceleration: 5000 + onContentYChanged: { + if (dragging || flicking) { + var item = Math.round((contentY + 120) / 110) + item = Math.max(Math.min(item, count - 1), 0) + if (item != currentIndex) { + var temperature = item / (count - 1) + HVACModel[propertyName] = temperature + } + } + } + highlightMoveDuration: 100 + interactive: true + + delegate: Text { + x: side === "right" ? 40 : 10 + height: 110 + verticalAlignment: Text.AlignVCenter + color: "white" + font.pixelSize: 70 + text: model.text + } + } + + Image { + mirror: side === "left" + source: "./images/right_number_cover.svg" + anchors.fill: parent + } +} diff --git a/sample-qml/apps/HVAC_org/images/defrost_front_off.png b/sample-qml/apps/HVAC_org/images/defrost_front_off.png new file mode 100644 index 0000000..7f12e77 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/defrost_front_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/defrost_front_off.svg b/sample-qml/apps/HVAC_org/images/defrost_front_off.svg new file mode 100644 index 0000000..d2f0a6a --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/defrost_front_off.svg @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +FRONT + + + diff --git a/sample-qml/apps/HVAC_org/images/defrost_front_on.png b/sample-qml/apps/HVAC_org/images/defrost_front_on.png new file mode 100644 index 0000000..d8c9185 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/defrost_front_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/defrost_front_on.svg b/sample-qml/apps/HVAC_org/images/defrost_front_on.svg new file mode 100644 index 0000000..c4ed46a --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/defrost_front_on.svg @@ -0,0 +1,247 @@ + + + +image/svg+xmlFRONT + \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/defrost_max_off.png b/sample-qml/apps/HVAC_org/images/defrost_max_off.png new file mode 100644 index 0000000..baf93cc Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/defrost_max_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/defrost_max_off.svg b/sample-qml/apps/HVAC_org/images/defrost_max_off.svg new file mode 100644 index 0000000..a027d25 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/defrost_max_off.svg @@ -0,0 +1,189 @@ + + + +image/svg+xmlMAX + \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/defrost_max_on.png b/sample-qml/apps/HVAC_org/images/defrost_max_on.png new file mode 100644 index 0000000..675d654 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/defrost_max_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/defrost_max_on.svg b/sample-qml/apps/HVAC_org/images/defrost_max_on.svg new file mode 100644 index 0000000..9385c42 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/defrost_max_on.svg @@ -0,0 +1,267 @@ + + + +image/svg+xmlMAX + \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/defrost_rear_off.png b/sample-qml/apps/HVAC_org/images/defrost_rear_off.png new file mode 100644 index 0000000..33d6cfd Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/defrost_rear_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/defrost_rear_off.svg b/sample-qml/apps/HVAC_org/images/defrost_rear_off.svg new file mode 100644 index 0000000..0f5142e --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/defrost_rear_off.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +REAR + + + + + diff --git a/sample-qml/apps/HVAC_org/images/defrost_rear_on.png b/sample-qml/apps/HVAC_org/images/defrost_rear_on.png new file mode 100644 index 0000000..2dfab44 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/defrost_rear_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/defrost_rear_on.svg b/sample-qml/apps/HVAC_org/images/defrost_rear_on.svg new file mode 100644 index 0000000..a44e246 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/defrost_rear_on.svg @@ -0,0 +1,244 @@ + + + +image/svg+xmlREAR + \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/drag_knob.svg b/sample-qml/apps/HVAC_org/images/drag_knob.svg new file mode 100644 index 0000000..774c1b6 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/drag_knob.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/fan_bar_off.png b/sample-qml/apps/HVAC_org/images/fan_bar_off.png new file mode 100644 index 0000000..ec0f372 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_bar_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_bar_on.png b/sample-qml/apps/HVAC_org/images/fan_bar_on.png new file mode 100644 index 0000000..107c8fc Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_bar_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_bar_on.svg b/sample-qml/apps/HVAC_org/images/fan_bar_on.svg new file mode 100644 index 0000000..f65fe74 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_bar_on.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + 16° + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/fan_control_ac_off.png b/sample-qml/apps/HVAC_org/images/fan_control_ac_off.png new file mode 100644 index 0000000..728efe4 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_control_ac_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_control_ac_off.svg b/sample-qml/apps/HVAC_org/images/fan_control_ac_off.svg new file mode 100644 index 0000000..13af676 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_control_ac_off.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + 16° + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A/C + + diff --git a/sample-qml/apps/HVAC_org/images/fan_control_ac_on.png b/sample-qml/apps/HVAC_org/images/fan_control_ac_on.png new file mode 100644 index 0000000..b9d03e5 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_control_ac_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_control_ac_on.svg b/sample-qml/apps/HVAC_org/images/fan_control_ac_on.svg new file mode 100644 index 0000000..040fa44 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_control_ac_on.svg @@ -0,0 +1,275 @@ + + + +image/svg+xml20° +21° +19° +18° +17° +16° +A/C + \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/fan_control_auto_off.png b/sample-qml/apps/HVAC_org/images/fan_control_auto_off.png new file mode 100644 index 0000000..2112b9c Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_control_auto_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_control_auto_off.svg b/sample-qml/apps/HVAC_org/images/fan_control_auto_off.svg new file mode 100644 index 0000000..f560a54 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_control_auto_off.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + 16° + + + + + + + + + + + + + + + + + + + + + + +AUTO + diff --git a/sample-qml/apps/HVAC_org/images/fan_control_auto_on.png b/sample-qml/apps/HVAC_org/images/fan_control_auto_on.png new file mode 100644 index 0000000..2b7daf6 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_control_auto_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_control_auto_on.svg b/sample-qml/apps/HVAC_org/images/fan_control_auto_on.svg new file mode 100644 index 0000000..2cdc613 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_control_auto_on.svg @@ -0,0 +1,282 @@ + + + +image/svg+xml20° +21° +19° +18° +17° +16° +AUTO + \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/fan_control_circ_off.png b/sample-qml/apps/HVAC_org/images/fan_control_circ_off.png new file mode 100644 index 0000000..08e2f11 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_control_circ_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_control_circ_off.svg b/sample-qml/apps/HVAC_org/images/fan_control_circ_off.svg new file mode 100644 index 0000000..d37814b --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_control_circ_off.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/fan_control_circ_on.png b/sample-qml/apps/HVAC_org/images/fan_control_circ_on.png new file mode 100644 index 0000000..4245785 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_control_circ_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_control_circ_on.svg b/sample-qml/apps/HVAC_org/images/fan_control_circ_on.svg new file mode 100644 index 0000000..a55b0aa --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_control_circ_on.svg @@ -0,0 +1,173 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_down_off.png b/sample-qml/apps/HVAC_org/images/fan_dir_down_off.png new file mode 100644 index 0000000..84d19f3 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_dir_down_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_down_off.svg b/sample-qml/apps/HVAC_org/images/fan_dir_down_off.svg new file mode 100644 index 0000000..616162b --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_dir_down_off.svg @@ -0,0 +1,196 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_down_on.png b/sample-qml/apps/HVAC_org/images/fan_dir_down_on.png new file mode 100644 index 0000000..8b74473 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_dir_down_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_down_on.svg b/sample-qml/apps/HVAC_org/images/fan_dir_down_on.svg new file mode 100644 index 0000000..f5e5771 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_dir_down_on.svg @@ -0,0 +1,201 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_right_off.png b/sample-qml/apps/HVAC_org/images/fan_dir_right_off.png new file mode 100644 index 0000000..a64cd81 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_dir_right_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_right_off.svg b/sample-qml/apps/HVAC_org/images/fan_dir_right_off.svg new file mode 100644 index 0000000..7df2d2a --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_dir_right_off.svg @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_right_on.png b/sample-qml/apps/HVAC_org/images/fan_dir_right_on.png new file mode 100644 index 0000000..b6cbc9d Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_dir_right_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_right_on.svg b/sample-qml/apps/HVAC_org/images/fan_dir_right_on.svg new file mode 100644 index 0000000..585dc61 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_dir_right_on.svg @@ -0,0 +1,227 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_up_off.png b/sample-qml/apps/HVAC_org/images/fan_dir_up_off.png new file mode 100644 index 0000000..0a0536e Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_dir_up_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_up_off.svg b/sample-qml/apps/HVAC_org/images/fan_dir_up_off.svg new file mode 100644 index 0000000..a89f804 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_dir_up_off.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_up_on.png b/sample-qml/apps/HVAC_org/images/fan_dir_up_on.png new file mode 100644 index 0000000..6c64b82 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_dir_up_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/fan_dir_up_on.svg b/sample-qml/apps/HVAC_org/images/fan_dir_up_on.svg new file mode 100644 index 0000000..e17278b --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/fan_dir_up_on.svg @@ -0,0 +1,244 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/fan_icon_off.png b/sample-qml/apps/HVAC_org/images/fan_icon_off.png new file mode 100644 index 0000000..5a1bf00 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/fan_icon_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/hazard_blink.png b/sample-qml/apps/HVAC_org/images/hazard_blink.png new file mode 100644 index 0000000..a58ac33 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/hazard_blink.png differ diff --git a/sample-qml/apps/HVAC_org/images/hazard_blink.svg b/sample-qml/apps/HVAC_org/images/hazard_blink.svg new file mode 100644 index 0000000..983c8e1 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/hazard_blink.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/hazard_off.png b/sample-qml/apps/HVAC_org/images/hazard_off.png new file mode 100644 index 0000000..c261e13 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/hazard_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/hazard_off.svg b/sample-qml/apps/HVAC_org/images/hazard_off.svg new file mode 100644 index 0000000..e9ad198 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/hazard_off.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + 53b5ce + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/hazard_on.png b/sample-qml/apps/HVAC_org/images/hazard_on.png new file mode 100644 index 0000000..c6a6790 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/hazard_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/hazard_on.svg b/sample-qml/apps/HVAC_org/images/hazard_on.svg new file mode 100644 index 0000000..f2ba8e0 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/hazard_on.svg @@ -0,0 +1,174 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/left_heat_seat_off.png b/sample-qml/apps/HVAC_org/images/left_heat_seat_off.png new file mode 100644 index 0000000..e9b9977 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/left_heat_seat_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/left_heat_seat_off.svg b/sample-qml/apps/HVAC_org/images/left_heat_seat_off.svg new file mode 100644 index 0000000..5823221 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/left_heat_seat_off.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/left_heat_seat_on.png b/sample-qml/apps/HVAC_org/images/left_heat_seat_on.png new file mode 100644 index 0000000..65cc992 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/left_heat_seat_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/left_heat_seat_on.svg b/sample-qml/apps/HVAC_org/images/left_heat_seat_on.svg new file mode 100644 index 0000000..4cd0841 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/left_heat_seat_on.svg @@ -0,0 +1,66 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/left_number_bg.svg b/sample-qml/apps/HVAC_org/images/left_number_bg.svg new file mode 100644 index 0000000..cdba6d5 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/left_number_bg.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + 16° + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/left_number_cover.svg b/sample-qml/apps/HVAC_org/images/left_number_cover.svg new file mode 100644 index 0000000..6bcfc16 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/left_number_cover.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/right_heat_seat_off.png b/sample-qml/apps/HVAC_org/images/right_heat_seat_off.png new file mode 100644 index 0000000..d44e5f8 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/right_heat_seat_off.png differ diff --git a/sample-qml/apps/HVAC_org/images/right_heat_seat_off.svg b/sample-qml/apps/HVAC_org/images/right_heat_seat_off.svg new file mode 100644 index 0000000..a260e8a --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/right_heat_seat_off.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + + + + + + + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/right_heat_seat_on.png b/sample-qml/apps/HVAC_org/images/right_heat_seat_on.png new file mode 100644 index 0000000..64f54c8 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/right_heat_seat_on.png differ diff --git a/sample-qml/apps/HVAC_org/images/right_heat_seat_on.svg b/sample-qml/apps/HVAC_org/images/right_heat_seat_on.svg new file mode 100644 index 0000000..893a546 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/right_heat_seat_on.svg @@ -0,0 +1,117 @@ + + + +image/svg+xml20° +21° +19° +18° +17° + \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/right_number_bg.svg b/sample-qml/apps/HVAC_org/images/right_number_bg.svg new file mode 100644 index 0000000..f9b7d71 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/right_number_bg.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/right_number_cover.svg b/sample-qml/apps/HVAC_org/images/right_number_cover.svg new file mode 100644 index 0000000..370acd3 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/right_number_cover.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + 20° + 21° + 19° + 18° + 17° + + + + + + + + + + + + diff --git a/sample-qml/apps/HVAC_org/images/separator.png b/sample-qml/apps/HVAC_org/images/separator.png new file mode 100644 index 0000000..920ea80 Binary files /dev/null and b/sample-qml/apps/HVAC_org/images/separator.png differ diff --git a/sample-qml/apps/HVAC_org/images/static_parts_bg.svg b/sample-qml/apps/HVAC_org/images/static_parts_bg.svg new file mode 100644 index 0000000..f850fcb --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/static_parts_bg.svg @@ -0,0 +1,1031 @@ + + + +image/svg+xml20° +21° +19° +18° +17° +16° +20° +21° +19° +18° +17° +MAX + \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/temp_bar_on_left.svg b/sample-qml/apps/HVAC_org/images/temp_bar_on_left.svg new file mode 100644 index 0000000..66cac81 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/temp_bar_on_left.svg @@ -0,0 +1,271 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/images/temp_bar_on_right.svg b/sample-qml/apps/HVAC_org/images/temp_bar_on_right.svg new file mode 100644 index 0000000..95bd894 --- /dev/null +++ b/sample-qml/apps/HVAC_org/images/temp_bar_on_right.svg @@ -0,0 +1,282 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/sample-qml/apps/HVAC_org/models/HVACModel.qml b/sample-qml/apps/HVAC_org/models/HVACModel.qml new file mode 100644 index 0000000..e737af4 --- /dev/null +++ b/sample-qml/apps/HVAC_org/models/HVACModel.qml @@ -0,0 +1,47 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton + +import QtQuick 2.0 +import vehicle 1.0 + +Item { + property bool fanUp: false + property bool fanRight: false + property bool fanDown: false + + property bool fanAC: false + property bool fanAuto: false + property bool fanRecirc: false + + property real fanSpeed: 0 + + property bool defrostMax: false + property bool defrostFront: false + property bool defrostRear: false + + property real leftTemperature: 0 + property real rightTemperature: 0 + + property int leftSeatHeat: 0 + property int rightSeatHeat: 0 + + onFanSpeedChanged: { + var currentFan = ClimateModel.getRangeValue(fanSpeed,ClimateModel.fanStepSize); + ClimateModel.fanSpeed = currentFan; + } + + onLeftTemperatureChanged: { + var temperature = ClimateModel.getRangeValue(leftTemperature,ClimateModel.temperatureStepSize); + ClimateModel.leftTemp = temperature; + } + + onRightTemperatureChanged: { + var temperature = ClimateModel.getRangeValue(rightTemperature,ClimateModel.temperatureStepSize); + ClimateModel.rightTemp = temperature; + } +} diff --git a/sample-qml/apps/HVAC_org/models/TemperatureModel.qml b/sample-qml/apps/HVAC_org/models/TemperatureModel.qml new file mode 100644 index 0000000..85ca415 --- /dev/null +++ b/sample-qml/apps/HVAC_org/models/TemperatureModel.qml @@ -0,0 +1,28 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton + +import QtQuick 2.0 + +ListModel { + ListElement { text: "LO" } + ListElement { text: "16\u00b0" } + ListElement { text: "17\u00b0" } + ListElement { text: "18\u00b0" } + ListElement { text: "19\u00b0" } + ListElement { text: "20\u00b0" } + ListElement { text: "21\u00b0" } + ListElement { text: "22\u00b0" } + ListElement { text: "23\u00b0" } + ListElement { text: "24\u00b0" } + ListElement { text: "25\u00b0" } + ListElement { text: "26\u00b0" } + ListElement { text: "27\u00b0" } + ListElement { text: "28\u00b0" } + ListElement { text: "29\u00b0" } + ListElement { text: "HI" } +} diff --git a/sample-qml/apps/HVAC_org/models/qmldir b/sample-qml/apps/HVAC_org/models/qmldir new file mode 100644 index 0000000..d757168 --- /dev/null +++ b/sample-qml/apps/HVAC_org/models/qmldir @@ -0,0 +1,8 @@ +#/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. +# * +# * This Source Code Form is subject to the terms of the Mozilla Public +# * License, v. 2.0. If a copy of the MPL was not distributed with this +# * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +singleton HVACModel 1.0 HVACModel.qml +singleton TemperatureModel 1.0 TemperatureModel.qml diff --git a/sample-qml/calledbyqml.cpp b/sample-qml/calledbyqml.cpp new file mode 100644 index 0000000..5df584a --- /dev/null +++ b/sample-qml/calledbyqml.cpp @@ -0,0 +1,38 @@ +#include "calledbyqml.h" +#include +#include +#include +#include + + +CalledByQml::CalledByQml(QObject *parent) : + QObject(parent) +{ +} + +int CalledByQml::consoleout() +{ + qDebug("consoleout method is called"); + LibHomeScreen libHomeScreen; + libHomeScreen.hardKeyPressed(1); + return 0; +} + +int CalledByQml::showup() +{ + qDebug("showup method is called"); + QGuiApplication app2(); + QQmlApplicationEngine engine2; + QString target(getenv("AFM_APP_INSTALL_DIR")); + qDebug("AFM_APP_INSTALL_DIR is " + target.toLatin1()); + + if(NULL == target) + { + target = "."; + } + + QString load_path; + load_path = target + "/main2.qml"; + //engine2.load(QUrl(load_path)); + return 0; +} diff --git a/sample-qml/calledbyqml.h b/sample-qml/calledbyqml.h new file mode 100644 index 0000000..fbb5ef5 --- /dev/null +++ b/sample-qml/calledbyqml.h @@ -0,0 +1,22 @@ +#ifndef CALLEDBYQML_H +#define CALLEDBYQML_H +#include + +class CalledByQml : public QObject +{ + Q_OBJECT + +public: + explicit CalledByQml(QObject *parent = 0); + Q_INVOKABLE int consoleout(); + Q_INVOKABLE int showup(); + +signals: + +public slots: + void refresh() { + qDebug("Called the C++ slot"); + } +}; + +#endif // CALLEDBYQML_H diff --git a/sample-qml/config.xml b/sample-qml/config.xml new file mode 100644 index 0000000..9703e68 --- /dev/null +++ b/sample-qml/config.xml @@ -0,0 +1,9 @@ + + + App Framework - sample-qml with homescreen + + + This application is used for ... confirm homescreen functionality + Sample Company <sample.agl.xxxx@mail.domain.sample.xxxxxx> + APL 2.0 + diff --git a/sample-qml/deployment.pri b/sample-qml/deployment.pri new file mode 100644 index 0000000..265ce71 --- /dev/null +++ b/sample-qml/deployment.pri @@ -0,0 +1,13 @@ +unix:!android { + isEmpty(target.path) { + qnx { + target.path = /tmp/$${TARGET}/bin + } else { + target.path = /opt/$${TARGET}/bin + } + export(target.path) + } + INSTALLS += target +} + +export(INSTALLS) diff --git a/sample-qml/dummyimports/amb/AutomotivePropertyItem.qml b/sample-qml/dummyimports/amb/AutomotivePropertyItem.qml new file mode 100644 index 0000000..158ad57 --- /dev/null +++ b/sample-qml/dummyimports/amb/AutomotivePropertyItem.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +Item { + property string propertyName: "" + property real value: 1.0 + function connect() {} +} diff --git a/sample-qml/dummyimports/amb/qmldir b/sample-qml/dummyimports/amb/qmldir new file mode 100644 index 0000000..1582652 --- /dev/null +++ b/sample-qml/dummyimports/amb/qmldir @@ -0,0 +1,2 @@ +AutomotivePropertyItem 0.1 AutomotivePropertyItem.qml + diff --git a/sample-qml/dummyimports/com/pelagicore/qmldevinfo/DevInfo.qml b/sample-qml/dummyimports/com/pelagicore/qmldevinfo/DevInfo.qml new file mode 100644 index 0000000..e81b44d --- /dev/null +++ b/sample-qml/dummyimports/com/pelagicore/qmldevinfo/DevInfo.qml @@ -0,0 +1,18 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Item { + id: root + + property var ipAddresses: [] + property var ip6addresses: [] + property string softwareVersion + property string buildId + property string nameServer + property string defaultGateway +} diff --git a/sample-qml/dummyimports/com/pelagicore/qmldevinfo/qmldir b/sample-qml/dummyimports/com/pelagicore/qmldevinfo/qmldir new file mode 100644 index 0000000..1caf203 --- /dev/null +++ b/sample-qml/dummyimports/com/pelagicore/qmldevinfo/qmldir @@ -0,0 +1,7 @@ +#/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. +# * +# * This Source Code Form is subject to the terms of the Mozilla Public +# * License, v. 2.0. If a copy of the MPL was not distributed with this +# * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +DevInfo 0.1 DevInfo.qml diff --git a/sample-qml/dummyimports/radio/Radio.qml b/sample-qml/dummyimports/radio/Radio.qml new file mode 100644 index 0000000..cea2e1a --- /dev/null +++ b/sample-qml/dummyimports/radio/Radio.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +Item { + signal stopped + signal playing +} diff --git a/sample-qml/dummyimports/radio/qmldir b/sample-qml/dummyimports/radio/qmldir new file mode 100644 index 0000000..e334188 --- /dev/null +++ b/sample-qml/dummyimports/radio/qmldir @@ -0,0 +1,2 @@ +Radio 1.0 Radio.qml +RadioPropertyItem 1.0 Radio.qml diff --git a/sample-qml/imports/components/AwesomeIcon.qml b/sample-qml/imports/components/AwesomeIcon.qml new file mode 100644 index 0000000..542fb0f --- /dev/null +++ b/sample-qml/imports/components/AwesomeIcon.qml @@ -0,0 +1,26 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import system 1.0 +import components 1.0 +import utils 1.0 + +Item { + height: icon.height + width: icon.height + + property alias iconSize: icon.font.pixelSize + property alias ucKey: icon.text + property alias iconColor: icon.color + + Text { + id: icon + font.family: "FontAwesome" + color: "white" + } +} + diff --git a/sample-qml/imports/components/Box.qml b/sample-qml/imports/components/Box.qml new file mode 100644 index 0000000..a2f2ae0 --- /dev/null +++ b/sample-qml/imports/components/Box.qml @@ -0,0 +1,49 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import utils 1.0 + +Item { + id: root + + opacity: 0.8 + property color color: Style.grey + property color border: color + property string shadow: "" + + OutShadow { + color: root.color + visible: root.shadow === "out" + } + + Rectangle { + id: rect + anchors.fill: parent + color: Style.black + border.width: 1 + border.color: root.border + } + + InsetShadow { + color: root.color + visible: root.shadow === "fill" + } + + InShadow { + color: root.color + visible: root.shadow === "in" + } + + Rectangle { + visible: root.shadow === "fill" + anchors.fill: parent + color: "transparent" + border.width: 1 + border.color: root.border + } + +} diff --git a/sample-qml/imports/components/BoxButton.qml b/sample-qml/imports/components/BoxButton.qml new file mode 100644 index 0000000..0969f46 --- /dev/null +++ b/sample-qml/imports/components/BoxButton.qml @@ -0,0 +1,36 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import components 1.0 + +Item { + id: root + + property alias shadow: box.shadow + property alias color: box.color + property alias text: textItem.text + + signal clicked() + + Box { + id: box + anchors.fill: parent + + Text { + id: textItem + anchors.centerIn: parent + horizontalAlignment: Text.AlignHCenter + font.pixelSize: 28 + color: "white" + } + + MouseArea { + anchors.fill: parent + onClicked: root.clicked() + } + } +} diff --git a/sample-qml/imports/components/BoxHeading.qml b/sample-qml/imports/components/BoxHeading.qml new file mode 100644 index 0000000..bb2c62a --- /dev/null +++ b/sample-qml/imports/components/BoxHeading.qml @@ -0,0 +1,37 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import utils 1.0 + +Row { + id: root + + property color color: Style.blueViv + property alias fontSize: headingText.font.pixelSize + property alias text: headingText.text + property alias boxWidth: box.width + property alias boxHeight: box.height + + spacing: 10 + + Rectangle { + id: box + anchors.bottom: headingText.baseline + anchors.bottomMargin: 0 + width: 100 + height: 16 + color: root.color + } + + Text { + id: headingText + font.family: "Source Sans Pro" + font.pixelSize: 22 + font.weight: Font.Bold + color: root.color + } +} diff --git a/sample-qml/imports/components/Button.qml b/sample-qml/imports/components/Button.qml new file mode 100644 index 0000000..9d5c495 --- /dev/null +++ b/sample-qml/imports/components/Button.qml @@ -0,0 +1,30 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Rectangle { + id: root + border.color: "#cccccc" + color:"#222" + border.width: 2 + height: pairText.height + 20 + width: pairText.width + 20 + + property string buttonText + + + Text { + id: pairText + anchors.centerIn: parent + font.family: "Source Sans Pro" + font.pixelSize: 48 + font.weight: Font.Bold + color: "white" + font.capitalization: Font.AllUppercase + text: buttonText + } +} diff --git a/sample-qml/imports/components/DateTime.qml b/sample-qml/imports/components/DateTime.qml new file mode 100644 index 0000000..6203712 --- /dev/null +++ b/sample-qml/imports/components/DateTime.qml @@ -0,0 +1,35 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import utils 1.0 + +Item { + id: dateTime + anchors.left: parent.left + anchors.right: parent.right + height: 120 + property var timeStamp: new Date() + + Timer { + interval: 1000 + running: true + repeat: true + onTriggered: timeStamp = new Date() + } + + Label { + fontColor: Style.grey + text: Qt.formatDate(timeStamp, "ddd MMM d") + } + + Label { + anchors.right: parent.right + fontColor: Style.grey + text: Qt.formatTime(timeStamp, "h:mm AP") + } +} + diff --git a/sample-qml/imports/components/HexGrid.qml b/sample-qml/imports/components/HexGrid.qml new file mode 100644 index 0000000..b81a09a --- /dev/null +++ b/sample-qml/imports/components/HexGrid.qml @@ -0,0 +1,32 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Item { + property real spacing: 0 + property int columns: 3 + + width: childrenRect.width + height: childrenRect.height + + Component.onCompleted: { + var sizeX = childrenRect.height + var sizeY = childrenRect.width + var column = 0 + var row = 0 + + for (var n = 0; n < children.length; n++) { + children[n].x = column * (sizeX + spacing) + children[n].y = row * (0.5 * sizeY + spacing) + column += 2 + if (column >= columns) { + row++ + column = row % 2 + } + } + } +} diff --git a/sample-qml/imports/components/HexSwitch.qml b/sample-qml/imports/components/HexSwitch.qml new file mode 100644 index 0000000..d0b7909 --- /dev/null +++ b/sample-qml/imports/components/HexSwitch.qml @@ -0,0 +1,80 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + width: 170 * height / 80 + height: 80 + + property bool value + property bool showLabels: false + + Image { + anchors.fill: parent + source: "../../images/switchplate_" + (value ? "on" : "off") + ".png" + } + + Item { + id: shadowTarget + x: value ? parent.width * 0.375 : -11 + width: parent.width * 0.7 + height: parent.height + + Image { + id: control + anchors.centerIn: parent + width: parent.height * 0.9 + fillMode: Image.PreserveAspectFit + source: "../../images/switchcontrol.png" + } + } + + DropShadow { + anchors.fill: shadowTarget + cached: true + horizontalOffset: parent.height * 0.05 + verticalOffset: parent.height * 0.05 + radius: 16 + samples: 32 + color: Qt.rgba(0, 0, 0, 0.35) + smooth: true + source: shadowTarget + } + + Text { + text: qsTr("OFF") + font.family: "Source Sans Pro" + anchors.right: parent.left + anchors.rightMargin: 30 + anchors.verticalCenter: parent.verticalCenter + font.pointSize: 25 + font.letterSpacing: -0.5 + font.weight: value ? Font.Normal : Font.Bold + color: value ? "#C4C4C4" : "#FE9C00" + visible: showLabels + } + + Text { + id: onText + text: qsTr("ON") + font.family: "Source Sans Pro" + anchors.left: parent.right + anchors.leftMargin: 30 + font.pointSize: 25 + anchors.verticalCenter: parent.verticalCenter + font.letterSpacing: -0.5 + font.weight: value ? Font.Bold : Font.Normal + color: value ? "#59FF00" : "#C4C4C4" + visible: showLabels + } + + MouseArea { + anchors.fill: parent + onClicked: value = !value + } +} diff --git a/sample-qml/imports/components/InShadow.qml b/sample-qml/imports/components/InShadow.qml new file mode 100644 index 0000000..2d64c2a --- /dev/null +++ b/sample-qml/imports/components/InShadow.qml @@ -0,0 +1,33 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +ShaderEffect { + anchors.fill: parent + property color color + property real radius: 16 + + fragmentShader: " +uniform lowp float radius; +uniform lowp float height; +uniform lowp float width; +uniform lowp float qt_Opacity; +uniform lowp vec4 color; +varying highp vec2 qt_TexCoord0; + +void main(void) { + lowp vec2 dist = min(qt_TexCoord0, vec2(1.0) - qt_TexCoord0); + // Border shadow + lowp float xval = smoothstep(0.0, radius, dist.x * width); + lowp float yval = smoothstep(0.0, radius, dist.y * height); + lowp float borderVal = sqrt(yval * xval) * 0.5 + 0.5; + + lowp vec4 borderColor = mix(color, vec4(0.0, 0.0, 0.0, 1.0), borderVal); + gl_FragColor = borderColor * qt_Opacity; +} + " +} diff --git a/sample-qml/imports/components/InsetShadow.qml b/sample-qml/imports/components/InsetShadow.qml new file mode 100644 index 0000000..6ad17cd --- /dev/null +++ b/sample-qml/imports/components/InsetShadow.qml @@ -0,0 +1,40 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +ShaderEffect { + anchors.fill: parent + property color color + property real radius: 100 + property real border: 20 + + fragmentShader: " +uniform lowp float radius; +uniform lowp float border; +uniform lowp float height; +uniform lowp float width; +uniform lowp float qt_Opacity; +uniform lowp vec4 color; +varying highp vec2 qt_TexCoord0; + +void main(void) { + lowp vec2 dist = min(qt_TexCoord0, vec2(1.0) - qt_TexCoord0); + // Border shadow + lowp float xval = smoothstep(0.0, border, dist.x * width); + lowp float yval = smoothstep(0.0, border, dist.y * height); + lowp float borderVal = sqrt(yval * xval) * 0.5 + 0.5; + // Inner shadow + xval = smoothstep(0.0, radius, dist.x * width); + yval = smoothstep(0.0, radius, dist.y * width); + lowp float innerVal = sqrt(yval * xval) * 0.5 + 0.5; + + lowp vec4 innerColor = mix(vec4(0.0, 0.0, 0.0, 0.5), color, innerVal); + lowp vec4 borderColor = mix(vec4(0.0, 0.0, 0.0, 1.0), innerColor, borderVal); + gl_FragColor = borderColor * qt_Opacity; +} + " +} diff --git a/sample-qml/imports/components/Label.qml b/sample-qml/imports/components/Label.qml new file mode 100644 index 0000000..e1e0b30 --- /dev/null +++ b/sample-qml/imports/components/Label.qml @@ -0,0 +1,27 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import utils 1.0 + +Item { + // Tracer {} + width: childrenRect.width + height: childrenRect.height + property alias text: text.text + property alias label: text + property alias fontSize: text.font.pixelSize + property alias fontColor: text.color + + Text { + id: text + color: "#ddd" + font.family: "Source Sans Pro" + font.pixelSize: 40 + font.capitalization: Font.AllUppercase + font.weight: Font.Bold + } +} diff --git a/sample-qml/imports/components/NumberPad.qml b/sample-qml/imports/components/NumberPad.qml new file mode 100644 index 0000000..b7763ca --- /dev/null +++ b/sample-qml/imports/components/NumberPad.qml @@ -0,0 +1,101 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import utils 1.0 + +Item { + id: root + height: childrenRect.height + property var letters: ["","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"] + property var bottomRow: ["*","0","#"] + + signal number(string number) + + Grid { + id: numberGrid + columns: 3 + spacing: 20 + + Repeater { + model: 9 + delegate: Item { + id: numberKey + width: (root.width - ( numberGrid.spacing*(numberGrid.columns-1)))/numberGrid.columns + height: numberKey.width * 0.8 + anchors.margins: 10 + + Rectangle { + id: shadowTarget + anchors.fill: parent + border.width: 1 + border.color: "white" + color: "#6653b5ce" + } + + Item { + height: childrenRect.height + width: parent.width + anchors.centerIn: parent + + Label { + anchors.horizontalCenter: parent.horizontalCenter + id: keypadNumber + text: index + 1 + } + + Label { + anchors.horizontalCenter: parent.horizontalCenter + id: keypadLetters + anchors.top: keypadNumber.bottom + fontSize: 30 + fontColor: "#53b5ce" + text: letters[index] + } + } + + MouseArea { + anchors.fill: parent + onClicked: root.number(keypadNumber.text) + } + } + } + + Repeater { + model: 3 + delegate: Item { + width: (root.width - ( numberGrid.spacing*(numberGrid.columns-1)))/numberGrid.columns + height: width * 0.8 + anchors.margins: 10 + + Rectangle { + id: shadowTarget + anchors.fill: parent + border.width: 1 + border.color: "white" + color: "#6653b5ce" + } + + Item { + height: childrenRect.height + width: parent.width + anchors.centerIn: parent + + Label { + anchors.horizontalCenter: parent.horizontalCenter + id: keypadNumber + text: bottomRow[index] + } + } + + MouseArea { + anchors.fill: parent + onClicked: root.number(keypadNumber.text) + } + } + } + } +} diff --git a/sample-qml/imports/components/OutShadow.qml b/sample-qml/imports/components/OutShadow.qml new file mode 100644 index 0000000..f4d8407 --- /dev/null +++ b/sample-qml/imports/components/OutShadow.qml @@ -0,0 +1,41 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +Item { + id: root + + anchors.fill: parent + property alias color: shadow.color + property alias radius: shadow.radius + + Item { + id: shadowTarget + x: -radius + y: -radius + width: parent.width + 2 * radius + height: parent.height + 2 * radius + + Rectangle { + anchors.centerIn: parent + width: root.width + height: root.height + color: "black" + } + } + + DropShadow { + id: shadow + anchors.fill: shadowTarget + horizontalOffset: 0 + verticalOffset: 0 + radius: 16 + samples: 32 + source: shadowTarget + } +} diff --git a/sample-qml/imports/components/Switch.qml b/sample-qml/imports/components/Switch.qml new file mode 100644 index 0000000..6cd50c7 --- /dev/null +++ b/sample-qml/imports/components/Switch.qml @@ -0,0 +1,13 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 + +Switch { + width: 100 + height: 62 +} + diff --git a/sample-qml/imports/components/qmldir b/sample-qml/imports/components/qmldir new file mode 100644 index 0000000..57e4d2d --- /dev/null +++ b/sample-qml/imports/components/qmldir @@ -0,0 +1,16 @@ +#/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. +# * +# * This Source Code Form is subject to the terms of the Mozilla Public +# * License, v. 2.0. If a copy of the MPL was not distributed with this +# * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +AwesomeIcon 1.0 AwesomeIcon.qml +Box 1.0 Box.qml +BoxButton 1.0 BoxButton.qml +BoxHeading 1.0 BoxHeading.qml +DateTime 1.0 DateTime.qml +HexGrid 1.0 HexGrid.qml +HexSwitch 1.0 HexSwitch.qml +Label 1.0 Label.qml +NumberPad 1.0 NumberPad.qml +Button 1.0 Button.qml diff --git a/sample-qml/imports/radio/Radio.qml b/sample-qml/imports/radio/Radio.qml new file mode 100644 index 0000000..cea2e1a --- /dev/null +++ b/sample-qml/imports/radio/Radio.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 + +Item { + signal stopped + signal playing +} diff --git a/sample-qml/imports/radio/qmldir b/sample-qml/imports/radio/qmldir new file mode 100644 index 0000000..e334188 --- /dev/null +++ b/sample-qml/imports/radio/qmldir @@ -0,0 +1,2 @@ +Radio 1.0 Radio.qml +RadioPropertyItem 1.0 Radio.qml diff --git a/sample-qml/imports/system/App.qml b/sample-qml/imports/system/App.qml new file mode 100644 index 0000000..d99e7f8 --- /dev/null +++ b/sample-qml/imports/system/App.qml @@ -0,0 +1,35 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import system 1.0 + +FocusScope { + id: root + property string appId + width: 1080 + height: 1920 + visible: true + property bool hasKeyFocus: false + focus: visible + onFocusChanged: if (focus) hasKeyFocus = true + + Rectangle{ + anchors.fill: parent + color: 'black' + } + + Keys.onPressed: { + switch (event.key) { + case Qt.Key_Left: + case Qt.Key_Right: + root.hasKeyFocus = false + break + default: + break + } + } +} diff --git a/sample-qml/imports/system/App.qml.org b/sample-qml/imports/system/App.qml.org new file mode 100644 index 0000000..d7da73c --- /dev/null +++ b/sample-qml/imports/system/App.qml.org @@ -0,0 +1,29 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import system 1.0 + +FocusScope { + id: root + property string appId + anchors.fill: parent + visible: System.activeApp === appId + property bool hasKeyFocus: false + focus: visible + onFocusChanged: if (focus) hasKeyFocus = true + + Keys.onPressed: { + switch (event.key) { + case Qt.Key_Left: + case Qt.Key_Right: + root.hasKeyFocus = false + break + default: + break + } + } +} diff --git a/sample-qml/imports/system/System.qml b/sample-qml/imports/system/System.qml new file mode 100644 index 0000000..8e155fd --- /dev/null +++ b/sample-qml/imports/system/System.qml @@ -0,0 +1,15 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton +import QtQuick 2.0 + +Item { + property string activeApp: "home" + property string activeSetting: "settings" + property bool showKeyboard: false + property bool showSettings: false +} diff --git a/sample-qml/imports/system/qmldir b/sample-qml/imports/system/qmldir new file mode 100644 index 0000000..afa0f56 --- /dev/null +++ b/sample-qml/imports/system/qmldir @@ -0,0 +1,8 @@ +#/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. +# * +# * This Source Code Form is subject to the terms of the Mozilla Public +# * License, v. 2.0. If a copy of the MPL was not distributed with this +# * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +singleton System 1.0 System.qml +App 1.0 App.qml diff --git a/sample-qml/imports/utils/Marker.qml b/sample-qml/imports/utils/Marker.qml new file mode 100644 index 0000000..c7a377e --- /dev/null +++ b/sample-qml/imports/utils/Marker.qml @@ -0,0 +1,60 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import QtQuick 2.0 +import utils 1.0 + +Item { + id: root + width: 120 + height: 120 + property string text + signal clicked() + property alias pressed: area.pressed + property alias color: background.color + property alias fontSize: label.font.pixelSize + property bool fill: false + + Rectangle { + id: background + anchors.fill: parent + color: Style.backgroundColor + opacity: root.fill ? 1.0: 0.2 + } + + Rectangle { + id: frame + anchors.fill: parent + color: 'transparent' + border.color: Qt.darker(background.color, 1.4) + border.width: 2 + opacity: 1.0 + } + + + Rectangle { + anchors.fill: label + anchors.margins: -2 + color: Style.backgroundColor + opacity: root.text ? 1.0 : 0.0 + } + + Text { + id: label + anchors.centerIn: parent + font.pixelSize: 14 + color: Style.greyDarkColor + opacity: 0.75 + text: root.text + } + MouseArea { + id: area + anchors.fill: parent + onClicked: root.clicked() + onPressed: background.color = Qt.darker(background.color, 1.5) + onReleased: background.color = Qt.lighter(background.color, 1.5) + } +} diff --git a/sample-qml/imports/utils/Style.qml b/sample-qml/imports/utils/Style.qml new file mode 100644 index 0000000..f9d9c16 --- /dev/null +++ b/sample-qml/imports/utils/Style.qml @@ -0,0 +1,37 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton +import QtQuick 2.2 + +QtObject { + property bool debugMode: false + property bool debugFill: false + + // Primary colors + property color orangeLt: "#ffd38c" + property color orangeViv: "#fe9c00" + property color blueLt: "#b2f0ff" + property color blueViv: "#53b5ce" + // Secondary colors + property color yellowLt: "#ffffb2" + property color yellowViv: "#ffff00" + property color greenLt: "#cdffb2" + property color greenViv: "#59ff00" + // Neutral colors + property color white: "#ffffff" + property color grey: "#c4c4c4" + property color black: "#000000" + property color overlay: Qt.rgba(0, 0, 0, 0.8) + + function getGfxPath() { + return Qt.resolvedUrl("../assets/") + } + + function gfx(name) { + return Qt.resolvedUrl("../../images/" + name ) + } +} diff --git a/sample-qml/imports/utils/qmldir b/sample-qml/imports/utils/qmldir new file mode 100644 index 0000000..c2df9de --- /dev/null +++ b/sample-qml/imports/utils/qmldir @@ -0,0 +1,8 @@ +#/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. +# * +# * This Source Code Form is subject to the terms of the Mozilla Public +# * License, v. 2.0. If a copy of the MPL was not distributed with this +# * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +singleton Style 1.0 Style.qml +Marker 1.0 Marker.qml diff --git a/sample-qml/imports/vehicle/ClimateModel.qml b/sample-qml/imports/vehicle/ClimateModel.qml new file mode 100644 index 0000000..9633f16 --- /dev/null +++ b/sample-qml/imports/vehicle/ClimateModel.qml @@ -0,0 +1,44 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton + +import QtQuick 2.0 +import Automotive.ClimateControl 1.0 + +Item { + property real fanStepSize:1/255 //Represents the stepSize for a given Climate control. + property alias fanSpeed: fanControl.fanSpeedLevel + + property real temperatureStepSize:1/15 //0== 15c, 15 == 30c + + property alias leftTemp: leftFront.targetTemperature + property alias rightTemp: rightFront.targetTemperature + + ClimateControlItem { + id:fanControl + } + + ClimateControlItem { + id: leftFront + zone: 9 + } + + ClimateControlItem { + id: rightFront + zone: 5 + } + + function getRangeValue(inputVal,stepSize){ + if(inputVal > 0){ + return Math.ceil(inputVal/stepSize); + }else{ + return 0; + } + } + +} + diff --git a/sample-qml/imports/vehicle/FuelModel.qml b/sample-qml/imports/vehicle/FuelModel.qml new file mode 100644 index 0000000..fa064e2 --- /dev/null +++ b/sample-qml/imports/vehicle/FuelModel.qml @@ -0,0 +1,46 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton + +import QtQuick 2.0 + +Item { + property bool metric: false + + function galToL(value) { + return (metric ? 3.78541 : 1) * value + } + + function mpgToLp100(value) { + return metric ? 235.214583571 / value : value + } + + property real baseTank: 25 + property real tankSize: galToL(baseTank) + property real level: tankSize * percentage * 0.01 + property real percentage: 100 + property real range: metric ? 100 * level / average : level * average + property real baseAverage: 20.7 + property real average: mpgToLp100(baseAverage + mpgDiff) + property real mpgDiff: 0 + + NumberAnimation on percentage { + from: 100 + to: 0 + duration: 5000 + loops: Animation.Infinite + easing.type: Easing.CosineCurve + } + + NumberAnimation on mpgDiff { + from: -2 + to: 2 + duration: 11200 + loops: Animation.Infinite + easing.type: Easing.CosineCurve + } +} diff --git a/sample-qml/imports/vehicle/PositionModel.qml b/sample-qml/imports/vehicle/PositionModel.qml new file mode 100644 index 0000000..00956aa --- /dev/null +++ b/sample-qml/imports/vehicle/PositionModel.qml @@ -0,0 +1,33 @@ +/* Copyright (C) 2015, Jaguar Land Rover, IoT.bzh. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton + +import QtQuick 2.0 +import amb 0.1 + +Item { + property string nmeaString: nmea.value + property real satellites: satsUsed.value + + AutomotivePropertyItem { + id: nmea + + objectName: "GpsNmea" + propertyName: "Nmea" + + Component.onCompleted: nmea.connect(); + } + + AutomotivePropertyItem { + id: satsUsed + + objectName: "GpsSatsUsed" + propertyName: "SatsUsed" + + Component.onCompleted: satsUsed.connect(); + } +} diff --git a/sample-qml/imports/vehicle/SpeedModel.qml b/sample-qml/imports/vehicle/SpeedModel.qml new file mode 100644 index 0000000..03422b0 --- /dev/null +++ b/sample-qml/imports/vehicle/SpeedModel.qml @@ -0,0 +1,38 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton + +import QtQuick 2.0 +import amb 0.1 + +Item { + property bool metric: false + + function mphToKph(value) { + return (metric ? 1.60934 : 1 ) * value + } + + property real max:Math.ceil(mphToKph(baseMaxSpeed)/30)*30 + property real baseMaxSpeed: 255 + property real textSpeed: prop.value + property real percentage: textSpeed / max * 100 + + AutomotivePropertyItem { + id: prop + + objectName: "VehicleSpeed" + propertyName: "Speed" + + Component.onCompleted: prop.connect(); + } + + Behavior on percentage { + SmoothedAnimation { + velocity: 100 + } + } +} diff --git a/sample-qml/imports/vehicle/TemperatureModel.qml b/sample-qml/imports/vehicle/TemperatureModel.qml new file mode 100644 index 0000000..2bfbbf4 --- /dev/null +++ b/sample-qml/imports/vehicle/TemperatureModel.qml @@ -0,0 +1,26 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +pragma Singleton + +import QtQuick 2.0 + +Item { + property bool metric: true + + function unit(value) { + return celsiusToFahrenheit(value).toFixed(1) + "\u00b0" + (metric ? "C" : "F") + } + + function celsiusToFahrenheit(value) { + return (metric ? value : 1.8 * value + 32) + } + + property real indoor: 20.4 + property string indoorString: unit(indoor) + property real outdoor: 28.9 + property string outdoorString: unit(outdoor) +} diff --git a/sample-qml/imports/vehicle/qmldir b/sample-qml/imports/vehicle/qmldir new file mode 100644 index 0000000..6538e95 --- /dev/null +++ b/sample-qml/imports/vehicle/qmldir @@ -0,0 +1,11 @@ +#/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. +# * +# * This Source Code Form is subject to the terms of the Mozilla Public +# * License, v. 2.0. If a copy of the MPL was not distributed with this +# * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +singleton FuelModel 1.0 FuelModel.qml +singleton SpeedModel 1.0 SpeedModel.qml +singleton TemperatureModel 1.0 TemperatureModel.qml +singleton PositionModel 1.0 PositionModel.qml +singleton ClimateModel 1.0 ClimateModel.qml diff --git a/sample-qml/main.cpp b/sample-qml/main.cpp new file mode 100644 index 0000000..9238a9b --- /dev/null +++ b/sample-qml/main.cpp @@ -0,0 +1,75 @@ +#include +#include +#include +#include +#include +#include // use libhomescreen +#include "calledbyqml.h" + + +#define FULLSCREEN 1 // assume 1 is "fullscreen" + + +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + + /* use libhomescreen + To use libhomescreen, add library path in project file(.pro) + */ + LibHomeScreen *mp_libHomeScreen; + mp_libHomeScreen = new LibHomeScreen(); + + QQmlApplicationEngine engine; + CalledByQml call_hsa; + engine.rootContext()->setContextProperty("hsa",&call_hsa); + + int appcategory = 0 ; + + bool enabled = true; + enabled = mp_libHomeScreen->renderAppToAreaAllowed(appcategory, FULLSCREEN); + if(enabled) + { + QString target(getenv("AFM_APP_INSTALL_DIR")); + qDebug("AFM_APP_INSTALL_DIR is " + target.toLatin1()); + + if(NULL == target) + { + target = "."; + } + + QString load_path; + load_path = target + "/imports"; + engine.addImportPath(load_path); + load_path = target + "/dummyimports"; + engine.addImportPath(load_path); + load_path = target + "/main.qml"; + + engine.load(QUrl(load_path)); + + std::vector surfaceIdList; + int pid = getpid(); + //maybe we can't call this function... + //surfaceIdList = mp_libHomeScreen->getAllSurfacesOfProcess(pid); + if(surfaceIdList.empty()) + { + qDebug("surface list is empty"); + } + else + { + qDebug("surface list is contained"); + // it will be implemented as soon as possible + //mp_libHomeScreen->renderSurfaceToArea(surfaceIdList.at(0),FULLSCREEN); + } + } + else + { + qDebug("renderAppToAreaAllowed is denied"); + delete mp_libHomeScreen; + return 0; + } + + app.exec(); + delete mp_libHomeScreen; + return 0; +} diff --git a/sample-qml/main.qml b/sample-qml/main.qml new file mode 100644 index 0000000..e2af15f --- /dev/null +++ b/sample-qml/main.qml @@ -0,0 +1,38 @@ +import QtQuick 2.6 +import QtQuick.Window 2.2 +import "apps/HVAC" +import "imports" +import "dummyimports" + +Window { + visible: true + width: 1080 + height: 1920 + title: qsTr("AGL sample qml app") + + //MainForm { + // anchors.fill: parent + // mouseArea.onClicked: { + // Qt.quit(); + // } + //} + HVAC { + id: hvc + width: 1080 + height: 1920 + visible: true + } + onVisibleChanged: { + if(visible == true) + { + console.log("visible true") + console.log("maybe it is okay") + hsa.consoleout() + hsa.refresh(); + } + else{ + console.log("visible false") + } + } + +} diff --git a/sample-qml/main2.qml b/sample-qml/main2.qml new file mode 100644 index 0000000..f2ff4c9 --- /dev/null +++ b/sample-qml/main2.qml @@ -0,0 +1,27 @@ +import QtQuick 2.6 +import QtQuick.Window 2.2 + +Window { + visible: true + width: 1080 + height: 1920 + title: qsTr("AGL sample qml app") + + MainForm { + anchors.fill: parent + mouseArea.onClicked: { + Qt.quit(); + } + } + onVisibleChanged: { + if(visible == true) + { + console.log("2:visible true") + console.log("maybe it is okay") + } + else{ + console.log("visible2 false") + } + } + +} diff --git a/sample-qml/qml.qrc b/sample-qml/qml.qrc new file mode 100644 index 0000000..680a07e --- /dev/null +++ b/sample-qml/qml.qrc @@ -0,0 +1,22 @@ + + + main.qml + MainForm.ui.qml + apps/HVAC/TemperatureWheel.qml + apps/HVAC/TempSlider.qml + apps/HVAC/SeatHeatButton.qml + apps/HVAC/MiddleColumn.qml + apps/HVAC/HazardButton.qml + apps/HVAC/HVAC.qml + apps/HVAC/FanControl.qml + apps/HVAC/ClimateButton.qml + imports/vehicle/qmldir + imports/utils/qmldir + imports/system/qmldir + imports/radio/qmldir + imports/components/qmldir + dummyimports/radio/qmldir + dummyimports/com/pelagicore/qmldevinfo/qmldir + dummyimports/amb/qmldir + + diff --git a/sample-qml/sample-qml b/sample-qml/sample-qml new file mode 100755 index 0000000..d5739e4 Binary files /dev/null and b/sample-qml/sample-qml differ diff --git a/sample-qml/sample-qml.pro b/sample-qml/sample-qml.pro new file mode 100644 index 0000000..e26bef6 --- /dev/null +++ b/sample-qml/sample-qml.pro @@ -0,0 +1,22 @@ +TEMPLATE = app + +QT += qml quick +CONFIG += c++11 + +SOURCES += main.cpp \ + calledbyqml.cpp + +RESOURCES += qml.qrc + +# Additional import path used to resolve QML modules in Qt Creator's code model +QML_IMPORT_PATH = + +INCLUDEPATH += $$PWD/../libhomescreen/include/ + +LIBS += -L$$OUT_PWD/../libhomescreen -lhomescreen + +# Default rules for deployment. +include(deployment.pri) + +HEADERS += \ + calledbyqml.h diff --git a/sample-qml/zip-command b/sample-qml/zip-command new file mode 100644 index 0000000..c5108cf --- /dev/null +++ b/sample-qml/zip-command @@ -0,0 +1 @@ +zip -q -r sample.wgt . -- cgit 1.2.3-korg