aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBramastyo Harimukti <bramastyo.harimukti.santoso@pelagicore.com>2017-10-19 13:26:52 +0200
committerDaniel d'Andrada <daniel.dandrada@luxoft.com>2018-02-28 15:45:17 +0100
commit54a77753da3765b4e1cc6508b900560ee6093c2b (patch)
tree9bc5be615aa7727824aca609d3289d2e4c617c61
parentae941eb8220648705f2c3f5b2ae1419e943c7096 (diff)
Initial commit of Triton-UI
-rw-r--r--.gitignore57
-rw-r--r--.qmake.conf8
-rw-r--r--LICENSE.CC-BY-NC-SA447
-rw-r--r--LICENSE.FDL450
-rw-r--r--LICENSE.GPL3684
-rw-r--r--Main.qml67
-rw-r--r--README.md47
-rw-r--r--am-config.yaml47
-rw-r--r--apps/NotAvailableYet.qml52
-rw-r--r--apps/com.pelagicore.maps/Maps.qml65
-rw-r--r--apps/com.pelagicore.maps/icon.pngbin0 -> 5309 bytes
-rw-r--r--apps/com.pelagicore.maps/info.yaml12
-rw-r--r--apps/com.pelagicore.music/AlbumScreen.qml90
-rw-r--r--apps/com.pelagicore.music/ClusterWidget.qml119
-rw-r--r--apps/com.pelagicore.music/CoverItem.qml86
-rw-r--r--apps/com.pelagicore.music/CurrentTrackScreen.qml285
-rw-r--r--apps/com.pelagicore.music/IndexerStatus.qml91
-rw-r--r--apps/com.pelagicore.music/Library.qml104
-rw-r--r--apps/com.pelagicore.music/LibraryList.qml173
-rw-r--r--apps/com.pelagicore.music/Music.qml119
-rw-r--r--apps/com.pelagicore.music/PlaylistContainer.qml151
-rw-r--r--apps/com.pelagicore.music/TrackSwipeView.qml72
-rw-r--r--apps/com.pelagicore.music/icon.pngbin0 -> 1913 bytes
-rw-r--r--apps/com.pelagicore.music/info.yaml12
-rw-r--r--apps/com.pelagicore.music/models/MusicModel.qml140
-rw-r--r--apps/com.pelagicore.music/models/qmldir1
-rw-r--r--apps/com.pelagicore.sheets/Main.qml45
-rw-r--r--apps/com.pelagicore.sheets/MenuPane.qml84
-rw-r--r--apps/com.pelagicore.sheets/boards/AppButtonBoard.qml71
-rw-r--r--apps/com.pelagicore.sheets/boards/AssetsBoard.qml60
-rw-r--r--apps/com.pelagicore.sheets/boards/BaseBoard.qml60
-rw-r--r--apps/com.pelagicore.sheets/boards/ButtonBoard.qml124
-rw-r--r--apps/com.pelagicore.sheets/boards/ColorBoard.qml100
-rw-r--r--apps/com.pelagicore.sheets/boards/ColorButton.qml46
-rw-r--r--apps/com.pelagicore.sheets/boards/FrameBoard.qml92
-rw-r--r--apps/com.pelagicore.sheets/boards/IconBoard.qml148
-rw-r--r--apps/com.pelagicore.sheets/boards/LabelBoard.qml69
-rw-r--r--apps/com.pelagicore.sheets/boards/LetterPickerBoard.qml44
-rw-r--r--apps/com.pelagicore.sheets/boards/ListItemBoard.qml148
-rw-r--r--apps/com.pelagicore.sheets/boards/PaneBoard.qml94
-rw-r--r--apps/com.pelagicore.sheets/boards/SliderBoard.qml60
-rw-r--r--apps/com.pelagicore.sheets/boards/StyleBoard.qml123
-rw-r--r--apps/com.pelagicore.sheets/boards/SwitchBoard.qml88
-rw-r--r--apps/com.pelagicore.sheets/boards/SwitchDelegateBoard.qml55
-rw-r--r--apps/com.pelagicore.sheets/boards/TabBoard.qml78
-rw-r--r--apps/com.pelagicore.sheets/boards/TemperatureSliderBoard.qml88
-rw-r--r--apps/com.pelagicore.sheets/boards/TextFieldBoard.qml46
-rw-r--r--apps/com.pelagicore.sheets/boards/ToolBoard.qml75
-rw-r--r--apps/com.pelagicore.sheets/boards/ToolButtonBoard.qml70
-rw-r--r--apps/com.pelagicore.sheets/boards/VolumeSliderBoard.qml53
-rw-r--r--apps/com.pelagicore.sheets/boards/WelcomePage.qml35
-rw-r--r--apps/com.pelagicore.sheets/icon.pngbin0 -> 3334 bytes
-rw-r--r--apps/com.pelagicore.sheets/info.yaml12
-rw-r--r--apps/com.pelagicore.template/Content.qml192
-rw-r--r--apps/com.pelagicore.template/Main.qml51
-rw-r--r--apps/com.pelagicore.template/icon.pngbin0 -> 2076 bytes
-rw-r--r--apps/com.pelagicore.template/info.yaml11
-rw-r--r--config.pri3
-rw-r--r--copydata.pro7
-rw-r--r--dummyimports/QtIvi/Media/MediaIndexerControl.qml40
-rw-r--r--dummyimports/QtIvi/Media/MediaPlayer.qml42
-rw-r--r--dummyimports/QtIvi/Media/qmldir2
-rw-r--r--dummyimports/QtIvi/SearchAndBrowseModel.qml40
-rw-r--r--dummyimports/QtIvi/VehicleFunctions/DummyClimateControl.qml46
-rw-r--r--dummyimports/QtIvi/VehicleFunctions/qmldir1
-rw-r--r--dummyimports/QtIvi/qmldir1
-rw-r--r--header.FDL-QTAS26
-rw-r--r--header.GPL-QTAS30
-rw-r--r--imports/assets/translations/de_DE.ts43
-rw-r--r--imports/assets/translations/en_GB.ts43
-rw-r--r--imports/assets/translations/en_US.ts43
-rw-r--r--imports/assets/translations/in_ID.ts43
-rw-r--r--imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/backspace-868482.svg75
-rw-r--r--imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/check-868482.svg7
-rw-r--r--imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/enter-868482.svg13
-rw-r--r--imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/globe-868482.svg56
-rw-r--r--imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/handwriting-868482.svg54
-rw-r--r--imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/hidekeyboard-868482.svg281
-rw-r--r--imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/search-868482.svg14
-rw-r--r--imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/textmode-868482.svg87
-rw-r--r--imports/shared/QtQuick/VirtualKeyboard/Styles/triton/style.qml878
-rw-r--r--imports/shared/animations/qmldir0
-rw-r--r--imports/shared/controls/+material/BackgroundPane.qml37
-rw-r--r--imports/shared/controls/+material/TemperatureSlider.qml117
-rw-r--r--imports/shared/controls/+material/VolumeSlider.qml37
-rw-r--r--imports/shared/controls/+universal/BackgroundPane.qml37
-rw-r--r--imports/shared/controls/AppStackView.qml77
-rw-r--r--imports/shared/controls/CategoryListItem.qml105
-rw-r--r--imports/shared/controls/DisplayBackground.qml55
-rw-r--r--imports/shared/controls/HDiv.qml47
-rw-r--r--imports/shared/controls/Icon.qml57
-rw-r--r--imports/shared/controls/LetterPicker.qml123
-rw-r--r--imports/shared/controls/ListItem.qml102
-rw-r--r--imports/shared/controls/ListItemRadioButton.qml67
-rw-r--r--imports/shared/controls/ListItemSwitch.qml51
-rw-r--r--imports/shared/controls/ListViewManager.qml43
-rw-r--r--imports/shared/controls/Popup.qml72
-rw-r--r--imports/shared/controls/ScrollIndicator.qml78
-rw-r--r--imports/shared/controls/SettingsItemDelegate.qml109
-rw-r--r--imports/shared/controls/Symbol.qml51
-rw-r--r--imports/shared/controls/TabView.qml116
-rw-r--r--imports/shared/controls/TemperatureSlider.qml230
-rw-r--r--imports/shared/controls/TextField.qml88
-rw-r--r--imports/shared/controls/Tool.qml50
-rw-r--r--imports/shared/controls/VolumeSlider.qml93
-rw-r--r--imports/shared/controls/qmldir27
-rw-r--r--imports/shared/service/notification/NotificationInterface.qml72
-rw-r--r--imports/shared/service/notification/qmldir1
-rw-r--r--imports/shared/service/popup/PopupInterface.qml106
-rw-r--r--imports/shared/service/popup/qmldir1
-rw-r--r--imports/shared/utils/AppUIScreen.qml91
-rw-r--r--imports/shared/utils/DisplayGrid.qml86
-rw-r--r--imports/shared/utils/DisplayGridCell.qml52
-rw-r--r--imports/shared/utils/Layouter.qml67
-rw-r--r--imports/shared/utils/Logging.qml45
-rw-r--r--imports/shared/utils/Marker.qml82
-rw-r--r--imports/shared/utils/NavigationUIScreen.qml107
-rw-r--r--imports/shared/utils/Spacer.qml40
-rw-r--r--imports/shared/utils/StageLoader.qml47
-rw-r--r--imports/shared/utils/Style.qml181
-rw-r--r--imports/shared/utils/Tracer.qml94
-rw-r--r--imports/shared/utils/UIElement.qml49
-rw-r--r--imports/shared/utils/UIPage.qml44
-rw-r--r--imports/shared/utils/UIPanel.qml36
-rw-r--r--imports/shared/utils/UIScreen.qml110
-rw-r--r--imports/shared/utils/qmldir15
-rw-r--r--imports/shared/visualization/CarVisualization.qml37
-rw-r--r--imports/shared/visualization/qmldir1
-rw-r--r--imports/shared/visualization/white.pngbin0 -> 647223 bytes
-rw-r--r--imports/system/models/application/ApplicationInfo.qml54
-rw-r--r--imports/system/models/application/ApplicationManagerModel.qml143
-rw-r--r--imports/system/models/application/qmldir2
-rw-r--r--imports/system/models/climate/ClimateModel.qml175
-rw-r--r--imports/system/models/climate/ClimateStateMachine.qml170
-rw-r--r--imports/system/models/climate/qmldir1
-rw-r--r--imports/system/models/cluster/StatusModel.qml39
-rw-r--r--imports/system/models/cluster/qmldir1
-rw-r--r--imports/system/models/media/MediaModel.qml93
-rw-r--r--imports/system/models/media/qmldir1
-rw-r--r--imports/system/models/notification/NotificationModel.qml200
-rw-r--r--imports/system/models/notification/qmldir1
-rw-r--r--imports/system/models/popup/PopupModel.qml164
-rw-r--r--imports/system/models/popup/qmldir1
-rw-r--r--imports/system/models/settings/SettingsModel.qml148
-rw-r--r--imports/system/models/settings/qmldir1
-rw-r--r--imports/system/models/startup/StagedStartupModel.qml81
-rw-r--r--imports/system/models/startup/qmldir1
-rw-r--r--imports/system/models/statusbar/StatusBarModel.qml57
-rw-r--r--imports/system/models/statusbar/qmldir1
-rw-r--r--imports/system/models/system/SystemModel.qml43
-rw-r--r--imports/system/models/system/qmldir1
-rw-r--r--imports/system/models/vehicle/VehicleModel.qml90
-rw-r--r--imports/system/models/vehicle/qmldir1
-rw-r--r--plugins.yaml.in11
-rw-r--r--plugins/plugins.pro5
-rw-r--r--plugins/screenmanager/plugin.cpp58
-rw-r--r--plugins/screenmanager/qmldir2
-rw-r--r--plugins/screenmanager/screenmanager.cpp64
-rw-r--r--plugins/screenmanager/screenmanager.h55
-rw-r--r--plugins/screenmanager/screenmanager.pro14
-rw-r--r--plugins/scripts/README.md9
-rw-r--r--plugins/scripts/scanmovies.py123
-rw-r--r--plugins/scripts/scanmusic.py149
-rw-r--r--plugins/styles/styles.pro4
-rw-r--r--plugins/styles/triton/qmldir3
-rw-r--r--plugins/styles/triton/qtquickcontrols2.conf14
-rw-r--r--plugins/styles/triton/triton.pro23
-rw-r--r--plugins/styles/triton/tritonstyle.cpp451
-rw-r--r--plugins/styles/triton/tritonstyle.h155
-rw-r--r--plugins/styles/triton/tritonstyle.qrc5
-rw-r--r--plugins/styles/triton/tritonstyleplugin.cpp72
-rw-r--r--plugins/styles/triton/tritonstyleplugin.h55
-rw-r--r--plugins/styles/triton/tritontheme.cpp60
-rw-r--r--plugins/styles/triton/tritontheme.h51
-rw-r--r--plugins/translation/plugin.cpp50
-rw-r--r--plugins/translation/qmldir2
-rw-r--r--plugins/translation/translation.cpp82
-rw-r--r--plugins/translation/translation.h66
-rw-r--r--plugins/translation/translation.pro57
-rw-r--r--qmake-features/qmlplugin.prf25
-rw-r--r--src/MouseTouchAdaptor.cpp276
-rw-r--r--src/MouseTouchAdaptor.h73
-rw-r--r--src/main.cpp110
-rw-r--r--src/src.pro27
-rw-r--r--styles/1080x1920Triton.conf14
-rw-r--r--styles/1280x800Triton.conf14
-rw-r--r--styles/768x1024Triton.conf14
-rw-r--r--styles/triton/Button.qml64
-rw-r--r--styles/triton/ComboBox.qml141
-rw-r--r--styles/triton/Control.qml37
-rw-r--r--styles/triton/Dialog.qml84
-rw-r--r--styles/triton/Frame.qml51
-rw-r--r--styles/triton/ItemDelegate.qml80
-rw-r--r--styles/triton/Label.qml42
-rw-r--r--styles/triton/Page.qml54
-rw-r--r--styles/triton/PageIndicator.qml66
-rw-r--r--styles/triton/Pane.qml46
-rw-r--r--styles/triton/Popup.qml54
-rw-r--r--styles/triton/Switch.qml116
-rw-r--r--styles/triton/SwitchDelegate.qml76
-rw-r--r--styles/triton/SwitchIndicator.qml71
-rw-r--r--styles/triton/ToolBar.qml50
-rw-r--r--styles/triton/ToolButton.qml70
-rw-r--r--sync.profile20
-rwxr-xr-xsysui/climate/ClimateBar.qml71
-rwxr-xr-xsysui/climate/TemperatureLevel.qml116
-rw-r--r--sysui/climate/qmldir1
-rw-r--r--sysui/display/ApplicationWidget.qml90
-rw-r--r--sysui/display/Display.qml229
-rw-r--r--sysui/display/HomePage.qml86
-rw-r--r--sysui/display/Launcher.qml114
-rw-r--r--sysui/display/Resizer.qml137
-rw-r--r--sysui/display/WidgetDrawer.qml131
-rw-r--r--sysui/display/WindowStack.qml142
-rw-r--r--sysui/display/qmldir1
-rw-r--r--sysui/popup/PopupContainer.qml119
-rw-r--r--sysui/popup/PopupFooter.qml58
-rw-r--r--sysui/popup/PopupHeader.qml70
-rw-r--r--sysui/popup/qmldir1
-rw-r--r--sysui/statusbar/DateAndTime.qml58
-rw-r--r--sysui/statusbar/IndicatorTray.qml59
-rw-r--r--sysui/statusbar/StatusBar.qml81
-rw-r--r--sysui/statusbar/Weather.qml65
-rw-r--r--sysui/statusbar/qmldir1
-rw-r--r--tests/tests.pro1
-rw-r--r--triton-ui.pro33
226 files changed, 17157 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..69dcc2ae
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,57 @@
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+
+# Qt-es
+
+/.qmake.cache
+/.qmake.stash
+*.pro.user
+*.pro.user.*
+*.moc
+moc_*.cpp
+qrc_*.cpp
+ui_*.h
+Makefile*
+*-build-*
+*.qmlc
+
+# QtCreator
+
+*.autosave
+*~
+*.orig
+
+*.qmlproject.user
+*.qmlproject.user*
+.DS_Store
+
+# packaging/checkinstall
+*.tgz
+*.deb
+CMakeCache.txt
+CMakeFiles
+description-pak
+doc-pak
+
+.directory
+core
+*.qmlc
diff --git a/.qmake.conf b/.qmake.conf
new file mode 100644
index 00000000..a643303a
--- /dev/null
+++ b/.qmake.conf
@@ -0,0 +1,8 @@
+#This empty file is required by qmake to generate the documentation targets.
+VERSION = 1.1.0
+
+CONFIG += prepare_docs qt_docs_targets
+SOURCE_DIR=$$PWD
+BUILD_DIR=$$shadowed($$PWD)
+QMAKEFEATURES=$$SOURCE_DIR/qmake-features
+
diff --git a/LICENSE.CC-BY-NC-SA b/LICENSE.CC-BY-NC-SA
new file mode 100644
index 00000000..d5a7f035
--- /dev/null
+++ b/LICENSE.CC-BY-NC-SA
@@ -0,0 +1,447 @@
+ Attribution-NonCommercial-ShareAlike 4.0 International
+
+ Triton IVI UI is Copyright (C) 2015 Pelagicore AG
+ Contact: http://www.pelagicore.com/
+
+ You may use, distribute and copy Triton IVI UI Assets under the terms of the
+ Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license
+ , which is displayed below.
+
+=======================================================================
+
+
+Attribution-NonCommercial-ShareAlike 4.0 International
+
+=======================================================================
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More_considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+=======================================================================
+
+Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
+Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution-NonCommercial-ShareAlike 4.0 International Public License
+("Public License"). To the extent this Public License may be
+interpreted as a contract, You are granted the Licensed Rights in
+consideration of Your acceptance of these terms and conditions, and the
+Licensor grants You such rights in consideration of benefits the
+Licensor receives from making the Licensed Material available under
+these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+
+ c. BY-NC-SA Compatible License means a license listed at
+ creativecommons.org/compatiblelicenses, approved by Creative
+ Commons as essentially the equivalent of this Public License.
+
+ d. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+
+ e. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ f. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ g. License Elements means the license attributes listed in the name
+ of a Creative Commons Public License. The License Elements of this
+ Public License are Attribution, NonCommercial, and ShareAlike.
+
+ h. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ i. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ j. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ k. NonCommercial means not primarily intended for or directed towards
+ commercial advantage or monetary compensation. For purposes of
+ this Public License, the exchange of the Licensed Material for
+ other material subject to Copyright and Similar Rights by digital
+ file-sharing or similar means is NonCommercial provided there is
+ no payment of monetary compensation in connection with the
+ exchange.
+
+ l. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ m. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ n. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part, for NonCommercial purposes only; and
+
+ b. produce, reproduce, and Share Adapted Material for
+ NonCommercial purposes only.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. Additional offer from the Licensor -- Adapted Material.
+ Every recipient of Adapted Material from You
+ automatically receives an offer from the Licensor to
+ exercise the Licensed Rights in the Adapted Material
+ under the conditions of the Adapter's License You apply.
+
+ c. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties, including when
+ the Licensed Material is used other than for NonCommercial
+ purposes.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+ b. ShareAlike.
+
+ In addition to the conditions in Section 3(a), if You Share
+ Adapted Material You produce, the following conditions also apply.
+
+ 1. The Adapter's License You apply must be a Creative Commons
+ license with the same License Elements, this version or
+ later, or a BY-NC-SA Compatible License.
+
+ 2. You must include the text of, or the URI or hyperlink to, the
+ Adapter's License You apply. You may satisfy this condition
+ in any reasonable manner based on the medium, means, and
+ context in which You Share Adapted Material.
+
+ 3. You may not offer or impose any additional or different terms
+ or conditions on, or apply any Effective Technological
+ Measures to, Adapted Material that restrict exercise of the
+ rights granted under the Adapter's License You apply.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database for NonCommercial purposes
+ only;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material,
+ including for purposes of Section 3(b); and
+
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+=======================================================================
+
+Creative Commons is not a party to its public licenses.
+Notwithstanding, Creative Commons may elect to apply one of its public
+licenses to material it publishes and in those instances will be
+considered the "Licensor." Except for the limited purpose of indicating
+that material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the public
+licenses.
+
+Creative Commons may be contacted at creativecommons.org.
diff --git a/LICENSE.FDL b/LICENSE.FDL
new file mode 100644
index 00000000..e0de1d62
--- /dev/null
+++ b/LICENSE.FDL
@@ -0,0 +1,450 @@
+ GNU Free Documentation License
+ Version 1.3, 3 November 2008
+
+
+ Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The "Document", below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as "you". You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification. Examples of
+transparent image formats include PNG, XCF and JPG. Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The "publisher" means any person or entity that distributes copies of
+the Document to the public.
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgments",
+"Dedications", "Endorsements", or "History".) To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no
+other conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to
+give them a chance to provide you with an updated version of the
+Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section Entitled "History", Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section Entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. For any section Entitled "Acknowledgments" or "Dedications",
+ Preserve the Title of the section, and preserve in the section all
+ the substance and tone of each of the contributor acknowledgments
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section Entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section to be Entitled "Endorsements"
+ or to conflict in title with any Invariant Section.
+O. Preserve any Warranty Disclaimers.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgments",
+and any sections Entitled "Dedications". You must delete all sections
+Entitled "Endorsements".
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other
+documents released under this License, and replace the individual
+copies of this License in the various documents with a single copy
+that is included in the collection, provided that you follow the rules
+of this License for verbatim copying of each of the documents in all
+other respects.
+
+You may extract a single document from such a collection, and
+distribute it individually under this License, provided you insert a
+copy of this License into the extracted document, and follow this
+License in all other respects regarding verbatim copying of that
+document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgments",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions of the
+GNU Free Documentation License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in
+detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+11. RELICENSING
+
+"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+"Massive Multiauthor Collaboration" (or "MMC") contained in the site
+means any set of copyrightable works thus published on the MMC site.
+
+"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+"Incorporate" means to publish or republish a Document, in whole or in
+part, as part of another Document.
+
+An MMC is "eligible for relicensing" if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole or
+in part into the MMC, (1) had no cover texts or invariant sections, and
+(2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff --git a/LICENSE.GPL3 b/LICENSE.GPL3
new file mode 100644
index 00000000..974e0160
--- /dev/null
+++ b/LICENSE.GPL3
@@ -0,0 +1,684 @@
+ GNU GENERAL PUBLIC LICENSE
+
+ Triton IVI UI is Copyright (C) 2017 Pelagicore AG
+ Contact: http://www.pelagicore.com/
+
+ You may use, distribute and copy Triton IVI UI under the terms of the
+ GNU General Public License version 3, which is displayed below.
+
+-------------------------------------------------------------------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/Main.qml b/Main.qml
new file mode 100644
index 00000000..7acfc124
--- /dev/null
+++ b/Main.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtApplicationManager 1.0
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+import models.startup 1.0
+
+Pane {
+ id: root
+
+ property bool showClusterIfPossible: ApplicationManager.systemProperties.showCluster && Style.withCluster
+ property var cluster
+
+ width: Style.screenWidth
+ height: Style.screenHeight
+ padding: 0
+
+ //Forwards the keys to the custer to handle it without being the active window
+ Keys.forwardTo: clusterLoader.item ? clusterLoader.item.cluster : (displayLoader.item ? displayLoader.item : null)
+
+ StageLoader {
+ id: displayLoader
+ anchors.fill: parent
+ source: "sysui/display/Display.qml"
+ active: StagedStartupModel.loadDisplay
+ }
+
+ StageLoader {
+ id: clusterLoader
+ height: Style.clusterHeight
+ width: Style.clusterWidth
+ source: "sysui/cluster/ClusterMain.qml"
+ active: root.showClusterIfPossible
+ focus: true
+ }
+}
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..f047db85
--- /dev/null
+++ b/README.md
@@ -0,0 +1,47 @@
+# Prerequisite
+
+Qt >= 5.9
+QtIvi
+Unix system
+Application Manager
+
+# Build and install triton-ui
+
+ $ qmake INSTALL_PREFIX=/path/to/install/folder && make && make install
+
+This will install all qml files and plugins into the triton subfolder of '/path/to/install/folder'. If INSTALL_PREFIX is not defined, then this will build all triton-ui plugins and installs the complete triton-ui to /opt/triton folder.
+
+The installation part is optional.
+
+* (Optional) Run scripts within the plugins/scripts folder to scan the media on the system
+
+# Run entire UI
+
+Building Triton will make 'triton-ui' executable which will be then run:
+
+ $ triton-ui -r
+
+To get more detailed log output, run:
+ $ triton-ui -r --verbose
+
+
+# Run the UI without QtIVI
+
+In case QtIVI is not installed, 'dummyimports' folder contains QML dummy implementation of QtIVI:
+
+ $ QML2_IMPORT_PATH=/path/to/dummyimports triton-ui -r
+
+
+# Style Configuration
+
+Triton UI supports different style configurations which can be used to adapt the style to the needs of the Hardware the UI should be running on.
+The following resolutions are available:
+
+* 1080x1920 - default
+* 1280x800
+* 1080x1920
+* 768x1024
+
+To set the UI for wanted (other than default one) resolution, set the 'QT_QUICK_CONTROLS_CONF' to the location of QtQuickControls 2 configuration file. Configuration files are within 'styles' folder (https://doc.qt.io/qt-5/qtquickcontrols2-environment.html).
+
+NOTE: You need to have Source Sans Pro font installed (see assets folder within the modules)
diff --git a/am-config.yaml b/am-config.yaml
new file mode 100644
index 00000000..96db27cd
--- /dev/null
+++ b/am-config.yaml
@@ -0,0 +1,47 @@
+formatVersion: 1
+formatType: am-configuration
+---
+# basic AM functionality - the builtin apps are in 'apps'.
+# installations will go into the standard /tmp/am hierarchy
+
+applications:
+ builtinAppsManifestDir: "${CONFIG_PWD}/apps"
+ installedAppsManifestDir: "/tmp/am/manifests"
+ appImageMountDir: "/tmp/am/image-mounts"
+ database: "/tmp/am/apps.db"
+
+# QML apps will be able to import from modules...
+
+runtimes:
+ qml:
+ importPaths: [ "${CONFIG_PWD}/imports/shared" ]
+
+# ... as well as the SystemUI
+
+ui:
+ fullscreen: no
+ style: "${CONFIG_PWD}/styles/triton"
+ mainQml: "${CONFIG_PWD}/Main.qml"
+ importPaths: [ "${CONFIG_PWD}/imports/shared", "${CONFIG_PWD}/imports/system", "${CONFIG_PWD}/sysui" ]
+ windowIcon: "${CONFIG_PWD}/imports/assets/icons/active/apps@96.png"
+
+systemProperties:
+ public:
+ showCluster: no
+ private:
+ appStoreServerUrl: 'http://chaos.pelagicore.net:8080'
+
+# development setup: no security
+
+flags:
+ noSecurity: yes
+ noUiWatchdog: yes
+
+# simulate an internal and a SD-card installation location
+
+installationLocations:
+- id: "internal-0"
+ installationPath: "/tmp/am/apps"
+ documentPath: "/tmp/am/docs"
+ mountPoint: "/tmp"
+ isDefault: true
diff --git a/apps/NotAvailableYet.qml b/apps/NotAvailableYet.qml
new file mode 100644
index 00000000..e6999ea7
--- /dev/null
+++ b/apps/NotAvailableYet.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+import controls 1.0
+import utils 1.0
+
+AppUIScreen {
+ id: root
+
+ width: Style.hspan(24)
+ height: Style.vspan(24)
+
+ title: 'Not available'
+
+ Label {
+ width: parent.width
+ anchors.verticalCenter: parent.verticalCenter
+ horizontalAlignment: Qt.AlignHCenter
+ text: "The application is not available yet"
+ font.pixelSize: Style.fontSizeXL
+ }
+}
diff --git a/apps/com.pelagicore.maps/Maps.qml b/apps/com.pelagicore.maps/Maps.qml
new file mode 100644
index 00000000..35338973
--- /dev/null
+++ b/apps/com.pelagicore.maps/Maps.qml
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import utils 1.0
+
+AppUIScreen {
+ id: root
+ title: "Triton Maps"
+
+ Component.onCompleted: {
+ root.setWindowProperty("windowType", "widget");
+ }
+
+ Rectangle {
+ color: "blue"
+ anchors.fill: parent
+
+ Rectangle {
+ color: touchPoint1.pressed ? "red" : "green"
+ anchors.fill: parent
+ anchors.margins: 30
+ }
+ }
+
+ MultiPointTouchArea {
+ anchors.fill: parent
+ touchPoints: [ TouchPoint { id: touchPoint1 } ]
+
+ property int count: 0
+ onReleased: {
+ count += 1;
+ root.setWindowProperty("activationCount", count);
+ }
+ }
+}
+
diff --git a/apps/com.pelagicore.maps/icon.png b/apps/com.pelagicore.maps/icon.png
new file mode 100644
index 00000000..fc2435e7
--- /dev/null
+++ b/apps/com.pelagicore.maps/icon.png
Binary files differ
diff --git a/apps/com.pelagicore.maps/info.yaml b/apps/com.pelagicore.maps/info.yaml
new file mode 100644
index 00000000..863b518a
--- /dev/null
+++ b/apps/com.pelagicore.maps/info.yaml
@@ -0,0 +1,12 @@
+formatVersion: 1
+formatType: am-application
+---
+id: 'com.pelagicore.maps'
+icon: 'icon.png'
+code: 'Maps.qml'
+runtime: 'qml'
+name:
+ en: 'Maps'
+ de: 'Karten'
+
+categories: [ 'navigation' ]
diff --git a/apps/com.pelagicore.music/AlbumScreen.qml b/apps/com.pelagicore.music/AlbumScreen.qml
new file mode 100644
index 00000000..66fa8f87
--- /dev/null
+++ b/apps/com.pelagicore.music/AlbumScreen.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+
+import controls 1.0
+import utils 1.0
+import "models"
+import "."
+
+UIScreen {
+ id: root
+ width: Style.hspan(24)
+ height: Style.vspan(24)
+
+
+ PathView {
+ id: view
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: Style.vspan(12)
+ model: MusicModel.nowPlaying
+ pathItemCount: 5
+ currentIndex: MusicModel.currentIndex
+ path: Path {
+ startX: -Style.hspan(3)
+ startY: view.height/2
+ PathLine {
+ x: view.width+Style.hspan(3)
+ y: view.height/2
+ }
+ }
+ snapMode: PathView.SnapToItem
+ preferredHighlightBegin: 0.5
+ preferredHighlightEnd: 0.5
+
+ delegate: CoverItem {
+ source: model.item.coverArtUrl
+ title: model.item.title
+ subTitle: model.item.artist
+ onClicked: {
+ MusicModel.currentIndex = index
+ root.backScreen()
+ }
+ }
+ }
+
+ Image {
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ source: Style.gfx('shadow_left')
+ }
+
+ Image {
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ source: Style.gfx('shadow_right')
+ }
+
+}
diff --git a/apps/com.pelagicore.music/ClusterWidget.qml b/apps/com.pelagicore.music/ClusterWidget.qml
new file mode 100644
index 00000000..120d01e1
--- /dev/null
+++ b/apps/com.pelagicore.music/ClusterWidget.qml
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+import utils 1.0
+import controls 1.0
+import "models"
+import "."
+
+Item {
+ width: Style.clusterWidth * 0.677
+ height: parent.height
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ ListView {
+ id: playListView
+ width: parent.width * 0.3
+ height: parent.height
+ anchors.centerIn: parent
+ clip: true
+ model: MusicModel.nowPlaying
+ currentIndex: MusicModel.currentIndex
+ highlight: Rectangle {
+ color: Style.colorWhite; opacity: 0.25
+ border.color: Qt.lighter(color, 1.2)
+ }
+ highlightMoveDuration: 75
+ preferredHighlightBegin: parent.height / 2
+ preferredHighlightEnd: parent.height / 2
+ highlightRangeMode: ListView.StrictlyEnforceRange
+ // TODO: Extract the delegate as own component
+ delegate: Control {
+ width: Style.hspan(4)
+ height: Style.vspan(2)
+ RowLayout {
+ anchors.fill: parent
+ spacing: 0
+ Item {
+ Layout.fillHeight: true
+ width: Style.hspan(1)
+ Item {
+ anchors.fill: parent
+ anchors.margins: Style.padding
+ Rectangle {
+ anchors.fill: parent
+ anchors.leftMargin: -6
+ anchors.rightMargin: -6
+ anchors.topMargin: -2
+ anchors.bottomMargin: -2
+ color: Style.colorWhite
+ }
+
+ Image {
+ anchors.centerIn: parent
+ height: parent.height
+ width: parent.height
+ source: model.item.coverArtUrl
+ fillMode: Image.PreserveAspectCrop
+ asynchronous: true
+ }
+ }
+ }
+ ColumnLayout {
+ spacing: 0
+ Label {
+ text: model.item.title
+ font.pixelSize: Style.fontSizeXS
+ opacity: 0.5
+ elide: Text.ElideRight
+ Layout.fillWidth: true
+ }
+ Label {
+ text: model.item.artist
+ font.pixelSize: Style.fontSizeS
+ Layout.fillWidth: true
+ elide: Text.ElideRight
+ }
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ MusicModel.currentIndex = index
+ }
+ }
+ }
+ }
+}
+
diff --git a/apps/com.pelagicore.music/CoverItem.qml b/apps/com.pelagicore.music/CoverItem.qml
new file mode 100644
index 00000000..b3cce7c9
--- /dev/null
+++ b/apps/com.pelagicore.music/CoverItem.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+import QtGraphicalEffects 1.0
+import utils 1.0
+import controls 1.0
+
+Control {
+ id: root
+ width: Style.hspan(6)
+ height: Style.isPotrait ? Style.vspan(5) : Style.vspan(10)
+ signal clicked()
+ property alias source: image.source
+ property alias title: title.text
+ property alias subTitle: subTitle.text
+
+ ColumnLayout {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 0
+ Item {
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: Style.hspan(5)
+ height: width
+ Rectangle {
+ anchors.fill: parent
+ color: Style.colorWhite
+ border.color: Qt.darker(color, 1.2)
+ }
+ Image {
+ id: image
+ anchors.fill: parent
+ anchors.margins: Style.paddingXS
+ fillMode: Image.PreserveAspectCrop
+ asynchronous: true
+ }
+ }
+ Label {
+ id: title
+ Layout.fillWidth: true
+ horizontalAlignment: Text.AlignHCenter
+ font.weight: Font.Light
+ opacity: 0.5
+ }
+ Label {
+ id: subTitle
+ Layout.fillWidth: true
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: Style.fontSizeS
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: root.clicked()
+ }
+}
diff --git a/apps/com.pelagicore.music/CurrentTrackScreen.qml b/apps/com.pelagicore.music/CurrentTrackScreen.qml
new file mode 100644
index 00000000..9b4572b2
--- /dev/null
+++ b/apps/com.pelagicore.music/CurrentTrackScreen.qml
@@ -0,0 +1,285 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.1
+import controls 1.0
+import utils 1.0
+import "models"
+import "."
+
+UIScreen {
+ id: root
+ objectName: 'CurrentTrackScreen'
+ width: Style.hspan(24)
+ height: Style.vspan(24)
+
+ property var track: MusicModel.currentEntry
+ property bool libraryVisible: false
+
+ signal showAlbums()
+
+
+ ColumnLayout {
+ id: musicControl
+ width: Style.hspan(12)
+ height: Style.vspan(16)
+ anchors.centerIn: parent
+ spacing: Style.isPotrait ? Style.vspan(1) : 0
+ RowLayout {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 0
+ Tool {
+ Layout.preferredWidth: Style.hspan(2)
+ symbol: 'prev'
+ onClicked: { MusicModel.previous() }
+ }
+
+ TrackSwipeView {
+ contentWidth: Style.hspan(6)
+
+ Layout.preferredWidth: Style.hspan(6)
+ Layout.preferredHeight: Style.isPotrait ? Style.vspan(5) : Style.vspan(10)
+ model: MusicModel.nowPlaying
+
+ currentIndex: MusicModel.currentIndex
+
+ delegate: CoverItem {
+ z: PathView.z
+ scale: PathView.scale
+ source: model.item.coverArtUrl
+ title: model.item.title
+ subTitle: model.item.artist
+ onClicked: {
+ root.showAlbums()
+ }
+ }
+ }
+
+ Tool {
+ Layout.preferredWidth: Style.hspan(2)
+ symbol: 'next'
+ onClicked: { MusicModel.next() }
+ }
+ }
+
+ RowLayout {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: Style.hspan(0.5)
+
+ Label {
+ Layout.preferredWidth: Style.hspan(1)
+ text: MusicModel.currentTime
+ }
+
+ Slider {
+ id: slider
+ Layout.preferredWidth: Style.hspan(9)
+ value: MusicModel.position
+ from: 0.00
+ to: MusicModel.duration
+ Layout.preferredHeight: Style.vspan(1)
+ function valueToString() {
+ return Math.floor(value/60000) + ':' + Math.floor((value/1000)%60)
+ }
+ onValueChanged: {
+ MusicModel.position = value
+ }
+ }
+
+ Label {
+ Layout.preferredWidth: Style.hspan(1)
+ text: MusicModel.durationTime
+ font.pixelSize: Style.fontSizeS
+ }
+ }
+
+ RowLayout {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 0
+ Tool {
+ Layout.preferredWidth: Style.hspan(2)
+ symbol: 'shuffle'
+ checked: MusicModel.shuffleOn
+ onClicked: MusicModel.toggleShuffle()
+ size: Style.symbolSizeXS
+ }
+ Spacer { Layout.preferredWidth: Style.hspan(2) }
+ Tool {
+ Layout.preferredWidth: Style.hspan(2)
+ symbol: MusicModel.playing?'pause':'play'
+ onClicked: MusicModel.togglePlay()
+ }
+ Spacer { Layout.preferredWidth: Style.hspan(2) }
+ Tool {
+ Layout.preferredWidth: Style.hspan(2)
+ symbol: 'loop'
+ checked: MusicModel.repeatOn
+ onClicked: MusicModel.toggleRepeat()
+ size: Style.symbolSizeXS
+ }
+ }
+ RowLayout {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 0
+ Symbol {
+ Layout.preferredWidth: Style.hspan(1)
+ size: Style.symbolSizeXS
+ name: 'speaker'
+ }
+ VolumeSlider {
+ id: volumeSlider
+ Layout.preferredWidth: Style.hspan(8)
+ Layout.preferredHeight: Style.vspan(2)
+ anchors.horizontalCenter: parent.horizontalCenter
+ value: 1 //MusicModel.volume
+// onValueChanged: {
+// MusicModel.volume = value
+// }
+ }
+ Label {
+ Layout.preferredWidth: Style.hspan(1)
+ horizontalAlignment: Text.AlignHCenter
+ height: Style.vspan(2)
+ text: Math.floor(volumeSlider.value*100)
+ }
+ }
+ Spacer {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ }
+ }
+
+ IndexerStatus {
+ anchors.horizontalCenter: musicControl.horizontalCenter
+ }
+
+ Library {
+ id: library
+ x: parent.width
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.topMargin: Style.vspan(2)
+ opacity: 0
+ visible: opacity > 0
+ onClose: {
+ root.libraryVisible = false
+ }
+ }
+
+ Control {
+ width: Style.hspan(4)
+ height: Style.vspan(12)
+ anchors.right: musicControl.left
+ anchors.rightMargin: Style.hspan(1)
+ anchors.verticalCenter: parent.verticalCenter
+ ColumnLayout {
+ anchors.fill: parent
+ ToolButton {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ text: "BLUETOOTH"
+ font.pixelSize: Style.fontSizeL
+ }
+ ToolButton {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ text: "USB"
+ enabled: false
+ font.pixelSize: Style.fontSizeL
+ }
+ ToolButton {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ text: "SPOTIFY"
+ enabled: false
+ font.pixelSize: Style.fontSizeL
+ }
+ }
+ }
+
+ Tool {
+ id: libraryButton
+ width: Style.hspan(3)
+ height: Style.vspan(5)
+ anchors.left: musicControl.right
+ anchors.leftMargin: Style.hspan(1)
+ anchors.verticalCenter: parent.verticalCenter
+ size: Style.symbolSizeM
+
+ symbol: "music"
+
+ onClicked: root.libraryVisible = true
+ }
+
+ states: State {
+ name: "libaryMode"; when: root.libraryVisible
+
+ PropertyChanges {
+ target: library
+ opacity: 1
+ x: root.width - library.width
+ }
+
+ PropertyChanges {
+ target: libraryButton
+ opacity: 0
+ }
+
+ PropertyChanges {
+ target: sourceOption
+ opacity: 0
+ }
+
+ AnchorChanges {
+ target: musicControl
+ anchors.horizontalCenter: undefined
+ }
+
+ PropertyChanges {
+ target: musicControl
+ x: 0
+ }
+ }
+
+ transitions: Transition {
+ from: ""; to: "libaryMode"; reversible: true
+
+ ParallelAnimation {
+ NumberAnimation { target: library; properties: "opacity"; duration: 400 }
+ NumberAnimation { target: library; properties: "x"; duration: 300 }
+ NumberAnimation { target: libraryButton; properties: "opacity"; duration: 300 }
+ NumberAnimation { target: sourceOption; properties: "opacity"; duration: 300 }
+ NumberAnimation { target: musicControl; properties: "x"; duration: 300 }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.music/IndexerStatus.qml b/apps/com.pelagicore.music/IndexerStatus.qml
new file mode 100644
index 00000000..4d8b4651
--- /dev/null
+++ b/apps/com.pelagicore.music/IndexerStatus.qml
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.1
+
+import controls 1.0
+import utils 1.0
+import "."
+
+import QtIvi.Media 1.0
+
+Rectangle {
+ width: Style.vspan(10)
+ height: Style.hspan(1)
+
+ color: "black"
+ opacity: indexerControl.state === MediaIndexerControl.Active ? 0.4 : 0
+ Behavior on opacity {
+ NumberAnimation { duration: 800 }
+ }
+
+ MediaIndexerControl {
+ id: indexerControl
+ }
+
+ Column {
+ anchors.fill: parent
+ spacing: 2
+
+ Label {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "Indexing..."
+ }
+
+ Item {
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: Style.vspan(8)
+ height: 4
+
+ Rectangle {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ width: parent.width
+ height: 4
+ radius: 4
+ border.color: Qt.lighter(color, 1.1)
+ color: "#999"
+ opacity: 0.25
+ }
+
+ Rectangle {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ width: parent.width * indexerControl.progress
+ height: 4
+ radius: 4
+ color: "white"
+ opacity: 0.25
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.music/Library.qml b/apps/com.pelagicore.music/Library.qml
new file mode 100644
index 00000000..0382557e
--- /dev/null
+++ b/apps/com.pelagicore.music/Library.qml
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+
+import controls 1.0
+import utils 1.0
+import "."
+
+Control {
+ id: root
+ width: Style.hspan(12)
+ height: Style.vspan(22)
+
+ signal close()
+
+ Rectangle {
+ anchors.fill: parent
+ color: "black"
+ }
+
+ Tool {
+ id: closeButton
+ height: Style.vspan(1)
+ width: Style.hspan(1)
+
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.topMargin: Style.vspan(2)
+ symbol: 'close'
+ size: Style.symbolSizeS
+ onClicked: root.close()
+ }
+
+ TabView {
+ id: tabView
+ width: root.width
+ height: root.height
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ tabWidth: Style.hspan(4)
+ viewLeftMargin: letterPicker.width
+ tabs: [
+ { title : "PLAYING", url : nowPlaying, properties : {} },
+ { title : "ARTISTS", url : library, properties : { type: "artists" } },
+ { title : "ALBUMS", url : library, properties : { type: "albums" } },
+ { title : "SONGS", url : library, properties : { type: "songs" } },
+ ]
+
+ }
+
+ LetterPicker {
+ id: letterPicker
+ height: root.height - tabView.tabHeight
+ anchors.left: parent.left
+ anchors.leftMargin: 5
+ anchors.bottom: parent.bottom
+ numOfVisibleLetters: 17
+ }
+
+ LibraryList {
+ id: nowPlaying
+ visible: false
+ nowPlaying: true
+ }
+
+ Component {
+ id: library
+ LibraryList {
+ visible: false
+ }
+ }
+}
+
diff --git a/apps/com.pelagicore.music/LibraryList.qml b/apps/com.pelagicore.music/LibraryList.qml
new file mode 100644
index 00000000..5088ac64
--- /dev/null
+++ b/apps/com.pelagicore.music/LibraryList.qml
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+import QtIvi 1.0
+
+import controls 1.0
+import utils 1.0
+import "models"
+import "."
+
+Control {
+ id: root
+ width: Style.hspan(10)
+ height: Style.vspan(18)
+
+ property string type: ""
+ property bool nowPlaying: false
+ property SearchAndBrowseModel model: SearchAndBrowseModel {
+ contentType: ""
+ onContentTypeChanged: console.log(Logging.apps, "CONTENT TYPE CHANGE: ", contentType)
+ serviceObject: MusicModel.player.serviceObject
+ }
+
+ onTypeChanged: {
+ if (type === "songs")
+ model.contentType = "track"
+ else if (type === "artists")
+ model.contentType = "artist"
+ else if (type === "albums")
+ model.contentType = "album"
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: "black"
+ }
+
+ ListView {
+ id: listView
+ anchors.fill: parent
+ model: root.nowPlaying ? MusicModel.nowPlaying : root.model
+ clip: true
+ highlightMoveDuration: 300
+ highlightFollowsCurrentItem: false
+ snapMode: ListView.SnapOneItem
+ currentIndex: nowPlaying ? MusicModel.currentIndex : -1
+
+ header: UIElement {
+ width: root.width
+ height: Style.vspan(root.model.canGoBack ? 3 : 0)
+ visible: root.model.canGoBack
+
+ Rectangle {
+ width: parent.width
+ height: 1
+ opacity: 0.2
+ color: "white"
+ }
+
+ Tool {
+ anchors.fill: parent
+ symbol: 'back'
+ onClicked: root.model.goBack()
+ }
+ }
+
+ delegate: Control {
+ width: root.width
+ height: Style.vspan(3)
+
+ Rectangle {
+ anchors.fill: parent
+ opacity: 0.2
+ visible: listView.currentIndex === index
+ }
+
+ Rectangle {
+ width: parent.width
+ height: 1
+ opacity: 0.2
+ color: "white"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (root.nowPlaying) {
+ MusicModel.currentIndex = index
+ MusicModel.player.play()
+ } else {
+ if (item.type === "audiotrack") {
+ MusicModel.nowPlaying.insert(MusicModel.nowPlaying.count, model.item)
+ MusicModel.player.play()
+ } else {
+ root.model.goForward(model.index, SearchAndBrowseModel.InModelNavigation)
+ }
+ }
+ }
+ }
+
+ Row {
+ anchors.verticalCenter: parent.verticalCenter
+ padding: Style.padding
+ spacing: 0
+ Icon {
+ width: height
+ height: Style.vspan(3)
+ fit: true
+ source: model.item.coverArtUrl ? model.item.coverArtUrl : model.item.data.coverArtUrl
+ }
+
+ Column {
+ spacing: 0
+ padding: Style.padding
+ Label {
+ width: Style.hspan(7)
+ height: Style.vspan(2)
+ text: model.name.toUpperCase()
+ font.pixelSize: Style.fontSizeM
+ }
+
+ Label {
+ width: Style.hspan(7)
+ height: Style.vspan(1)
+ text: model.type === "audiotrack" ? model.item.artist.toUpperCase() : (model.type === "album" ? model.item.data.artist.toUpperCase() : "")
+ font.pixelSize: Style.fontSizeS
+ font.bold: true
+ }
+ }
+
+ Tool {
+ width: Style.hspan(1)
+ height: Style.vspan(3)
+ size: Style.symbolSizeS
+ symbol: "close"
+ visible: root.nowPlaying
+ onClicked: MusicModel.nowPlaying.remove(index)
+ }
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.music/Music.qml b/apps/com.pelagicore.music/Music.qml
new file mode 100644
index 00000000..6b172b14
--- /dev/null
+++ b/apps/com.pelagicore.music/Music.qml
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import utils 1.0
+
+AppUIScreen {
+ id: root
+ title: "Triton Music Player"
+
+ color: "transparent"
+
+ Component.onCompleted: {
+ root.setWindowProperty("windowType", "widget");
+ }
+
+ Rectangle {
+ opacity: 0.3
+ color: "blue"
+ anchors.fill: parent
+
+ Rectangle {
+ color: touchPoint1.pressed ? "red" : "green"
+ anchors.fill: parent
+ anchors.margins: 30
+ }
+ }
+
+ MultiPointTouchArea {
+ anchors.fill: parent
+ touchPoints: [ TouchPoint { id: touchPoint1 } ]
+
+ property int count: 0
+ onReleased: {
+ count += 1;
+ root.setWindowProperty("activationCount", count);
+ }
+ }
+}
+
+
+/*
+import controls 1.0
+import utils 1.0
+import "models"
+import "."
+
+AppUIScreen {
+ id: root
+ title: "Triton Music Player"
+
+ onClusterKeyPressed: {
+ if (key === Qt.Key_Down) {
+ MusicModel.next()
+ }
+ else if (key === Qt.Key_Up) {
+ MusicModel.previous()
+ }
+ }
+
+ cluster: ClusterWidget {}
+
+
+ AppStackView {
+ id: stack
+ anchors.fill: parent
+ initialItem: currentTrack
+ Component {
+ id: currentTrack
+ CurrentTrackScreen {
+ onBackScreen: {
+ root.back()
+ }
+ onShowAlbums: {
+ stack.push(albums)
+ }
+ }
+ }
+
+ Component {
+ id: albums
+ AlbumScreen {
+ onBackScreen: {
+ stack.pop()
+ }
+
+ }
+ }
+ }
+}
+*/
diff --git a/apps/com.pelagicore.music/PlaylistContainer.qml b/apps/com.pelagicore.music/PlaylistContainer.qml
new file mode 100644
index 00000000..34fc149a
--- /dev/null
+++ b/apps/com.pelagicore.music/PlaylistContainer.qml
@@ -0,0 +1,151 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+
+import utils 1.0
+import controls 1.0
+import "models"
+import "."
+
+RowLayout {
+ id: playListContainer
+
+ signal clicked(int index)
+
+ spacing: 5
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.topMargin: Style.vspan(1)
+ height: Style.vspan(16)
+ width: Style.hspan(5)
+ anchors.rightMargin: expanded ? Style.hspan(0) : -Style.hspan(4)
+ Behavior on anchors.rightMargin {
+ NumberAnimation { easing.type: Easing.InCirc; duration: 250 }
+ }
+
+ property bool expanded: false
+
+ function toggleExpand() {
+ expanded = !expanded
+ }
+
+ Tool {
+ symbol: 'music'
+ Layout.alignment: Qt.AlignTop
+ onClicked: {
+ playListContainer.toggleExpand()
+ }
+ }
+ Timer {
+ id: closer
+ interval: 3000
+ onTriggered: {
+ playListContainer.expanded = false
+ }
+ }
+ Rectangle {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ color: '#000'
+ anchors.margins: -Style.padding
+ ListView {
+ id: playListView
+ anchors.fill: parent
+ clip: true
+ model: MusicModel.model
+ currentIndex: MusicModel.currentIndex
+ highlight: Rectangle {
+ color: Style.colorWhite; opacity: 0.25
+ border.color: Qt.lighter(color, 1.2)
+ }
+ highlightMoveDuration: 75
+ delegate: Control {
+ width: Style.hspan(5)
+ height: Style.vspan(2)
+ RowLayout {
+ anchors.fill: parent
+ spacing: 0
+ Item {
+ Layout.fillHeight: true
+ width: Style.hspan(1)
+ Item {
+ anchors.fill: parent
+ anchors.margins: Style.padding
+ Rectangle {
+ anchors.fill: parent
+ anchors.leftMargin: -6
+ anchors.rightMargin: -6
+ anchors.topMargin: -2
+ anchors.bottomMargin: -2
+ color: Style.colorWhite
+ }
+
+ Image {
+ anchors.centerIn: parent
+ height: parent.height
+ width: parent.height
+ source: MusicModel.coverPath(model.cover)
+ fillMode: Image.PreserveAspectCrop
+ asynchronous: true
+ }
+ }
+ }
+ ColumnLayout {
+ spacing: 0
+ Label {
+ text: model.title
+ font.pixelSize: Style.fontSizeXS
+ opacity: 0.5
+ elide: Text.ElideRight
+ Layout.fillWidth: true
+ }
+ Label {
+ text: model.artist
+ font.pixelSize: Style.fontSizeS
+ Layout.fillWidth: true
+ elide: Text.ElideRight
+ }
+ }
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ playListContainer.clicked(index)
+ closer.restart()
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.music/TrackSwipeView.qml b/apps/com.pelagicore.music/TrackSwipeView.qml
new file mode 100644
index 00000000..cc9dc3d2
--- /dev/null
+++ b/apps/com.pelagicore.music/TrackSwipeView.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.1
+
+import utils 1.0
+
+PathView {
+ id: root
+
+ property int contentWidth: Style.hspan(4)
+
+ property int padding: (width-root.contentWidth)/2
+
+ clip: true
+
+ snapMode: PathView.SnapOneItem
+
+ pathItemCount: 3
+
+ preferredHighlightBegin: 0.5
+ preferredHighlightEnd: 0.5
+
+ path: Path {
+ startX: -root.contentWidth+root.padding
+ startY: root.height/2
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: -100 }
+ PathAttribute { name: "z"; value: 0 }
+ PathAttribute { name: "yTranslate"; value: Style.vspan(4) }
+
+ PathLine { x: root.width/2; y: root.height/2 }
+ PathAttribute { name: "scale"; value: 1 }
+ PathAttribute { name: "angle"; value: 0 }
+ PathAttribute { name: "z"; value: 1 }
+ PathAttribute { name: "yTranslate"; value: 0 }
+
+ PathLine { x: root.width + root.contentWidth-root.padding; y: root.height/2 }
+ PathAttribute { name: "scale"; value: 0.5 }
+ PathAttribute { name: "angle"; value: 100 }
+ PathAttribute { name: "z"; value: 0 }
+ PathAttribute { name: "yTranslate"; value: Style.vspan(4) }
+ }
+}
diff --git a/apps/com.pelagicore.music/icon.png b/apps/com.pelagicore.music/icon.png
new file mode 100644
index 00000000..77bd3dfc
--- /dev/null
+++ b/apps/com.pelagicore.music/icon.png
Binary files differ
diff --git a/apps/com.pelagicore.music/info.yaml b/apps/com.pelagicore.music/info.yaml
new file mode 100644
index 00000000..1fb02312
--- /dev/null
+++ b/apps/com.pelagicore.music/info.yaml
@@ -0,0 +1,12 @@
+formatVersion: 1
+formatType: am-application
+---
+id: 'com.pelagicore.music'
+icon: 'icon.png'
+code: 'Music.qml'
+runtime: 'qml'
+name:
+ en: 'Music'
+ de: 'Musik'
+
+categories: [ 'media' ]
diff --git a/apps/com.pelagicore.music/models/MusicModel.qml b/apps/com.pelagicore.music/models/MusicModel.qml
new file mode 100644
index 00000000..871c80a2
--- /dev/null
+++ b/apps/com.pelagicore.music/models/MusicModel.qml
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.6
+import QtApplicationManager 1.0
+import QtIvi 1.0
+import QtIvi.Media 1.0
+import utils 1.0
+
+QtObject {
+ id: root
+
+ property alias nowPlaying: player.playQueue
+
+ property MediaPlayer player: MediaPlayer {
+ id: player
+ }
+
+ property int currentIndex: player.playQueue.currentIndex
+ onCurrentIndexChanged: {
+ player.playQueue.currentIndex = currentIndex
+ }
+
+ property Connections con: Connections {
+ target: player.playQueue
+ onCurrentIndexChanged: {
+ root.currentIndex = currentIndex
+ }
+
+ onRowsInserted: {
+ console.log(Logging.apps, "ROW INSERTED: NEW INDEX: ", first)
+ player.playQueue.currentIndex = first;
+ }
+ }
+
+ property int count: player.playQueue.count
+ property var currentEntry: player.currentTrack;
+ property alias position: player.position
+ property alias duration: player.duration
+ property string currentTime: Qt.formatTime(new Date(player.position), 'mm:ss')
+ property string durationTime: Qt.formatTime(new Date(player.duration), 'mm:ss')
+
+ property bool shuffleOn: player.playMode === MediaPlayer.Shuffle
+ property bool repeatOn: player.playMode === MediaPlayer.RepeatTrack
+
+ function next() {
+ console.log(Logging.apps, 'MusicModel.nextTrack()')
+ player.next()
+ }
+
+ function previous() {
+ console.log(Logging.apps, 'MusicModel.previousTrack()')
+ player.previous()
+ }
+
+ property bool playing: player.playState === MediaPlayer.Playing
+
+ function togglePlay() {
+ if (root.playing)
+ player.pause()
+ else
+ player.play();
+ }
+
+ function toggleShuffle() {
+ if (shuffleOn)
+ player.playMode = MediaPlayer.Normal
+ else
+ player.playMode = MediaPlayer.Shuffle
+ }
+
+ function toggleRepeat() {
+ if (repeatOn)
+ player.playMode = MediaPlayer.Normal
+ else
+ player.playMode = MediaPlayer.RepeatTrack
+ }
+
+ property Item ipc: Item {
+ ApplicationInterfaceExtension {
+ id: musicRemoteControl
+
+ name: "com.pelagicore.music.control"
+ }
+
+ Binding { target: musicRemoteControl.object; property: "currentTrack"; value: player.currentTrack }
+ Binding { target: musicRemoteControl.object; property: "currentTime"; value: root.currentTime }
+ Binding { target: musicRemoteControl.object; property: "durationTime"; value: root.durationTime }
+ Binding { target: musicRemoteControl.object; property: "playing"; value: root.playing }
+
+ Connections {
+ target: musicRemoteControl.object
+
+ onPlay: {
+ player.play()
+ }
+
+ onPause: {
+ player.pause()
+ }
+
+ onPrevious: {
+ root.previous()
+ }
+
+ onNext: {
+ root.next()
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.music/models/qmldir b/apps/com.pelagicore.music/models/qmldir
new file mode 100644
index 00000000..4724802d
--- /dev/null
+++ b/apps/com.pelagicore.music/models/qmldir
@@ -0,0 +1 @@
+singleton MusicModel MusicModel.qml
diff --git a/apps/com.pelagicore.sheets/Main.qml b/apps/com.pelagicore.sheets/Main.qml
new file mode 100644
index 00000000..f264326d
--- /dev/null
+++ b/apps/com.pelagicore.sheets/Main.qml
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.2
+import QtQuick.Controls 2.0
+import utils 1.0
+
+AppUIScreen {
+ id: root
+ title: "Triton Sheets App"
+
+ MenuPane {
+ anchors.centerIn: parent
+
+ onBackScreen: { root.back(); }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/MenuPane.qml b/apps/com.pelagicore.sheets/MenuPane.qml
new file mode 100644
index 00000000..f2377d35
--- /dev/null
+++ b/apps/com.pelagicore.sheets/MenuPane.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Controls 2.1
+import utils 1.0
+import controls 1.0
+import Qt.labs.folderlistmodel 2.0
+
+UIScreen {
+ id: root
+
+ FolderListModel {
+ id: folderModel
+ folder: "boards"
+ nameFilters: ["*.qml"]
+ }
+
+ Frame {
+ id: navigationPane
+ width: root.width / 4
+ height: Style.vspan(20)
+ anchors.left: parent.left
+ anchors.leftMargin: Style.hspan(3)
+ anchors.top: parent.top
+ ListView {
+ id: view
+ anchors.topMargin: 20
+ anchors.fill: parent
+ model: folderModel
+ clip: true
+ delegate: ItemDelegate {
+ width: ListView.view.width
+ text: fileName
+ highlighted: ListView.isCurrentItem
+ font.pixelSize: 20
+ onClicked: {
+ view.currentIndex = index;
+ //make sure there is nothing else on the stack
+ stackView.clear();
+ stackView.replace(Qt.resolvedUrl(model.filePath));
+ }
+ }
+ }
+ }
+
+ StackView {
+ id: stackView
+ width: root.width - navigationPane.width - Style.hspan(3)
+ anchors.left: navigationPane.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ initialItem: Qt.resolvedUrl(folderModel.get(0).filePath)
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/AppButtonBoard.qml b/apps/com.pelagicore.sheets/boards/AppButtonBoard.qml
new file mode 100644
index 00000000..9b360e25
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/AppButtonBoard.qml
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0 as QControls
+import QtQuick.Layouts 1.0
+
+import controls 1.0
+import utils 1.0
+
+BaseBoard {
+ id: root
+
+ description: "App Launcher Grid Delegate Board"
+
+ Component.onCompleted: Style.debugMode = true
+ ColumnLayout {
+
+ AppButton {
+ icon: Style.icon("widgets_phone")
+ name: "Hello World"
+ onClicked: console.log(Logging.apps,"Clicked")
+ }
+
+ AppButton {
+ icon: Style.icon("widgets_phone")
+ name: "Downloading"
+ installProgress: slider.valueAt(slider.position)
+ }
+
+ QControls.Slider {
+ id: slider
+ Layout.fillWidth: true
+ }
+
+ AppButton {
+ icon: Style.icon("widgets_phone")
+ name: "Edit Mode"
+ editMode: true
+ onRemoveClicked: console.log(Logging.apps,"Remove clicked")
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/AssetsBoard.qml b/apps/com.pelagicore.sheets/boards/AssetsBoard.qml
new file mode 100644
index 00000000..5b8eb833
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/AssetsBoard.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+import Qt.labs.folderlistmodel 2.0
+import utils 1.0
+
+BaseBoard {
+
+ Item {
+ id: content
+ anchors.fill: parent
+ FolderListModel {
+ id: folderModel
+ folder: Qt.resolvedUrl(Style.assetPath + "drawable-ldpi")
+ }
+ GridView {
+ anchors.fill: parent
+ anchors.margins: 32
+ clip: true
+ cellWidth: 72; cellHeight: 72
+ model: folderModel
+ delegate: Image {
+ width: 64; height: 64; source: Style.icon(model.fileBaseName)
+ fillMode: Image.PreserveAspectFit
+ asynchronous: true
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/BaseBoard.qml b/apps/com.pelagicore.sheets/boards/BaseBoard.qml
new file mode 100644
index 00000000..e2b5e3fc
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/BaseBoard.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+
+Page {
+ id: root
+
+ default property alias content: content.children
+
+ property alias description: label.text
+
+ header: Label {
+ id: label
+ padding: 20
+ wrapMode: Label.Wrap
+ font.pixelSize: 20
+ }
+
+ Item {
+ id: content
+ anchors.top: parent.top
+ anchors.topMargin: Style.vspan(2)
+ anchors.margins: Style.padding
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/ButtonBoard.qml b/apps/com.pelagicore.sheets/boards/ButtonBoard.qml
new file mode 100644
index 00000000..39b35f16
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/ButtonBoard.qml
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+
+import controls 1.0
+import utils 1.0
+
+BaseBoard {
+ id: root
+
+ description: " The push button is perhaps the most commonly used widget in any" +
+ " graphical user interface. Pushing (or clicking) a button commands the computer" +
+ " to perform some action or answer a question. Common examples of buttons are OK," +
+ " Apply, Cancel, Close, Yes, No, and Help buttons."
+
+ Flickable {
+ id: scrollView
+ anchors.fill: parent
+
+ flickableDirection: Flickable.VerticalFlick
+ contentWidth: layout.width; contentHeight: layout.height
+
+ GridLayout {
+ id: layout
+
+ width: parent.width
+
+ rowSpacing: Style.paddingXL
+ columnSpacing: Style.padding
+
+ columns: 2
+
+ Label { width: Style.hspan(8); text: "No Text, No Icon, grid 2x2" }
+ Button {
+ Layout.preferredWidth: Style.hspan(2)
+ Layout.preferredHeight: Style.vspan(2)
+ width: Style.hspan(2); height: Style.vspan(2)
+
+ Marker { anchors.fill: parent; visible: parent.pressed }
+ Tracer { visible: true }
+ }
+
+ Label { width: Style.hspan(8); text: "Only text, grid 2x1" }
+ Button {
+ Layout.preferredWidth: Style.hspan(2)
+ Layout.preferredHeight: Style.vspan(1)
+ width: Style.hspan(2); height: Style.vspan(1)
+ text: "Press me"
+
+ Marker { anchors.fill: parent; visible: parent.pressed }
+ }
+
+ Label { width: Style.hspan(8); text: "Only icon, grid 1x2" }
+ Button {
+ Layout.preferredWidth: Style.hspan(1)
+ Layout.preferredHeight: Style.vspan(2)
+ width: Style.hspan(1); height: Style.vspan(2)
+
+ Marker { anchors.fill: parent; visible: parent.pressed }
+ }
+
+ Label { width: Style.hspan(8); text: "Text & Icon, grid 3x3" }
+ Button {
+ Layout.preferredWidth: Style.hspan(3)
+ Layout.preferredHeight: Style.vspan(3)
+
+ width: Style.hspan(3); height: Style.vspan(3)
+ text: "Hello World"
+
+ Marker { anchors.fill: parent; visible: parent.pressed }
+ }
+
+ Label { width: Style.hspan(8); text: "Regular Button" }
+ Button {
+ id: buttonControl
+ text: qsTr("Button")
+ width: Style.hspan(3)
+
+ onClicked: console.log(Logging.apps, "Button Clicked!");
+
+ contentItem: Label {
+ text: buttonControl.text
+ font: buttonControl.font
+ opacity: enabled ? 1.0 : 0.3
+ color: buttonControl.down ? "#db9432" : "#ffffff"
+ horizontalAlignment: Label.AlignHCenter
+ verticalAlignment: Label.AlignVCenter
+ elide: Label.ElideRight
+ }
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/ColorBoard.qml b/apps/com.pelagicore.sheets/boards/ColorBoard.qml
new file mode 100644
index 00000000..d68a524c
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/ColorBoard.qml
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.1
+import QtQuick.Layouts 1.1
+import QtQuick.Controls.impl 2.1
+
+BaseBoard {
+ id: root
+
+ description: "Colors used in UI"
+
+ property var colors: [
+ { name: "background", color: Default.backgroundColor },
+ { name: "overlayModal", color: Default.overlayModalColor },
+ { name: "overlayDim", color: Default.overlayDimColor },
+ { name: "text", color: Default.textColor },
+ { name: "textDark", color: Default.textDarkColor },
+ { name: "textLight", color: Default.textLightColor },
+ { name: "textLink", color: Default.textLinkColor },
+ { name: "textSelection", color: Default.textSelectionColor },
+ { name: "textDisabled", color: Default.textDisabledColor },
+ { name: "textDisabledLight", color: Default.textDisabledLightColor },
+ { name: "focus", color: Default.focusColor },
+ { name: "focusLight", color: Default.focusLightColor },
+ { name: "focusPressed", color: Default.focusPressedColor },
+ { name: "button", color: Default.buttonColor },
+ { name: "buttonPressed", color: Default.buttonPressedColor },
+ { name: "buttonChecked", color: Default.buttonCheckedColor },
+ { name: "buttonCheckedPressed", color: Default.buttonCheckedPressedColor },
+ { name: "buttonCheckedFocus", color: Default.buttonCheckedFocusColor },
+ { name: "toolButton", color: Default.toolButtonColor },
+ { name: "tabButton", color: Default.tabButtonColor },
+ { name: "tabButtonPressed", color: Default.tabButtonPressedColor },
+ { name: "tabButtonCheckedPressed", color: Default.tabButtonCheckedPressedColor },
+ { name: "delegate", color: Default.delegateColor },
+ { name: "delegatePressed", color: Default.delegatePressedColor },
+ { name: "delegateFocus", color: Default.delegateFocusColor },
+ { name: "indicatorPressed", color: Default.indicatorPressedColor },
+ { name: "indicatorDisabled", color: Default.indicatorDisabledColor },
+ { name: "indicatorFrame", color: Default.indicatorFrameColor },
+ { name: "indicatorFramePressed", color: Default.indicatorFramePressedColor },
+ { name: "indicatorFrameDisabled", color: Default.indicatorFrameDisabledColor },
+ { name: "frameDark", color: Default.frameDarkColor },
+ { name: "frameLight", color: Default.frameLightColor },
+ { name: "scrollBar", color: Default.scrollBarColor },
+ { name: "scrollBarPressed", color: Default.scrollBarPressedColor },
+ { name: "progressBar", color: Default.progressBarColor },
+ { name: "pageIndicator", color: Default.pageIndicatorColor },
+ { name: "separator", color: Default.separatorColor },
+ { name: "disabledDark", color: Default.disabledDarkColor },
+ { name: "disabledLight", color: Default.disabledLightColor },
+ ]
+
+ GridView {
+ id: view
+ width: parent.width
+ height: 48 * 13
+ anchors.top: parent.top
+ anchors.topMargin: 50
+ cellWidth: root.width/3
+ cellHeight: 48
+ model: root.colors
+ delegate: ColorButton {
+ width: GridView.view.cellWidth-2
+ height: GridView.view.cellHeight-2
+ text: modelData.name
+ color: modelData.color
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/ColorButton.qml b/apps/com.pelagicore.sheets/boards/ColorButton.qml
new file mode 100644
index 00000000..8b300275
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/ColorButton.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtQuick.Controls 2.1
+
+Button {
+ id: root
+
+ property color color
+
+ indicator: Rectangle {
+ anchors.right: background.right
+ width: 20
+ height: root.height
+ color: root.color
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/FrameBoard.qml b/apps/com.pelagicore.sheets/boards/FrameBoard.qml
new file mode 100644
index 00000000..0ade9954
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/FrameBoard.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick.Controls 2.1
+import QtQuick.Layouts 1.1
+
+BaseBoard {
+ id: root
+
+ description: "Frame is used to layout a logical group of controls together within a visual frame."
+
+ Frame {
+ anchors.top: parent.top
+ anchors.topMargin: 150
+ anchors.horizontalCenter: parent.horizontalCenter
+ ColumnLayout {
+ anchors.fill: parent
+ CheckBox {
+ id: checkBox1
+ text: qsTr("E-mail");
+ font.pixelSize: 20;
+ contentItem: Label {
+ text: checkBox1.text
+ font: checkBox1.font
+ opacity: enabled ? 1.0 : 0.3
+ color: checkBox1.down ? "#9e6a22" : "#db9432"
+ horizontalAlignment: Label.AlignHCenter
+ verticalAlignment: Label.AlignVCenter
+ leftPadding: checkBox1.indicator.width + checkBox1.spacing
+ }
+ }
+
+ CheckBox {
+ id: checkBox2
+ text: qsTr("Calendar");
+ font.pixelSize: 20;
+ contentItem: Label {
+ text: checkBox2.text
+ font: checkBox2.font
+ opacity: enabled ? 1.0 : 0.3
+ color: checkBox2.down ? "#9e6a22" : "#db9432"
+ horizontalAlignment: Label.AlignHCenter
+ verticalAlignment: Label.AlignVCenter
+ leftPadding: checkBox2.indicator.width + checkBox2.spacing
+ }
+ }
+
+ CheckBox {
+ id: checkBox3
+ text: qsTr("Contacts");
+ font.pixelSize: 20;
+ contentItem: Label {
+ text: checkBox3.text
+ font: checkBox3.font
+ opacity: enabled ? 1.0 : 0.3
+ color: checkBox3.down ? "#9e6a22" : "#db9432"
+ horizontalAlignment: Label.AlignHCenter
+ verticalAlignment: Label.AlignVCenter
+ leftPadding: checkBox3.indicator.width + checkBox3.spacing
+ }
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/IconBoard.qml b/apps/com.pelagicore.sheets/boards/IconBoard.qml
new file mode 100644
index 00000000..38a1dacc
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/IconBoard.qml
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+
+BaseBoard {
+ id: root
+
+ description: "Icon Board"
+
+ Grid {
+ anchors.fill: parent; anchors.margins: Style.padding
+ rowSpacing: Style.padding
+ columns: 2
+
+ // Test icon w/o specifying any width/height
+ Label {
+ text: "No w/h specified"
+ font.pixelSize: Style.fontSizeXS
+ }
+ Icon {
+ height: Style.vspan(2)
+ source: Style.icon("climatebar_icon_seating_person")
+ }
+
+ // Test specify a width/height greater than the image's width/height
+ Label {
+ text: "w/h > image's w/h"
+ font.pixelSize: Style.fontSizeXS
+ }
+ Icon {
+ width: Style.hspan(3); height: Style.vspan(3)
+ source: Style.icon("climatebar_icon_seating_person")
+ }
+
+ // Test specifying a width/height which is less than the image's width/height
+ Label {
+ text: "w/h < image's w/h, w/ manual clip"
+ font.pixelSize: Style.fontSizeXS
+ }
+ Icon {
+ source: Style.icon("climatebar_icon_seating_person")
+ width: Style.hspan(1); height: Style.vspan(1)
+ clip: true
+ }
+
+ // Test specifying a width/height which is less than the image's width/height
+ Label {
+ text: "w/h < image's w/h, w/o clip"
+ font.pixelSize: Style.fontSizeXS
+ }
+ Icon {
+ source: Style.icon("climatebar_icon_seating_person")
+ Layout.preferredWidth: 30; Layout.preferredHeight: 30
+ }
+
+
+ // Test icon w/o specifying any width/height but use anchoring
+ Label {
+ text: "anchor to parent"
+ font.pixelSize: Style.fontSizeXS
+ }
+ Item {
+ width: Style.hspan(3); height: Style.vspan(3)
+
+ Icon {
+ source: Style.icon("climatebar_icon_seating_person")
+ anchors.fill: parent
+ Tracer {visible:true}
+ }
+ }
+
+ // Test disable w/o a disable image
+ Label {
+ text: "Opacity on disabled"
+ font.pixelSize: Style.fontSizeXS
+ }
+ Item {
+ width: disableEnableOpacityIcon.width; height: disableEnableOpacityIcon.height
+
+ Icon {
+ id: disableEnableOpacityIcon
+
+ height: Style.vspan(2)
+ source: Style.icon("climatebar_icon_seating_person")
+ enabled: false
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: disableEnableOpacityIcon.enabled = !disableEnableOpacityIcon.enabled
+ }
+ }
+
+ // Test disable w/ a disable image
+ Label {
+ text: "Image on disabled"
+ font.pixelSize: Style.fontSizeXS
+ }
+ Item {
+ width: disableEnableImageIcon.width; height: disableEnableImageIcon.height
+
+ Icon {
+ id: disableEnableImageIcon
+
+ height: Style.vspan(2)
+ source: Style.icon ("climatebar_icon_seating_person")
+ enabled: false
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: disableEnableImageIcon.enabled = !disableEnableImageIcon.enabled
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/LabelBoard.qml b/apps/com.pelagicore.sheets/boards/LabelBoard.qml
new file mode 100644
index 00000000..1ba0b9b0
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/LabelBoard.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+
+BaseBoard {
+ id: root
+
+ description: "Label Board"
+
+ Component.onCompleted: Style.debugMode = true
+
+ ColumnLayout {
+ anchors.fill: parent; anchors.margins: Style.padding
+ anchors.topMargin: 50
+
+ Label {
+ text: "Hello World"
+ }
+
+ Label {
+ Layout.fillWidth: true
+ text: "HorizontalAlignment = Text.AlignCenter"
+ horizontalAlignment: Text.AlignHCenter
+ }
+
+ Label {
+ height: Style.vspan(3)
+ width: Style.hspan(5)
+ text: "vspan=3, hspan=5"
+ }
+
+ Spacer {
+ Layout.fillHeight: true
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/LetterPickerBoard.qml b/apps/com.pelagicore.sheets/boards/LetterPickerBoard.qml
new file mode 100644
index 00000000..4a5b5a54
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/LetterPickerBoard.qml
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import utils 1.0
+import controls 1.0
+
+BaseBoard {
+
+ description: "Letter Picker"
+
+ LetterPicker {
+
+ }
+}
+
diff --git a/apps/com.pelagicore.sheets/boards/ListItemBoard.qml b/apps/com.pelagicore.sheets/boards/ListItemBoard.qml
new file mode 100644
index 00000000..8fdef413
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/ListItemBoard.qml
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+import controls 1.0
+import utils 1.0
+
+BaseBoard {
+ width: 800
+
+ description: "List Items"
+
+ Flickable {
+ id: scrollView
+ anchors.fill: parent
+
+ flickableDirection: Flickable.VerticalFlick
+ contentWidth: layout.width;
+ contentHeight: layout.height
+
+ ColumnLayout {
+ id: layout
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ ListViewManager {
+ id: categoryListView
+ width: Style.hspan(6)
+ height: Style.vspan(8)
+ model: 5
+ header: Label {
+ width: parent.width
+ text: "Category List Item"
+ }
+
+ delegate: CategoryListItem {
+ width: Style.hspan(6)
+ height: Style.vspan(3)
+
+ text: "CATEGORY ITEM #" + (index + 1)
+ symbol: "tire_pressure"
+ onClicked: categoryListView.currentIndex = index
+ }
+
+ }
+
+ ListViewManager {
+ id: settingsListView
+ width: Style.hspan(6)
+ height: Style.vspan(8)
+ model: 6
+ header: Label {
+ width: parent.width
+ text: "Settings List Item"
+ }
+
+ delegate: SettingsItemDelegate {
+ width: Style.hspan(6)
+ height: Style.vspan(2)
+ checkable: index%2 === 0 ? true : false
+ text: index%2 === 0 ? "Settings item with check option": "Settings item without check option"
+ icon: "tire_pressure"
+ }
+
+ }
+
+ ListViewManager {
+ id: listView
+ width: Style.hspan(11)
+ height: Style.vspan(8)
+ model: ListModel {
+ ListElement {
+ text: "Normal List Item"
+ }
+ ListElement {
+ text: "Normal List Item"
+ }
+ ListElement {
+ text: "Normal List Item"
+ }
+ ListElement {
+ text: "Normal List Item"
+ }
+ ListElement {
+ text: "Normal List Item"
+ }
+ }
+
+ header: Label {
+ width: parent.width
+ text: "Settings List Item"
+ }
+
+ delegate: ListItem {
+ width: Style.hspan(11)
+ height: Style.vspan(2)
+
+ titleText: "Normal List Item"
+ iconName: Style.symbol("tire_pressure", Style.defaultSymbolSize, false)
+ }
+
+ }
+
+ ListView {
+ model: 10
+ width: Style.hspan(11)
+ height: Style.vspan(8)
+
+ delegate: ItemDelegate {
+ font.pixelSize: 20
+ text: modelData
+ highlighted: ListView.isCurrentItem
+ onClicked: currentIndex = index
+ }
+ }
+ }
+ }
+
+}
diff --git a/apps/com.pelagicore.sheets/boards/PaneBoard.qml b/apps/com.pelagicore.sheets/boards/PaneBoard.qml
new file mode 100644
index 00000000..b963e5ad
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/PaneBoard.qml
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick.Controls 2.1
+import QtQuick.Layouts 1.1
+
+BaseBoard {
+ id: root
+
+ description: "Pane provides a background color that matches with the application style" +
+ " and theme. Pane does not provide a layout of its own, but requires you to" +
+ " position its contents, for instance by creating a RowLayout or a ColumnLayout."
+
+ Pane {
+ anchors.top: parent.top
+ anchors.topMargin: 150
+ anchors.horizontalCenter: parent.horizontalCenter
+ ColumnLayout {
+ anchors.fill: parent
+ CheckBox {
+ id: checkBox1
+ text: qsTr("E-mail");
+ font.pixelSize: 20;
+ contentItem: Label {
+ text: checkBox1.text
+ font: checkBox1.font
+ opacity: enabled ? 1.0 : 0.3
+ color: checkBox1.down ? "#9e6a22" : "#db9432"
+ horizontalAlignment: Label.AlignHCenter
+ verticalAlignment: Label.AlignVCenter
+ leftPadding: checkBox1.indicator.width + checkBox1.spacing
+ }
+ }
+
+ CheckBox {
+ id: checkBox2
+ text: qsTr("Calendar");
+ font.pixelSize: 20;
+ contentItem: Label {
+ text: checkBox2.text
+ font: checkBox2.font
+ opacity: enabled ? 1.0 : 0.3
+ color: checkBox2.down ? "#9e6a22" : "#db9432"
+ horizontalAlignment: Label.AlignHCenter
+ verticalAlignment: Label.AlignVCenter
+ leftPadding: checkBox2.indicator.width + checkBox2.spacing
+ }
+ }
+
+ CheckBox {
+ id: checkBox3
+ text: qsTr("Contacts");
+ font.pixelSize: 20;
+ contentItem: Label {
+ text: checkBox3.text
+ font: checkBox3.font
+ opacity: enabled ? 1.0 : 0.3
+ color: checkBox3.down ? "#9e6a22" : "#db9432"
+ horizontalAlignment: Label.AlignHCenter
+ verticalAlignment: Label.AlignVCenter
+ leftPadding: checkBox3.indicator.width + checkBox3.spacing
+ }
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/SliderBoard.qml b/apps/com.pelagicore.sheets/boards/SliderBoard.qml
new file mode 100644
index 00000000..ff791d22
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/SliderBoard.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import utils 1.0
+import controls 1.0
+
+BaseBoard {
+
+ Label {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "Slider Component"
+ }
+
+ Column {
+ anchors.centerIn: parent
+ Slider {
+
+ }
+
+ Slider {
+ value: 0.5
+ }
+
+ Slider {
+ value: 1
+ }
+ }
+
+
+}
diff --git a/apps/com.pelagicore.sheets/boards/StyleBoard.qml b/apps/com.pelagicore.sheets/boards/StyleBoard.qml
new file mode 100644
index 00000000..ad78b444
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/StyleBoard.qml
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+
+BaseBoard {
+ id: root
+ description: 'Style Board'
+
+ GridLayout {
+ anchors.fill: parent
+ anchors.margins: Style.padding
+ columns: 2
+ Label {
+ text: 'Style.colorWhite'
+ font.pixelSize: Style.fontSizeXS
+ }
+ Marker {
+ color: Style.colorWhite
+ solid: true
+ }
+ Label {
+ text: 'Style.colorOrange'
+ font.pixelSize: Style.fontSizeXS
+ }
+ Marker {
+ color: Style.colorOrange
+ solid: true
+ }
+ Label {
+ id: label
+ text: 'Style.colorGrey'
+ font.pixelSize: Style.fontSizeXS
+ }
+ Marker {
+ color: Style.colorGrey
+ solid: true
+ }
+ Label {
+ text: 'Style.colorBlack'
+ font.pixelSize: Style.fontSizeXS
+ }
+ Marker {
+ color: Style.colorBlack
+ solid: true
+ }
+ Label {
+ text: 'Size XS'
+ font.pixelSize: Style.fontSizeXS
+ }
+ Label {
+ text: 'Lorem Ipsum'
+ font.pixelSize: Style.fontSizeXS
+ }
+ Label {
+ text: 'Size S'
+ font.pixelSize: Style.fontSizeXS
+ }
+ Label {
+ text: 'Lorem Ipsum'
+ font.pixelSize: Style.fontSizeS
+ }
+ Label {
+ text: 'Size M'
+ font.pixelSize: Style.fontSizeXS
+ }
+ Label {
+ text: 'Lorem Ipsum'
+ font.pixelSize: Style.fontSizeM
+ }
+ Label {
+ text: 'Size L'
+ font.pixelSize: Style.fontSizeXS
+ }
+ Label {
+ text: 'Lorem Ipsum'
+ font.pixelSize: Style.fontSizeL
+ }
+ Label {
+ text: 'Size XL'
+ font.pixelSize: Style.fontSizeXS
+ }
+ Label {
+ text: 'Lorem Ipsum'
+ font.pixelSize: Style.fontSizeXL
+ }
+ Spacer {
+ Layout.fillHeight: true
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/SwitchBoard.qml b/apps/com.pelagicore.sheets/boards/SwitchBoard.qml
new file mode 100644
index 00000000..07de031d
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/SwitchBoard.qml
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+import utils 1.0
+
+BaseBoard {
+ id: root
+
+ description: 'Switch Board'
+
+ GridLayout {
+ anchors.fill: parent; anchors.margins: Style.padding
+ columns: 2
+
+ Label {
+ text: qsTr('Switch 1 - %1').arg(switch1.checked ? 'On' : 'Off')
+ font.pixelSize: Style.fontSizeXS
+ }
+
+ Switch {
+ id: switch1
+ checked: true
+ }
+
+ Label {
+ text: qsTr('Switch 2 - %1').arg(switch2.checked ? 'On' : 'Off')
+ font.pixelSize: Style.fontSizeXS
+ }
+
+ Switch {
+ id: switch2
+ checked: false
+ }
+
+ Label {
+ text: "hspan(4), vspan(4)"
+ font.pixelSize: Style.fontSizeXS
+ }
+
+ Control {
+ width: Style.hspan(4); height: Style.vspan(4)
+
+ Switch {
+ id: switch3
+ width: Style.hspan(4); height: Style.vspan(4)
+ checked: true
+
+ }
+ }
+
+ Spacer {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.columnSpan: 2
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/SwitchDelegateBoard.qml b/apps/com.pelagicore.sheets/boards/SwitchDelegateBoard.qml
new file mode 100644
index 00000000..6d28f265
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/SwitchDelegateBoard.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Controls 2.1
+
+BaseBoard {
+ id: root
+
+ description: "A Switch is a toggle button that can be switched on (checked) or off (unchecked)."
+
+ ListView {
+ id: listView
+ anchors.centerIn: parent
+ anchors.margins: 24
+ width: parent.width/2
+ height: parent.height * .75
+ model: 10
+ delegate: SwitchDelegate {
+ width: ListView.view.width
+ font.pixelSize: 20
+ text: 'Switch #' + index
+ highlighted: ListView.isCurrentItem
+ onClicked: listView.currentIndex = index
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/TabBoard.qml b/apps/com.pelagicore.sheets/boards/TabBoard.qml
new file mode 100644
index 00000000..2dcf00a1
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/TabBoard.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+
+
+BaseBoard {
+ id: root
+
+ description: "Tab Board"
+
+ DisplayBackground {
+ anchors.fill: parent
+ }
+
+ TabView {
+ id: tabView
+ anchors.fill: parent
+ tabs: [
+ { title : "ICON BOARD", url : rectTest, properties : {} },
+ { title : "LABEL BOARD", url : rectTest1, properties : {} },
+ ]
+ }
+
+ Item {
+ id: rectTest
+ width: 400
+ height: 800
+ visible: false
+ Label {
+ anchors.centerIn: parent
+ text: "TAB 1"
+ }
+ }
+
+ Item {
+ id: rectTest1
+ width: 400
+ height: 800
+ visible: false
+ Label {
+ anchors.centerIn: parent
+ text: "TAB 2"
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/TemperatureSliderBoard.qml b/apps/com.pelagicore.sheets/boards/TemperatureSliderBoard.qml
new file mode 100644
index 00000000..5260dbc6
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/TemperatureSliderBoard.qml
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+
+import controls 1.0
+import utils 1.0
+
+BaseBoard {
+ id: root
+
+ description: "Label Board"
+
+ Row {
+
+ spacing: 100
+ anchors.centerIn: parent
+
+ Column {
+ Label {
+ width: Style.hspan(3)
+ height: Style.vspan(1)
+ text: qsTr("Value: %1").arg(temp.value.toFixed(1))
+ horizontalAlignment: Qt.AlignHCenter
+ }
+
+ TemperatureSlider {
+ id: temp
+ width: Style.hspan(3)
+ height: Style.vspan(14)
+ }
+ }
+
+ Column {
+ Label {
+ width: Style.hspan(3)
+ height: Style.vspan(1)
+ text: qsTr("Value: %1").arg(temp2.value.toFixed(1))
+ horizontalAlignment: Qt.AlignHCenter
+ }
+
+ TemperatureSlider {
+ id: temp2
+ width: Style.hspan(3)
+ height: Style.vspan(20)
+ mirrorSlider: true
+ roundingMode: roundingModeWhole
+ from: 0
+ to: 20
+ stepSize: 2
+ value: 10
+
+ }
+ }
+
+ }
+
+}
diff --git a/apps/com.pelagicore.sheets/boards/TextFieldBoard.qml b/apps/com.pelagicore.sheets/boards/TextFieldBoard.qml
new file mode 100644
index 00000000..7b7b1314
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/TextFieldBoard.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick.Controls 2.1
+
+BaseBoard {
+ id: root
+
+ description: "Displays a single line of editable plain text."
+
+ TextField {
+ width: 300
+ height: 50
+ anchors.top: parent.top
+ anchors.topMargin: 50
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/ToolBoard.qml b/apps/com.pelagicore.sheets/boards/ToolBoard.qml
new file mode 100644
index 00000000..e0d94c4b
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/ToolBoard.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+
+BaseBoard {
+
+ description: "Tool Board"
+
+ Column {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 30
+
+ Tool {
+ symbol: "music"
+ size: 32
+ }
+
+ Tool {
+ symbol: "music"
+ size: 48
+ }
+
+ Tool {
+ symbol: "music"
+ size: 72
+ }
+
+ Tool {
+ symbol: "music"
+ size: 96
+ }
+
+ Tool {
+ symbol: "music"
+ size: 144
+ }
+
+ Tool {
+ symbol: "music"
+ size: 192
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/ToolButtonBoard.qml b/apps/com.pelagicore.sheets/boards/ToolButtonBoard.qml
new file mode 100644
index 00000000..68a88d0a
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/ToolButtonBoard.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Controls 2.1
+import QtQuick.Layouts 1.1
+
+BaseBoard {
+ id: root
+
+ description: "Provides a button type that is typically used within a ToolBar."
+
+ ToolBar {
+ id: control
+ anchors.top: parent.top
+ anchors.topMargin: 70
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ background: Rectangle {
+ implicitHeight: 40
+ color: "grey"
+
+ Rectangle {
+ width: parent.width
+ height: 1
+ anchors.bottom: parent.bottom
+ color: "transparent"
+ border.color: "#db9432"
+ }
+ }
+
+ RowLayout {
+ anchors.fill: parent
+ ToolButton {
+ text: qsTr("Undo")
+ }
+ ToolButton {
+ text: qsTr("Redo")
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/VolumeSliderBoard.qml b/apps/com.pelagicore.sheets/boards/VolumeSliderBoard.qml
new file mode 100644
index 00000000..8f47ff05
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/VolumeSliderBoard.qml
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+import controls 1.0
+import utils 1.0
+
+BaseBoard {
+
+ description: 'Volume Board'
+
+ ColumnLayout {
+ VolumeSlider {
+ value: 0.0
+ }
+ VolumeSlider {
+ value: 0.5
+ }
+ VolumeSlider {
+ value: 1.0
+ }
+ }
+}
diff --git a/apps/com.pelagicore.sheets/boards/WelcomePage.qml b/apps/com.pelagicore.sheets/boards/WelcomePage.qml
new file mode 100644
index 00000000..be8a7661
--- /dev/null
+++ b/apps/com.pelagicore.sheets/boards/WelcomePage.qml
@@ -0,0 +1,35 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+BaseBoard {
+
+ description: "Welcome to the widgets gallery of NEPTUNE UI!"
+}
diff --git a/apps/com.pelagicore.sheets/icon.png b/apps/com.pelagicore.sheets/icon.png
new file mode 100644
index 00000000..e3aac9a9
--- /dev/null
+++ b/apps/com.pelagicore.sheets/icon.png
Binary files differ
diff --git a/apps/com.pelagicore.sheets/info.yaml b/apps/com.pelagicore.sheets/info.yaml
new file mode 100644
index 00000000..1aa21c43
--- /dev/null
+++ b/apps/com.pelagicore.sheets/info.yaml
@@ -0,0 +1,12 @@
+formatVersion: 1
+formatType: am-application
+---
+id: 'com.pelagicore.sheets'
+icon: 'icon.png'
+code: 'Main.qml'
+runtime: 'qml'
+name:
+ en: 'Sheets'
+ de: '---'
+
+categories: [ 'app' ]
diff --git a/apps/com.pelagicore.template/Content.qml b/apps/com.pelagicore.template/Content.qml
new file mode 100644
index 00000000..46383261
--- /dev/null
+++ b/apps/com.pelagicore.template/Content.qml
@@ -0,0 +1,192 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Controls 2.1
+import utils 1.0
+import service.notification 1.0
+import service.popup 1.0
+
+Item {
+ id: root
+
+ NotificationInterface {
+ id: notificationHighPrio
+ summary: "Notification Prio 2"
+ body: "Notification sample"
+ priority: 2
+ icon: Style.symbolM("loop")
+ }
+
+ NotificationInterface {
+ id: notificationHighPrio2
+ summary: "Notification Prio 3"
+ body: "Notification sample"
+ priority: 3
+ icon: Style.symbolM("mail")
+ }
+
+ NotificationInterface {
+ id: notificationLowPrio
+ summary: "Notification Prio 9"
+ body: "Notification sample"
+ priority: 9
+ icon: Style.symbolM("maps")
+ }
+
+ NotificationInterface {
+ id: notificationLowPrio2
+ summary: "Notification Prio 10"
+ body: "Notification sample"
+ priority: 10
+ icon: Style.symbolM("my_cloud")
+ }
+
+ PopupInterface {
+ id: popupInterfaceHighPrio
+ actions: [ { text: "Cancel" } ]
+ title: "Popup Prio 2"
+ summary: "Popup Sample"
+ priority: 2
+ }
+
+ PopupInterface {
+ id: popupInterfaceHighPrio2
+ actions: [ { text: "Cancel" } ]
+ title: "Popup Prio 3"
+ subtitle: "The Subtitle"
+ summary: "Popup Sample"
+ priority: 3
+ }
+
+ PopupInterface {
+ id: popupInterfaceLowPrio
+ actions: [ { text: "Cancel" } ]
+ title: "Popup Prio 9"
+ summary: "Popup Sample"
+ priority: 9
+ }
+
+ PopupInterface {
+ id: popupInterfaceLowPrio2
+ actions: [ { text: "Cancel" } ]
+ title: "Popup Prio 10"
+ summary: "Popup Sample"
+ priority: 10
+ }
+
+ Text {
+ anchors.top: parent.top
+ anchors.topMargin: 50
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "Template Application"
+ color: "white"
+ }
+
+ Column {
+ anchors.top: parent.top
+ anchors.topMargin: 150
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 2
+
+ Row {
+ spacing: 2
+
+ Button {
+ id: buttonControl
+ text: "Notification 2"
+ width: root.width/2 - parent.spacing
+
+ onClicked: notificationHighPrio.show();
+ }
+
+ Button {
+ id: buttonControl2
+ text: "Notification 3"
+ width: root.width/2 - parent.spacing
+
+ onClicked: notificationHighPrio2.show();
+ }
+
+ Button {
+ id: buttonControl3
+ text: "Notification 9"
+ width: root.width/2 - parent.spacing
+
+ onClicked: notificationLowPrio.show();
+ }
+
+ Button {
+ id: buttonControl4
+ text: "Notification 10"
+ width: root.width/2 - parent.spacing
+
+ onClicked: notificationLowPrio2.show();
+ }
+ }
+
+ Row {
+ spacing: 2
+
+ Button {
+ id: buttonControl5
+ text: "Popup 2"
+ width: root.width/2 - parent.spacing
+
+ onClicked: popupInterfaceHighPrio.show();
+ }
+
+ Button {
+ id: buttonControl6
+ text: "Popup 3"
+ width: root.width/2 - parent.spacing
+
+ onClicked: popupInterfaceHighPrio2.show();
+ }
+
+ Button {
+ id: buttonControl7
+ text: "Popup 9"
+ width: root.width/2 - parent.spacing
+
+ onClicked: popupInterfaceLowPrio.show();
+ }
+
+ Button {
+ id: buttonControl8
+ text: "Popup 10"
+ width: root.width/2 - parent.spacing
+
+ onClicked: popupInterfaceLowPrio2.show();
+ }
+ }
+ }
+}
diff --git a/apps/com.pelagicore.template/Main.qml b/apps/com.pelagicore.template/Main.qml
new file mode 100644
index 00000000..026bd87b
--- /dev/null
+++ b/apps/com.pelagicore.template/Main.qml
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+import controls 1.0
+import utils 1.0
+
+
+AppUIScreen {
+ id: root
+ title: "Triton Template"
+
+ UIScreen {
+ Content {
+ anchors.centerIn: parent
+ width: Style.hspan(13)
+ height: Style.vspan(24)
+ }
+
+ onBackScreen: root.back()
+ }
+}
diff --git a/apps/com.pelagicore.template/icon.png b/apps/com.pelagicore.template/icon.png
new file mode 100644
index 00000000..d7521dfe
--- /dev/null
+++ b/apps/com.pelagicore.template/icon.png
Binary files differ
diff --git a/apps/com.pelagicore.template/info.yaml b/apps/com.pelagicore.template/info.yaml
new file mode 100644
index 00000000..b54eb626
--- /dev/null
+++ b/apps/com.pelagicore.template/info.yaml
@@ -0,0 +1,11 @@
+formatVersion: 1
+formatType: am-application
+---
+id: 'com.pelagicore.template'
+icon: 'icon.png'
+code: 'Main.qml'
+runtime: 'qml'
+name:
+ en: 'Template'
+
+categories: [ 'app' ]
diff --git a/config.pri b/config.pri
new file mode 100644
index 00000000..87f0877b
--- /dev/null
+++ b/config.pri
@@ -0,0 +1,3 @@
+isEmpty(INSTALL_PREFIX) {
+INSTALL_PREFIX=/opt
+}
diff --git a/copydata.pro b/copydata.pro
new file mode 100644
index 00000000..4b4cb278
--- /dev/null
+++ b/copydata.pro
@@ -0,0 +1,7 @@
+TEMPLATE = aux
+
+# Copy all QML files during the build time
+do_copydata.commands = $(COPY_DIR) $$PWD/apps $$PWD/imports $$PWD/sysui $$PWD/styles $$PWD/am-config.yaml $$PWD/Main.qml $$OUT_PWD
+
+first.depends = do_copydata
+!equals(PWD, $$OUT_PWD):QMAKE_EXTRA_TARGETS += first do_copydata
diff --git a/dummyimports/QtIvi/Media/MediaIndexerControl.qml b/dummyimports/QtIvi/Media/MediaIndexerControl.qml
new file mode 100644
index 00000000..46b46824
--- /dev/null
+++ b/dummyimports/QtIvi/Media/MediaIndexerControl.qml
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.5
+
+QtObject {
+ id: root
+
+ property int progress: 0
+ property string state: ""
+
+}
diff --git a/dummyimports/QtIvi/Media/MediaPlayer.qml b/dummyimports/QtIvi/Media/MediaPlayer.qml
new file mode 100644
index 00000000..761e6c9f
--- /dev/null
+++ b/dummyimports/QtIvi/Media/MediaPlayer.qml
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.5
+
+QtObject {
+
+ property int position: 0
+ property int duration: 0
+
+ property QtObject playQueue: QtObject {
+ property int currentIndex: 0
+ }
+}
diff --git a/dummyimports/QtIvi/Media/qmldir b/dummyimports/QtIvi/Media/qmldir
new file mode 100644
index 00000000..664c3799
--- /dev/null
+++ b/dummyimports/QtIvi/Media/qmldir
@@ -0,0 +1,2 @@
+MediaPlayer 1.0 MediaPlayer.qml
+MediaIndexerControl 1.0 MediaIndexerControl.qml
diff --git a/dummyimports/QtIvi/SearchAndBrowseModel.qml b/dummyimports/QtIvi/SearchAndBrowseModel.qml
new file mode 100644
index 00000000..4a25302c
--- /dev/null
+++ b/dummyimports/QtIvi/SearchAndBrowseModel.qml
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.5
+
+QtObject {
+ id: root
+
+ property var serviceObject
+ property string contentType: ""
+
+}
diff --git a/dummyimports/QtIvi/VehicleFunctions/DummyClimateControl.qml b/dummyimports/QtIvi/VehicleFunctions/DummyClimateControl.qml
new file mode 100644
index 00000000..df15db3a
--- /dev/null
+++ b/dummyimports/QtIvi/VehicleFunctions/DummyClimateControl.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+QtObject {
+ property int discoveryMode: 0 /* QIviAbstractFeature::NoAutoDiscovery */
+ property int steeringWheelHeater: 0
+ property bool recirculationEnabled: false
+ property int recirculationMode: 0 /* QtIviVehicleFunctionsModule::RecirculationOff */
+ property bool airConditioningEnabled: true
+ property bool defrostEnabled: false
+ property bool heaterEnabled: true
+ property int outsideTemperature: 15
+ property int fanSpeedLevel: 3
+ property int airflowDirections: 0
+ property QtObject zoneAt: QtObject {}
+}
diff --git a/dummyimports/QtIvi/VehicleFunctions/qmldir b/dummyimports/QtIvi/VehicleFunctions/qmldir
new file mode 100644
index 00000000..7cddcd9c
--- /dev/null
+++ b/dummyimports/QtIvi/VehicleFunctions/qmldir
@@ -0,0 +1 @@
+ClimateControl 1.0 DummyClimateControl.qml
diff --git a/dummyimports/QtIvi/qmldir b/dummyimports/QtIvi/qmldir
new file mode 100644
index 00000000..a471de0a
--- /dev/null
+++ b/dummyimports/QtIvi/qmldir
@@ -0,0 +1 @@
+SearchAndBrowseModel 1.0 SearchAndBrowseModel.qml
diff --git a/header.FDL-QTAS b/header.FDL-QTAS
new file mode 100644
index 00000000..a9b7fbd9
--- /dev/null
+++ b/header.FDL-QTAS
@@ -0,0 +1,26 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the QtIvi module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
diff --git a/header.GPL-QTAS b/header.GPL-QTAS
new file mode 100644
index 00000000..35c92829
--- /dev/null
+++ b/header.GPL-QTAS
@@ -0,0 +1,30 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
diff --git a/imports/assets/translations/de_DE.ts b/imports/assets/translations/de_DE.ts
new file mode 100644
index 00000000..0da61b0a
--- /dev/null
+++ b/imports/assets/translations/de_DE.ts
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="de_DE">
+<context>
+ <name></name>
+ <message id="hill_descent_control_id">
+ <source>Hill Descent Control</source>
+ <translation>Bergabfahrhilfe</translation>
+ </message>
+ <message id="intelligent_speed_adaptation_id">
+ <source>Intelligent Speed Adaptation</source>
+ <translation>Intelligente Geschwindigkeitsanpassung</translation>
+ </message>
+ <message id="automatic_beam_switching_id">
+ <source>Automatic Beam Switching</source>
+ <translation>Automatische Fernlichtschaltung</translation>
+ </message>
+ <message id="collision_avoidance_id">
+ <source>Collision Avoidance</source>
+ <translation>Kollisionsvermeidung</translation>
+ </message>
+ <message id="lane_assist_id">
+ <source>Lane Assist</source>
+ <translation>Spur-Assistent</translation>
+ </message>
+ <message id="traffic_jam_assist_id">
+ <source>Traffic Jam Assist</source>
+ <translation>Stau-Assistent</translation>
+ </message>
+ <message id="driver_drowsiness_alert_id">
+ <source>Driver Drowsiness Alert</source>
+ <translation>Fahrermüdigkeitserkennung</translation>
+ </message>
+ <message id="park_assist_id">
+ <source>Park Assist</source>
+ <translation>Park Assistenzsysteme</translation>
+ </message>
+ <message id="language_id">
+ <source>Language</source>
+ <translation>Sprache</translation>
+ </message>
+</context>
+</TS>
diff --git a/imports/assets/translations/en_GB.ts b/imports/assets/translations/en_GB.ts
new file mode 100644
index 00000000..3a44fbd5
--- /dev/null
+++ b/imports/assets/translations/en_GB.ts
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="en_GB">
+<context>
+ <name></name>
+ <message id="hill_descent_control_id">
+ <source>Hill Descent Control</source>
+ <translation>Hill Descent Control</translation>
+ </message>
+ <message id="intelligent_speed_adaptation_id">
+ <source>Intelligent Speed Adaptation</source>
+ <translation>Intelligent Speed Adaptation</translation>
+ </message>
+ <message id="automatic_beam_switching_id">
+ <source>Automatic Beam Switching</source>
+ <translation>Automatic Beam Switching</translation>
+ </message>
+ <message id="collision_avoidance_id">
+ <source>Automatic Beam Switching</source>
+ <translation>Automatic Beam Switching</translation>
+ </message>
+ <message id="lane_assist_id">
+ <source>Lane Assist</source>
+ <translation>Lane Assist</translation>
+ </message>
+ <message id="traffic_jam_assist_id">
+ <source>Traffic Jam Assist</source>
+ <translation>Traffic Jam Assist</translation>
+ </message>
+ <message id="driver_drowsiness_alert_id">
+ <source>Driver Drowsiness Alert</source>
+ <translation>Driver Drowsiness Alert</translation>
+ </message>
+ <message id="park_assist_id">
+ <source>Park Assist</source>
+ <translation>Park Assist</translation>
+ </message>
+ <message id="language_id">
+ <source>Language</source>
+ <translation>Language</translation>
+ </message>
+</context>
+</TS>
diff --git a/imports/assets/translations/en_US.ts b/imports/assets/translations/en_US.ts
new file mode 100644
index 00000000..3a44fbd5
--- /dev/null
+++ b/imports/assets/translations/en_US.ts
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="en_GB">
+<context>
+ <name></name>
+ <message id="hill_descent_control_id">
+ <source>Hill Descent Control</source>
+ <translation>Hill Descent Control</translation>
+ </message>
+ <message id="intelligent_speed_adaptation_id">
+ <source>Intelligent Speed Adaptation</source>
+ <translation>Intelligent Speed Adaptation</translation>
+ </message>
+ <message id="automatic_beam_switching_id">
+ <source>Automatic Beam Switching</source>
+ <translation>Automatic Beam Switching</translation>
+ </message>
+ <message id="collision_avoidance_id">
+ <source>Automatic Beam Switching</source>
+ <translation>Automatic Beam Switching</translation>
+ </message>
+ <message id="lane_assist_id">
+ <source>Lane Assist</source>
+ <translation>Lane Assist</translation>
+ </message>
+ <message id="traffic_jam_assist_id">
+ <source>Traffic Jam Assist</source>
+ <translation>Traffic Jam Assist</translation>
+ </message>
+ <message id="driver_drowsiness_alert_id">
+ <source>Driver Drowsiness Alert</source>
+ <translation>Driver Drowsiness Alert</translation>
+ </message>
+ <message id="park_assist_id">
+ <source>Park Assist</source>
+ <translation>Park Assist</translation>
+ </message>
+ <message id="language_id">
+ <source>Language</source>
+ <translation>Language</translation>
+ </message>
+</context>
+</TS>
diff --git a/imports/assets/translations/in_ID.ts b/imports/assets/translations/in_ID.ts
new file mode 100644
index 00000000..ef1c840c
--- /dev/null
+++ b/imports/assets/translations/in_ID.ts
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="in_ID">
+<context>
+ <name></name>
+ <message id="hill_descent_control_id">
+ <source>Hill Descent Control</source>
+ <translation>Kontrol Bukit Menurun</translation>
+ </message>
+ <message id="intelligent_speed_adaptation_id">
+ <source>Intelligent Speed Adaptation</source>
+ <translation>Adaptasi Kecepatan Cerdas</translation>
+ </message>
+ <message id="automatic_beam_switching_id">
+ <source>Automatic Beam Switching</source>
+ <translation>Kontrol Lampu Otomatis</translation>
+ </message>
+ <message id="collision_avoidance_id">
+ <source>Collision Avoidance</source>
+ <translation>Pencegah Tabrakan</translation>
+ </message>
+ <message id="lane_assist_id">
+ <source>Lane Assist</source>
+ <translation>Asisten Jalur</translation>
+ </message>
+ <message id="traffic_jam_assist_id">
+ <source>Traffic Jam Assist</source>
+ <translation>Asisten Kemacetan</translation>
+ </message>
+ <message id="driver_drowsiness_alert_id">
+ <source>Driver Drowsiness Alert</source>
+ <translation>Pengingat Kelelahan Supir</translation>
+ </message>
+ <message id="park_assist_id">
+ <source>Park Assist</source>
+ <translation>Asisten Parkir</translation>
+ </message>
+ <message id="language_id">
+ <source>Language</source>
+ <translation>Bahasa Indonesia</translation>
+ </message>
+</context>
+</TS>
diff --git a/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/backspace-868482.svg b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/backspace-868482.svg
new file mode 100644
index 00000000..d96d56ca
--- /dev/null
+++ b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/backspace-868482.svg
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ viewBox="-420 107 159 88"
+ enable-background="new -420 107 159 88"
+ xml:space="preserve"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="backspace-868482.svg"><metadata
+ id="metadata3483"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs3481" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1136"
+ id="namedview3479"
+ showgrid="false"
+ inkscape:zoom="4.327044"
+ inkscape:cx="109.27575"
+ inkscape:cy="20.181193"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="g3463" /><g
+ id="g3459"><rect
+ x="-420"
+ y="107"
+ fill="none"
+ width="159"
+ height="88"
+ id="rect3461" /><g
+ id="g3463"><g
+ id="g3465"><path
+ d="m -261.2,195 -114.8,0 -44,-44 44,-44 114.8,0 z m -112.17994,-3.67355 107.81308,-0.2311 0,-79.72849 -108.27529,0 -39.40204,39.40204 z"
+ id="path3467"
+ inkscape:connector-curvature="0"
+ style="fill:#868482"
+ sodipodi:nodetypes="cccccccccccc" /></g><g
+ id="g3469"
+ transform="translate(5.315407,3.0043605)"><g
+ id="g3471"><rect
+ x="-327.47067"
+ y="128.42934"
+ transform="matrix(-0.7071,-0.7071,0.7071,-0.7071,-665.0558,26.5252)"
+ width="6.0706396"
+ height="50.470654"
+ id="rect3473"
+ style="fill:#868482" /></g><g
+ id="g3475"><rect
+ x="-351.79507"
+ y="151.44643"
+ transform="matrix(-0.7071,-0.7071,0.7071,-0.7071,-665.0499,26.5255)"
+ width="52.595058"
+ height="5.2535815"
+ id="rect3477"
+ style="fill:#868482" /></g></g></g></g></svg>
diff --git a/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/check-868482.svg b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/check-868482.svg
new file mode 100644
index 00000000..82db68a4
--- /dev/null
+++ b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/check-868482.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-414 91 170 119" enable-background="new -414 91 170 119" xml:space="preserve">
+<g>
+ <polygon fill="#868482" points="-351.7,210 -414,147.7 -402.7,136.3 -351.7,187.3 -255.3,91 -244,102.3 "/>
+</g>
+</svg>
diff --git a/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/enter-868482.svg b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/enter-868482.svg
new file mode 100644
index 00000000..fce3431a
--- /dev/null
+++ b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/enter-868482.svg
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="-394 111 211 80" enable-background="new -394 111 211 80" xml:space="preserve">
+<g>
+ <rect x="-394" y="111" fill="none" width="211" height="80"/>
+ <g>
+ <rect x="-384.8" y="144.8" fill="#868482" width="201.8" height="12.3"/>
+ <rect x="-195.3" y="121.7" fill="#868482" width="12.3" height="35.3"/>
+ <polygon fill="#868482" points="-349.5,111 -349.5,190.8 -394,151.7 "/>
+ </g>
+</g>
+</svg>
diff --git a/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/globe-868482.svg b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/globe-868482.svg
new file mode 100644
index 00000000..2da3a1e7
--- /dev/null
+++ b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/globe-868482.svg
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ viewBox="-427 79 144 144"
+ enable-background="new -427 79 144 144"
+ xml:space="preserve"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="globe-868482.svg"><metadata
+ id="metadata3793"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs3791" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1136"
+ id="namedview3789"
+ showgrid="false"
+ inkscape:zoom="4.6354778"
+ inkscape:cx="15.443116"
+ inkscape:cy="49.492945"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="Layer_1" /><g
+ id="g3781"><rect
+ x="-427"
+ y="79"
+ fill="none"
+ width="144"
+ height="144"
+ id="rect3783" /><g
+ id="g3785"><path
+ d="m -355,223 c -39.5,0 -71.8,-32.1 -72,-71.6 -0.2,-39.7 31.9,-72.2 71.6,-72.4 l 0.7,0 c 19.1,0.1 37.1,7.6 50.6,21.1 13.5,13.5 21,31.5 21.1,50.5 0.1,19.2 -7.3,37.4 -20.8,51 -13.5,13.7 -31.6,21.3 -50.8,21.4 z m 3.22136,-42.7 0,35.96737 c 9,-8.1 18.80446,-20.05728 23.40446,-30.85728 -6.7,-2 -16.40446,-4.71009 -23.40446,-5.11009 z M -380,183.9 c 3.2,7.4 9.01009,18.18309 14.31009,24.48309 2.4,2.9 5.74718,4.95282 8.54718,7.45282 L -357.57418,180.3 c -7,0.4 -15.62582,1.6 -22.42582,3.6 z m 58.2,3 c -3.9,9.1 -15.88755,21.48309 -22.58755,28.98309 10.4,-2.9 26.58755,-12.38309 34.48755,-20.28309 0.5,-0.5 1,-1.1 1.6,-1.6 -4.4,-2.9 -8.9,-5.2 -13.5,-7.1 z m -82.073,8.72582 c 7.8,8.5 28.47064,18.03591 39.87064,21.23591 -0.5,-0.6 -4.98309,-5.51455 -5.48309,-6.11455 -6,-7.1 -11.01573,-15.54718 -14.51573,-23.94718 -4.7,2 -15.57182,6.02582 -19.87182,8.82582 z m 83.03145,-13.68991 c 5.5,2.3 12.95728,7.04155 18.05728,10.34155 6.5,-9.4 12.773,-28.06619 13.573,-39.56619 l -25.48873,0 c -0.1,1.2 -0.1,4.98873 -0.2,6.28873 -0.7,6.8 -3.94155,16.63591 -5.94155,22.93591 z m -100.59436,-27.93027 c 0.8,11.8 7.60446,27.13027 14.00446,36.33027 5.1,-3.3 15.36173,-6.96291 20.76173,-9.26291 -2.4,-7.5 -8.23028,-19.71455 -8.63028,-27.71455 z m 31.16854,-0.64719 c 0.3,7 6.03028,19.84037 8.13028,26.44037 7.7,-2.4 16.56291,-3.36854 24.56291,-3.66854 l 0.21573,-23.20328 z m 38.48873,22.34037 c 8,0.4 16.97864,2.77864 24.67864,5.17864 1.7,-5.6 5.70446,-15.59882 6.20446,-21.59882 0.1,-1 0.53145,-6.53028 0.63145,-7.43028 l -31.51455,0.64718 z M -314.8,146.7 l 25.58873,0 c -0.8,-11.5 -6.973,-24.55727 -13.573,-33.95727 -5.1,3.4 -11.79437,5.76854 -17.39437,8.06854 2.5,7.5 4.97864,17.88873 5.37864,25.88873 z m -37.19436,0.86291 31.73027,-1.07864 c -0.4,-7 -3.32582,-17.46736 -5.42582,-24.06736 -7.7,2.4 -18.95164,4.34718 -26.95164,4.74718 z m -37.95728,0.43145 32.16173,0 0,-20.83027 c -7.9,-0.4 -20.97746,-0.83709 -28.57746,-3.23709 -1.8,5.8 -3.21572,13.41009 -3.81572,19.61009 -0.1,0.8 0.23145,3.65727 0.23145,4.45727 z m -31.69999,0.86292 26.45163,-0.64719 c 0.1,-1 0.1,-3.51009 0.2,-4.51009 0.6,-7 2,-13.8 4,-20.3 -5.5,-2.3 -13.92018,-6.39436 -19.02018,-9.79436 -6.4,9.1 -10.83145,23.45164 -11.63145,35.25164 z m 68.57863,-63.07183 0.21573,35.69882 c 6.9,-0.3 18.23027,-1.5 24.93027,-3.5 -1.37418,-7.31572 -7.3,-14.54718 -12.5,-20.64718 -2.4,-2.9 -9.846,-9.05164 -12.646,-11.55164 z m -30.94155,33.27746 c 6.7,2 18.89319,2.33709 25.79319,2.63709 l 0.64718,-35.698822 c -8.9,7.9 -21.84037,22.461732 -26.44037,33.061732 z m 38.29554,-34.224642 c 0.8,0.9 7.42465,6.977459 8.22465,7.977459 5.9,6.9 11.89436,14.384273 15.39436,22.484273 4.7,-2 12.96737,-4.73145 17.36737,-7.63145 -0.6,-0.6 -1.63146,-1.84719 -2.23146,-2.54719 -9.29436,-11.451637 -28.15492,-17.483092 -38.75492,-20.283092 z M -406.246,107.88427 c 4.4,2.8 12.78309,7.78873 17.48309,9.68873 4,-9.3 17.48192,-24.803277 24.48192,-32.303277 -11.8,3.2 -33.96501,13.91455 -41.96501,22.614547 z"
+ id="path3787"
+ inkscape:connector-curvature="0"
+ style="fill:#868482"
+ sodipodi:nodetypes="scccscccscccccccccccscccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" /></g></g></svg>
diff --git a/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/handwriting-868482.svg b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/handwriting-868482.svg
new file mode 100644
index 00000000..f128b3d4
--- /dev/null
+++ b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/handwriting-868482.svg
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ viewBox="0 0 156 104"
+ enable-background="new 0 0 156 104"
+ xml:space="preserve"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="handwriting-868482.svg"><metadata
+ id="metadata3399"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs3397" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1136"
+ id="namedview3395"
+ showgrid="false"
+ inkscape:zoom="9.2948718"
+ inkscape:cx="83.191118"
+ inkscape:cy="52"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="Layer_1" /><g
+ id="g3387"><g
+ id="g3389"><path
+ d="m 37.922759,97.167586 c -10.1,0 -11.046207,-1.342069 -16.967587,-8.651034 -8.271034,-21 1.526897,-31.697931 17.826897,-48.997931 1.2,-1.2 7.241379,-9.493104 8.441379,-10.793104 5.3,-5.7 1.111724,-14.727586 -0.588276,-18.027586 -1.8,-3.4 -11.309655,-4.0393103 -16.009655,-3.3393103 -16.5,2.6 -24.7503446,30.7034483 -24.7503446,30.9034483 L 0,36.6 C 0.3,35.3 6.4,4.3 31.2,0.3 41,-1.3 49.7,2.7 53.9,10.7 c 4.7,8.9 2.6,20.1 -5.3,28.6 -1.2,1.3 -2.4,2.6 -3.6,3.8 -16.7,17.8 -25.9,28.5 -19.6,41.4 3.3,6.8 11.1,7.6 16.9,6.3 C 51.5,88.7 62.1,79.7 62,61.3 61.8,33.2 78.2,19.5 92.2,16.4 c 14.5,-3.2 26.67862,3.922759 32.97862,17.322759 1.3,2.8 2.83793,5.077241 3.63793,7.777241 13.3,0.7 25.82276,5.375862 26.32276,5.475862 l -2.32414,5.044828 c -0.1,0 -12.71241,-4.306207 -23.61241,-5.306207 2.11379,17.360689 -3.65104,36.323448 -15.68897,41.155172 C 101.61379,93.869655 87.9,92.1 83,83.1 79.9,77.5 81.1,68.4 85.9,60.6 c 7.9,-13 25.71103,-17.615172 35.91103,-19.015172 -0.4,-1.2 -3.26689,-7.456552 -3.76689,-8.456552 -3.9,-8.3 -16.07311,-13.368276 -24.973106,-11.368276 -9.7,2.2 -26.056551,18.017241 -25.856551,39.017241 0.2,25.5 -9.682759,32.613104 -23.082759,35.813104 -2.6,0.6 -3.808965,0.577241 -6.208965,0.577241 z M 123.02759,47.137241 c -14,1.5 -27.377935,6.671035 -32.222073,16.235173 -4.569547,5.48009 -6.825089,15.074863 -1.501379,19.937241 10.744832,7.956552 19.564832,1.708966 24.404142,-1.198621 10.58482,-6.253103 9.81931,-26.073793 9.31931,-34.973793 z"
+ id="path3391"
+ inkscape:connector-curvature="0"
+ style="fill:#868482"
+ sodipodi:nodetypes="sccccccccccccccccccccccccccccsccccc" /></g><rect
+ fill="none"
+ width="156"
+ height="104"
+ id="rect3393" /></g></svg>
diff --git a/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/hidekeyboard-868482.svg b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/hidekeyboard-868482.svg
new file mode 100644
index 00000000..694bcc12
--- /dev/null
+++ b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/hidekeyboard-868482.svg
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ viewBox="-427 87 144 127"
+ enable-background="new -427 87 144 127"
+ xml:space="preserve"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="hidekeyboard-868482.svg"><metadata
+ id="metadata3534"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs3532" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1136"
+ id="namedview3530"
+ showgrid="false"
+ inkscape:zoom="3.8188977"
+ inkscape:cx="57.633466"
+ inkscape:cy="81.826203"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="g3468" /><g
+ id="g3464"><rect
+ x="-427"
+ y="87"
+ fill="none"
+ width="144"
+ height="127"
+ id="rect3466" /><g
+ id="g3468"><g
+ id="g3470" /><g
+ id="g3498"
+ transform="matrix(0.6642876,0,0,0.60833553,-135.10074,52.111516)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500"
+ style="fill:#868482" /></g><g
+ id="g3522"
+ transform="matrix(1,0,0,0.53000264,-0.26185567,72.641448)"><rect
+ x="-388.89999"
+ y="146.2"
+ width="67.699997"
+ height="11.7"
+ id="rect3524"
+ style="fill:#868482" /></g><polygon
+ style="fill:#868482"
+ id="polygon3528"
+ points="-381.1,195.2 -355,213.9 -328.9,195.2 -345.2,195.2 -355,202.2 -364.8,195.2 " /><g
+ id="g3498-5"
+ transform="matrix(0.6642876,0,0,0.60833553,-116.19714,52.058942)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7"
+ style="fill:#868482" /></g><g
+ id="g3498-5-4"
+ transform="matrix(0.6642876,0,0,0.60833553,-78.8827,51.666158)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7-0"
+ style="fill:#868482" /></g><g
+ id="g3498-5-43"
+ transform="matrix(0.6642876,0,0,0.60833553,-97.474452,51.928014)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7-4"
+ style="fill:#868482" /></g><g
+ id="g3498-5-2"
+ transform="matrix(0.6642876,0,0,0.60833553,-60.16002,51.666158)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7-6"
+ style="fill:#868482" /></g><g
+ id="g3498-5-3"
+ transform="matrix(0.6642876,0,0,0.60833553,-41.568267,51.797086)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7-64"
+ style="fill:#868482" /></g><g
+ id="g3498-5-0"
+ transform="matrix(0.6642876,0,0,0.60833553,-41.306411,32.419767)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7-60"
+ style="fill:#868482" /></g><g
+ id="g3498-5-5"
+ transform="matrix(0.6642876,0,0,0.60833553,-60.290947,32.419767)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7-1"
+ style="fill:#868482" /></g><g
+ id="g3498-5-34"
+ transform="matrix(0.6642876,0,0,0.60833553,-78.751772,32.288839)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7-8"
+ style="fill:#868482" /></g><g
+ id="g3498-5-28"
+ transform="matrix(0.6642876,0,0,0.60833553,-97.60538,32.419766)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7-08"
+ style="fill:#868482" /></g><g
+ id="g3498-5-8"
+ transform="matrix(0.6642876,0,0,0.60833553,-116.45899,32.288839)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7-66"
+ style="fill:#868482" /></g><g
+ id="g3498-5-6"
+ transform="matrix(0.6642876,0,0,0.60833553,-134.91981,32.550694)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-7-85"
+ style="fill:#868482" /></g><g
+ id="g3498-2"
+ transform="matrix(0.56357388,0,0,7.7030576,-197.43282,-888.87016)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-3"
+ style="fill:#868482" /></g><g
+ id="g3498-2-4"
+ transform="matrix(0.56357388,0,0,7.7030576,-59.762201,-888.87016)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-3-6"
+ style="fill:#868482" /></g><g
+ id="g3498-50"
+ transform="matrix(11.474227,0,0,0.60833553,4253.5026,93.039354)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-1"
+ style="fill:#868482" /></g><g
+ id="g3498-50-9"
+ transform="matrix(11.474227,0,0,0.60833553,4252.9789,9.9001791)"><rect
+ x="-407.5"
+ y="126.7"
+ width="11.7"
+ height="11.7"
+ id="rect3500-1-4"
+ style="fill:#868482" /></g><path
+ style="fill:#999999;fill-opacity:1"
+ d="m -0.0757732,45.191067 0,-45.0182098 3.2404639,-0.08614494 C 7.3998563,-0.02587596 134.35087,-0.02575465 139.85335,0.08684287 l 4.22242,0.08640373 0,45.0180154 0,45.018016 -72.07577,0 -72.0757732,0 0,-45.018211 z m 137.7360832,-0.08643 0,-38.0345359 -65.594846,0 -65.5948454,0 0,38.0345359 0,38.034536 65.5948454,0 65.594846,0 0,-38.034536 z"
+ id="path3720"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#ffffff"
+ d="m 21.265464,45.759278 0,-3.469587 3.796907,0 3.796907,0 0,3.469587 0,3.469588 -3.796907,0 -3.796907,0 0,-3.469588 z"
+ id="path3722"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 21.396392,26.185567 0,-3.535052 3.862371,0 3.862371,0 0,3.535052 0,3.535052 -3.862371,0 -3.862371,0 0,-3.535052 z"
+ id="path3724"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 39.857216,25.923711 0,-3.535051 3.862372,0 3.862371,0 0,3.535051 0,3.535052 -3.862371,0 -3.862372,0 0,-3.535052 z"
+ id="path3726"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#ffffff"
+ d="m 40.119072,45.693814 0,-3.535051 3.862371,0 3.862371,0 0,3.535051 0,3.535052 -3.862371,0 -3.862371,0 0,-3.535052 z"
+ id="path3728"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 58.841753,45.562887 0,-3.535052 3.862371,0 3.862371,0 0,3.535052 0,3.535051 -3.862371,0 -3.862371,0 0,-3.535051 z"
+ id="path3730"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#ffffff"
+ d="m 58.710825,26.054639 0,-3.535051 3.862371,0 3.862371,0 0,3.535051 0,3.535052 -3.862371,0 -3.862371,0 0,-3.535052 z"
+ id="path3732"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 77.564433,25.923711 0,-3.535051 3.862371,0 3.862371,0 0,3.535051 0,3.535052 -3.862371,0 -3.862371,0 0,-3.535052 z"
+ id="path3734"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 77.433505,45.301031 0,-3.535052 3.862371,0 3.862371,0 0,3.535052 0,3.535051 -3.862371,0 -3.862371,0 0,-3.535051 z"
+ id="path3736"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 96.156186,45.301031 0,-3.535052 3.862374,0 3.86237,0 0,3.535052 0,3.535051 -3.86237,0 -3.862374,0 0,-3.535051 z"
+ id="path3738"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 96.025258,26.054639 0,-3.535051 3.862371,0 3.862371,0 0,3.535051 0,3.535052 -3.862371,0 -3.862371,0 0,-3.535052 z"
+ id="path3740"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 115.00979,26.054639 0,-3.535051 3.86237,0 3.86238,0 0,3.535051 0,3.535052 -3.86238,0 -3.86237,0 0,-3.535052 z"
+ id="path3742"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 114.74794,45.431959 0,-3.535052 3.86237,0 3.86237,0 0,3.535052 0,3.535051 -3.86237,0 -3.86237,0 0,-3.535051 z"
+ id="path3744"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 37.893299,66.249485 0,-3.011341 33.779381,0 33.77938,0 0,3.011341 0,3.01134 -33.77938,0 -33.779381,0 0,-3.01134 z"
+ id="path3746"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 64.14433,121.20799 c -4.320619,-3.09875 -10.146368,-7.27582 -12.94611,-9.28238 l -5.090439,-3.64829 8.049329,0 8.04933,0 4.883685,3.48882 c 3.894822,2.78239 4.926318,3.46219 5.094241,3.35732 0.115806,-0.0723 2.325191,-1.64229 4.909744,-3.48882 l 4.699189,-3.35732 8.052119,0 8.052118,0 -0.510624,0.36756 c -0.280842,0.20216 -5.931036,4.24862 -12.555984,8.99213 -6.624949,4.7435 -12.222114,8.75517 -12.438144,8.91481 L 72,126.84208 64.14433,121.20799 Z"
+ id="path3748"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 58.890373,26.058333 0,-3.404124 3.665979,0 3.66598,0 0,3.404124 0,3.404124 -3.66598,0 -3.665979,0 0,-3.404124 z"
+ id="path5455"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 21.445012,45.697508 0,-3.404124 3.66598,0 3.665979,0 0,3.404124 0,3.404124 -3.665979,0 -3.66598,0 0,-3.404124 z"
+ id="path5482"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /><path
+ style="fill:#999999;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 40.29862,45.697508 0,-3.404124 3.66598,0 3.665979,0 0,3.404124 0,3.404124 -3.665979,0 -3.66598,0 0,-3.404124 z"
+ id="path5484"
+ inkscape:connector-curvature="0"
+ transform="translate(-427,87)" /></g></g></svg>
diff --git a/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/search-868482.svg b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/search-868482.svg
new file mode 100644
index 00000000..6ee0ba97
--- /dev/null
+++ b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/search-868482.svg
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="-425 77 148 148" enable-background="new -425 77 148 148" xml:space="preserve">
+<g>
+ <rect x="-425" y="77" fill="none" width="148" height="148"/>
+ <g>
+ <path fill="#868482" d="M-278.2,209.7c1.6,1.6,1.6,4.1,0,5.7l-8.5,8.5c-1.6,1.6-4.1,1.6-5.7,0l-44.6-44.6c-1.6-1.6-1.6-4.1,0-5.7
+ l8.5-8.5c1.6-1.6,4.1-1.6,5.7,0L-278.2,209.7z"/>
+ <path fill="#868482" d="M-367,89c25.4,0,46,20.6,46,46s-20.6,46-46,46c-25.4,0-46-20.6-46-46S-392.4,89-367,89 M-367,77
+ c-32,0-58,26-58,58s26,58,58,58c32,0,58-26,58-58S-335,77-367,77L-367,77z"/>
+ </g>
+</g>
+</svg>
diff --git a/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/textmode-868482.svg b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/textmode-868482.svg
new file mode 100644
index 00000000..709cd284
--- /dev/null
+++ b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/images/textmode-868482.svg
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ width="124px"
+ height="96px"
+ viewBox="0 0 124 96"
+ enable-background="new 0 0 124 96"
+ xml:space="preserve"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="textmode-868482.svg"><metadata
+ id="metadata3875"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs3873" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1136"
+ id="namedview3871"
+ showgrid="false"
+ inkscape:zoom="2.4583333"
+ inkscape:cx="-2.4745771"
+ inkscape:cy="47.999999"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="Layer_1" /><g
+ id="g3853"
+ style="fill:#999999;fill-opacity:1"><g
+ id="g3855"
+ style="fill:#999999;fill-opacity:1"><g
+ id="g3857"
+ style="fill:#999999;fill-opacity:1"><path
+ fill="#868482"
+ d="M55.4,70.8L46.9,49H19.4L11,70.8H2.9L30,2h6.7l27,68.8H55.4z M44.4,41.8l-8-21.2c-1-2.7-2.1-6-3.2-9.9 c-0.7,3-1.7,6.3-3,9.9l-8.1,21.2H44.4z"
+ id="path3859"
+ style="fill:#999999;fill-opacity:1" /><path
+ fill="#868482"
+ d="M66.6,72.8H54.1L45.5,51H20.8l-8.4,21.8H0L28.7,0h9.4L66.6,72.8z M56.8,68.8h4L35.4,4h-1.9l1.7,6.2 c1.1,3.8,2.1,7.1,3.1,9.7l9,24h-28l9.1-23.9c1.2-3.5,2.2-6.7,2.9-9.6L32.8,4h-1.4L5.9,68.8h3.8L18.1,47h30.2L56.8,68.8z M25.1,39.8h16.4l-7-18.5c-0.4-1.1-0.8-2.2-1.2-3.4c-0.4,1.1-0.7,2.2-1.2,3.4L25.1,39.8z"
+ id="path3861"
+ style="fill:#999999;fill-opacity:1" /></g><g
+ id="g3863"
+ style="fill:#999999;fill-opacity:1"><path
+ fill="#868482"
+ d="M116.2,70.8l-1.5-7.3h-0.4c-2.6,3.2-5.1,5.4-7.7,6.5s-5.7,1.7-9.5,1.7c-5.1,0-9.1-1.3-12-3.9 s-4.3-6.4-4.3-11.2c0-10.4,8.3-15.8,24.9-16.3l8.7-0.3v-3.2c0-4-0.9-7-2.6-8.9s-4.5-2.9-8.3-2.9c-4.3,0-9.1,1.3-14.5,3.9l-2.4-6 c2.5-1.4,5.3-2.5,8.3-3.2s6-1.2,9.1-1.2c6.1,0,10.7,1.4,13.6,4.1s4.4,7.1,4.4,13.1v35.1H116.2z M98.7,65.3c4.8,0,8.6-1.3,11.4-4 s4.1-6.4,4.1-11.2v-4.6l-7.8,0.3c-6.2,0.2-10.6,1.2-13.4,2.9S89,53.1,89,56.7c0,2.8,0.9,5,2.6,6.4S95.6,65.3,98.7,65.3z"
+ id="path3865"
+ style="fill:#999999;fill-opacity:1" /><path
+ fill="#868482"
+ d="M97.1,73.8c-5.6,0-10.1-1.5-13.3-4.5c-3.3-3-5-7.3-5-12.7c0-11.6,9-17.8,26.8-18.3l6.8-0.2v-1.3 c0-3.5-0.7-6.1-2.1-7.6c-1.3-1.5-3.6-2.2-6.8-2.2c-4,0-8.6,1.3-13.7,3.7l-1.9,0.9L84,22.1l1.6-0.8c2.7-1.4,5.6-2.6,8.8-3.4 c3.2-0.8,6.4-1.2,9.6-1.2c6.6,0,11.7,1.6,15,4.6c3.4,3.1,5.1,8,5.1,14.5v37.1h-9.4l-1.1-5.3c-2,2-4,3.5-6,4.4 C104.7,73.1,101.2,73.8,97.1,73.8z M103.5,23c4.4,0,7.7,1.2,9.8,3.5c2.1,2.3,3.1,5.7,3.1,10.3V42l-10.7,0.3 c-23,0.7-23,10.9-23,14.3c0,4.3,1.2,7.5,3.7,9.7c2.5,2.3,6.1,3.4,10.6,3.4c3.5,0,6.4-0.5,8.7-1.5c2.2-1,4.6-3,6.9-6l0.6-0.8h2.6 l0.7,1.6l1.2,5.7h2.1V35.8c0-5.4-1.3-9.3-3.8-11.6c-2.6-2.4-6.7-3.5-12.3-3.5c-2.8,0-5.7,0.4-8.6,1.1c-2.2,0.6-4.3,1.3-6.3,2.3 l0.9,2.3C94.9,24.1,99.4,23,103.5,23z M98.7,67.3c-3.5,0-6.4-0.9-8.5-2.7C88,62.8,87,60.1,87,56.7c0-4.3,1.7-7.6,5-9.6 c3.1-1.9,7.8-3,14.4-3.2l9.9-0.4v6.7c0,5.3-1.6,9.6-4.8,12.6C108.3,65.8,104,67.3,98.7,67.3z M112.2,47.6l-5.7,0.2 c-5.8,0.2-10,1.1-12.4,2.6C92,51.8,91,53.8,91,56.7c0,2.2,0.6,3.8,1.9,4.9c1.3,1.1,3.3,1.7,5.8,1.7c4.3,0,7.6-1.1,10-3.4 c2.4-2.3,3.5-5.5,3.5-9.7V47.6z"
+ id="path3867"
+ style="fill:#999999;fill-opacity:1" /></g></g><rect
+ y="88"
+ fill="#868482"
+ width="124"
+ height="8"
+ id="rect3869"
+ style="fill:#999999;fill-opacity:1" /></g><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 0.33220339,72.63421 c 0,-0.155512 11.21134461,-28.667467 28.36096261,-72.12573542 0.143964,-0.36481583 1.481288,-0.50697527 4.733406,-0.50316785 L 37.959322,0.01061345 51.99322,35.862443 c 7.718644,19.718506 14.093085,36.099169 14.165419,36.401472 0.105888,0.442511 -1.021912,0.549644 -5.786164,0.549644 l -5.917684,0 -0.546838,-1.118644 C 53.607192,71.079661 51.634697,66.138911 49.524625,60.715473 l -3.836489,-9.860803 -12.536913,0.09809 -12.536911,0.09809 -4.160608,10.779661 -4.160608,10.779661 -5.9804461,0.112569 c -3.2892456,0.06192 -5.98044651,0.02208 -5.98044651,-0.08853 z M 41.423311,39.559322 c 0.0112,-0.536844 -7.930409,-21.643254 -8.141955,-21.638878 -0.210051,0.0043 -8.141912,21.095451 -8.137865,21.638878 0.003,0.398954 16.271502,0.398954 16.27982,0 z"
+ id="path3877"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 92.065151,73.149063 c -3.134892,-0.597811 -6.806633,-2.545615 -8.728039,-4.630092 -3.392162,-3.680063 -4.988275,-9.313558 -4.123086,-14.552476 0.655241,-3.967636 1.662266,-6.021269 4.194145,-8.553147 4.290577,-4.290579 10.117905,-6.121781 21.824109,-6.858095 l 7.47634,-0.470258 -0.23843,-2.843927 c -0.31037,-3.702079 -1.57377,-6.208129 -3.6811,-7.301736 -3.65637,-1.897491 -10.292169,-1.160169 -17.463875,1.940458 -1.80721,0.781333 -3.322385,1.379711 -3.367056,1.329729 -0.04467,-0.04998 -0.915507,-2.104434 -1.935193,-4.565451 l -1.853974,-4.474576 2.725673,-1.292565 c 3.14265,-1.490302 7.040665,-2.780454 10.251098,-3.392873 3.029187,-0.577844 10.434727,-0.568505 13.314347,0.01679 7.53165,1.530841 11.84608,6.107198 13.11198,13.90799 0.24028,1.480703 0.41628,10.734302 0.41806,21.980995 l 0.003,19.423728 -4.60617,0 -4.60616,0 -0.46374,-2.493636 c -0.25506,-1.371499 -0.554,-2.583889 -0.6643,-2.694191 -0.11031,-0.110307 -1.04828,0.545637 -2.08439,1.457658 -1.03611,0.91202 -2.66587,2.03679 -3.62169,2.499498 -3.64892,1.766412 -11.019819,2.493295 -15.881619,1.566175 z M 106.05095,61.766929 c 4.32066,-2.196863 6.139,-5.519149 6.14339,-11.224556 l 0.002,-2.949153 -3.76271,0.0081 c -2.06949,0.0044 -5.04407,0.190591 -6.61017,0.413687 -8.020819,1.142591 -10.808919,3.331507 -10.833665,8.505426 -0.02458,5.139533 2.569947,7.10421 8.959187,6.784237 2.870148,-0.143735 3.841638,-0.388564 6.101698,-1.5377 z"
+ id="path3879"
+ inkscape:connector-curvature="0" /><path
+ style="fill:#999999;fill-opacity:1"
+ d="m 0.33220339,92.135593 0,-3.864407 61.83050861,0 61.830508,0 0,3.864407 0,3.864407 -61.830508,0 -61.83050861,0 0,-3.864407 z"
+ id="path3881"
+ inkscape:connector-curvature="0" /></svg>
diff --git a/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/style.qml b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/style.qml
new file mode 100644
index 00000000..3bfcb54e
--- /dev/null
+++ b/imports/shared/QtQuick/VirtualKeyboard/Styles/triton/style.qml
@@ -0,0 +1,878 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.VirtualKeyboard 2.1
+import QtQuick.VirtualKeyboard.Styles 2.1
+import QtGraphicalEffects 1.0
+
+import utils 1.0 as Utils
+
+KeyboardStyle {
+ id: currentStyle
+ readonly property bool compactSelectionList: [InputEngine.Pinyin, InputEngine.Cangjie].indexOf(InputContext.inputEngine.inputMode) !== -1
+ readonly property string fontFamily: Utils.Style.fontFamily
+ readonly property real keyBackgroundMargin: Math.round(13 * scaleHint)
+ readonly property real keyContentMargin: Math.round(45 * scaleHint)
+ readonly property real keyIconScale: scaleHint * 0.6
+ readonly property string resourcePrefix: ""
+
+ readonly property string inputLocale: InputContext.locale
+ property color inputLocaleIndicatorColor: "white"
+ property Timer inputLocaleIndicatorHighlightTimer: Timer {
+ interval: 1000
+ onTriggered: inputLocaleIndicatorColor = "gray"
+ }
+ onInputLocaleChanged: {
+ inputLocaleIndicatorColor = "white"
+ inputLocaleIndicatorHighlightTimer.restart()
+ }
+
+ keyboardDesignWidth: 2560
+ keyboardDesignHeight: 800
+ keyboardRelativeLeftMargin: 114 / keyboardDesignWidth
+ keyboardRelativeRightMargin: 114 / keyboardDesignWidth
+ keyboardRelativeTopMargin: 13 / keyboardDesignHeight
+ keyboardRelativeBottomMargin: 86 / keyboardDesignHeight
+
+ keyboardBackground: Rectangle {
+ color: "black"
+ opacity: 0.9
+ }
+
+ keyPanel: KeyPanel {
+ Rectangle {
+ id: keyBackground
+ color: "transparent"
+ border.width: 1
+ border.color: "#464646"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Text {
+ id: keySmallText
+ text: control.smallText
+ visible: control.smallTextVisible
+ color: "gray"
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.margins: keyContentMargin / 3
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: 38 * scaleHint
+ capitalization: control.uppercased ? Font.AllUppercase : Font.MixedCase
+ }
+ }
+ Text {
+ id: keyText
+ text: control.displayText
+ color: "white"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ anchors.fill: parent
+ anchors.leftMargin: keyContentMargin
+ anchors.topMargin: control.smallTextVisible ? keyContentMargin * 1.2 : keyContentMargin
+ anchors.rightMargin: keyContentMargin
+ anchors.bottomMargin: control.smallTextVisible ? keyContentMargin * 0.8 : keyContentMargin
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: 52 * scaleHint
+ capitalization: control.uppercased ? Font.AllUppercase : Font.MixedCase
+ }
+ }
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: control.pressed
+ PropertyChanges {
+ target: keyBackground
+ opacity: 0.75
+ }
+ PropertyChanges {
+ target: keyText
+ opacity: 0.5
+ }
+ },
+ State {
+ name: "disabled"
+ when: !control.enabled
+ PropertyChanges {
+ target: keyBackground
+ opacity: 0.75
+ }
+ PropertyChanges {
+ target: keyText
+ opacity: 0.05
+ }
+ }
+ ]
+ }
+
+ backspaceKeyPanel: KeyPanel {
+ Rectangle {
+ id: backspaceKeyBackground
+ color: "transparent"
+ border.width: 1
+ border.color: "#464646"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Image {
+ id: backspaceKeyIcon
+ anchors.centerIn: parent
+ sourceSize.width: 159 * keyIconScale
+ sourceSize.height: 88 * keyIconScale
+ smooth: false
+ source: resourcePrefix + "images/backspace-868482.svg"
+ }
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: control.pressed
+ PropertyChanges {
+ target: backspaceKeyBackground
+ opacity: 0.80
+ }
+ PropertyChanges {
+ target: backspaceKeyIcon
+ opacity: 0.6
+ }
+ },
+ State {
+ name: "disabled"
+ when: !control.enabled
+ PropertyChanges {
+ target: backspaceKeyBackground
+ opacity: 0.8
+ }
+ PropertyChanges {
+ target: backspaceKeyIcon
+ opacity: 0.2
+ }
+ }
+ ]
+ }
+
+ languageKeyPanel: KeyPanel {
+ Rectangle {
+ id: languageKeyBackground
+ color: "transparent"
+ border.width: 1
+ border.color: "#464646"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Image {
+ id: languageKeyIcon
+ anchors.centerIn: parent
+ sourceSize.width: 144 * keyIconScale
+ sourceSize.height: 144 * keyIconScale
+ smooth: false
+ source: resourcePrefix + "images/globe-868482.svg"
+ }
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: control.pressed
+ PropertyChanges {
+ target: languageKeyBackground
+ opacity: 0.80
+ }
+ PropertyChanges {
+ target: languageKeyIcon
+ opacity: 0.75
+ }
+ },
+ State {
+ name: "disabled"
+ when: !control.enabled
+ PropertyChanges {
+ target: languageKeyBackground
+ opacity: 0.8
+ }
+ PropertyChanges {
+ target: languageKeyIcon
+ opacity: 0.2
+ }
+ }
+ ]
+ }
+
+ enterKeyPanel: KeyPanel {
+ Rectangle {
+ id: enterKeyBackground
+ color: "transparent"
+ border.width: 1
+ border.color: "#464646"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Image {
+ id: enterKeyIcon
+ visible: enterKeyText.text.length === 0
+ anchors.centerIn: parent
+ readonly property size enterKeyIconSize: Qt.size(96, 96)
+ sourceSize.width: enterKeyIconSize.width * keyIconScale
+ sourceSize.height: enterKeyIconSize.height * keyIconScale
+ smooth: false
+ source: Utils.Style.symbolL("back", false)
+ rotation: 180
+ mirror: true
+ }
+ Text {
+ id: enterKeyText
+ visible: text.length !== 0
+ text: control.actionId !== EnterKeyAction.None ? "" : control.displayText
+ clip: true
+ fontSizeMode: Text.HorizontalFit
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: "#80c342"
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: 44 * scaleHint
+ capitalization: Font.AllUppercase
+ }
+ anchors.fill: parent
+ anchors.margins: Math.round(42 * scaleHint)
+ }
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: control.pressed
+ PropertyChanges {
+ target: enterKeyBackground
+ opacity: 0.80
+ }
+ PropertyChanges {
+ target: enterKeyIcon
+ opacity: 0.6
+ }
+ PropertyChanges {
+ target: enterKeyText
+ opacity: 0.6
+ }
+ },
+ State {
+ name: "disabled"
+ when: !control.enabled
+ PropertyChanges {
+ target: enterKeyBackground
+ opacity: 0.8
+ }
+ PropertyChanges {
+ target: enterKeyIcon
+ opacity: 0.2
+ }
+ PropertyChanges {
+ target: enterKeyText
+ opacity: 0.05
+ }
+ }
+ ]
+ }
+
+ hideKeyPanel: KeyPanel {
+ Rectangle {
+ id: hideKeyBackground
+ color: "transparent"
+ border.width: 1
+ border.color: "#464646"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Image {
+ id: hideKeyIcon
+ anchors.centerIn: parent
+ sourceSize.width: 144 * keyIconScale
+ sourceSize.height: 127 * keyIconScale
+ smooth: false
+ source: resourcePrefix + "images/hidekeyboard-868482.svg"
+ }
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: control.pressed
+ PropertyChanges {
+ target: hideKeyBackground
+ opacity: 0.80
+ }
+ PropertyChanges {
+ target: hideKeyIcon
+ opacity: 0.6
+ }
+ },
+ State {
+ name: "disabled"
+ when: !control.enabled
+ PropertyChanges {
+ target: hideKeyBackground
+ opacity: 0.8
+ }
+ PropertyChanges {
+ target: hideKeyIcon
+ opacity: 0.2
+ }
+ }
+ ]
+ }
+
+ shiftKeyPanel: KeyPanel {
+ Rectangle {
+ id: shiftKeyBackground
+ color: "transparent"
+ border.width: 1
+ border.color: "#464646"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Image {
+ id: shiftKeyIcon
+ anchors.centerIn: parent
+ sourceSize.width: 100 * keyIconScale
+ sourceSize.height: 100 * keyIconScale
+ smooth: false
+ source: Utils.Style.symbolL("arrow", false)
+ }
+ states: [
+ State {
+ name: "capslock"
+ when: InputContext.capsLock
+ PropertyChanges {
+ target: shiftKeyBackground
+ color: "#BC6608"
+ }
+ PropertyChanges {
+ target: shiftKeyIcon
+ source: Utils.Style.symbolL("arrow", false)
+ }
+ },
+ State {
+ name: "shift"
+ when: InputContext.shift
+ PropertyChanges {
+ target: shiftKeyIcon
+ source: Utils.Style.symbolL("arrow", true)
+ }
+ }
+ ]
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: control.pressed
+ PropertyChanges {
+ target: shiftKeyBackground
+ opacity: 0.80
+ }
+ PropertyChanges {
+ target: shiftKeyIcon
+ opacity: 0.6
+ }
+ },
+ State {
+ name: "disabled"
+ when: !control.enabled
+ PropertyChanges {
+ target: shiftKeyBackground
+ opacity: 0.8
+ }
+ PropertyChanges {
+ target: shiftKeyIcon
+ opacity: 0.2
+ }
+ }
+ ]
+ }
+
+ spaceKeyPanel: KeyPanel {
+ Rectangle {
+ id: spaceKeyBackground
+ color: "transparent"
+ border.width: 1
+ border.color: "#464646"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Text {
+ id: spaceKeyText
+ text: Qt.locale(InputContext.locale).nativeLanguageName
+ color: currentStyle.inputLocaleIndicatorColor
+ Behavior on color { PropertyAnimation { duration: 250 } }
+ anchors.centerIn: parent
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: 48 * scaleHint
+ }
+ }
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: control.pressed
+ PropertyChanges {
+ target: spaceKeyBackground
+ opacity: 0.80
+ }
+ },
+ State {
+ name: "disabled"
+ when: !control.enabled
+ PropertyChanges {
+ target: spaceKeyBackground
+ opacity: 0.8
+ }
+ }
+ ]
+ }
+
+ symbolKeyPanel: KeyPanel {
+ Rectangle {
+ id: symbolKeyBackground
+ color: "transparent"
+ border.width: 1
+ border.color: "#464646"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Text {
+ id: symbolKeyText
+ text: control.displayText
+ color: "white"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ anchors.fill: parent
+ anchors.margins: keyContentMargin
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: 44 * scaleHint
+ capitalization: Font.AllUppercase
+ }
+ }
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: control.pressed
+ PropertyChanges {
+ target: symbolKeyBackground
+ opacity: 0.80
+ }
+ PropertyChanges {
+ target: symbolKeyText
+ opacity: 0.6
+ }
+ },
+ State {
+ name: "disabled"
+ when: !control.enabled
+ PropertyChanges {
+ target: symbolKeyBackground
+ opacity: 0.8
+ }
+ PropertyChanges {
+ target: symbolKeyText
+ opacity: 0.2
+ }
+ }
+ ]
+ }
+
+ modeKeyPanel: KeyPanel {
+ Rectangle {
+ id: modeKeyBackground
+ color: "transparent"
+ border.width: 1
+ border.color: "#464646"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Text {
+ id: modeKeyText
+ text: control.displayText
+ color: "white"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ anchors.fill: parent
+ anchors.margins: keyContentMargin
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: 44 * scaleHint
+ capitalization: Font.AllUppercase
+ }
+ }
+ Rectangle {
+ id: modeKeyIndicator
+ implicitHeight: parent.height * 0.1
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ anchors.leftMargin: parent.width * 0.4
+ anchors.rightMargin: parent.width * 0.4
+ anchors.bottomMargin: parent.height * 0.12
+ color: "#80c342"
+ radius: 3
+ visible: control.mode
+ }
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: control.pressed
+ PropertyChanges {
+ target: modeKeyBackground
+ opacity: 0.80
+ }
+ PropertyChanges {
+ target: modeKeyText
+ opacity: 0.6
+ }
+ },
+ State {
+ name: "disabled"
+ when: !control.enabled
+ PropertyChanges {
+ target: modeKeyBackground
+ opacity: 0.8
+ }
+ PropertyChanges {
+ target: modeKeyText
+ opacity: 0.2
+ }
+ }
+ ]
+ }
+
+ handwritingKeyPanel: KeyPanel {
+ Rectangle {
+ id: hwrKeyBackground
+ color: "transparent"
+ border.width: 1
+ border.color: "#464646"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Image {
+ id: hwrKeyIcon
+ anchors.centerIn: parent
+ readonly property size hwrKeyIconSize: keyboard.handwritingMode ? Qt.size(124, 96) : Qt.size(156, 104)
+ sourceSize.width: hwrKeyIconSize.width * keyIconScale
+ sourceSize.height: hwrKeyIconSize.height * keyIconScale
+ smooth: false
+ source: resourcePrefix + (keyboard.handwritingMode ? "images/textmode-868482.svg" : "images/handwriting-868482.svg")
+ }
+ }
+ states: [
+ State {
+ name: "pressed"
+ when: control.pressed
+ PropertyChanges {
+ target: hwrKeyBackground
+ opacity: 0.80
+ }
+ PropertyChanges {
+ target: hwrKeyIcon
+ opacity: 0.6
+ }
+ },
+ State {
+ name: "disabled"
+ when: !control.enabled
+ PropertyChanges {
+ target: hwrKeyBackground
+ opacity: 0.8
+ }
+ PropertyChanges {
+ target: hwrKeyIcon
+ opacity: 0.2
+ }
+ }
+ ]
+ }
+
+ characterPreviewMargin: 0
+ characterPreviewDelegate: Item {
+ property string text
+ id: characterPreview
+ Rectangle {
+ id: characterPreviewBackground
+ anchors.fill: parent
+ color: "#5d5b59"
+ radius: 5
+ Text {
+ id: characterPreviewText
+ color: "white"
+ text: characterPreview.text
+ fontSizeMode: Text.HorizontalFit
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ anchors.fill: parent
+ anchors.margins: Math.round(48 * scaleHint)
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: 82 * scaleHint
+ }
+ }
+ }
+ }
+
+ alternateKeysListItemWidth: 99 * scaleHint
+ alternateKeysListItemHeight: 150 * scaleHint
+ alternateKeysListDelegate: Item {
+ id: alternateKeysListItem
+ width: alternateKeysListItemWidth
+ height: alternateKeysListItemHeight
+ Text {
+ id: listItemText
+ text: model.text
+ color: "#868482"
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: 52 * scaleHint
+ }
+ anchors.centerIn: parent
+ }
+ states: State {
+ name: "current"
+ when: alternateKeysListItem.ListView.isCurrentItem
+ PropertyChanges {
+ target: listItemText
+ color: "white"
+ }
+ }
+ }
+ alternateKeysListHighlight: Rectangle {
+ color: "#5d5b59"
+ radius: 5
+ }
+ alternateKeysListBackground: Rectangle {
+ color: "#1e1b18"
+ radius: 5
+ }
+
+ selectionListHeight: 85 * scaleHint
+ selectionListDelegate: SelectionListItem {
+ id: selectionListItem
+ width: Math.round(selectionListLabel.width + selectionListLabel.anchors.leftMargin * 2)
+ Text {
+ id: selectionListLabel
+ anchors.left: parent.left
+ anchors.leftMargin: Math.round((compactSelectionList ? 50 : 140) * scaleHint)
+ anchors.verticalCenter: parent.verticalCenter
+ text: decorateText(display, wordCompletionLength)
+ color: "#BC6608"
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: 44 * scaleHint
+ }
+ function decorateText(text, wordCompletionLength) {
+ if (wordCompletionLength > 0) {
+ return text.slice(0, -wordCompletionLength) + '<u>' + text.slice(-wordCompletionLength) + '</u>'
+ }
+ return text
+ }
+ }
+ Rectangle {
+ id: selectionListSeparator
+ width: 4 * scaleHint
+ height: 36 * scaleHint
+ radius: 2
+ color: "#35322f"
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.left
+ }
+ states: State {
+ name: "current"
+ when: selectionListItem.ListView.isCurrentItem
+ PropertyChanges {
+ target: selectionListLabel
+ color: "white"
+ }
+ }
+ }
+ selectionListBackground: keyboardBackground
+
+ selectionListAdd: Transition {
+ NumberAnimation { property: "y"; from: wordCandidateView.height; duration: 200 }
+ NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200 }
+ }
+ selectionListRemove: Transition {
+ NumberAnimation { property: "y"; to: -wordCandidateView.height; duration: 200 }
+ NumberAnimation { property: "opacity"; to: 0; duration: 200 }
+ }
+
+ navigationHighlight: Rectangle {
+ color: "transparent"
+ border.color: "yellow"
+ border.width: 5
+ }
+
+ traceInputKeyPanelDelegate: TraceInputKeyPanel {
+ traceMargins: keyBackgroundMargin
+ Rectangle {
+ id: traceInputKeyPanelBackground
+ radius: 5
+ color: "#35322f"
+ anchors.fill: parent
+ anchors.margins: keyBackgroundMargin
+ Text {
+ id: hwrInputModeIndicator
+ visible: control.patternRecognitionMode === InputEngine.HandwritingRecoginition
+ text: InputContext.inputEngine.inputMode === InputEngine.Latin ? "Abc" : "123"
+ color: "white"
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.margins: keyContentMargin
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: 44 * scaleHint
+ capitalization: {
+ if (InputContext.capsLock)
+ return Font.AllUppercase
+ if (InputContext.shift)
+ return Font.MixedCase
+ return Font.AllLowercase
+ }
+ }
+ }
+ }
+ Canvas {
+ id: traceInputKeyGuideLines
+ anchors.fill: traceInputKeyPanelBackground
+ opacity: 0.1
+ onPaint: {
+ console.error(Utils.Logging.sysui, "PAINT")
+ var ctx = getContext("2d")
+ ctx.lineWidth = 1
+ ctx.strokeStyle = "#BC6608"
+ ctx.clearRect(0, 0, width, height)
+ var i
+ if (control.horizontalRulers) {
+ for (i = 0; i < control.horizontalRulers.length; i++) {
+ ctx.beginPath()
+ ctx.moveTo(0, control.horizontalRulers[i])
+ ctx.lineTo(width, control.horizontalRulers[i])
+ ctx.stroke()
+ }
+ }
+ if (control.verticalRulers) {
+ for (i = 0; i < control.verticalRulers.length; i++) {
+ ctx.beginPath()
+ ctx.moveTo(control.verticalRulers[i], 0)
+ ctx.lineTo(control.verticalRulers[i], height)
+ ctx.stroke()
+ }
+ }
+ }
+ }
+ }
+
+ traceCanvasDelegate: TraceCanvas {
+ id: traceCanvas
+ onAvailableChanged: {
+ if (!available)
+ return
+ var ctx = getContext("2d")
+ if (parent.canvasType === "fullscreen") {
+ ctx.lineWidth = 10
+ ctx.strokeStyle = "#BC6608"
+ } else {
+ ctx.lineWidth = 10 * scaleHint
+ ctx.strokeStyle = "#BC6608"
+ }
+ ctx.lineCap = "round"
+ ctx.fillStyle = ctx.strokeStyle
+ }
+ autoDestroyDelay: 800
+ onTraceChanged: if (trace === null) opacity = 0
+ Behavior on opacity { PropertyAnimation { easing.type: Easing.OutCubic; duration: 150 } }
+ }
+
+ popupListDelegate: SelectionListItem {
+ property real cursorAnchor: popupListLabel.x + popupListLabel.width
+ id: popupListItem
+ width: popupListLabel.width + popupListLabel.anchors.leftMargin * 2
+ height: popupListLabel.height + popupListLabel.anchors.topMargin * 2
+ Text {
+ id: popupListLabel
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.leftMargin: popupListLabel.height / 2
+ anchors.topMargin: popupListLabel.height / 3
+ text: decorateText(display, wordCompletionLength)
+ color: "#5CAA15"
+ font {
+ family: fontFamily
+ weight: Utils.Style.fontWeight
+ pixelSize: Qt.inputMethod.cursorRectangle.height * 0.8
+ }
+ function decorateText(text, wordCompletionLength) {
+ if (wordCompletionLength > 0) {
+ return text.slice(0, -wordCompletionLength) + '<u>' + text.slice(-wordCompletionLength) + '</u>'
+ }
+ return text
+ }
+ }
+ states: State {
+ name: "current"
+ when: popupListItem.ListView.isCurrentItem
+ PropertyChanges {
+ target: popupListLabel
+ color: "black"
+ }
+ }
+ }
+
+ popupListBackground: Item {
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ color: "white"
+ border {
+ width: 1
+ color: "#929495"
+ }
+ }
+ }
+
+ popupListAdd: Transition {
+ NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: 200 }
+ }
+
+ popupListRemove: Transition {
+ NumberAnimation { property: "opacity"; to: 0; duration: 200 }
+ }
+}
diff --git a/imports/shared/animations/qmldir b/imports/shared/animations/qmldir
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/imports/shared/animations/qmldir
diff --git a/imports/shared/controls/+material/BackgroundPane.qml b/imports/shared/controls/+material/BackgroundPane.qml
new file mode 100644
index 00000000..13f828b1
--- /dev/null
+++ b/imports/shared/controls/+material/BackgroundPane.qml
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick.Controls 2.0
+
+
+Pane {
+ id: control
+}
diff --git a/imports/shared/controls/+material/TemperatureSlider.qml b/imports/shared/controls/+material/TemperatureSlider.qml
new file mode 100644
index 00000000..5fe29b87
--- /dev/null
+++ b/imports/shared/controls/+material/TemperatureSlider.qml
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+import utils 1.0
+import controls 1.0
+
+Control {
+ id: root
+
+
+ implicitWidth: Style.hspan(2)
+ implicitHeight: Style.vspan(8)
+
+ readonly property int roundingModeWhole: 1
+ readonly property int roundingModeHalf: 2
+
+ property bool mirrorSlider: false
+
+ property alias from: slider.from
+ property alias to: slider.to
+ property alias value: slider.value
+ property int roundingMode: roundingModeWhole
+ property alias stepSize: slider.stepSize
+
+ transform: Rotation {
+ angle: mirrorSlider ? 180 : 0
+ axis { x: 0; y: 1; z: 0 }
+ origin { x: root.width/2; y: root.height/2 }
+ }
+
+ ColumnLayout {
+ id: barRow
+
+ spacing: 0
+ width: parent.width
+ height: parent.height
+
+ Label {
+ Layout.fillWidth: true
+ Layout.preferredHeight: Style.vspan(2)
+
+ font.family: Style.fontFamily
+ font.pixelSize: Style.fontSizeXL
+
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ text: "+"
+ color: Style.colorWhite
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: slider.increase()
+ }
+ }
+
+ Slider {
+ id: slider
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ orientation: Qt.Vertical
+ snapMode: Slider.SnapAlways
+ }
+
+ Label {
+ Layout.fillWidth: true
+ Layout.preferredHeight: Style.vspan(2)
+
+ font.family: Style.fontFamily
+ font.pixelSize: Style.fontSizeXL
+
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ text: "-"
+ color: Style.colorWhite
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: slider.decrease()
+ }
+ }
+ }
+
+ function _clamp(value) {
+ return Math.round(Math.min(root.maxValue, Math.max(root.minValue, value))*root.roundingMode)/root.roundingMode
+ }
+}
diff --git a/imports/shared/controls/+material/VolumeSlider.qml b/imports/shared/controls/+material/VolumeSlider.qml
new file mode 100644
index 00000000..49e46181
--- /dev/null
+++ b/imports/shared/controls/+material/VolumeSlider.qml
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick.Controls 2.0
+
+
+Slider {
+ id: control
+}
diff --git a/imports/shared/controls/+universal/BackgroundPane.qml b/imports/shared/controls/+universal/BackgroundPane.qml
new file mode 100644
index 00000000..13f828b1
--- /dev/null
+++ b/imports/shared/controls/+universal/BackgroundPane.qml
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick.Controls 2.0
+
+
+Pane {
+ id: control
+}
diff --git a/imports/shared/controls/AppStackView.qml b/imports/shared/controls/AppStackView.qml
new file mode 100644
index 00000000..fdcfff85
--- /dev/null
+++ b/imports/shared/controls/AppStackView.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+
+StackView {
+ id: stack
+
+
+ property int pushDuration: 400
+ property int popDuration: 250
+
+ pushEnter: Transition {
+ XAnimator {
+ from: 2*stack.width
+ to: 0
+ duration: pushDuration
+ }
+ }
+
+ pushExit: Transition {
+ XAnimator {
+ to: -2*stack.width
+ duration: pushDuration
+ }
+ }
+
+ popEnter: Transition {
+ XAnimator {
+ from: -2*stack.width
+ to: 0
+ duration: popDuration
+ }
+ }
+
+ popExit: Transition {
+ XAnimator {
+ from: 0
+ to: 2*stack.width
+ duration: popDuration
+ }
+ }
+
+ Tracer{}
+}
diff --git a/imports/shared/controls/CategoryListItem.qml b/imports/shared/controls/CategoryListItem.qml
new file mode 100644
index 00000000..055c62e5
--- /dev/null
+++ b/imports/shared/controls/CategoryListItem.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+import controls 1.0
+import utils 1.0
+
+Control {
+ id: root
+
+ property alias text: label.text
+ property alias symbol: symbol.name
+
+ signal clicked()
+
+ BorderImage {
+ anchors.fill: parent
+ anchors.bottomMargin: 1
+ source: Style.gfx('appstore_tab_panel')
+ opacity: 1-activeBackground.opacity
+ border {
+ left: 4
+ right: 60
+ top: 4
+ bottom: 4
+ }
+ asynchronous: true
+ }
+
+ BorderImage {
+ id: activeBackground
+ anchors.fill: parent
+ anchors.bottomMargin: 1
+ source: Style.gfx('appstore_tab_panel_selected')
+ opacity: root.ListView.isCurrentItem
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+ border {
+ left: 4
+ right: 60
+ top: 4
+ bottom: 4
+ }
+ asynchronous: true
+ }
+
+ Label {
+ id: label
+
+ anchors.left: parent.left
+ anchors.right: symbol.left
+ height: parent.height
+ anchors.leftMargin: Style.paddingXL
+ anchors.rightMargin: symbol.width === 0 ? Style.paddingXL : 0
+
+ font.pixelSize: Style.fontSizeS
+ font.capitalization: Font.AllUppercase
+ color: root.ListView.isCurrentItem ? Style.colorOrange : Style.colorWhite
+
+ Behavior on color { ColorAnimation { duration: 200 } }
+ }
+
+ Symbol {
+ id: symbol
+
+ anchors.right: parent.right
+ width: Style.hspan(name ? 2 : 0)
+ height: parent.height
+ active: root.ListView.isCurrentItem
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: root.clicked()
+ }
+}
diff --git a/imports/shared/controls/DisplayBackground.qml b/imports/shared/controls/DisplayBackground.qml
new file mode 100644
index 00000000..ac031955
--- /dev/null
+++ b/imports/shared/controls/DisplayBackground.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtGraphicalEffects 1.0
+import utils 1.0
+
+Item {
+
+ property string background: Style.displayBackground
+
+ Image {
+ id: bg
+
+ anchors.fill: parent
+ //anchors.centerIn: parent
+ source: Style.gfx2(background)
+ visible: !Style.fakeBackground
+ fillMode: Image.PreserveAspectCrop
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: '#2e2e2e'
+ visible: Style.fakeBackground
+ }
+}
diff --git a/imports/shared/controls/HDiv.qml b/imports/shared/controls/HDiv.qml
new file mode 100644
index 00000000..d571b94f
--- /dev/null
+++ b/imports/shared/controls/HDiv.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import utils 1.0
+
+// TODO: Convert to Pane
+
+Control {
+ width: Style.hspan(8)
+ height: Style.vspan(2)
+ Image {
+ anchors.centerIn: parent
+ anchors.verticalCenterOffset: 16
+ source: Style.gfx('widgets_hdiv')
+ asynchronous: true
+ }
+}
diff --git a/imports/shared/controls/Icon.qml b/imports/shared/controls/Icon.qml
new file mode 100644
index 00000000..e3f15738
--- /dev/null
+++ b/imports/shared/controls/Icon.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+import utils 1.0
+
+Control {
+ id: root
+ implicitWidth: Style.hspan(2)
+ implicitHeight: Style.vspan(2)
+
+ property string source
+ property bool fit: false
+
+ Image {
+ id: defaultIcon
+ width: root.fit ? root.width : undefined
+ height: root.fit ? root.height : undefined
+ anchors.centerIn: parent
+ source: root.source ? root.source : ""
+ opacity: root.enabled ? 1.0 : 0.5
+ asynchronous: true
+ antialiasing: true
+ fillMode: root.fit ? Image.PreserveAspectFit : Image.Pad
+ Behavior on opacity { NumberAnimation { duration: 250 } }
+ }
+}
diff --git a/imports/shared/controls/LetterPicker.qml b/imports/shared/controls/LetterPicker.qml
new file mode 100644
index 00000000..0b758852
--- /dev/null
+++ b/imports/shared/controls/LetterPicker.qml
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtGraphicalEffects 1.0
+import utils 1.0
+
+// TODO: Derive form QQC2 Pane
+
+Control {
+ id: root
+
+ width: Style.hspan(1)
+ height: Style.vspan(20)
+
+ property string letter: letterModel[pathView.currentIndex]
+ property color textColor: "white"
+ property alias numOfVisibleLetters: pathView.pathItemCount
+ // TODO: use 'abcde'.split('')
+ property var letterModel: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "y", "z"]
+
+ PathView {
+ id: pathView
+
+ property int padding: (width-root.itemWidth)/2
+
+ anchors.fill: parent
+ clip: true
+
+ snapMode: PathView.SnapOneItem
+
+ pathItemCount: 15
+
+ model: root.letterModel
+
+ preferredHighlightBegin: 0.5
+ preferredHighlightEnd: 0.5
+
+ delegate: Item {
+
+ width: 40
+ height: root.height/pathView.count
+ scale: PathView.scale
+ property string value: modelData
+ Label {
+ anchors.fill: parent
+ text: modelData.toUpperCase()
+ horizontalAlignment: Text.AlignHCenter
+ color: root.textColor
+ font.pixelSize: Style.fontSizeXL
+ }
+ }
+
+ path: Path {
+ startX: pathView.width/2
+ startY: 0
+ PathAttribute { name: "scale"; value: 0.7 }
+
+ PathLine { x: pathView.width/2; y: pathView.height/2 }
+ PathAttribute { name: "scale"; value: 1 }
+
+ PathLine { x: pathView.width/2; y: pathView.height }
+ PathAttribute { name: "scale"; value: 0.7 }
+
+ }
+ }
+
+ LinearGradient {
+ width: root.width
+ height: 0.3 * root.height
+
+ start: Qt.point(0, 0)
+ end: Qt.point(0, height)
+ gradient: Gradient {
+ GradientStop { position: 0.2; color: "black" }
+ GradientStop { position: 1.0; color: "transparent" }
+ }
+ }
+
+ LinearGradient {
+ width: root.width
+ height: 0.3 * root.height
+ anchors.bottom: parent.bottom
+
+ start: Qt.point(0, 0)
+ end: Qt.point(0, height)
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "transparent" }
+ GradientStop { position: 0.8; color: "black" }
+ }
+ }
+
+ Tracer {}
+}
diff --git a/imports/shared/controls/ListItem.qml b/imports/shared/controls/ListItem.qml
new file mode 100644
index 00000000..f72ce571
--- /dev/null
+++ b/imports/shared/controls/ListItem.qml
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+
+import controls 1.0
+import utils 1.0
+
+ItemDelegate {
+ id: root
+
+ anchors.left: parent.left
+ anchors.leftMargin: Style.hspan(2)
+
+ property alias icon: icon.name
+ property alias hasChildren: childIndicator.visible
+
+ contentItem: Item {
+ anchors.fill: root
+ RowLayout {
+ height: parent.height
+
+ Symbol {
+ id: icon
+ Layout.preferredWidth: Style.hspan(1)
+ Layout.fillHeight: true
+ opacity: 0.4
+ visible: name !== ""
+ }
+
+ Item {
+ id: placeHolder
+ width: Style.hspan(0.2)
+ height: parent.height
+ visible: !icon.visible
+ }
+
+ Label {
+ id: titleLabel
+ Layout.preferredWidth: Style.hspan(18)
+ Layout.fillHeight: true
+ elide: Text.ElideRight
+ text: root.text
+ }
+ }
+
+ Icon {
+ id: childIndicator
+ anchors.right: parent.right
+ width: Style.hspan(1)
+ Layout.fillHeight: true
+ source: Style.icon("cloud_arrow")
+ }
+
+ Item {
+ width: root.width
+ anchors.verticalCenter: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ height: Style.vspan(2)
+ Image {
+ width: parent.width
+ anchors.centerIn: parent
+ anchors.verticalCenterOffset: 16
+ source: Style.gfx('widgets_hdiv')
+ asynchronous: true
+ }
+ }
+ }
+
+ Tracer {
+ }
+}
diff --git a/imports/shared/controls/ListItemRadioButton.qml b/imports/shared/controls/ListItemRadioButton.qml
new file mode 100644
index 00000000..f9d7b341
--- /dev/null
+++ b/imports/shared/controls/ListItemRadioButton.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+
+import controls 1.0
+import utils 1.0
+
+ListItem {
+ id: root
+
+ hasChildren: false
+
+ property bool selected: false
+
+ // Replace this with asset when available
+ Rectangle {
+ width: Style.hspan(0.4)
+ height: width
+ radius: width
+ border.width: Style.hspan(0.04)
+ border.color: Style.colorWhite
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ anchors.rightMargin: Style.vspan(4)
+ color: "transparent"
+
+ Rectangle {
+ width: Style.hspan(0.3)
+ height: width
+ radius: width
+ anchors.centerIn: parent
+ color: Style.colorOrange
+ visible: selected
+ }
+ }
+}
diff --git a/imports/shared/controls/ListItemSwitch.qml b/imports/shared/controls/ListItemSwitch.qml
new file mode 100644
index 00000000..74100616
--- /dev/null
+++ b/imports/shared/controls/ListItemSwitch.qml
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.2
+
+import controls 1.0
+import utils 1.0
+
+ListItem {
+ id: root
+
+ Switch {
+ id: switchControl
+ Layout.preferredWidth: Style.hspan(5)
+ Layout.fillHeight: true
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ checked: root.checked
+ onClicked: root.clicked()
+ }
+}
diff --git a/imports/shared/controls/ListViewManager.qml b/imports/shared/controls/ListViewManager.qml
new file mode 100644
index 00000000..905cfa54
--- /dev/null
+++ b/imports/shared/controls/ListViewManager.qml
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+import utils 1.0
+
+ListView {
+ id: root
+ clip: true
+ boundsBehavior: Flickable.StopAtBounds
+ ScrollBar.vertical: ScrollBar { }
+}
+
diff --git a/imports/shared/controls/Popup.qml b/imports/shared/controls/Popup.qml
new file mode 100644
index 00000000..e08432ea
--- /dev/null
+++ b/imports/shared/controls/Popup.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+
+// TODO: Convert to use QQC2 Popup
+// TODO: Check that QQC2 Popups are supported by AppMan
+
+
+Control {
+ id: root
+ width: Style.hspan(6)
+ height: Style.vspan(7)
+
+ property alias source: icon.source
+ property alias text: label.text
+
+ Rectangle {
+ anchors.fill: parent
+ color: "black"
+ opacity: 0.4
+ }
+
+ Image {
+ id: icon
+ anchors.top: parent.top
+ anchors.topMargin: Style.vspan(1)
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ }
+
+ Label {
+ id: label
+ width: Style.hspan(7)
+ height: Style.vspan(3)
+ horizontalAlignment: Text.AlignHCenter
+ anchors.horizontalCenter: icon.horizontalCenter
+ anchors.top: icon.bottom
+ //Tracer { visible: true}
+ }
+}
diff --git a/imports/shared/controls/ScrollIndicator.qml b/imports/shared/controls/ScrollIndicator.qml
new file mode 100644
index 00000000..ba9b2b31
--- /dev/null
+++ b/imports/shared/controls/ScrollIndicator.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import utils 1.0
+
+// TODO: Convert to use QQC2 ScrollIndicator
+Item {
+ id: sliderCOntainer
+ width: 5
+ //color: "black"
+
+ height: 500
+
+ property real position
+ property real givenPosition
+ property real scrollerSize
+
+ Rectangle {
+ id: slider
+ y: sliderCOntainer.givenPosition
+ onYChanged: {
+ if (area.drag.active)
+ position = y/sliderCOntainer.height
+ }
+
+ height: sliderCOntainer.scrollerSize
+ width: parent.width
+
+ color: Style.colorOrange
+
+ Behavior on y {
+ NumberAnimation {duration : 200 }
+ }
+
+ MouseArea {
+ id: area
+ anchors.fill: parent
+
+ drag.target: slider
+ drag.axis: Drag.YAxis
+ drag.maximumY: sliderCOntainer.height - slider.height
+ drag.minimumY: 0
+ }
+ }
+
+ Tracer {}
+
+ Behavior on width { NumberAnimation { duration: 100 }}
+}
diff --git a/imports/shared/controls/SettingsItemDelegate.qml b/imports/shared/controls/SettingsItemDelegate.qml
new file mode 100644
index 00000000..49c08dbe
--- /dev/null
+++ b/imports/shared/controls/SettingsItemDelegate.qml
@@ -0,0 +1,109 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+
+import utils 1.0
+
+ItemDelegate {
+ id: root
+ implicitWidth: Style.hspan(16)
+ implicitHeight: Style.vspan(2)
+
+ property alias icon: icon.name
+ property alias hasChildren: childIndicator.visible
+ checkable: true
+
+ background: Item {
+ implicitWidth: Style.hspan(16)
+ implicitHeight: Style.vspan(2)
+ }
+
+ contentItem: Control {
+ implicitWidth: Style.hspan(16)
+ implicitHeight: Style.vspan(2)
+ RowLayout {
+ height: parent.height
+ spacing: 5
+
+ Symbol {
+ id: icon
+ Layout.preferredWidth: Style.hspan(2)
+ Layout.fillHeight: true
+ opacity: 0.4
+ }
+
+ Label {
+ id: titleLabel
+ Layout.preferredWidth: Style.hspan(8)
+ Layout.fillHeight: true
+ text: root.text
+ elide: Text.ElideRight
+ }
+
+ Switch {
+ id: switchControl
+ Layout.preferredWidth: Style.hspan(5)
+ Layout.fillHeight: true
+ visible: root.checkable
+ checked: root.checked
+ onClicked: {
+ root.checked = !root.checked
+ root.clicked()
+ }
+ }
+
+ Spacer {
+ Layout.preferredWidth: Style.hspan(3)
+ Layout.fillHeight: true
+ visible: !root.checkable
+ }
+
+ Icon {
+ id: childIndicator
+ Layout.preferredWidth: Style.hspan(2)
+ Layout.fillHeight: true
+ source: Style.icon("cloud_arrow")
+ }
+ }
+ HDiv {
+ anchors.verticalCenter: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+// _tracer_color: 'transparent'
+ }
+ }
+
+ Tracer {
+ }
+
+}
diff --git a/imports/shared/controls/Symbol.qml b/imports/shared/controls/Symbol.qml
new file mode 100644
index 00000000..083b04c4
--- /dev/null
+++ b/imports/shared/controls/Symbol.qml
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import utils 1.0
+
+Control {
+ id: root
+
+ width: Style.hspan(1)
+ height: Style.vspan(2)
+ property string name
+ property bool active
+ property int size: Style.defaultSymbolSize
+ property alias rotate: image.rotation
+ Image {
+ id: image
+ anchors.centerIn: parent
+ source: root.name ? Style.symbol(root.name, root.size, root.active) : ""
+ asynchronous: true
+ }
+}
diff --git a/imports/shared/controls/TabView.qml b/imports/shared/controls/TabView.qml
new file mode 100644
index 00000000..5fb54a84
--- /dev/null
+++ b/imports/shared/controls/TabView.qml
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+import controls 1.0
+import utils 1.0
+
+Control {
+ id: root
+
+ property int currentIndex: 0
+ property alias tabs: repeater.model
+ property real tabWidth: Style.hspan(2)
+ property real tabHeight: Style.vspan(1)
+ property bool horizontalAlignment: true
+ property int viewLeftMargin: 0
+
+ TabBar {
+ id: tabRow
+ anchors.top: parent.top
+ anchors.horizontalCenter: root.horizontalAlignment ? parent.horizontalCenter : undefined
+ height: root.tabHeight
+
+ Repeater {
+ id: repeater
+ TabButton {
+ property real maxTabWidth: repeater.count ? root.width / repeater.count : root.width
+ width: Math.min(maxTabWidth, root.tabWidth)
+ height: root.tabHeight
+ text: modelData.title
+ onClicked: {
+ if (root.currentIndex !== index) {
+ tabContent.replace(null, modelData.url, modelData.properties);
+ root.currentIndex = tabRow.currentIndex;
+ }
+ }
+ }
+ }
+ }
+
+
+ StackView {
+ id: tabContent
+
+ anchors.top: tabRow.bottom;
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left;
+ anchors.right: parent.right
+ anchors.leftMargin: root.viewLeftMargin
+
+ clip: true
+
+ Component.onCompleted: {
+ console.log(Logging.sysui, 'push initial item for tab view')
+ push(root.tabs[root.currentIndex].url, root.tabs[root.currentIndex].properties)
+ }
+
+ // TODO: Replace StackViewDelegate
+
+// delegate: QControls.StackViewDelegate {
+
+// function transitionFinished(properties)
+// {
+// properties.exitItem.opacity = 1
+// }
+
+// pushTransition: QControls.StackViewTransition {
+// PropertyAnimation {
+// target: enterItem
+// property: "opacity"
+// from: 0
+// to: 1
+// duration: 250
+// }
+
+// PropertyAnimation {
+// target: exitItem
+// property: "opacity"
+// from: 1
+// to: 0
+// duration: 250
+// }
+// }
+// }
+ }
+}
diff --git a/imports/shared/controls/TemperatureSlider.qml b/imports/shared/controls/TemperatureSlider.qml
new file mode 100644
index 00000000..9833f1e8
--- /dev/null
+++ b/imports/shared/controls/TemperatureSlider.qml
@@ -0,0 +1,230 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+import utils 1.0
+import controls 1.0
+
+Control {
+ id: root
+
+ implicitWidth: Style.hspan(2)
+ implicitHeight: Style.vspan(8)
+
+ readonly property int roundingModeWhole: 1
+ readonly property int roundingModeHalf: 2
+
+ property bool mirrorSlider: false
+
+ property real from: 0
+ property real to: 1
+ property real value: 0.2
+ property int roundingMode: roundingModeWhole
+ property real stepSize: 0.1
+
+ onValueChanged: {
+ if ((root.value >= root.from) && (root.value <= root.to) && !touchArea.isTouchPressed)
+ slider.handlerPosition = (root.value - root.from) / (root.to - root.from)
+ }
+
+ transform: Rotation {
+ angle: mirrorSlider ? 180 : 0
+ axis { x: 0; y: 1; z: 0 }
+ origin { x: root.width/2; y: root.height/2 }
+ }
+
+ ColumnLayout {
+ id: barRow
+
+ spacing: 0
+ width: parent.width
+ height: parent.height
+
+ Label {
+ Layout.fillWidth: true
+ Layout.preferredHeight: Style.vspan(2)
+
+ font.family: Style.fontFamily
+ font.pixelSize: Style.fontSizeXL
+
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ text: "+"
+ color: Style.colorWhite
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: slider.increase()
+ }
+ }
+
+ Item {
+ id: slider
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ property real handlerPosition: (root.value >= root.from && root.value <= root.to) ?
+ (root.value - root.from) / (root.to - root.from) : 0
+
+ function increase() {
+ if (root.value < root.to)
+ root.value = root.value + root.stepSize
+ }
+
+ function decrease() {
+ if (root.value > root.from)
+ root.value = root.value - root.stepSize
+ }
+
+ Column {
+ id: viewContainer
+
+ Repeater {
+ id: view
+
+ model: modelCount
+ property int modelCount: (slider.height - Style.vspan(1))/itemHeight
+ property int itemHeight: 7
+ property real deltaRed: (0xa6 - 0xf0) / modelCount
+ property real deltaGreen: (0xd5 - 0x7d) / modelCount
+ property real deltaBlue: (0xda - 0x0) / modelCount
+ property int currentIndex: slider.handlerPosition * modelCount //- 2
+
+ function calcRed(index) { return (deltaRed * (modelCount-index) + 0xf0) / 255 }
+ function calcGreen(index) { return (deltaGreen * (modelCount-index) + 0x7d) / 255 }
+ function calcBlue(index) { return (deltaBlue * (modelCount-index) + 0x0) / 255 }
+
+ delegate: Item {
+ width: slider.width
+ height: view.itemHeight
+ property int entry: index
+
+ Rectangle {
+ id: stripe
+
+ property bool bottomPart: index >= (view.modelCount - view.currentIndex)
+
+ antialiasing: true
+ anchors.right: parent.right
+ width: parent.width - Style.hspan(1)
+ height: parent.height - 3
+ border.color: Qt.darker(color, 1.5)
+ border.width: 1
+ color: Qt.rgba(view.calcRed(index), view.calcGreen(index), view.calcBlue(index))
+ scale: bottomPart ? 1.0 : 0.96
+ transformOrigin: Item.Left
+ Behavior on scale { NumberAnimation { easing.type: Easing.OutQuad } }
+ opacity: bottomPart ? 1.0 : 0.6
+ Behavior on opacity { NumberAnimation {} }
+ }
+ }
+ }
+ }
+
+ Symbol {
+ id: handler
+ y: (1 - slider.handlerPosition)*viewContainer.height - height/2
+ implicitWidth: Style.hspan(1)
+ implicitHeight: Style.vspan(1)
+ width: slider.width
+ height: implicitHeight
+
+ property real position: 1 - y/viewContainer.height
+
+ transform: Rotation {
+ angle: 180
+ axis { x: 0; y: 1; z: 0 }
+ origin { x: width/2; y: height/2 }
+ }
+
+ Symbol {
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ opacity: 0.4
+ name: "slider_marker"
+ height: Style.vspan(1)
+ }
+ }
+
+ MultiPointTouchArea {
+ id: touchArea
+
+ anchors.fill: parent
+
+ property alias isTouchPressed: mainTouchPoint.pressed
+
+ touchPoints: [
+ TouchPoint {
+ id: mainTouchPoint
+
+ onYChanged: {
+ if (y >= viewContainer.height) {
+ root.value = root.from
+ } else if (y <= 0) {
+ root.value = root.to
+ } else {
+ slider.handlerPosition = 1 - y/viewContainer.height
+ var tempValue = slider.handlerPosition * (root.to - root.from)
+ tempValue = tempValue + root.from
+
+ var difference = tempValue - root.value
+ if (Math.abs(difference) > root.stepSize) {
+ var increaseTimes = Math.floor(difference/root.stepSize)
+ root.value = root.value + increaseTimes * root.stepSize
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+
+ Label {
+ Layout.fillWidth: true
+ Layout.preferredHeight: Style.vspan(2)
+
+ font.family: Style.fontFamily
+ font.pixelSize: Style.fontSizeXL
+
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ text: "-"
+ color: Style.colorWhite
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: slider.decrease()
+ }
+ }
+ }
+}
diff --git a/imports/shared/controls/TextField.qml b/imports/shared/controls/TextField.qml
new file mode 100644
index 00000000..57ae5402
--- /dev/null
+++ b/imports/shared/controls/TextField.qml
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import utils 1.0
+
+Control {
+ id: root
+
+ property alias text: textInput.text
+ property alias hintText: hintLabel.text
+ property alias length: textInput.length
+ property alias inputMethodHints: textInput.inputMethodHints
+ property bool forceFocusOnClick: false
+
+ signal accepted
+
+ Rectangle {
+ id: background
+
+ anchors.fill: parent
+ color: Style.colorBlack
+ }
+
+ TextInput {
+ id: textInput
+
+ anchors.fill: parent
+ anchors.leftMargin: Style.paddingXL
+ anchors.rightMargin: Style.paddingXL
+ verticalAlignment: Qt.AlignVCenter
+
+ font.family: Style.fontFamily
+ font.pixelSize: Style.fontSizeM
+ color: Style.colorWhite
+ clip: true
+
+ onAccepted: root.accepted()
+ }
+
+ Label {
+ id: hintLabel
+
+ anchors.fill: textInput
+ font.italic: true
+ opacity: !textInput.activeFocus && textInput.length === 0
+
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ MouseArea {
+ id: focusMouseArea
+
+ enabled: root.forceFocusOnClick && !textInput.activeFocus
+ anchors.fill: textInput
+
+ onClicked: textInput.forceActiveFocus()
+ }
+}
diff --git a/imports/shared/controls/Tool.qml b/imports/shared/controls/Tool.qml
new file mode 100644
index 00000000..045a1b3f
--- /dev/null
+++ b/imports/shared/controls/Tool.qml
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Controls 2.3
+import controls 1.0
+import utils 1.0
+
+
+// FIXME: delete-me. Implementation should be using ToolButton directly
+ToolButton {
+ id: root
+ width: Style.hspan(4)
+ height: Style.vspan(2)
+ property string symbol
+ property int size
+
+ indicator: Image {
+ anchors.centerIn: parent
+ source: root.symbol ? Style.symbol(root.symbol, root.size, root.checked) : ""
+ }
+}
diff --git a/imports/shared/controls/VolumeSlider.qml b/imports/shared/controls/VolumeSlider.qml
new file mode 100644
index 00000000..f31af1e6
--- /dev/null
+++ b/imports/shared/controls/VolumeSlider.qml
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import utils 1.0
+
+Slider {
+ id: root
+ implicitWidth: Style.hspan(16)
+ implicitHeight: Style.vspan(2)
+
+ background: Item {
+ x: root.leftPadding
+ y: root.topPadding + root.availableHeight / 2 - height / 2
+ implicitWidth: Style.hspan(8)
+ implicitHeight: Style.vspan(2)
+ Image {
+ anchors.centerIn: parent
+ source: Style.gfx('volume_slider_overlay')
+ opacity: 0.2
+ asynchronous: true
+ }
+ ListView {
+ id: view
+ anchors.fill: parent
+ anchors.topMargin: Style.paddingXL
+ anchors.bottomMargin: Style.paddingXL
+ orientation: Qt.Horizontal
+ interactive: false
+ model: width/12
+ currentIndex: root.position * count
+ Behavior on currentIndex { SmoothedAnimation { velocity: view.count*2} }
+ delegate: Item {
+ width: view.width/view.count
+ height: view.height
+ property int entry: index
+ Rectangle {
+ width: 4
+ height: parent.height
+ anchors.centerIn: parent
+ border.color: Qt.darker(color, 1.1)
+ color: '#A2CED2'
+ radius: 1
+ scale: view.currentIndex >= index?1.0:0.85
+ transformOrigin: Item.Bottom
+ Behavior on scale { NumberAnimation { easing.type: Easing.OutQuad } }
+ opacity: view.currentIndex >= index?1.0:0.25
+ Behavior on opacity { NumberAnimation {} }
+ }
+ }
+ Tracer {}
+ }
+ Tracer {}
+ }
+
+ handle: Item {
+ // we need to have a pseudo handle otherwise drag does not work
+ x: root.leftPadding + root.visualPosition * (root.availableWidth - width)
+ y: root.topPadding + root.availableHeight / 2 - height / 2
+ width: Style.hspan(1)
+ height: Style.vspan(2)
+ Tracer {}
+ }
+}
diff --git a/imports/shared/controls/qmldir b/imports/shared/controls/qmldir
new file mode 100644
index 00000000..fe6b9099
--- /dev/null
+++ b/imports/shared/controls/qmldir
@@ -0,0 +1,27 @@
+Icon 1.0 Icon.qml
+DisplayBackground 1.0 DisplayBackground.qml
+CategoryListView 1.0 CategoryListView.qml
+CategoryListItem 1.0 CategoryListItem.qml
+TabView 1.0 TabView.qml
+SettingsListView 1.0 SettingsListView.qml
+SettingsItemDelegate 1.0 SettingsItemDelegate.qml
+Tool 1.0 Tool.qml
+TextTool 1.0 TextTool.qml
+HDiv 1.0 HDiv.qml
+VDiv 1.0 VDiv.qml
+VolumeSlider 1.0 VolumeSlider.qml
+Symbol 1.0 Symbol.qml
+TextField 1.0 TextField.qml
+WebBrowser 1.0 WebBrowser.qml
+ListViewManager 1.0 ListViewManager.qml
+Divider 1.0 Divider.qml
+ListItem 1.0 ListItem.qml
+ListItemRadioButton 1.0 ListItemRadioButton.qml
+ListItemSwitch 1.0 ListItemSwitch.qml
+AppStackView 1.0 AppStackView.qml
+Popup 1.0 Popup.qml
+LetterPicker 1.0 LetterPicker.qml
+AppInfoPanel 1.0 AppInfoPanel.qml
+BackgroundPane 1.0 BackgroundPane.qml
+TemperatureSlider 1.0 TemperatureSlider.qml
+ImageButton 1.0 ImageButton.qml
diff --git a/imports/shared/service/notification/NotificationInterface.qml b/imports/shared/service/notification/NotificationInterface.qml
new file mode 100644
index 00000000..8f57ecfb
--- /dev/null
+++ b/imports/shared/service/notification/NotificationInterface.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtApplicationManager 1.0
+
+/*!
+ \qmltype NotificationInterface
+ \inqmlmodule service
+ \inherits Notification
+ \brief An interface for requesting notifications.
+
+ NotificationInterface inherits \l {Notification} from \l{Qt Application Manager}
+ and acts like an adapter for Triton UI.
+ The NotificationInterface properties \c timeout and \c category are adopted
+ to match Triton UI requirements and should not be used. In the Triton UI
+ interaction, notifications should always be dismissed by an end user
+ instead of a time-out.
+
+ \section2 Example Usage
+
+ The following example demonstrates the NotificationInterface usage:
+
+ \qml
+
+ NotificationInterface {
+ summary: "Notification Prio 9"
+ body: "Notification sample"
+ priority: 9
+ icon: Style.symbolM("maps")
+ }
+ \endqml
+
+ \c summary defines a notification title. \c body defines a notification
+ description. Notifications are queued based on a value in \c priority.
+ \c icon must contain an absolute icon path. Otherwise, the icon is not shown.
+*/
+
+Notification {
+ id: root
+
+ timeout: 0
+ category: "notification"
+}
diff --git a/imports/shared/service/notification/qmldir b/imports/shared/service/notification/qmldir
new file mode 100644
index 00000000..4c1b488c
--- /dev/null
+++ b/imports/shared/service/notification/qmldir
@@ -0,0 +1 @@
+NotificationInterface 1.0 NotificationInterface.qml
diff --git a/imports/shared/service/popup/PopupInterface.qml b/imports/shared/service/popup/PopupInterface.qml
new file mode 100644
index 00000000..9c6c92a4
--- /dev/null
+++ b/imports/shared/service/popup/PopupInterface.qml
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtApplicationManager 1.0
+
+/*!
+ \qmltype PopupInterface
+ \inqmlmodule service
+ \inherits Notification
+ \brief An interface for requesting popups.
+
+ PopupInterface inherits \l{Notification} from \l{Qt Application Manager} and
+ acts like an adapter for Triton UI popups.
+ The PopupInterface properties \c timeout and \c category are adopted
+ to match Triton UI requirements and should not be used. In the Triton UI
+ interaction, pop-ups should always be dismissed by an end user
+ instead of a time-out.
+
+ \section2 Example Usage
+
+ \qml
+
+ PopupInterface {
+ id: popupInterfaceLowPrio
+ actions: [ { text: "Cancel" } ]
+ title: "Popup Prio 9"
+ summary: "Popup Sample"
+ priority: 9
+ }
+
+ \endqml
+
+ Pop-up notifications are queued based on a value in \c priority. \c actions
+ defines an array of buttons for a popup.
+*/
+
+Notification {
+ id: root
+
+ category: "popup"
+ timeout: 0
+
+ /*!
+ \qmlproperty string AppUIScreen::title
+
+ This property assigns a title for the popup.
+ */
+
+ property string title: ""
+
+ /*!
+ \qmlproperty string AppUIScreen::subtitle
+
+ This property assigns a subtitle for the popup.
+ */
+
+ property string subtitle: ""
+
+ onTitleChanged: {
+ root.updatePopup();
+ }
+
+ onSubtitleChanged: {
+ root.updatePopup();
+ }
+
+ /*!
+ \internal
+ */
+ function updatePopup() {
+ root.extended = {
+ "title": root.title,
+ "subtitle": root.subtitle
+ }
+ root.update();
+ }
+}
diff --git a/imports/shared/service/popup/qmldir b/imports/shared/service/popup/qmldir
new file mode 100644
index 00000000..306cae49
--- /dev/null
+++ b/imports/shared/service/popup/qmldir
@@ -0,0 +1 @@
+PopupInterface 1.0 PopupInterface.qml
diff --git a/imports/shared/utils/AppUIScreen.qml b/imports/shared/utils/AppUIScreen.qml
new file mode 100644
index 00000000..3e201f96
--- /dev/null
+++ b/imports/shared/utils/AppUIScreen.qml
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+import QtApplicationManager 1.0
+import controls 1.0
+import utils 1.0
+
+/*!
+ \qmltype AppUIScreen
+ \inqmlmodule utils
+ \inherits ApplicationManagerWindow
+ \brief A base QML item for developing applications.
+
+ AppUIScreen is a QML item which should be a root element in every
+ Triton UI application. It provides APIs for interacting with a system UI and
+ for positioning the application's visual elements.
+
+ See \l{Triton UI Application Development} for best practices on how to use the APIs.
+
+ \section2 Example Usage
+
+ The following example uses \l{AppUIScreen} as a root element:
+
+ \qml
+
+ AppUIScreen {
+ id: root
+ title: "Triton Template"
+
+ UIScreen {
+ Content {
+ anchors.centerIn: parent
+ width: Style.hspan(13)
+ height: Style.vspan(24)
+ }
+
+ onBackScreen: root.back()
+ }
+ }
+ \endqml
+
+*/
+
+ApplicationManagerWindow {
+ id: pelagicoreWindow
+ width: Style.hspan(24)
+ height: Style.vspan(24)
+
+ /*!
+ \qmlproperty Item AppUIScreen::content
+
+ A default property that specifies a content area for the application's visual content.
+ */
+
+ default property alias content: content.children
+
+ Item {
+ id: content
+ anchors.fill: parent
+ }
+}
diff --git a/imports/shared/utils/DisplayGrid.qml b/imports/shared/utils/DisplayGrid.qml
new file mode 100644
index 00000000..223e3bc5
--- /dev/null
+++ b/imports/shared/utils/DisplayGrid.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Layouts 1.0
+import utils 1.0
+Item {
+ width: 1280
+ height: 800
+ visible: Style.gridMode
+
+ Loader {
+ anchors.fill: parent
+ active: Style.gridMode
+ sourceComponent: Component {
+ Item {
+ id: root
+ property int padding: Style.padding
+ property int columns:24
+ property int rows:24
+ property int hmargin: (root.width-columns*cellWidth)/2
+ property int vmargin: (root.height-rows*cellHeight)/2
+ property int cellWidth: Style.cellWidth
+ property int cellHeight: Style.cellHeight
+ opacity: 0.5
+
+ // property int rows:
+
+ GridView {
+ anchors.fill: parent
+ anchors.leftMargin: root.hmargin
+ anchors.rightMargin: root.hmargin
+ anchors.topMargin: root.vmargin
+ anchors.bottomMargin: root.vmargin
+ cellWidth: root.cellWidth
+ cellHeight: root.cellHeight
+ model: root.columns*root.rows
+ interactive: false
+
+ delegate: DisplayGridCell {
+ width: root.cellWidth
+ height: root.cellHeight
+ padding: root.padding
+ }
+ }
+
+ Text {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ color: '#fff'
+ text: "hmargin: " + root.hmargin + ' vmargin: ' + root.vmargin
+ }
+ }
+ }
+ }
+}
+
diff --git a/imports/shared/utils/DisplayGridCell.qml b/imports/shared/utils/DisplayGridCell.qml
new file mode 100644
index 00000000..4898098f
--- /dev/null
+++ b/imports/shared/utils/DisplayGridCell.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+Item {
+ id: root
+ width: 48
+ height: 48
+ property int padding: 8
+ Rectangle {
+ anchors.fill: parent
+ anchors.margins: root.padding
+ color: "#53d769"
+ border.color: Qt.lighter(color, 1.2)
+ opacity: 0.1
+ }
+ Rectangle {
+ anchors.fill: parent
+ color: 'transparent'
+ border.color: "#53d769"
+ opacity: 0.5
+ }
+}
diff --git a/imports/shared/utils/Layouter.qml b/imports/shared/utils/Layouter.qml
new file mode 100644
index 00000000..66dcfe3e
--- /dev/null
+++ b/imports/shared/utils/Layouter.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+Item {
+ property var target
+
+ Keys.onPressed: {
+ if (target) {
+ switch (event.key) {
+ case Qt.Key_Up:
+ target.anchors.topMargin--
+ target.anchors.bottomMargin++
+ target.anchors.verticalCenterOffset--
+ break
+ case Qt.Key_Left:
+ target.anchors.leftMargin--
+ target.anchors.rightMargin++
+ target.anchors.horizontalCenterOffset--
+ break
+ case Qt.Key_Down:
+ target.anchors.topMargin++
+ target.anchors.bottomMargin--
+ target.anchors.verticalCenterOffset++
+ break
+ case Qt.Key_Right:
+ target.anchors.leftMargin++
+ target.anchors.rightMargin--
+ target.anchors.horizontalCenterOffset++
+ break
+ }
+ console.log(Logging.sysui, target.anchors.topMargin, target.anchors.bottomMargin,
+ target.anchors.leftMargin, target.anchors.rightMargin,
+ target.anchors.verticalCenterOffset,
+ target.anchors.horizontalCenterOffset)
+ }
+ }
+}
diff --git a/imports/shared/utils/Logging.qml b/imports/shared/utils/Logging.qml
new file mode 100644
index 00000000..23973a6b
--- /dev/null
+++ b/imports/shared/utils/Logging.qml
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.8
+
+QtObject {
+ property bool foo: true
+
+ property var sysui: LoggingCategory {
+ name: "triton.sysui"
+ }
+
+ property var apps: LoggingCategory {
+ name: "triton.apps"
+ }
+}
diff --git a/imports/shared/utils/Marker.qml b/imports/shared/utils/Marker.qml
new file mode 100644
index 00000000..734ef03a
--- /dev/null
+++ b/imports/shared/utils/Marker.qml
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import utils 1.0
+
+Control {
+ id: root
+
+ width: Style.hspan(4)
+ height: Style.vspan(2)
+
+ property string text
+ signal clicked()
+
+ property alias color: background.color
+ property bool solid: false
+
+ Rectangle {
+ id: background
+ anchors.fill: parent
+ color: '#576071'
+ opacity: root.solid?1.0:0.5
+ border.color: Qt.lighter(Qt.tint(color, '#66ffffff'), area.containsMouse?1.5:1.0)
+ }
+
+ Text {
+ id: label
+ anchors.centerIn: parent
+ color: '#fff'
+ font.pixelSize: 14
+ text: root.text
+ }
+ Text {
+ id: info
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.margins: 4
+ color: '#fff'
+ font.pixelSize: 10
+ text: root.width + 'x' + root.height
+ horizontalAlignment: Text.AlignRight
+ opacity: area.containsMouse?0.5:0.0
+ Behavior on opacity { NumberAnimation {} }
+ }
+
+ MouseArea {
+ id: area
+ anchors.fill: parent
+ onClicked: root.clicked()
+ hoverEnabled: true
+ }
+}
diff --git a/imports/shared/utils/NavigationUIScreen.qml b/imports/shared/utils/NavigationUIScreen.qml
new file mode 100644
index 00000000..0369ab6a
--- /dev/null
+++ b/imports/shared/utils/NavigationUIScreen.qml
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+import QtApplicationManager 1.0
+import controls 1.0
+import utils 1.0
+
+/*!
+ \qmltype NavigationUIScreen
+ \inqmlmodule utils 1.0
+ \inherits AppUIScreen
+ \brief A base item for developing navigation applications.
+
+ NavigationUIScreen is a QML item which should be the root element in
+ Triton UI navigation applications. It provides APIs for interacting with a system UI and
+ for positioning the application's visual elements. NavigationUIScreen extends
+ \l AppUIScreen with additional properties for setting a home page map widget.
+
+ See \l{Triton UI Application Development} for best practices on how to use the APIs.
+
+ \section2 Example Usage
+
+ \qml
+
+ NavigationUIScreen {
+ id: root
+ title: "Triton Template"
+
+ cluster: ClusterMapWidget {}
+
+ widget: HomePageMapWidget {}
+
+ UIScreen {
+ MapContent {
+ anchors.centerIn: parent
+ width: Style.hspan(13)
+ height: Style.vspan(24)
+ }
+
+ onBackScreen: root.back()
+ }
+ }
+ \endqml
+
+ This documentation is part of \l{utils}.
+*/
+
+AppUIScreen {
+ id: root
+
+ /*!
+ \qmlproperty Item AppUIScreen::widget
+
+ This property specifies a content area for a map widget. The content
+ area will be placed in a system UI home page.
+ */
+
+ property alias widget: widgetContainer.children
+
+ /*!
+ \internal
+ */
+ property var widgetSurface: ApplicationManagerWindow {
+ width: Style.hspan(12)
+ height: Style.vspan(19)
+ visible: widgetContainer.children.length > 0
+
+ Item {
+ id: widgetContainer
+ anchors.fill: parent
+ }
+
+ Component.onCompleted: {
+ widgetSurface.setWindowProperty("windowType", "widgetMap")
+ }
+ }
+}
diff --git a/imports/shared/utils/Spacer.qml b/imports/shared/utils/Spacer.qml
new file mode 100644
index 00000000..377d46b1
--- /dev/null
+++ b/imports/shared/utils/Spacer.qml
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import utils 1.0
+
+Control {
+ id: root
+ implicitWidth: Style.hspan(1)
+ implicitHeight: Style.vspan(1)
+}
diff --git a/imports/shared/utils/StageLoader.qml b/imports/shared/utils/StageLoader.qml
new file mode 100644
index 00000000..3773e27e
--- /dev/null
+++ b/imports/shared/utils/StageLoader.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Loader {
+ id: root
+
+ active: false
+
+ // QtBUG: https://bugreports.qt.io/browse/QTBUG-50992 otherwise it should be asynchronous
+ asynchronous: false
+
+ onStatusChanged: {
+ if (root.status === Loader.Error) {
+ console.warn(Logging.sysui, "Error loading component", root.source, root.sourceComponent.errorString());
+ }
+ }
+}
diff --git a/imports/shared/utils/Style.qml b/imports/shared/utils/Style.qml
new file mode 100644
index 00000000..658d4e3f
--- /dev/null
+++ b/imports/shared/utils/Style.qml
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.6
+
+import com.pelagicore.styles.triton 1.0
+import com.pelagicore.translation 1.0
+
+QtObject {
+ id: root
+
+ property bool withCluster: true
+
+ property int paddingXS: 2
+ property int paddingS: 4
+ property int padding: 8
+ property int paddingL: 12
+ property int paddingXL: 16
+
+ property int screenWidth: TritonStyle.windowWidth
+ property int screenHeight: TritonStyle.windowHeight
+ property int clusterWidth: 1920
+ property int clusterHeight: 720
+ property int displayHMargin: 11
+ property int displayVMargin: 0
+ property int cellWidth: TritonStyle.cellWidth //1280/24
+ property int cellHeight: TritonStyle.cellHeight // 800/24
+ property string fontFamily: TritonStyle.fontFamily
+ property real fontWeight: Font.Light
+ property real fontFactor: TritonStyle.fontFactor
+ property int fontSizeXXS: TritonStyle.fontSizeXXS
+ property int fontSizeXS: TritonStyle.fontSizeXS
+ property int fontSizeS: TritonStyle.fontSizeS
+ property int fontSizeM: TritonStyle.fontSizeM
+ property int fontSizeL: TritonStyle.fontSizeL
+ property int fontSizeXL: TritonStyle.fontSizeXL
+ property int fontSizeXXL: TritonStyle.fontSizeXXL
+ property color colorWhite: TritonStyle.brightColor
+ property color colorOrange: TritonStyle.accentColor
+ property color colorGrey: TritonStyle.lighter25(TritonStyle.darkColor)
+ property color colorBlack: TritonStyle.darkColor
+ property bool debugMode: false
+ property bool gridMode: false
+ property bool fakeBackground: false
+ property string displayBackground: TritonStyle.backgroundImage
+ property real disabledIconOpacity: 0.6
+
+ property bool isPotrait: screenWidth < screenHeight
+
+ property int defaultSymbolSize: symbolSizeM
+ property int defaultGfxSize: 1
+ property int symbolSizeXS: 32
+ property int symbolSizeS: 48
+ property int symbolSizeM: 72
+ property int symbolSizeL: 96
+ property int symbolSizeXL: 114
+ property int symbolSizeXXL: 192
+
+ property int launcherSpan: 1
+ property int notificationCenterSpan: 8
+
+ // Cimate config
+ property int climateCollapsedSpan: 3
+ property real climateCollapsedVspan: vspan(climateCollapsedSpan)
+
+ //StatusBar config
+ property real statusBarSpan: 0.5
+ property real statusBarHeight: vspan(statusBarSpan)
+
+ //Popup config
+ property real popupWidth: isPotrait ? hspan(12) : hspan(8)
+ property real popupHeight: isPotrait ? vspan(5) : vspan(6)
+
+ property real launcherHeight: vspan(launcherSpan)
+
+ property string assetPath: Qt.resolvedUrl("../../assets/")
+ property url drawableUrl: Qt.resolvedUrl(root.assetPath + 'drawable-ldpi')
+ property url symbolUrl: Qt.resolvedUrl(root.assetPath + 'icons')
+ property url gfxUrl: Qt.resolvedUrl(root.assetPath + 'gfx/')
+ property url fonts: Qt.resolvedUrl(root.assetPath + 'fonts/')
+
+ property alias languageLocale: translation.languageLocale
+ property QtObject translation: Translation {
+ id: translation
+ Component.onCompleted: {
+ setPath(root.assetPath + "translations/");
+ languageLocale = "en_US";
+ }
+ }
+
+ function symbol(name, size, active) {
+ size = size || defaultSymbolSize;
+ return symbolUrl + (active ? '/active/' : '/') + name + '@' + size + '.png';
+ }
+
+ function symbolXS(name, active) {
+ return symbol(name, symbolSizeXS, active);
+ }
+
+ function symbolS(name, active) {
+ return symbol(name, symbolSizeS, active);
+ }
+
+ function symbolM(name, active) {
+ return symbol(name, symbolSizeM, active);
+ }
+
+ function symbolL(name, active) {
+ return symbol(name, symbolSizeL, active);
+ }
+
+ function symbolXL(name, active) {
+ return symbol(name, symbolSizeXL, active);
+ }
+
+ function symbolXXL(name, active) {
+ return symbol(name, symbolSizeXXL, active);
+ }
+
+
+ function gfx2(name) {
+ return gfxUrl + name + '.png'
+ }
+
+ function gfx2Dynamic(name, size) {
+ return gfxUrl + name + '@' + size + 'x.png'
+ }
+
+ function icon(name) {
+ return drawableUrl + '/' + name + '.png';
+ }
+
+ function gfx(name) {
+ return drawableUrl + '/' + name + '.png';
+ }
+
+ function hspan(value) {
+ return cellWidth * value
+ }
+
+ function vspan(value) {
+ return cellHeight * value
+ }
+
+ function asset(name) {
+ return Qt.resolvedUrl(root.assetPath + + name)
+ }
+
+ function font(name) {
+ return Qt.resolvedUrl(root.assetPath + '/fonts/' + name + '.ttf')
+ }
+}
diff --git a/imports/shared/utils/Tracer.qml b/imports/shared/utils/Tracer.qml
new file mode 100644
index 00000000..eccc0b24
--- /dev/null
+++ b/imports/shared/utils/Tracer.qml
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+import utils 1.0
+
+MouseArea {
+ id: root
+ anchors.fill: parent
+ property color color: randomColor();
+ property string text: parent.objectName
+ property real padding: 0.5
+ visible: Style.debugMode
+ property bool fill: root.opaque
+ acceptedButtons: Qt.RightButton
+ property bool opaque: false
+
+ propagateComposedEvents: true
+
+ Rectangle {
+ id: fill
+ anchors.fill: parent
+ anchors.margins: root.padding
+ color: root.fill?root.color:'transparent'
+ opacity: root.opaque? 1.0 : 0.10
+ }
+
+ Rectangle {
+ id: frame
+ anchors.fill: parent
+ anchors.margins: root.padding
+ color: 'transparent'
+ border.color: root.color
+ border.width: 1
+ opacity: 0.80
+ }
+
+ Text {
+ id: note
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ anchors.margins: 4
+ horizontalAlignment: Text.AlignRight
+ text: root.text
+ font.pixelSize: 10
+ color: root.color
+ }
+
+ function randomColor() {
+ return Qt.rgba(Math.random(), Math.random(), Math.random(), 1.0)
+ }
+
+ onPressAndHold: {
+ console.log(Logging.sysui, 'trace: ' + root.parent)
+
+ console.log(Logging.sysui, 'Hierarchy: ')
+ var parent = root.parent;
+ var indent = ' ';
+ while (parent) {
+ console.log(Logging.sysui, indent + '+ ' + parent)
+ indent += ' ';
+ parent = parent.parent;
+ }
+ }
+}
diff --git a/imports/shared/utils/UIElement.qml b/imports/shared/utils/UIElement.qml
new file mode 100644
index 00000000..13094f66
--- /dev/null
+++ b/imports/shared/utils/UIElement.qml
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+
+import utils 1.0
+
+Control {
+ implicitWidth: Style.hspan(4)
+ implicitHeight: Style.vspan(1)
+ width: implicitWidth
+ height: implicitHeight
+
+ property alias _tracer_color: tracer.color
+ property alias _tracer_padding: tracer.padding
+
+ Tracer {
+ id: tracer
+ }
+}
diff --git a/imports/shared/utils/UIPage.qml b/imports/shared/utils/UIPage.qml
new file mode 100644
index 00000000..a90d04c5
--- /dev/null
+++ b/imports/shared/utils/UIPage.qml
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import utils 1.0
+import QtQuick.Controls 2.0
+
+// TODO: Convert to QQC2 Page
+
+Page {
+ id: root
+ implicitWidth: Style.hspan(24)
+ implicitHeight: Style.vspan(24)
+
+ background: Item {}
+}
diff --git a/imports/shared/utils/UIPanel.qml b/imports/shared/utils/UIPanel.qml
new file mode 100644
index 00000000..f667afb8
--- /dev/null
+++ b/imports/shared/utils/UIPanel.qml
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+
+Control {
+}
diff --git a/imports/shared/utils/UIScreen.qml b/imports/shared/utils/UIScreen.qml
new file mode 100644
index 00000000..b02a57de
--- /dev/null
+++ b/imports/shared/utils/UIScreen.qml
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import utils 1.0
+import controls 1.0
+
+/*!
+ \qmltype UIScreen
+ \inqmlmodule utils
+ \inherits Page
+ \brief A base item for all Triton UI screens.
+
+ UIScreen is a QML item that provides Triton UI application screens. UIScreen
+ has a layout with back buttons that provides access to a previous
+ screen.
+
+ \section2 Example Usage
+
+ \qml
+
+ AppUIScreen {
+ id: root
+ title: "Triton Template"
+
+ UIScreen {
+ Content {
+ anchors.centerIn: parent
+ width: Style.hspan(13)
+ height: Style.vspan(24)
+ }
+
+ onBackScreen: root.back()
+ }
+ }
+ \endqml
+
+ For each screen an application has, UIScreen should be used as a base item.
+
+*/
+
+Page {
+ id: root
+ implicitWidth: Style.hspan(24)
+ implicitHeight: Style.vspan(24)
+
+ background: Item {}
+
+ /*!
+ \qmlproperty bool UIScreen::hideBack
+
+ This property holds the visibility status of a back button.
+ If hideBack is set to \c true, the back button is hidden. Default
+ value is \c false.
+ */
+
+ property bool hideBack: false
+
+ /*!
+ \qmlsignal UIScreen::backScreen()
+
+ The signal is emitted when a back button is selected.
+
+ */
+
+ signal backScreen()
+
+
+ Tool {
+ id: backButton
+ anchors.left: parent.left
+ anchors.top: parent.top
+ width: Style.hspan(2)
+ height: Style.vspan(2)
+ visible: !root.hideBack
+ symbol: 'back'
+ onClicked: root.backScreen()
+ }
+
+}
+
diff --git a/imports/shared/utils/qmldir b/imports/shared/utils/qmldir
new file mode 100644
index 00000000..0b9e6005
--- /dev/null
+++ b/imports/shared/utils/qmldir
@@ -0,0 +1,15 @@
+singleton Style 1.0 Style.qml
+AutoConfig 1.0 AutoConfig.qml
+Marker 1.0 Marker.qml
+Spacer 1.0 Spacer.qml
+Tracer 1.0 Tracer.qml
+DisplayGrid 1.0 DisplayGrid.qml
+UIElement 1.0 UIElement.qml
+UIPanel 1.0 UIPanel.qml
+UIScreen 1.0 UIScreen.qml
+UIPage 1.0 UIPage.qml
+AppUIScreen 1.0 AppUIScreen.qml
+NavigationUIScreen 1.0 NavigationUIScreen.qml
+Layouter 1.0 Layouter.qml
+StageLoader 1.0 StageLoader.qml
+singleton Logging 1.0 Logging.qml
diff --git a/imports/shared/visualization/CarVisualization.qml b/imports/shared/visualization/CarVisualization.qml
new file mode 100644
index 00000000..ced81517
--- /dev/null
+++ b/imports/shared/visualization/CarVisualization.qml
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+Image {
+ property int overviewItem: 0
+ source: "white.png"
+}
diff --git a/imports/shared/visualization/qmldir b/imports/shared/visualization/qmldir
new file mode 100644
index 00000000..c59b9434
--- /dev/null
+++ b/imports/shared/visualization/qmldir
@@ -0,0 +1 @@
+CarVisualization 1.0 CarVisualization.qml
diff --git a/imports/shared/visualization/white.png b/imports/shared/visualization/white.png
new file mode 100644
index 00000000..a181253a
--- /dev/null
+++ b/imports/shared/visualization/white.png
Binary files differ
diff --git a/imports/system/models/application/ApplicationInfo.qml b/imports/system/models/application/ApplicationInfo.qml
new file mode 100644
index 00000000..db22fb5f
--- /dev/null
+++ b/imports/system/models/application/ApplicationInfo.qml
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.7
+
+/*
+ A wrapper for AppMan Application that adds some more goodies
+
+ Maybe some of those extra bits could be put into Application itself to reduce or even
+ eliminate the need for this wrapper.
+ */
+QtObject {
+ // the AppMan Application object
+ property var application
+
+ // whether the application is active (on foreground / fullscreen)
+ // false means it's either invisible, minimized, reduced to a widget geometry
+ // or might not even be running at all
+ property bool active: false
+
+ // If false, Application.activated signals won't cause the application to be the active one
+ property bool canBeActive: true
+
+ // the main window of this application, if any
+ property var window
+}
diff --git a/imports/system/models/application/ApplicationManagerModel.qml b/imports/system/models/application/ApplicationManagerModel.qml
new file mode 100644
index 00000000..e9cd0358
--- /dev/null
+++ b/imports/system/models/application/ApplicationManagerModel.qml
@@ -0,0 +1,143 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.8
+import QtApplicationManager 1.0
+import utils 1.0
+
+QtObject {
+ id: root
+
+ property string activeAppId
+ onActiveAppIdChanged: console.log("******* activeAppId = " + activeAppId)
+
+ signal applicationSurfaceReady(Item item)
+
+ property var appInfoMap: new Object
+
+ property var loggingCategory: LoggingCategory {
+ id: logCategory
+ name: "triton.applicationmanagermodel"
+ }
+
+ property var _appInfoComponent: Component {
+ id: appInfoComponent
+ ApplicationInfo {}
+ }
+
+ function application(appId) {
+ if (!appInfoMap[appId]) {
+ var appInfo = appInfoComponent.createObject();
+ appInfo.application = ApplicationManager.application(appId);
+ appInfoMap[appId] = appInfo;
+ return appInfo;
+ } else {
+ return appInfoMap[appId];
+ }
+ }
+
+ function appIdFromWindow(item) {
+ return WindowManager.get(WindowManager.indexOfWindow(item)).applicationId
+ }
+
+ function goHome() {
+ var appInfo = appInfoMap[root.activeAppId]
+ if (appInfo) {
+ appInfo.active = false;
+ }
+ root.activeAppId = ""
+ }
+
+ Component.onCompleted: {
+ ApplicationManager.applicationWasActivated.connect(applicationActivatedHandler)
+ WindowManager.windowReady.connect(windowReadyHandler)
+
+ // TODO do something about it
+ //WindowManager.windowClosing.connect(windowClosingHandler)
+
+ WindowManager.windowLost.connect(windowLostHandler)
+ WindowManager.windowPropertyChanged.connect(windowPropertyChangedHandler)
+ }
+
+ function applicationActivatedHandler(appId, appAliasId) {
+ console.log(logCategory, "applicationActivatedHandler: appId:" + appId + ", appAliasId:" + appAliasId)
+
+ if (appId === root.activeAppId)
+ return;
+
+ var appInfo = application(appId)
+ if (!appInfo.canBeActive)
+ return;
+
+ appInfo.active = true;
+
+ appInfo = appInfoMap[root.activeAppId]
+ if (appInfo) {
+ appInfo.active = false;
+ }
+
+ root.activeAppId = appId
+
+ for (var i = 0; i < WindowManager.count; i++) {
+ if (!WindowManager.get(i).isClosing && WindowManager.get(i).applicationId === appId) {
+ var item = WindowManager.get(i).windowItem
+ root.applicationSurfaceReady(item)
+ break
+ }
+ }
+ }
+
+ function windowReadyHandler(index, item) {
+ console.log(logCategory, "windowReadyHandler: index:" + index + ", item:" + item)
+
+ var appID = WindowManager.get(index).applicationId;
+
+ var appInfo = application(appID);
+ appInfo.window = item;
+
+ root.applicationSurfaceReady(item)
+ }
+
+ function windowLostHandler(index, item) {
+ // TODO care about animating before releasing
+ WindowManager.releaseWindow(item)
+ }
+
+
+ function windowPropertyChangedHandler(window, name, value) {
+ if (name === "activationCount") {
+ var appId = WindowManager.get(WindowManager.indexOfWindow(window)).applicationId;
+ ApplicationManager.application(appId).activated();
+ root.applicationActivatedHandler(appId, appId);
+ }
+ }
+}
diff --git a/imports/system/models/application/qmldir b/imports/system/models/application/qmldir
new file mode 100644
index 00000000..d568a333
--- /dev/null
+++ b/imports/system/models/application/qmldir
@@ -0,0 +1,2 @@
+singleton ApplicationManagerModel 1.0 ApplicationManagerModel.qml
+ApplicationInfo 1.0 ApplicationInfo.qml
diff --git a/imports/system/models/climate/ClimateModel.qml b/imports/system/models/climate/ClimateModel.qml
new file mode 100644
index 00000000..eb9b10d7
--- /dev/null
+++ b/imports/system/models/climate/ClimateModel.qml
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.0
+import QtIvi.VehicleFunctions 1.0
+import models.settings 1.0
+
+QtObject {
+ id: root
+
+ property string weatherIcon: "topbar_icon_rain"
+
+ property ClimateControl climateControl: ClimateControl {
+ discoveryMode: ClimateControl.AutoDiscovery
+ }
+
+ property QtObject leftSeat: QtObject {
+ readonly property real minValue: 16
+ readonly property real maxValue: 28
+ readonly property real stepValue: 0.5
+ readonly property real value: climateControl.zoneAt.FrontLeft.targetTemperature
+
+ readonly property bool heat: climateControl.zoneAt.FrontLeft.seatHeater > 0
+
+ function setValue(newValue) {
+ climateControl.zoneAt.FrontLeft.targetTemperature = newValue
+ }
+
+ function setHeat(newHeat) {
+ climateControl.zoneAt.FrontLeft.seatHeater = newHeat
+ }
+
+ // set some sane default value
+ Component.onCompleted: {
+ setValue(21);
+ }
+ }
+
+ property QtObject rightSeat: QtObject {
+ readonly property real minValue: 16
+ readonly property real maxValue: 28
+ readonly property real stepValue: 0.5
+ readonly property real value: climateControl.zoneAt.FrontRight.targetTemperature
+
+ readonly property bool heat: climateControl.zoneAt.FrontRight.seatHeater > 0
+
+ function setValue(newValue) {
+ climateControl.zoneAt.FrontRight.targetTemperature = newValue
+ }
+
+ function setHeat(newHeat) {
+ climateControl.zoneAt.FrontRight.seatHeater = newHeat
+ }
+
+ // set some sane default value
+ Component.onCompleted: {
+ setValue(22.5);
+ }
+ }
+
+ property QtObject frontHeat: QtObject {
+ property string symbol: "front"
+ readonly property bool enabled: climateControl.defrostEnabled
+
+ function setEnabled(newEnabled) {
+ climateControl.defrostEnabled = newEnabled;
+ }
+ }
+
+ property QtObject rearHeat: QtObject {
+ property string symbol: "rear"
+ readonly property bool enabled: climateControl.heaterEnabled
+
+ function setEnabled(newEnabled) {
+ climateControl.heaterEnabled = newEnabled;
+ }
+ }
+
+ property QtObject airCondition: QtObject {
+ readonly property string symbol: "ac"
+ readonly property bool enabled: climateControl.airConditioningEnabled
+
+ function setEnabled(newEnabled) {
+ climateControl.airConditioningEnabled = newEnabled;
+ }
+ }
+
+ property QtObject airQuality: QtObject {
+ readonly property string symbol: "air_quality"
+ readonly property bool enabled: climateControl.recirculationMode === ClimateControl.RecirculationOn
+
+ function setEnabled(newEnabled) {
+ climateControl.recirculationMode = newEnabled ? ClimateControl.RecirculationOn : ClimateControl.RecirculationOff;
+ }
+ }
+
+ property QtObject eco: QtObject {
+ property string symbol: "eco"
+ property bool enabled: false
+
+ function setEnabled(newEnabled) {
+ enabled = newEnabled;
+ }
+ }
+
+ property QtObject steeringWheelHeat: QtObject {
+ readonly property string symbol: "stearing_wheel"
+ readonly property bool enabled: climateControl.steeringWheelHeater >= 5
+
+ function setEnabled(newEnabled) {
+ climateControl.steeringWheelHeater = newEnabled ? 10 : 0;
+ }
+ }
+
+ readonly property var climateOptions: [frontHeat, rearHeat, airCondition, airQuality, eco, steeringWheelHeat]
+
+ property int outsideTemp: climateControl.outsideTemperature != 0 ? calculateUnitValue(climateControl.outsideTemperature)
+ : calculateUnitValue(15)
+ property string outsideTempText: qsTr("%1" + tempSuffix).arg(outsideTemp)
+ property int ventilation: climateControl.fanSpeedLevel
+ readonly property string tempSuffix: SettingsModel.metric ? "°C" : "°F"
+ property int ventilationLevels: 7 // 6 + off (0)
+
+ function setVentilation(newVentilation) {
+ climateControl.fanSpeedLevel = newVentilation;
+ }
+
+ property QtObject airflowDirections: QtObject {
+ property int directions: climateControl.airflowDirections
+ // FIXME this is stupid, how to get the available list programatically?
+ // TODO ClimateControl.Windshield missing; when added, this will get fun ;)
+ readonly property var availableDirections: [ClimateControl.Dashboard, ClimateControl.Floor,
+ ClimateControl.Dashboard | ClimateControl.Floor]
+ onDirectionsChanged: climateControl.airflowDirections = directions
+ }
+
+ property QtObject stateMachine: ClimateStateMachine {
+ climateControl: root.climateControl
+ doorsOpen: eco.enabled // TODO use QtIVI doors/window state for this eventually
+ }
+
+ function calculateUnitValue(value) {
+ // Default value is the celsius
+ return SettingsModel.metric ? value : Math.round(value * 1.8 + 32)
+ }
+}
diff --git a/imports/system/models/climate/ClimateStateMachine.qml b/imports/system/models/climate/ClimateStateMachine.qml
new file mode 100644
index 00000000..0e3f6ab1
--- /dev/null
+++ b/imports/system/models/climate/ClimateStateMachine.qml
@@ -0,0 +1,170 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQml.StateMachine 1.0 as DSM
+import QtIvi.VehicleFunctions 1.0
+
+QtObject {
+ id: root
+ property ClimateControl climateControl
+ property bool doorsOpen: false
+
+ property QtObject stateMachine: DSM.StateMachine {
+ id: climateStateMachine
+ running: true
+ initialState: runningState
+
+ DSM.State {
+ childMode: DSM.State.ParallelStates
+ id: runningState
+
+ DSM.State {
+ id: suspendable
+ initialState: doorsClosedState
+
+ DSM.State {
+ id: doorsClosedState
+ childMode: DSM.State.ParallelStates
+
+ DSM.State {
+ id: airConditionState
+ initialState: climateControl.airConditioningEnabled ? airConditionOn : airConditionOff
+
+ DSM.State {
+ id: airConditionOff
+ onEntered: climateControl.airConditioningEnabled = false
+ DSM.SignalTransition {
+ targetState: airConditionOn
+ signal: climateControl.airConditioningEnabledChanged
+ guard: climateControl.airConditioningEnabled
+ }
+ }
+
+ DSM.State {
+ id: airConditionOn
+ onEntered: {
+ climateControl.airConditioningEnabled = true
+ climateControl.steeringWheelHeater = 0
+ }
+ DSM.SignalTransition {
+ targetState: airConditionOff
+ signal: climateControl.airConditioningEnabledChanged
+ guard: !climateControl.airConditioningEnabled
+ }
+ }
+ } // airConditionState
+
+ DSM.State {
+ id: airRecirculationState
+ initialState: climateControl.recirculationEnabled ? airRecirculationOn : airRecirculationOff
+
+ DSM.State {
+ id: airRecirculationOff
+ onEntered: climateControl.recirculationMode = ClimateControl.RecirculationOff
+ DSM.SignalTransition {
+ targetState: airRecirculationOn
+ signal: climateControl.recirculationModeChanged
+ guard: climateControl.recirculationEnabled
+ }
+ }
+
+ DSM.State {
+ id: airRecirculationOn
+ onEntered: {
+ climateControl.recirculationMode = ClimateControl.RecirculationOn
+ }
+ DSM.SignalTransition {
+ targetState: airRecirculationOff
+ signal: climateControl.recirculationModeChanged
+ guard: climateControl.recirculationMode === ClimateControl.RecirculationOff
+ }
+ }
+ } // airRecirculationState
+
+ DSM.HistoryState {
+ id: historyState
+ defaultState: doorsClosedState
+ historyType: DSM.HistoryState.DeepHistory
+ }
+
+ DSM.SignalTransition {
+ targetState: suspended
+ signal: doorsOpenChanged
+ guard: doorsOpen
+ }
+ } // door closed state
+
+ DSM.State {
+ id: suspended
+ onEntered: {
+ climateControl.airConditioningEnabled = false
+ climateControl.recirculationMode = ClimateControl.RecirculationOff
+ }
+ DSM.SignalTransition {
+ targetState: historyState
+ signal: doorsOpenChanged
+ guard: !doorsOpen
+ }
+ }
+
+ } // suspendable state
+
+ DSM.State {
+ id: steeringWheelHeatState
+ initialState: (climateControl.steeringWheelHeater >= 5) ? steeringWheelHeatOn : steeringWheelHeatOff
+
+ DSM.State {
+ id: steeringWheelHeatOff
+ onEntered: climateControl.steeringWheelHeater = 0
+ DSM.SignalTransition {
+ targetState: steeringWheelHeatOn
+ signal: climateControl.steeringWheelHeaterChanged
+ guard: climateControl.steeringWheelHeater >= 5
+ }
+ }
+
+ DSM.State {
+ id: steeringWheelHeatOn
+ onEntered: {
+ climateControl.steeringWheelHeater = 10
+ climateControl.airConditioningEnabled = false
+ }
+ DSM.SignalTransition {
+ targetState: steeringWheelHeatOff
+ signal: climateControl.steeringWheelHeaterChanged
+ guard: climateControl.steeringWheelHeater < 5
+ }
+ }
+ }
+ } // running state
+ }
+}
diff --git a/imports/system/models/climate/qmldir b/imports/system/models/climate/qmldir
new file mode 100644
index 00000000..b9174ecf
--- /dev/null
+++ b/imports/system/models/climate/qmldir
@@ -0,0 +1 @@
+singleton ClimateModel 1.0 ClimateModel.qml
diff --git a/imports/system/models/cluster/StatusModel.qml b/imports/system/models/cluster/StatusModel.qml
new file mode 100644
index 00000000..9bbbbac7
--- /dev/null
+++ b/imports/system/models/cluster/StatusModel.qml
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.0
+
+QtObject {
+ property int pageIndicatorCount: 0
+ property int currentPage: 0
+ property string clusterTitle
+}
diff --git a/imports/system/models/cluster/qmldir b/imports/system/models/cluster/qmldir
new file mode 100644
index 00000000..f675ec4a
--- /dev/null
+++ b/imports/system/models/cluster/qmldir
@@ -0,0 +1 @@
+singleton StatusModel 1.0 StatusModel.qml
diff --git a/imports/system/models/media/MediaModel.qml b/imports/system/models/media/MediaModel.qml
new file mode 100644
index 00000000..20031363
--- /dev/null
+++ b/imports/system/models/media/MediaModel.qml
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.0
+import QtApplicationManager 1.0
+
+QtObject {
+ id: root
+
+ property string defaultMusicApp: "com.pelagicore.music"
+ property var musicProvider: musicControl
+
+ property var currentTrack: musicProvider.currentTrack
+ property bool playing: musicProvider.playing
+ property string currentTime: musicProvider.currentTime
+ property string durationTime: musicProvider.durationTime
+
+ property QtObject musicControl: ApplicationIPCInterface {
+
+ property var currentTrack: {}
+ property string currentTime: "00:00"
+ property string durationTime: "00:00"
+ property bool playing: false
+
+ signal previous()
+ signal next()
+ signal play()
+ signal pause()
+
+ Component.onCompleted: {
+ ApplicationIPCManager.registerInterface(musicControl, "com.pelagicore.music.control", {})
+ }
+ }
+
+ function play() {
+ musicProvider.play()
+ }
+
+ function pause() {
+ musicProvider.pause()
+ }
+
+ function togglePlay() {
+ if (playing) {
+ pause()
+ } else {
+ play()
+ }
+ }
+
+ function nextTrack() {
+ if (root.musicProvider)
+ root.musicProvider.next()
+ }
+
+ function previousTrack() {
+ if (root.musicProvider)
+ root.musicProvider.previous()
+ }
+
+ function startMusicApp() {
+ ApplicationManager.startApplication(root.defaultMusicApp)
+ }
+}
diff --git a/imports/system/models/media/qmldir b/imports/system/models/media/qmldir
new file mode 100644
index 00000000..8afb701f
--- /dev/null
+++ b/imports/system/models/media/qmldir
@@ -0,0 +1 @@
+singleton MediaModel 1.0 MediaModel.qml
diff --git a/imports/system/models/notification/NotificationModel.qml b/imports/system/models/notification/NotificationModel.qml
new file mode 100644
index 00000000..caab4036
--- /dev/null
+++ b/imports/system/models/notification/NotificationModel.qml
@@ -0,0 +1,200 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.8
+
+import utils 1.0
+import QtApplicationManager 1.0
+
+QtObject {
+ id: root
+
+ property ListModel model: ListModel { }
+ property QtObject currentNotification: QtObject {
+ property int id: -1
+ property string title: ""
+ property string description: ""
+ property int priority: 15
+ property string icon: ""
+ }
+
+ property bool notificationVisible: false
+ property var notificationQueue:[]
+ property var buttonModel: []
+
+ property var loggingCategory: LoggingCategory {
+ id: logCategory
+ name: "triton.notificationmodel"
+ }
+
+ property Timer notificationTimer: Timer {
+ interval: 2000;
+ onTriggered: {
+ root.closeNotification();
+ root.showNotificationOnQueue();
+ }
+ }
+
+ property Connections notificationManagerConnection: Connections {
+ target: NotificationManager
+
+ onNotificationAdded: {
+ var receivedContent = NotificationManager.notification(id);
+
+ if (receivedContent.category === "notification") {
+ console.log(logCategory, "::: Notification received :::", id);
+
+ if (!root.notificationVisible && root.notificationQueue.length === 0) {
+ root.addNotification(id);
+ }
+ else {
+ if (root.currentNotification.priority < receivedContent.priority || root.currentNotification.priority === receivedContent.priority) {
+ root.notificationQueue.push(id);
+ } else {
+ root.closeNotification();
+ root.addNotification(id);
+ }
+ }
+ }
+ }
+
+ onNotificationChanged: {
+ var receivedContent = NotificationManager.notification(id);
+
+ if (receivedContent.category === "notification") {
+ console.log(logCategory, "::: Notification changed :::", id);
+ var notificationExisted = false;
+
+ for (var x = 0; x < root.model.count; ++x) {
+ if (id === root.model.get(x).id) {
+ notificationExisted = true;
+ }
+ }
+
+ if (notificationExisted) {
+ if (!root.notificationVisible && root.notificationQueue.length === 0) {
+ updateNotification(id);
+ } else {
+ if (receivedContent.priority < 5 && root.currentNotification.priority < receivedContent.priority) {
+ root.notificationQueue.unshift(id);
+ } else if (root.currentNotification.priority < receivedContent.priority || root.currentNotification.priority === receivedContent.priority) {
+ root.notificationQueue.push(id);
+ } else {
+ root.updateNotification(id);
+ }
+ }
+ }
+ }
+ }
+
+ onNotificationAboutToBeRemoved: {
+ var receivedContent = NotificationManager.notification(id);
+
+ if (receivedContent.category === "notification") {
+ root.closeNotification();
+ for (var x = 0; x < root.model.count; ++x) {
+ if (id === root.model.get(x).id) {
+ root.model.remove(x);
+ }
+ }
+ }
+ }
+ }
+
+ function addNotification(id) {
+ var contentToShow = NotificationManager.notification(id);
+ root.model.append(parseNotification(contentToShow))
+ root.showNotification();
+ }
+
+ function updateNotification(id) {
+ var contentToUpdate = NotificationManager.notification(id);
+ for (var x = 0; x < root.model.count; ++x) {
+ if (id === root.model.get(x).id) {
+ root.model.set(x, parseNotification(contentToUpdate))
+ }
+ }
+ root.showNotification();
+ }
+
+ function parseNotification(contentToShow) {
+ root.currentNotification.title = contentToShow.summary
+ root.currentNotification.description = contentToShow.body
+ root.currentNotification.priority = contentToShow.priority
+ root.currentNotification.icon = contentToShow.icon
+ root.currentNotification.id = contentToShow.id
+
+ return root.currentNotification
+ }
+
+ function showNotification() {
+ root.notificationVisible = true;
+ root.notificationTimer.restart();
+ }
+
+ function showNotificationOnQueue() {
+ if (root.notificationQueue.length > 0) {
+ for (var x = 0; x < root.model.count; ++x) {
+ if (root.notificationQueue[0] === root.model.get(x).id) {
+ var contentOnQueue = NotificationManager.notification(root.notificationQueue[0]);
+ root.model.set(x, parseNotification(contentOnQueue))
+ root.notificationQueue.splice(0,1);
+ root.showNotification();
+ return
+ }
+ }
+
+ root.addNotification(root.notificationQueue[0]);
+ root.notificationQueue.splice(0,1);
+ }
+ }
+
+ function closeNotification() {
+ root.notificationVisible = false;
+ root.currentNotification.title = ""
+ root.currentNotification.description = ""
+ root.currentNotification.priority = 15
+ root.currentNotification.icon = ""
+ root.currentNotification.id = -1
+ }
+
+ function buttonClicked(index) {
+ NotificationManager.triggerNotificationAction(root.notificationIndex, root.buttonModel[index]);
+ root.closeNotification();
+ }
+
+ function removeNotification(index) {
+ NotificationManager.dismissNotification(root.model.get(index).id);
+ root.model.remove(index);
+ }
+}
+
diff --git a/imports/system/models/notification/qmldir b/imports/system/models/notification/qmldir
new file mode 100644
index 00000000..8924bddb
--- /dev/null
+++ b/imports/system/models/notification/qmldir
@@ -0,0 +1 @@
+singleton NotificationModel 1.0 NotificationModel.qml
diff --git a/imports/system/models/popup/PopupModel.qml b/imports/system/models/popup/PopupModel.qml
new file mode 100644
index 00000000..fff62aff
--- /dev/null
+++ b/imports/system/models/popup/PopupModel.qml
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.8
+import QtApplicationManager 1.0
+
+QtObject {
+ id: root
+
+ property bool popupVisible: false
+ property int popupIndex: -1
+ property int currentVisiblePopupId: 0
+ property QtObject currentPopup: QtObject {
+ property int id: -1
+ property var body
+ property var summary
+ property real progressValue: 0.0
+ property int priority: 15
+
+ }
+ property var buttonModel: []
+
+ property var popupQueue: []
+ property var popupContentData
+ property var popupButtonData
+
+ property var loggingCategory: LoggingCategory {
+ id: logCategory
+ name: "triton.popupmodel"
+ }
+
+ readonly property Connections notificationManagerConnection: Connections {
+ target: NotificationManager
+
+ onNotificationAdded: {
+ var receivedContent = NotificationManager.notification(id);
+
+ if (receivedContent.category === "popup") {
+ console.log(logCategory, "::: Popup received :::", id);
+ if (!root.popupVisible && root.popupQueue.length === 0) {
+ root.requestPopup(id);
+ }
+ else {
+ if (root.currentPopup.priority < receivedContent.priority || root.currentPopup.priority === receivedContent.priority) {
+ root.popupQueue.push(id);
+ } else {
+ root.popupQueue.push(root.currentPopup.id);
+ root.hideCurrentPopup();
+ root.requestPopup(id);
+ }
+ }
+ }
+ }
+
+ onNotificationChanged: {
+ var receivedContent = NotificationManager.notification(id);
+
+ if (receivedContent.category === "popup") {
+ console.log(logCategory, "::: Popup changed :::", id);
+ if (root.currentPopup.id === id) {
+ root.processPopup(receivedContent);
+ } else if (root.currentPopup.priority > receivedContent.priority) {
+ root.hideCurrentPopup();
+ root.requestPopup(id);
+ } else {
+ root.popupQueue.push(id);
+ }
+ }
+ }
+
+ onNotificationAboutToBeRemoved: {
+ var receivedContent = NotificationManager.notification(id);
+
+ if (receivedContent.category === "popup") {
+ hideCurrentPopup();
+ }
+ }
+ }
+
+ function requestPopup(id) {
+ var contentToShow = NotificationManager.notification(id);
+ root.popupIndex = contentToShow.id;
+ root.processPopup(contentToShow);
+ root.popupVisible = true;
+ }
+
+ function processPopup(receivedPopup) {
+ var receivedBody = receivedPopup.extended;
+ var receivedSummary = receivedPopup.summary;
+ var receivedButtons = [];
+ var receivedProgress = receivedPopup.progress;
+
+ for (var i in receivedPopup.actions) {
+ receivedButtons.push(receivedPopup.actions[i]);
+ }
+
+ root.currentPopup.id = receivedPopup.id;
+ root.currentPopup.summary = receivedSummary;
+ root.currentPopup.body = receivedBody;
+ root.currentPopup.priority = receivedPopup.priority;
+ root.currentPopup.progressValue = receivedProgress;
+ root.buttonModel = receivedButtons;
+ }
+
+ function showPopupOnQueue() {
+ if (root.popupQueue.length > 0) {
+ root.requestPopup(root.popupQueue[0]);
+ root.popupQueue.splice(0,1);
+ }
+ }
+
+ function buttonPressed(buttonIndex) {
+ NotificationManager.triggerNotificationAction(root.popupIndex, buttonIndex);
+ NotificationManager.dismissNotification(root.popupIndex);
+ root.hideCurrentPopup();
+ if (root.popupQueue.length > 0) {
+ root.showPopupOnQueue();
+ }
+ }
+
+ function resetContent() {
+ root.currentPopup.id = -1;
+ root.currentPopup.summary = {};
+ root.currentPopup.body = {};
+ root.currentPopup.priority = 15;
+ root.currentPopup.progressValue = 0.0;
+ root.buttonModel = [];
+ root.popupIndex = -1;
+ }
+
+ function hideCurrentPopup() {
+ root.resetContent();
+ root.popupVisible = false;
+ }
+}
diff --git a/imports/system/models/popup/qmldir b/imports/system/models/popup/qmldir
new file mode 100644
index 00000000..def8b1c0
--- /dev/null
+++ b/imports/system/models/popup/qmldir
@@ -0,0 +1 @@
+singleton PopupModel 1.0 PopupModel.qml
diff --git a/imports/system/models/settings/SettingsModel.qml b/imports/system/models/settings/SettingsModel.qml
new file mode 100644
index 00000000..cdb82e02
--- /dev/null
+++ b/imports/system/models/settings/SettingsModel.qml
@@ -0,0 +1,148 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.6
+
+QtObject {
+ id: root
+
+ property bool settingsPageVisible: false
+ property bool clusterVisible: true
+ property string unitSystem: "metric" // "metric" or "imp_us"
+ readonly property bool metric: unitSystem === "metric"
+
+ readonly property ListModel profiles: ListModel {
+ ListElement { name: "Driver 1" }
+ ListElement { name: "Driver 2" }
+ ListElement { name: "Driver 3" }
+ ListElement { name: "Driver 4" }
+ }
+ property int currentProfileIndex: 0
+
+ readonly property ListModel languages: ListModel {
+ ListElement { name: "en_GB" }
+ ListElement { name: "en_US" }
+ ListElement { name: "in_ID" }
+ ListElement { name: "de_DE" }
+ }
+ property int currentLanguageIndex: 0
+
+ property bool appUpdatesEnabled: false
+ property bool liveTrafficEnabled: false
+ property bool satelliteViewEnabled: false
+
+ property int windowTransitionsIndex: 0
+
+ property ListModel entries: ListModel {
+ ListElement { title: "USER PROFILE"; icon: "profile"; checked: true; hasChildren: true; hasCheck: true }
+ ListElement { title: "SERVICE & SUPPORT"; icon: "service"; checked: false; hasChildren: false }
+ ListElement { title: "TRAFFIC INFORMATION"; icon: "warning"; checked: true; hasChildren: true }
+ ListElement { title: "TOLL & CONGESTION FEES"; icon: "toll"; checked: false; hasChildren: true }
+ ListElement { title: "METRIC SYSTEM"; icon: "fees"; checked: true; hasChildren: false }
+ ListElement { title: "APP UPDATES"; icon: "updates"; checked: true; hasChildren: true }
+ ListElement { title: "SYSTEM MONITOR"; icon: "insurance"; checked: false; hasChildren: true }
+ }
+
+ property var carSettings: [
+ { section: "Units", option: clockOption },
+ { section: "Units", option: speedOption },
+ { section: "Communication", option: bluetoothOption }
+ ]
+
+ property var clockOption: QtObject {
+ property string format: active === 0 ? "hh:mm" : "h:mm AP"
+ property var options: ['24H', 'AM/PM']
+ property string name: "Time"
+ property int active: 0
+
+ function setActive(index) { active = index }
+ }
+
+ property var speedOption: QtObject {
+ property var options: ['KMH', 'MPH']
+ property string name: "Speed"
+ property int active: 0
+
+ function setActive(index) { active = index }
+ }
+
+ property var bluetoothOption: QtObject {
+
+ property string name: "Bluetooth"
+ property bool active: false
+
+ function setActive(value) { active = value }
+ }
+
+ property ListModel functions: ListModel {
+ ListElement {
+ description: "hill_descent_control_id"
+ icon: "hill_descent_control"
+ active: true
+ }
+ ListElement {
+ description: "intelligent_speed_adaptation_id"
+ icon: "intelligent_speed_adaptation"
+ active: false
+ }
+ ListElement {
+ description: "automatic_beam_switching_id"
+ icon: "automatic_beam_switching"
+ active: true
+ }
+ ListElement {
+ description: "collision_avoidance_id"
+ icon: "collision_avoidance"
+ active: false
+ }
+ ListElement {
+ description: "lane_assist_id"
+ icon: "lane_keeping_assist"
+ active: false
+ }
+ ListElement {
+ description: "traffic_jam_assist_id"
+ icon: "traffic_jam_assist"
+ active: false
+ }
+ ListElement {
+ description: "driver_drowsiness_alert_id"
+ icon: "driver_drownsyness_alert"
+ active: true
+ }
+ ListElement {
+ description: "park_assist_id"
+ icon: "park_assist"
+ active: false
+ }
+ }
+}
diff --git a/imports/system/models/settings/qmldir b/imports/system/models/settings/qmldir
new file mode 100644
index 00000000..0dee67a3
--- /dev/null
+++ b/imports/system/models/settings/qmldir
@@ -0,0 +1 @@
+singleton SettingsModel 1.0 SettingsModel.qml
diff --git a/imports/system/models/startup/StagedStartupModel.qml b/imports/system/models/startup/StagedStartupModel.qml
new file mode 100644
index 00000000..8f7ea120
--- /dev/null
+++ b/imports/system/models/startup/StagedStartupModel.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.0
+import QtQml.StateMachine 1.0 as DSM
+
+Item {
+ id: root
+
+ property bool loadDisplay: false
+ property bool loadRest: false
+ property bool loadBackgroundElements: false
+
+ signal enterMenuState()
+ signal enterFinalState()
+
+ DSM.StateMachine {
+ id: stateMachine
+ initialState: homePage
+ running: true
+
+ DSM.State {
+ id: homePage
+
+ DSM.SignalTransition {
+ targetState: menuState
+ signal: root.enterMenuState
+ }
+
+ onEntered: root.loadDisplay = true
+ }
+
+ DSM.State {
+ id: menuState
+
+ DSM.SignalTransition {
+ targetState: finalState
+ signal: root.enterFinalState
+ }
+
+ onEntered: root.loadRest = true
+ }
+
+ DSM.FinalState {
+ id: finalState
+
+ onEntered: root.loadBackgroundElements = true
+ }
+ }
+
+}
+
diff --git a/imports/system/models/startup/qmldir b/imports/system/models/startup/qmldir
new file mode 100644
index 00000000..0f842ed5
--- /dev/null
+++ b/imports/system/models/startup/qmldir
@@ -0,0 +1 @@
+singleton StagedStartupModel 1.0 StagedStartupModel.qml
diff --git a/imports/system/models/statusbar/StatusBarModel.qml b/imports/system/models/statusbar/StatusBarModel.qml
new file mode 100644
index 00000000..1a2b1772
--- /dev/null
+++ b/imports/system/models/statusbar/StatusBarModel.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.0
+
+QtObject {
+ id: root
+
+ property string clusterTitle: ""
+
+ property var indicators: [
+ { name: "battery", active: true },
+ { name: "wifi", active: true },
+ { name: "break", active: false },
+ { name: "bluetooth", active: false }
+ ]
+
+ property var currentDate: new Date();
+
+ property QtObject timer: Timer {
+ interval: 1000
+ repeat: true
+ running: true
+ onTriggered: {
+ currentDate = new Date();
+ }
+ }
+}
diff --git a/imports/system/models/statusbar/qmldir b/imports/system/models/statusbar/qmldir
new file mode 100644
index 00000000..79a0f791
--- /dev/null
+++ b/imports/system/models/statusbar/qmldir
@@ -0,0 +1 @@
+singleton StatusBarModel 1.0 StatusBarModel.qml
diff --git a/imports/system/models/system/SystemModel.qml b/imports/system/models/system/SystemModel.qml
new file mode 100644
index 00000000..43c0ba4c
--- /dev/null
+++ b/imports/system/models/system/SystemModel.qml
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.0
+
+QtObject {
+ id: root
+
+ property bool climateExpanded: false
+ property bool windowOverviewVisible: false
+ property bool toolBarMonitorVisible: false
+ property bool notificationCenterVisible: false
+}
+
diff --git a/imports/system/models/system/qmldir b/imports/system/models/system/qmldir
new file mode 100644
index 00000000..0349e1d3
--- /dev/null
+++ b/imports/system/models/system/qmldir
@@ -0,0 +1 @@
+singleton SystemModel 1.0 SystemModel.qml
diff --git a/imports/system/models/vehicle/VehicleModel.qml b/imports/system/models/vehicle/VehicleModel.qml
new file mode 100644
index 00000000..447ed451
--- /dev/null
+++ b/imports/system/models/vehicle/VehicleModel.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+pragma Singleton
+import QtQuick 2.0
+import utils 1.0
+import QtApplicationManager 1.0
+
+QtObject {
+ id: root
+
+ property bool dialAnimation: true
+ property real speed: navigationControl.navigationRunning ? navigationControl.navigationSpeed : 0
+ property string rightDialBorderColor: navigationControl.dialBorderColor
+ property bool warningDialAnimation: navigationControl.activateWarning
+
+ readonly property real rightDialValue: root.speed * 0.0031
+
+ property int displaySpeed: speed
+ property real fuel: 0.5 // fuel precentage min 0.0; max 1.0;
+ property string rightDialIcon: navigationControl.rightDialIcon
+ property string rightDialMainText: navigationControl.mainText
+ property string rightDialSubText: navigationControl.subText
+ property real rightIconScale: 2
+
+ property Timer timer: Timer {
+ running: root.dialAnimation
+ repeat: true
+ interval: 4000
+ property bool higherValue: false
+ onTriggered: {
+ root.speed = higherValue ? (navigationControl.navigationSpeed) : (navigationControl.navigationSpeed +5)
+
+ higherValue = !higherValue
+ }
+ }
+
+ // For simulations we need to communicate with nav app
+ property QtObject navigationControl: ApplicationIPCInterface {
+
+ property real navigationSpeed: 0
+ property bool navigationRunning: false
+ property bool activateWarning: false
+ property string dialBorderColor: Style.colorWhite
+ property string rightDialIcon: Style.gfx("cluster/my_position")
+ property string mainText: "0.6mi"
+ property string subText: "Service in 300km"
+
+ Component.onCompleted: {
+ ApplicationIPCManager.registerInterface(navigationControl, "com.pelagicore.navigation.control", {})
+ }
+ }
+
+ Behavior on speed {
+ SmoothedAnimation {
+ velocity: 8
+ duration : 4000
+ easing.overshoot: 0
+ }
+ }
+
+}
diff --git a/imports/system/models/vehicle/qmldir b/imports/system/models/vehicle/qmldir
new file mode 100644
index 00000000..35e3add6
--- /dev/null
+++ b/imports/system/models/vehicle/qmldir
@@ -0,0 +1 @@
+singleton VehicleModel 1.0 VehicleModel.qml
diff --git a/plugins.yaml.in b/plugins.yaml.in
new file mode 100644
index 00000000..750e9b9a
--- /dev/null
+++ b/plugins.yaml.in
@@ -0,0 +1,11 @@
+formatVersion: 1
+formatType: am-configuration
+---
+runtimes:
+ qml:
+ importPaths: [ \"$$PLUGINS_DIR\" ]
+
+# ... as well as the SystemUI
+
+ui:
+ importPaths: [ \"$$PLUGINS_DIR\" ]
diff --git a/plugins/plugins.pro b/plugins/plugins.pro
new file mode 100644
index 00000000..e730ba17
--- /dev/null
+++ b/plugins/plugins.pro
@@ -0,0 +1,5 @@
+TEMPLATE = subdirs
+
+SUBDIRS = screenmanager \
+ styles \
+ translation
diff --git a/plugins/screenmanager/plugin.cpp b/plugins/screenmanager/plugin.cpp
new file mode 100644
index 00000000..eaa1e0df
--- /dev/null
+++ b/plugins/screenmanager/plugin.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#include <QtQml/qqmlextensionplugin.h>
+#include <qqml.h>
+#include "screenmanager.h"
+
+static QObject *screenManagerSingletonFactory(QQmlEngine *engine, QJSEngine *scriptEngine)
+{
+ Q_UNUSED(scriptEngine)
+ Q_UNUSED(engine)
+
+ return new ScreenManager();
+}
+
+class HoundPlugin : public QQmlExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
+public:
+ virtual void registerTypes(const char *uri)
+ {
+ Q_ASSERT(QLatin1String(uri) == QLatin1String("com.pelagicore.ScreenManager"));
+ Q_UNUSED(uri);
+
+ qmlRegisterSingletonType<ScreenManager>(uri, 1, 0, "ScreenManager", screenManagerSingletonFactory);
+ }
+};
+
+#include "plugin.moc"
diff --git a/plugins/screenmanager/qmldir b/plugins/screenmanager/qmldir
new file mode 100644
index 00000000..5472c914
--- /dev/null
+++ b/plugins/screenmanager/qmldir
@@ -0,0 +1,2 @@
+module com.pelagicore.ScreenManager
+plugin screenmanagerplugin
diff --git a/plugins/screenmanager/screenmanager.cpp b/plugins/screenmanager/screenmanager.cpp
new file mode 100644
index 00000000..9d340772
--- /dev/null
+++ b/plugins/screenmanager/screenmanager.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#include "screenmanager.h"
+#include <QGuiApplication>
+#include <QScreen>
+#include <QDebug>
+
+ScreenManager::ScreenManager(QObject *parent)
+ : QObject(parent)
+{
+ connect(qApp, &QGuiApplication::screenAdded, this, &ScreenManager::availableScreensChanged);
+ connect(qApp, &QGuiApplication::screenRemoved, this, &ScreenManager::availableScreensChanged);
+}
+
+int ScreenManager::screenCount() const
+{
+ return QGuiApplication::screens().count();
+}
+
+void ScreenManager::setScreen(QWindow *window, int screen)
+{
+ if (screen >= 0 && screen < QGuiApplication::screens().count())
+ window->setScreen(QGuiApplication::screens().at(screen));
+ else
+ qWarning() << "invalid Screen";
+}
+
+QList<QObject *> ScreenManager::availableScreens() const
+{
+ QList<QObject *> list;
+ for (QScreen *screen : QGuiApplication::screens())
+ list.append(screen);
+
+ return list;
+}
diff --git a/plugins/screenmanager/screenmanager.h b/plugins/screenmanager/screenmanager.h
new file mode 100644
index 00000000..0ad49f97
--- /dev/null
+++ b/plugins/screenmanager/screenmanager.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#ifndef SCREENMANAGER_H
+#define SCREENMANAGER_H
+
+#include <QtCore/QObject>
+#include <QWindow>
+
+class ScreenManager : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QList<QObject*> availableScreens READ availableScreens NOTIFY availableScreensChanged)
+
+public:
+ explicit ScreenManager(QObject *parent = nullptr);
+
+ Q_INVOKABLE int screenCount() const;
+ Q_INVOKABLE void setScreen(QWindow * window, int screen);
+ QList<QObject*> availableScreens() const;
+
+signals:
+ void availableScreensChanged();
+};
+
+#endif // SCREENMANAGER_H
diff --git a/plugins/screenmanager/screenmanager.pro b/plugins/screenmanager/screenmanager.pro
new file mode 100644
index 00000000..53974fed
--- /dev/null
+++ b/plugins/screenmanager/screenmanager.pro
@@ -0,0 +1,14 @@
+TEMPLATE = lib
+TARGET = screenmanagerplugin
+QT += qml quick
+CONFIG += qt plugin c++11
+
+uri = com.pelagicore.ScreenManager
+load(qmlplugin)
+
+SOURCES += \
+ plugin.cpp \
+ screenmanager.cpp \
+
+HEADERS += \
+ screenmanager.h \
diff --git a/plugins/scripts/README.md b/plugins/scripts/README.md
new file mode 100644
index 00000000..94f1060d
--- /dev/null
+++ b/plugins/scripts/README.md
@@ -0,0 +1,9 @@
+# Scripts usage
+
+Scan scripts are used for for creating the SQL lite database and filling it with the music and movies. The data is later read with datasource project and in the end used from the QML.
+
+# Requirements
+
+Scan scripts require the mutagen Python package.
+
+https://bitbucket.org/lazka/mutagen
diff --git a/plugins/scripts/scanmovies.py b/plugins/scripts/scanmovies.py
new file mode 100644
index 00000000..b7b7bfe8
--- /dev/null
+++ b/plugins/scripts/scanmovies.py
@@ -0,0 +1,123 @@
+# -*- coding: utf-8 -*-
+
+"""
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+"""
+
+# scanmovies.py
+# scans the ~/media/movies folder and generates all covers
+# and a ~/media.db database with alll tracks.
+
+import os
+import sqlite3 as db
+import argparse
+from mutagen.mp4 import MP4
+
+
+parser = argparse.ArgumentParser(description='scan movie folder')
+
+parser.add_argument('--source', default='~/media/movies', help='movie dir to scan')
+
+args = parser.parse_args()
+
+source = os.path.expanduser(args.source)
+
+albums = set()
+
+connection = db.connect(os.path.expanduser('~/media.db'))
+
+cursor = connection.cursor()
+
+
+sql_drop = 'drop table if exists movies'
+
+sql_create = """
+create table movies (
+ pk integer primary key,
+ title text,
+ year integer,
+ genre text,
+ desc text,
+ source text,
+ cover text
+ )
+"""
+
+sql_insert = """
+insert into movies (title,year,genre,desc,source,cover) VALUES (?,?,?,?,?,?)
+"""
+
+def createTable():
+ print('create table')
+ cursor.execute(sql_drop)
+ cursor.execute(sql_create)
+
+
+def extractTag(media, tag):
+ obj = media.get(tag)
+ if obj:
+ return ''.join(obj)#.encode('utf-8')
+ return ''
+
+def scanFolder(source):
+ print('scan folder: ' + source)
+ start = os.path.abspath(source)
+ for root, dirnames, filenames in os.walk(start):
+ for filename in filenames:
+ if not filename[-3:] == 'm4v':
+ continue
+ filepath = os.path.join(root, filename)
+ folderpath = os.path.relpath(root, start)
+ name = filename[0:-4]
+ print('analyze: ' + filepath)
+ try:
+ movie = MP4(filepath)
+ except:
+ print 'error reading: ', filepath
+ continue
+ title = extractTag(movie, '\xa9nam')
+ year = extractTag(movie, '\xa9day')
+ genre = extractTag(movie, '\xa9gen')
+ coverData = movie['covr'][0]
+ cover = os.path.join(folderpath, 'cover.jpg')
+ desc = extractTag(movie, 'desc')
+ source = os.path.join(folderpath, filename)
+ coverArt = file(os.path.join(start, cover), 'w')
+ coverArt.write(coverData)
+ coverArt.close()
+ cursor.execute(sql_insert, (title, year, genre, desc, source, cover))
+
+
+createTable()
+scanFolder(source)
+
+connection.commit()
diff --git a/plugins/scripts/scanmusic.py b/plugins/scripts/scanmusic.py
new file mode 100644
index 00000000..fe79431c
--- /dev/null
+++ b/plugins/scripts/scanmusic.py
@@ -0,0 +1,149 @@
+# -*- coding: utf-8 -*-
+
+"""
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+"""
+
+# scanmusic.py
+# scans the ~/media/music folder and generates all covers
+# and a ~/media.db database with alll tracks.
+
+import os
+import sqlite3 as db
+import argparse
+from mutagen.id3 import ID3, ID3NoHeaderError
+
+
+parser = argparse.ArgumentParser(description='scan music folder')
+
+parser.add_argument('--source', default='~/media/music', help='music dir to scan')
+
+args = parser.parse_args()
+
+source = os.path.expanduser(args.source)
+
+albums = set()
+
+connection = db.connect(os.path.expanduser('~/media.db'))
+
+cursor = connection.cursor()
+
+
+sql_drop = 'drop table if exists music'
+
+sql_create = """
+create table music (
+ pk integer primary key,
+ album text,
+ title text,
+ track text,
+ artist text,
+ source text,
+ cover text
+ )
+"""
+
+sql_insert = """
+insert into music (album,title,track,artist,source,cover) VALUES (?,?,?,?,?,?)
+"""
+
+def createTable():
+ print('create table')
+ cursor.execute(sql_drop)
+ cursor.execute(sql_create)
+
+
+def extractTag(media, tag):
+ obj = media.get(tag)
+ if obj:
+ return ''.join(obj.text)#.encode('utf-8')
+ return ''
+
+def scanFolder(source):
+ print('scan folder: ' + source)
+ start = os.path.abspath(source)
+ for root, dirnames, filenames in os.walk(start):
+ for filename in filenames:
+ if not filename[-4:] == '.mp3':
+ continue
+ filepath = os.path.join(root, filename)
+ name = filename[0:-4]
+ folderpath = os.path.relpath(root, start)
+ print('analyze: ' + filepath)
+ try:
+ audio = ID3(filepath)
+ except ID3NoHeaderError:
+ print 'error reading: ', filepath
+ continue
+
+
+ # import pdb; pdb.set_trace()
+ title = extractTag(audio, 'TIT2')
+ album = extractTag(audio, 'TALB')
+ artist = extractTag(audio, 'TPE1')
+ track = extractTag(audio, 'TRCK')
+ source = os.path.join(folderpath, filename).decode('utf-8')
+
+ apics = audio.getall('APIC')[:1]
+ apic = None
+ if len(apics):
+ apic = apics[0]
+ coverName = ''
+ if apic:
+ if apic.mime == 'image/jpeg':
+ coverName = 'cover.jpg'
+ elif apic.mime == 'image/png':
+ coverName = 'cover.png'
+ else:
+ print('unknown cover mime type: ' + mime)
+ else:
+ import pdb; pdb.set_trace()
+ print('!!! NO COVER')
+
+ cover = os.path.join(folderpath, coverName).decode('utf-8')
+ album_id = '%s/%s'%(album, artist)
+ if not album_id in albums:
+ albums.add(album_id)
+ if apic: # save new cover
+ art = file(os.path.join(root, coverName), 'w')
+ art.write(apic.data)
+ art.close()
+ cursor.execute(sql_insert, (album, title, track, artist, source, cover))
+
+
+createTable()
+scanFolder(source)
+
+connection.commit()
+
+
+
diff --git a/plugins/styles/styles.pro b/plugins/styles/styles.pro
new file mode 100644
index 00000000..96db23fa
--- /dev/null
+++ b/plugins/styles/styles.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+
+SUBDIRS += \
+ triton
diff --git a/plugins/styles/triton/qmldir b/plugins/styles/triton/qmldir
new file mode 100644
index 00000000..deb48bb3
--- /dev/null
+++ b/plugins/styles/triton/qmldir
@@ -0,0 +1,3 @@
+module com.pelagicore.styles.triton
+plugin tritonstyle
+
diff --git a/plugins/styles/triton/qtquickcontrols2.conf b/plugins/styles/triton/qtquickcontrols2.conf
new file mode 100644
index 00000000..051c823a
--- /dev/null
+++ b/plugins/styles/triton/qtquickcontrols2.conf
@@ -0,0 +1,14 @@
+[Controls]
+Style=Material
+[Material]
+Theme=Dark
+
+[Triton]
+Theme=Dark
+FontSize=28
+FontFactor=1.0
+FontFamily="Open Sans"
+WindowWidth=1080
+WindowHeight=1920
+Dark/BrightColor=#FEFEFE
+Light/BrightColor=#3E3E3E
diff --git a/plugins/styles/triton/triton.pro b/plugins/styles/triton/triton.pro
new file mode 100644
index 00000000..917278d0
--- /dev/null
+++ b/plugins/styles/triton/triton.pro
@@ -0,0 +1,23 @@
+TEMPLATE = lib
+TARGET = tritonstyle
+QT += quick
+QT += gui-private quick-private quickcontrols2-private
+CONFIG += qt plugin c++11 no_private_qt_headers_warning
+
+uri = com.pelagicore.styles.triton
+load(qmlplugin)
+
+SOURCES += \
+ tritonstyle.cpp \
+ tritonstyleplugin.cpp \
+ tritontheme.cpp
+
+HEADERS += \
+ tritonstyle.h \
+ tritonstyleplugin.h \
+ tritontheme.h
+
+RESOURCES += \
+ tritonstyle.qrc
+
+
diff --git a/plugins/styles/triton/tritonstyle.cpp b/plugins/styles/triton/tritonstyle.cpp
new file mode 100644
index 00000000..75cfde49
--- /dev/null
+++ b/plugins/styles/triton/tritonstyle.cpp
@@ -0,0 +1,451 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#include "tritonstyle.h"
+#include <QtQml/qqmlinfo.h>
+#include <QtQuick/QQuickItem>
+#include <QtQuick/QQuickWindow>
+#include <QtGui/QGuiApplication>
+#include <QtCore/QSettings>
+
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+#include <QtQuickControls2/private/qquickstyle_p.h>
+#endif
+
+class ThemeData
+{
+public:
+ ThemeData() {}
+ ThemeData(const QHash<TritonStyle::SystemColor, QColor>& newColors)
+ : colors(newColors)
+ {}
+
+ QHash<TritonStyle::SystemColor, QColor> colors;
+};
+
+
+
+
+static QHash<TritonStyle::SystemColor, QColor>
+GlobalLightColors {
+ {TritonStyle::DarkColor, QColor(0xFF1F1F1F)},
+ {TritonStyle::BrightColor, QColor(0xFFFEFEFE)},
+ {TritonStyle::AccentColor, QColor(0xFFF6A623)},
+ {TritonStyle::PositiveColor, QColor(0xFF50E3C2)},
+ {TritonStyle::NegativeColor, QColor(0xFF303030)}
+ };
+
+static QHash<TritonStyle::SystemColor, QColor>
+GlobalDarkColors {
+ {TritonStyle::DarkColor, QColor(0xFF1F1F1F)},
+ {TritonStyle::BrightColor, QColor(0xFFFEFEFE)},
+ {TritonStyle::AccentColor, QColor(0xFFF6A623)},
+ {TritonStyle::PositiveColor, QColor(0xFF50E3C2)},
+ {TritonStyle::NegativeColor, QColor(0xFF303030)}
+ };
+
+//TODO: replace with typedef
+static ThemeData GlobalDarkThemeData(GlobalDarkColors);
+static ThemeData GlobalLightThemeData(GlobalLightColors);
+
+static ThemeData& tritonstyle_theme_data(TritonStyle::Theme theme)
+{
+ return theme == TritonStyle::Dark? GlobalDarkThemeData : GlobalLightThemeData;
+}
+
+
+class StyleData {
+public:
+ StyleData()
+ : font(QGuiApplication::font())
+ , fontFactor(1.0)
+ , theme(TritonStyle::Light)
+ , windowSize(1080, 1920)
+ , backgroundImage("ivi_bg15")
+ , themeData(GlobalDarkThemeData)
+ {
+ compute();
+ }
+ StyleData(const StyleData &data)
+ : font(data.font)
+ , fontFactor(data.fontFactor)
+ , theme(data.theme)
+ , windowSize(data.windowSize)
+ , backgroundImage(data.backgroundImage)
+ , themeData(data.themeData)
+ {
+ compute();
+ }
+
+ void compute() {
+ cell.setWidth(windowSize.width()/24);
+ cell.setHeight(windowSize.height()/24);
+ fontSizeXXS = font.pixelSize() * 0.4 * fontFactor;
+ fontSizeXS = font.pixelSize() * 0.6 * fontFactor;
+ fontSizeS = font.pixelSize() * 0.8 * fontFactor;
+ fontSizeM = font.pixelSize() * 1.0 * fontFactor;
+ fontSizeL = font.pixelSize() * 1.25 * fontFactor;
+ fontSizeXL = font.pixelSize() * 1.5 * fontFactor;
+ fontSizeXXL = font.pixelSize() * 1.75 * fontFactor;
+ }
+
+ QFont font;
+ qreal fontFactor;
+ TritonStyle::Theme theme;
+ QSize windowSize;
+ QString backgroundImage;
+ QSize cell;
+ int fontSizeXXS;
+ int fontSizeXS;
+ int fontSizeS;
+ int fontSizeM;
+ int fontSizeL;
+ int fontSizeXL;
+ int fontSizeXXL;
+ ThemeData themeData;
+};
+
+static StyleData GlobalStyleData;
+
+
+template <typename Enum>
+static Enum toEnumValue(const QByteArray &data, Enum defaultValue)
+{
+ QMetaEnum enumeration = QMetaEnum::fromType<Enum>();
+ bool ok;
+ Enum value = static_cast<Enum>(enumeration.keyToValue(data, &ok));
+ if (ok)
+ return value;
+ return defaultValue;
+}
+
+static int toInteger(const QByteArray &data, int defaultValue)
+{
+ bool ok;
+ int value = data.toInt(&ok);
+ if (ok)
+ return value;
+ return defaultValue;
+}
+
+static qreal toReal(const QByteArray &data, qreal defaultValue)
+{
+ bool ok;
+ int value = data.toFloat(&ok);
+ if (ok)
+ return value;
+ return defaultValue;
+}
+
+QString toString(const QByteArray& data, const QString& defaultValue)
+{
+ QString value = QString::fromLocal8Bit(data);
+ if (value.isEmpty())
+ return defaultValue;
+ return value;
+}
+
+QColor toColor(const QByteArray& data, const QColor& defaultValue)
+{
+ QString value = QString::fromLocal8Bit(data);
+ if (value.isEmpty())
+ return defaultValue;
+ QColor color(value);
+ if (!color.isValid())
+ qWarning() << "Invalid color: " << value;
+ return color;
+}
+
+static QByteArray resolveSetting(const QSharedPointer<QSettings> &settings, const QString &name, const QByteArray &env=QByteArray())
+{
+ QByteArray value;
+ if (!env.isNull())
+ value = qgetenv(env);
+ if (value.isNull() && !settings.isNull())
+ value = settings->value(name).toByteArray();
+ if (value.isEmpty())
+ qWarning() << "TritonStyle settings value is empty: " << name;
+ return value;
+}
+
+TritonStyle::TritonStyle(QObject *parent)
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+ : QQuickAttachedObject(parent)
+#else
+ : QQuickStyleAttached(parent)
+#endif
+ , m_data(new StyleData(GlobalStyleData))
+{
+ init();
+}
+
+TritonStyle::~TritonStyle()
+{
+}
+
+TritonStyle *TritonStyle::qmlAttachedProperties(QObject *object)
+{
+ return new TritonStyle(object);
+}
+
+
+QColor TritonStyle::systemColor(SystemColor role) const
+{
+ return m_data->themeData.colors[role];
+}
+
+QColor TritonStyle::darkColor() const
+{
+ return systemColor(DarkColor);
+}
+
+QColor TritonStyle::brightColor() const
+{
+ return systemColor(BrightColor);
+}
+
+QColor TritonStyle::accentColor() const
+{
+ return systemColor(AccentColor);
+}
+
+QColor TritonStyle::positiveColor() const
+{
+ return systemColor(PositiveColor);
+}
+
+QColor TritonStyle::negativeColor() const
+{
+ return systemColor(NegativeColor);
+}
+
+
+QColor TritonStyle::lighter25(const QColor& color)
+{
+ return color.lighter(150);
+}
+
+QColor TritonStyle::lighter50(const QColor& color)
+{
+ return color.lighter(200);
+}
+
+QColor TritonStyle::lighter75(const QColor& color)
+{
+ return color.lighter(400);
+}
+
+QColor TritonStyle::darker25(const QColor& color)
+{
+ return color.darker(150);
+}
+
+
+QColor TritonStyle::darker50(const QColor& color)
+{
+ return color.darker(200);
+}
+
+QColor TritonStyle::darker75(const QColor& color)
+{
+ return color.darker(400);
+}
+
+qreal TritonStyle::cellWidth() const
+{
+ return m_data->cell.width();
+}
+
+qreal TritonStyle::cellHeight() const
+{
+ return m_data->cell.height();
+}
+
+
+int TritonStyle::fontSizeXXS() const
+{
+ return m_data->fontSizeXXS;
+}
+
+int TritonStyle::fontSizeXS() const
+{
+ return m_data->fontSizeXS;
+}
+
+int TritonStyle::fontSizeS() const
+{
+ return m_data->fontSizeS;
+}
+
+int TritonStyle::fontSizeM() const
+{
+ return m_data->fontSizeM;
+}
+
+int TritonStyle::fontSizeL() const
+{
+ return m_data->fontSizeL;
+}
+
+int TritonStyle::fontSizeXL() const
+{
+ return m_data->fontSizeXL;
+}
+
+int TritonStyle::fontSizeXXL() const
+{
+ return m_data->fontSizeXXL;
+}
+
+QString TritonStyle::backgroundImage() const
+{
+ return m_data->backgroundImage;
+}
+
+QString TritonStyle::fontFamily() const
+{
+ return m_data->font.family();
+}
+
+int TritonStyle::fontFactor() const
+{
+ return m_data->fontFactor;
+}
+
+qreal TritonStyle::windowWidth() const
+{
+ return m_data->windowSize.width();
+}
+
+qreal TritonStyle::windowHeight() const
+{
+ return m_data->windowSize.height();
+}
+
+void TritonStyle::init()
+{
+ static bool initialized = false;
+ if (!initialized) {
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+ QSharedPointer<QSettings> settings = QQuickStylePrivate::settings(QStringLiteral("Triton"));
+#else
+ QSharedPointer<QSettings> settings = QQuickStyleAttached::settings(QStringLiteral("Triton"));
+#endif
+ QByteArray data;
+
+ data = resolveSetting(settings, "Theme");
+ GlobalStyleData.theme = toEnumValue<Theme>(data, GlobalStyleData.theme);
+
+ data = resolveSetting(settings, "FontSize");
+ GlobalStyleData.font.setPixelSize(toInteger(data, GlobalStyleData.font.pixelSize()));
+
+ data = resolveSetting(settings, "FontFactor");
+ GlobalStyleData.fontFactor = toReal(data, GlobalStyleData.fontFactor);
+
+ data = resolveSetting(settings, "FontFamily");
+ GlobalStyleData.font.setFamily(toString(data, GlobalStyleData.font.family()));
+
+ data = resolveSetting(settings, "WindowWidth");
+ GlobalStyleData.windowSize.setWidth(toInteger(data, GlobalStyleData.windowSize.width()));
+
+ data = resolveSetting(settings, "WindowHeight");
+ GlobalStyleData.windowSize.setHeight(toInteger(data, GlobalStyleData.windowSize.height()));
+
+ resolveGlobalThemeData(settings);
+ GlobalStyleData.themeData = tritonstyle_theme_data(GlobalStyleData.theme);
+
+ QGuiApplication::setFont(GlobalStyleData.font);
+ }
+
+ initialized = true;
+ m_data.reset(new StyleData(GlobalStyleData));
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+ QQuickAttachedObject::init();
+#else
+ QQuickStyleAttached::init();
+#endif
+}
+
+void TritonStyle::resolveGlobalThemeData(const QSharedPointer<QSettings> &settings)
+{
+ QMetaEnum themeEnumeration = QMetaEnum::fromType<Theme>();
+ QMetaEnum enumeration = QMetaEnum::fromType<SystemColor>();
+
+ for (int themeIndex=0; themeIndex<themeEnumeration.keyCount(); themeIndex++) {
+ QByteArray themeKey(themeEnumeration.key(themeIndex));
+ Theme themeValue = static_cast<Theme>(themeEnumeration.value(themeIndex));
+ ThemeData& themeData = tritonstyle_theme_data(themeValue);
+
+ for (int i=0; i<enumeration.keyCount(); i++) {
+ SystemColor value = static_cast<SystemColor>(enumeration.value(i));
+ QByteArray settingsKey = themeKey + '/' + QByteArray(enumeration.key(i));
+ QByteArray data = resolveSetting(settings, settingsKey);
+ QColor color = toColor(data, systemColor(value));
+ themeData.colors.insert(value, color);
+ }
+ }
+}
+
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+void TritonStyle::attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent)
+#else
+void TritonStyle::parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent)
+#endif
+{
+ Q_UNUSED(oldParent);
+ TritonStyle* triton = qobject_cast<TritonStyle *>(newParent);
+ if (triton)
+ inheritStyle(*triton->m_data);
+}
+
+void TritonStyle::inheritStyle(const StyleData& data)
+{
+ m_data.reset(new StyleData(data));
+ propagateStyle(data);
+ emit tritonStyleChanged();
+}
+
+void TritonStyle::propagateStyle(const StyleData& data)
+{
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+ const auto styles = attachedChildren();
+ for (QQuickAttachedObject *child: styles) {
+#else
+ const auto styles = childStyles();
+ for (QQuickStyleAttached *child: styles) {
+#endif
+ TritonStyle* triton = qobject_cast<TritonStyle *>(child);
+ if (triton)
+ triton->inheritStyle(data);
+ }
+}
+
+
diff --git a/plugins/styles/triton/tritonstyle.h b/plugins/styles/triton/tritonstyle.h
new file mode 100644
index 00000000..b48a9f55
--- /dev/null
+++ b/plugins/styles/triton/tritonstyle.h
@@ -0,0 +1,155 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#ifndef TRITONSTYLE_H
+#define TRITONSTYLE_H
+
+#include <QtGui/QColor>
+#include <QtCore/QSharedPointer>
+#include <QtCore/QScopedPointer>
+
+QT_FORWARD_DECLARE_CLASS(QSettings)
+
+class StyleData;
+
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+#include <QtQuickControls2/private/qquickattachedobject_p.h>
+
+class TritonStyle : public QQuickAttachedObject
+#else
+#include <QtQuickControls2/private/qquickstyleattached_p.h>
+
+class TritonStyle : public QQuickStyleAttached
+#endif
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor darkColor READ darkColor NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(QColor brightColor READ brightColor NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(QColor accentColor READ accentColor NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(QColor positiveColor READ positiveColor NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(QColor negativeColor READ negativeColor NOTIFY tritonStyleChanged FINAL)
+
+ Q_PROPERTY(int fontSizeXXS READ fontSizeXXS NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(int fontSizeXS READ fontSizeXS NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(int fontSizeS READ fontSizeS NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(int fontSizeM READ fontSizeM NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(int fontSizeL READ fontSizeL NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(int fontSizeXL READ fontSizeXL NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(int fontSizeXXL READ fontSizeXXL NOTIFY tritonStyleChanged FINAL)
+
+ Q_PROPERTY(QString fontFamily READ fontFamily NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(int fontFactor READ fontFactor NOTIFY tritonStyleChanged FINAL)
+
+ Q_PROPERTY(qreal cellWidth READ cellWidth NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(qreal cellHeight READ cellHeight NOTIFY tritonStyleChanged FINAL)
+
+ Q_PROPERTY(qreal windowWidth READ windowWidth NOTIFY tritonStyleChanged FINAL)
+ Q_PROPERTY(qreal windowHeight READ windowHeight NOTIFY tritonStyleChanged FINAL)
+
+ Q_PROPERTY(QString backgroundImage READ backgroundImage NOTIFY tritonStyleChanged)
+
+public:
+ explicit TritonStyle(QObject *parent = nullptr);
+ virtual ~TritonStyle();
+
+ static TritonStyle *qmlAttachedProperties(QObject *object);
+
+ enum Theme { Light, Dark };
+ Q_ENUM(Theme)
+
+ enum SystemColor {
+ DarkColor,
+ BrightColor,
+ AccentColor,
+ PositiveColor,
+ NegativeColor
+ };
+ Q_ENUM(SystemColor)
+
+ QColor systemColor(SystemColor role) const;
+ QColor darkColor() const;
+ QColor brightColor() const;
+ QColor accentColor() const;
+ QColor positiveColor() const;
+ QColor negativeColor() const;
+
+ int fontSizeXXS() const;
+ int fontSizeXS() const;
+ int fontSizeS() const;
+ int fontSizeM() const;
+ int fontSizeL() const;
+ int fontSizeXL() const;
+ int fontSizeXXL() const;
+
+ Q_INVOKABLE QColor lighter25(const QColor& color);
+ Q_INVOKABLE QColor lighter50(const QColor& color);
+ Q_INVOKABLE QColor lighter75(const QColor& color);
+ Q_INVOKABLE QColor darker25(const QColor& color);
+ Q_INVOKABLE QColor darker50(const QColor& color);
+ Q_INVOKABLE QColor darker75(const QColor& color);
+
+ qreal cellWidth() const;
+ qreal cellHeight() const;
+
+ QString backgroundImage() const;
+
+ QString fontFamily() const;
+ int fontFactor() const;
+
+ qreal windowWidth() const;
+
+ qreal windowHeight() const;
+
+protected:
+ void init();
+signals:
+ void tritonStyleChanged();
+
+private:
+ QScopedPointer<StyleData> m_data;
+ qreal m_windowWidth;
+
+ qreal m_windowHeight;
+
+protected:
+#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
+ void attachedParentChange(QQuickAttachedObject *newParent, QQuickAttachedObject *oldParent);
+#else
+ void parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent);
+#endif
+ void inheritStyle(const StyleData &data);
+ void propagateStyle(const StyleData &data);
+ void resolveGlobalThemeData(const QSharedPointer<QSettings> &settings);
+};
+
+QML_DECLARE_TYPEINFO(TritonStyle, QML_HAS_ATTACHED_PROPERTIES)
+
+#endif // TRITONSTYLE_H
diff --git a/plugins/styles/triton/tritonstyle.qrc b/plugins/styles/triton/tritonstyle.qrc
new file mode 100644
index 00000000..4fbf17b7
--- /dev/null
+++ b/plugins/styles/triton/tritonstyle.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qtquickcontrols2.conf</file>
+ </qresource>
+</RCC>
diff --git a/plugins/styles/triton/tritonstyleplugin.cpp b/plugins/styles/triton/tritonstyleplugin.cpp
new file mode 100644
index 00000000..15b5a13d
--- /dev/null
+++ b/plugins/styles/triton/tritonstyleplugin.cpp
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#include "tritonstyleplugin.h"
+
+#include <QtQml>
+#include "tritonstyle.h"
+#include "tritontheme.h"
+
+Q_LOGGING_CATEGORY(tritonStyle, "triton.style")
+
+
+TritonStylePlugin::TritonStylePlugin(QObject *parent)
+ : QQuickStylePlugin(parent)
+{
+ qCDebug(tritonStyle) << "constructor";
+}
+
+void TritonStylePlugin::registerTypes(const char *uri)
+{
+ qCDebug(tritonStyle) << "registerTypes():" << uri;
+ // @uri com.pelagicore.styles.triton
+ qmlRegisterUncreatableType<TritonStyle>(uri, 1, 0, "TritonStyle", "TritonStyle is an attached property");
+}
+
+void TritonStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri)
+{
+ qCDebug(tritonStyle) << "initializeEngine()";
+ QQuickStylePlugin::initializeEngine(engine, uri);
+}
+
+QString TritonStylePlugin::name() const
+{
+ qCDebug(tritonStyle) << "name()";
+ return QStringLiteral("triton");
+}
+
+QQuickProxyTheme *TritonStylePlugin::createTheme() const
+{
+ qCDebug(tritonStyle) << "createTheme()";
+ return new TritonTheme;
+}
+
+
diff --git a/plugins/styles/triton/tritonstyleplugin.h b/plugins/styles/triton/tritonstyleplugin.h
new file mode 100644
index 00000000..07fbcaf0
--- /dev/null
+++ b/plugins/styles/triton/tritonstyleplugin.h
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#ifndef TRITONSTYLEPLUGIN_H
+#define TRITONSTYLEPLUGIN_H
+
+#include <QtQuickControls2/private/qquickstyleplugin_p.h>
+#include <QLoggingCategory>
+
+QT_FORWARD_DECLARE_CLASS(QQmlEngine)
+Q_DECLARE_LOGGING_CATEGORY(tritonStyle)
+
+class TritonStylePlugin : public QQuickStylePlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
+
+public:
+ TritonStylePlugin(QObject* parent=nullptr);
+ void registerTypes(const char *uri) override;
+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
+ QString name() const override;
+ QQuickProxyTheme *createTheme() const override;
+
+};
+
+#endif // TRITONSTYLEPLUGIN_H
diff --git a/plugins/styles/triton/tritontheme.cpp b/plugins/styles/triton/tritontheme.cpp
new file mode 100644
index 00000000..d4f0ca11
--- /dev/null
+++ b/plugins/styles/triton/tritontheme.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#include "tritontheme.h"
+
+#include <QDebug>
+#include <QtGui/QFont>
+#include <QtGui/QFontInfo>
+
+Q_LOGGING_CATEGORY(tritonTheme, "triton.theme")
+
+TritonTheme::TritonTheme(QPlatformTheme *theme)
+{
+ Q_UNUSED(theme)
+ qCDebug(tritonTheme) << "constructor";
+ const QFont font(QLatin1String("Open Sans"));
+
+ if (QFontInfo(font).family() == QLatin1String("Open Sans")) {
+ const QString family = font.family();
+ m_systemFont.setFamily(family);
+ }
+
+ m_systemFont.setPixelSize(15);
+}
+
+const QFont *TritonTheme::font(QPlatformTheme::Font type) const
+{
+ switch (type) {
+ default:
+ return &m_systemFont;
+ }
+}
diff --git a/plugins/styles/triton/tritontheme.h b/plugins/styles/triton/tritontheme.h
new file mode 100644
index 00000000..90340109
--- /dev/null
+++ b/plugins/styles/triton/tritontheme.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#ifndef TRITONTHEME_H
+#define TRITONTHEME_H
+
+#include <QtGui/QFont>
+#include <QtQuickControls2/private/qquickproxytheme_p.h>
+#include <QLoggingCategory>
+
+Q_DECLARE_LOGGING_CATEGORY(tritonTheme)
+
+class TritonTheme : public QQuickProxyTheme
+{
+public:
+ TritonTheme(QPlatformTheme *theme = nullptr);
+
+ const QFont *font(QPlatformTheme::Font type = SystemFont) const;
+private:
+ QFont m_systemFont;
+};
+
+#endif // TRITONTHEME_H
diff --git a/plugins/translation/plugin.cpp b/plugins/translation/plugin.cpp
new file mode 100644
index 00000000..b5025454
--- /dev/null
+++ b/plugins/translation/plugin.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#include <QtQml/qqmlextensionplugin.h>
+#include <qqml.h>
+#include "translation.h"
+
+class HoundPlugin : public QQmlExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
+public:
+ virtual void registerTypes(const char *uri) override
+ {
+ Q_ASSERT(QLatin1String(uri) == QLatin1String("com.pelagicore.translation"));
+ Q_UNUSED(uri);
+
+ qmlRegisterType<Translation>(uri, 1, 0, "Translation");
+ }
+};
+
+#include "plugin.moc"
diff --git a/plugins/translation/qmldir b/plugins/translation/qmldir
new file mode 100644
index 00000000..34109628
--- /dev/null
+++ b/plugins/translation/qmldir
@@ -0,0 +1,2 @@
+module com.pelagicore.translation
+plugin translationplugin
diff --git a/plugins/translation/translation.cpp b/plugins/translation/translation.cpp
new file mode 100644
index 00000000..6491a368
--- /dev/null
+++ b/plugins/translation/translation.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#include "translation.h"
+#include <QGuiApplication>
+#include <QtQml>
+#include <QScreen>
+#include <QDebug>
+
+Translation::Translation(QObject *parent)
+ : QObject(parent)
+{
+}
+
+void Translation::setPath(const QUrl &languageFilePath)
+{
+ m_languageFilePath = languageFilePath.toLocalFile();
+}
+
+void Translation::setLanguageLocale(const QString &languageLocale)
+{
+ if (m_languageLocale != languageLocale) {
+ if ( loadTranslationFile(languageLocale) ) {
+ m_languageLocale = languageLocale;
+
+ emit languageLocaleChanged();
+ emit languageChanged();
+ }
+ }
+}
+
+QString Translation::languageLocale() const
+{
+ return m_languageLocale;
+}
+
+bool Translation::loadTranslationFile(const QString &langLocale)
+{
+ QString fileToLoad(m_languageFilePath);
+ fileToLoad += langLocale + ".qm";
+
+ if ( m_translator.load(fileToLoad) ) {
+ qApp->installTranslator(&m_translator);
+
+ QEvent ev(QEvent::LanguageChange);
+ qApp->sendEvent(QQmlEngine::contextForObject(this)->engine(), &ev);
+
+ return true;
+ }
+
+ qWarning() << "Failed to load translation file";
+
+ return false;
+}
diff --git a/plugins/translation/translation.h b/plugins/translation/translation.h
new file mode 100644
index 00000000..ffb74ddf
--- /dev/null
+++ b/plugins/translation/translation.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#ifndef TRANSLATION_H
+#define TRANSLATION_H
+
+#include <QtCore/QObject>
+#include <QTranslator>
+#include <QUrl>
+
+class Translation : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString languageLocale READ languageLocale WRITE setLanguageLocale NOTIFY languageLocaleChanged)
+
+public:
+ explicit Translation(QObject *parent = nullptr);
+
+ Q_INVOKABLE void setPath(const QUrl &languageFilePath);
+
+ void setLanguageLocale(const QString &languageLocale);
+ QString languageLocale() const;
+
+signals:
+ void languageLocaleChanged();
+ void languageChanged();
+
+protected:
+ bool loadTranslationFile(const QString &langLocale);
+
+ QString m_languageLocale;
+ QString m_languageFilePath;
+
+ QTranslator m_translator;
+};
+
+#endif // TRANSLATION_H
diff --git a/plugins/translation/translation.pro b/plugins/translation/translation.pro
new file mode 100644
index 00000000..6402ebd9
--- /dev/null
+++ b/plugins/translation/translation.pro
@@ -0,0 +1,57 @@
+TEMPLATE = lib
+TARGET = translationplugin
+QT += qml quick
+CONFIG += qt plugin c++11
+
+uri = com.pelagicore.translation
+load(qmlplugin)
+
+SOURCES += \
+ plugin.cpp \
+ translation.cpp \
+
+HEADERS += \
+ translation.h \
+
+# var, prepend, append
+defineReplace(prependAll) {
+ for(a,$$1):result += $$2$${a}$$3
+ return($$result)
+}
+
+assetsPath = $$PWD/../../imports/assets
+qmlSysUiPath = $$PWD/../../sysui
+# See qml files to scan while running lupdate/lrelease
+lupdate_only {
+ SOURCES += $$files($$shell_quote($$shell_path($${qmlSysUiPath}/))*.qml, true)
+}
+
+target.path = $$installPath
+
+supportedLocales = \
+ de_DE \
+ en_GB \
+ en_US \
+ in_ID
+
+TRANSLATIONS = $$prependAll(supportedLocales, $$assetsPath/translations/, .ts)
+
+qtPrepareTool(LUPDATE, lupdate)
+qtPrepareTool(LRELEASE, lrelease)
+
+ts.commands = $$LUPDATE $$shell_quote($$_PRO_FILE_)
+QMAKE_EXTRA_TARGETS += ts
+
+qm.input = TRANSLATIONS
+qm.output = $$shadowed($$assetsPath/translations)/${QMAKE_FILE_BASE}.qm
+qm.variable_out = PRE_TARGETDEPS
+qm.commands = $${LRELEASE} -idbased ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
+qm.name = LRELEASE ${QMAKE_FILE_IN}
+qm.CONFIG += no_link
+QMAKE_EXTRA_COMPILERS += qm
+
+qmfiles.files = $$prependAll(supportedLocales, $$shadowed($$assetsPath/translations)/, .qm)
+qmfiles.path = $$INSTALL_PREFIX/triton/imports/assets/translations
+qmfiles.CONFIG += no_check_exist
+
+INSTALLS += qmfiles
diff --git a/qmake-features/qmlplugin.prf b/qmake-features/qmlplugin.prf
new file mode 100644
index 00000000..ee5f462e
--- /dev/null
+++ b/qmake-features/qmlplugin.prf
@@ -0,0 +1,25 @@
+# Add a long padded rpath, so the installer can replace it with a relative rpath
+QMAKE_RPATHDIR += "$$INSTALL_PREFIX/long_padding/long_padding/long_padding/long_padding/long_padding\
+ long_padding/long_padding/long_padding/long_padding/long_padding/long_padding/"
+
+TARGET = $$qtLibraryTarget($$TARGET)
+DESTDIR = $$BUILD_DIR/imports/shared/$$replace(uri, \\., /)
+CONFIG += skip_target_version_ext
+
+OTHER_FILES = qmldir
+
+!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
+ copy_qmldir.target = $$replace(DESTDIR, /, $$QMAKE_DIR_SEP)$${QMAKE_DIR_SEP}qmldir
+ copy_qmldir.depends = $$replace(_PRO_FILE_PWD_, /, $$QMAKE_DIR_SEP)$${QMAKE_DIR_SEP}qmldir
+ copy_qmldir.commands = $(COPY_FILE) \"$$copy_qmldir.depends\" \"$$copy_qmldir.target\"
+ QMAKE_EXTRA_TARGETS += copy_qmldir
+ PRE_TARGETDEPS += $$copy_qmldir.target
+}
+
+include(../config.pri)
+
+qmldir.files = qmldir
+installPath = $$INSTALL_PREFIX/triton/imports/shared/$$replace(uri, \\., /)
+qmldir.path = $$installPath
+target.path = $$installPath
+INSTALLS += target qmldir
diff --git a/src/MouseTouchAdaptor.cpp b/src/MouseTouchAdaptor.cpp
new file mode 100644
index 00000000..12bbddd0
--- /dev/null
+++ b/src/MouseTouchAdaptor.cpp
@@ -0,0 +1,276 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#include "MouseTouchAdaptor.h"
+
+#include <QGuiApplication>
+#include <QMouseEvent>
+#include <QTest>
+
+#include <qpa/qplatformnativeinterface.h>
+#include <qpa/qwindowsysteminterface.h>
+
+#include <X11/extensions/XInput2.h>
+#include <X11/extensions/XI2proto.h>
+
+Q_LOGGING_CATEGORY(mouseTouchAdaptor, "mousetouchadaptor")
+
+using QTest::QTouchEventSequence;
+
+namespace {
+
+Qt::MouseButton xcbButtonToQtMouseButton(xcb_button_t detail)
+{
+ switch (detail) {
+ case 1: return Qt::LeftButton;
+ case 2: return Qt::MidButton;
+ case 3: return Qt::RightButton;
+ // don't care about the rest
+ default: return Qt::NoButton;
+ }
+}
+
+void xi2PrepareXIGenericDeviceEvent(xcb_ge_event_t *event)
+{
+ // xcb event structs contain stuff that wasn't on the wire, the full_sequence field
+ // adds an extra 4 bytes and generic events cookie data is on the wire right after the standard 32 bytes.
+ // Move this data back to have the same layout in memory as it was on the wire
+ // and allow casting, overwriting the full_sequence field.
+ memmove((char*) event + 32, (char*) event + 36, event->length * 4);
+}
+
+qreal fixed1616ToReal(FP1616 val)
+{
+ return qreal(val) / 0x10000;
+}
+
+} // anonymous namespace
+
+MouseTouchAdaptor *MouseTouchAdaptor::m_instance = nullptr;
+
+MouseTouchAdaptor *MouseTouchAdaptor::instance()
+{
+ if (!m_instance) {
+ new MouseTouchAdaptor;
+ }
+ return m_instance;
+}
+
+MouseTouchAdaptor::MouseTouchAdaptor()
+{
+ Q_ASSERT(!m_instance);
+ m_instance = this;
+
+ qGuiApp->installNativeEventFilter(this);
+
+ // Create a fake touch device to deliver our synthesized events
+ m_touchDevice = new QTouchDevice;
+ m_touchDevice->setType(QTouchDevice::TouchScreen);
+ QWindowSystemInterface::registerTouchDevice(m_touchDevice);
+
+ queryForXInput2();
+}
+
+MouseTouchAdaptor::~MouseTouchAdaptor()
+{
+ Q_ASSERT(m_instance);
+ m_instance = nullptr;
+}
+
+void MouseTouchAdaptor::queryForXInput2()
+{
+ QPlatformNativeInterface *nativeInterface = qGuiApp->platformNativeInterface();
+ Display *xDisplay = static_cast<Display*>(nativeInterface->nativeResourceForIntegration("Display"));
+
+ int xiOpCode, xiEventBase, xiErrorBase;
+ if (xDisplay && XQueryExtension(xDisplay, "XInputExtension", &xiOpCode, &xiEventBase, &xiErrorBase)) {
+ // 2.0 is enough for our needs
+ int xiMajor = 2;
+ int xi2Minor = 0;
+ m_haveXInput2 = XIQueryVersion(xDisplay, &xiMajor, &xi2Minor) != BadRequest;
+ }
+}
+
+bool MouseTouchAdaptor::nativeEventFilter(const QByteArray &eventType, void *message, long * /*result*/)
+{
+ if (eventType != "xcb_generic_event_t") {
+ qCDebug(mouseTouchAdaptor) << "Non XCB native event received. Ignoring.";
+ return false;
+ }
+
+ xcb_generic_event_t *xcbEvent = static_cast<xcb_generic_event_t *>(message);
+
+ switch (xcbEvent->response_type & ~0x80) {
+ case XCB_BUTTON_PRESS: {
+ auto xcbPress = reinterpret_cast<xcb_button_press_event_t *>(xcbEvent);
+ return handleButtonPress(static_cast<WId>(xcbPress->event), xcbPress->detail, 0,
+ xcbPress->event_x, xcbPress->event_y);
+ }
+ case XCB_BUTTON_RELEASE: {
+ auto xcbRelease = reinterpret_cast<xcb_button_release_event_t *>(xcbEvent);
+ return handleButtonRelease(static_cast<WId>(xcbRelease->event), xcbRelease->detail, 0,
+ xcbRelease->event_x, xcbRelease->event_y);
+ }
+ case XCB_MOTION_NOTIFY: {
+ auto xcbMotion = reinterpret_cast<xcb_motion_notify_event_t *>(xcbEvent);
+ return handleMotionNotify(static_cast<WId>(xcbMotion->event), 0,
+ xcbMotion->event_x, xcbMotion->event_y);
+ }
+ case XCB_GE_GENERIC:
+ if (m_haveXInput2) {
+ return handleXI2Event(reinterpret_cast<xcb_ge_event_t *>(xcbEvent));
+ } else {
+ return false;
+ }
+ default:
+ return false;
+ };
+}
+
+bool MouseTouchAdaptor::handleButtonPress(WId windowId, uint32_t detail, uint32_t /*modifiers*/, int x, int y)
+{
+ Qt::MouseButton button = xcbButtonToQtMouseButton(detail);
+
+ // Filter out the other mouse buttons
+ if (button != Qt::LeftButton)
+ return true;
+
+ QWindow *targetWindow = findQWindowWithXWindowID(windowId);
+
+ QPoint windowPos(x / targetWindow->devicePixelRatio(), y / targetWindow->devicePixelRatio());
+
+ QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice, false /* autoCommit */);
+ touchEvent.press(0 /* touchId */, windowPos);
+ touchEvent.commit(false /* processEvents */);
+
+ m_leftButtonIsPressed = true;
+ return true;
+}
+
+bool MouseTouchAdaptor::handleButtonRelease(WId windowId, uint32_t detail, uint32_t, int x, int y)
+{
+ Qt::MouseButton button = xcbButtonToQtMouseButton(detail);
+
+ // Don't eat the event if it wasn't a left mouse press
+ if (button != Qt::LeftButton)
+ return false;
+
+ QWindow *targetWindow = findQWindowWithXWindowID(windowId);
+
+ QPoint windowPos(x / targetWindow->devicePixelRatio(), y / targetWindow->devicePixelRatio());
+
+ QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice, false /* autoCommit */);
+ touchEvent.release(0 /* touchId */, windowPos);
+ touchEvent.commit(false /* processEvents */);
+
+ m_leftButtonIsPressed = false;
+ return true;
+}
+
+bool MouseTouchAdaptor::handleMotionNotify(WId windowId, uint32_t /*modifiers*/, int x, int y)
+{
+ if (!m_leftButtonIsPressed)
+ return true;
+
+ QWindow *targetWindow = findQWindowWithXWindowID(windowId);
+
+ QPoint windowPos(x / targetWindow->devicePixelRatio(), y / targetWindow->devicePixelRatio());
+
+ QTouchEventSequence touchEvent = QTest::touchEvent(targetWindow, m_touchDevice, false /* autoCommit */);
+ touchEvent.move(0 /* touchId */, windowPos);
+ touchEvent.commit(false /* processEvents */);
+
+ return true;
+}
+
+QWindow *MouseTouchAdaptor::findQWindowWithXWindowID(WId windowId)
+{
+ QWindowList windowList = QGuiApplication::topLevelWindows();
+ QWindow *foundWindow = nullptr;
+
+ int i = 0;
+ while (!foundWindow && i < windowList.count()) {
+ QWindow *window = windowList[i];
+ if (window->winId() == windowId)
+ foundWindow = window;
+ else
+ ++i;
+ }
+
+ Q_ASSERT(foundWindow);
+ return foundWindow;
+}
+
+bool MouseTouchAdaptor::handleXI2Event(xcb_ge_event_t *event)
+{
+ xi2PrepareXIGenericDeviceEvent(event);
+ xXIGenericDeviceEvent *xiEvent = reinterpret_cast<xXIGenericDeviceEvent *>(event);
+ xXIDeviceEvent *xiDeviceEvent = 0;
+
+ switch (xiEvent->evtype) {
+ case XI_ButtonPress:
+ case XI_ButtonRelease:
+ case XI_Motion:
+ xiDeviceEvent = reinterpret_cast<xXIDeviceEvent *>(event);
+ break;
+ default:
+ break;
+ }
+
+ if (!xiDeviceEvent)
+ return false;
+
+ switch (xiDeviceEvent->evtype) {
+ case XI_ButtonPress:
+ return handleButtonPress(
+ static_cast<WId>(xiDeviceEvent->event),
+ xiDeviceEvent->detail,
+ xiDeviceEvent->mods.base_mods,
+ fixed1616ToReal(xiDeviceEvent->event_x),
+ fixed1616ToReal(xiDeviceEvent->event_y));
+ case XI_ButtonRelease:
+ return handleButtonRelease(
+ static_cast<WId>(xiDeviceEvent->event),
+ xiDeviceEvent->detail,
+ xiDeviceEvent->mods.base_mods,
+ fixed1616ToReal(xiDeviceEvent->event_x),
+ fixed1616ToReal(xiDeviceEvent->event_y));
+ case XI_Motion:
+ return handleMotionNotify(
+ static_cast<WId>(xiDeviceEvent->event),
+ xiDeviceEvent->mods.base_mods,
+ fixed1616ToReal(xiDeviceEvent->event_x),
+ fixed1616ToReal(xiDeviceEvent->event_y));
+ return true;
+ default:
+ return false;
+ }
+}
diff --git a/src/MouseTouchAdaptor.h b/src/MouseTouchAdaptor.h
new file mode 100644
index 00000000..f16097b9
--- /dev/null
+++ b/src/MouseTouchAdaptor.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#ifndef MOUSETOUCHADAPTOR_H
+#define MOUSETOUCHADAPTOR_H
+
+#include <QAbstractNativeEventFilter>
+#include <QLoggingCategory>
+#include <QObject>
+#include <QTouchDevice>
+#include <QWindow>
+
+#include <xcb/xcb.h>
+
+Q_DECLARE_LOGGING_CATEGORY(mouseTouchAdaptor)
+
+/*
+ Converts native mouse events into touch events
+
+ Useful for emulating touch interaction using a mouse device since touch input
+ follows a completely different code path from mouse events in Qt.
+ */
+class MouseTouchAdaptor : public QObject, public QAbstractNativeEventFilter {
+public:
+ static MouseTouchAdaptor *instance();
+ virtual ~MouseTouchAdaptor();
+
+ bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
+private:
+ MouseTouchAdaptor();
+ void queryForXInput2();
+ bool handleButtonPress(WId windowId, uint32_t detail, uint32_t modifiers, int x, int y);
+ bool handleButtonRelease(WId windowId, uint32_t detail, uint32_t, int x, int y);
+ bool handleMotionNotify(WId windowId, uint32_t modifiers, int x, int y);
+ QWindow *findQWindowWithXWindowID(WId windowId);
+ bool handleXI2Event(xcb_ge_event_t *event);
+
+ static MouseTouchAdaptor *m_instance;
+
+ QTouchDevice *m_touchDevice;
+ bool m_haveXInput2{false};
+ bool m_leftButtonIsPressed{false};
+};
+
+#endif // MOUSETOUCHADAPTOR_H
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 00000000..9fbd3ec8
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+#include <QtAppManCommon/global.h>
+#include <QtAppManCommon/logging.h>
+#include <QtAppManMain/main.h>
+#include <QtAppManMain/defaultconfiguration.h>
+#include <QtAppManPackage/package.h>
+#include <QtAppManInstaller/sudo.h>
+#include <QGuiApplication>
+#include <QIcon>
+
+#include <QDebug>
+
+#ifdef TRITON_ENABLE_TOUCH_EMULATION
+# include "MouseTouchAdaptor.h"
+#endif
+
+
+QT_USE_NAMESPACE_AM
+
+// code to transform a macro into a string literal
+#define QUOTE(name) #name
+#define STR(macro) QUOTE(macro)
+
+Q_DECL_EXPORT int main(int argc, char *argv[])
+{
+#if defined(Q_OS_UNIX) && defined(AM_MULTI_PROCESS)
+ // set a reasonable default for OSes/distros that do not set this by default
+ setenv("XDG_RUNTIME_DIR", "/tmp", 0);
+#endif
+
+ QCoreApplication::setApplicationName(qSL("Triton UI"));
+ QCoreApplication::setOrganizationName(qSL("Pelagicore AG"));
+ QCoreApplication::setOrganizationDomain(qSL("pelagicore.com"));
+ QCoreApplication::setApplicationVersion(TRITON_VERSION);
+
+ Logging::initialize();
+
+ Package::ensureCorrectLocale();
+
+ QString error;
+ if (Q_UNLIKELY(!forkSudoServer(DropPrivilegesPermanently, &error))) {
+ qCCritical(LogSystem) << "ERROR:" << qPrintable(error);
+ return 2;
+ }
+
+ try {
+ setenv("QT_IM_MODULE", "qtvirtualkeyboard", 1);
+ // this is needed for both WebEngine and Wayland Multi-screen rendering
+ QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
+#if !defined(QT_NO_SESSIONMANAGER)
+ QGuiApplication::setFallbackSessionManagementEnabled(false);
+#endif
+
+ Main a(argc, argv);
+
+#ifdef TRITON_ENABLE_TOUCH_EMULATION
+ QScopedPointer<MouseTouchAdaptor> mouseTouchAdaptor;
+ if (QTouchDevice::devices().isEmpty())
+ mouseTouchAdaptor.reset(MouseTouchAdaptor::instance());
+#endif
+
+ QIcon::setThemeName("triton");
+ {
+ QStringList searchPaths = QIcon::themeSearchPaths();
+ searchPaths.prepend(STR(TRITON_ICONS_PATH));
+ QIcon::setThemeSearchPaths(searchPaths);
+ }
+
+ DefaultConfiguration cfg(QStringList(qSL("am-config.yaml")), QString());
+ cfg.parse();
+ a.setup(&cfg);
+ a.loadQml(cfg.loadDummyData());
+ a.showWindow(cfg.fullscreen() && !cfg.noFullscreen());
+
+ return MainBase::exec();
+ } catch (const std::exception &e) {
+ qCCritical(LogSystem) << "ERROR:" << e.what();
+ return 2;
+ }
+}
diff --git a/src/src.pro b/src/src.pro
new file mode 100644
index 00000000..cc349372
--- /dev/null
+++ b/src/src.pro
@@ -0,0 +1,27 @@
+TEMPLATE = app
+TARGET = triton-ui
+
+include(../config.pri)
+
+macos:CONFIG -= app_bundle
+CONFIG *= no_private_qt_headers_warning link_pkgconfig
+
+QT *= appman_main-private testlib gui-private
+
+DEFINES *= TRITON_VERSION=\\\"$$VERSION\\\"
+
+SOURCES = main.cpp
+
+unix:!macos:system($$pkgConfigExecutable() --libs x11 xi xcb) {
+ PKGCONFIG *= xcb x11 xi
+ SOURCES += MouseTouchAdaptor.cpp
+ HEADERS += MouseTouchAdaptor.h
+ DEFINES += TRITON_ENABLE_TOUCH_EMULATION
+}
+
+DESTDIR = $$OUT_PWD/../
+
+DEFINES += "TRITON_ICONS_PATH=$$INSTALL_PREFIX/triton/imports/assets/icons"
+
+target.path = $$INSTALL_PREFIX/triton
+INSTALLS += target
diff --git a/styles/1080x1920Triton.conf b/styles/1080x1920Triton.conf
new file mode 100644
index 00000000..051c823a
--- /dev/null
+++ b/styles/1080x1920Triton.conf
@@ -0,0 +1,14 @@
+[Controls]
+Style=Material
+[Material]
+Theme=Dark
+
+[Triton]
+Theme=Dark
+FontSize=28
+FontFactor=1.0
+FontFamily="Open Sans"
+WindowWidth=1080
+WindowHeight=1920
+Dark/BrightColor=#FEFEFE
+Light/BrightColor=#3E3E3E
diff --git a/styles/1280x800Triton.conf b/styles/1280x800Triton.conf
new file mode 100644
index 00000000..4784d275
--- /dev/null
+++ b/styles/1280x800Triton.conf
@@ -0,0 +1,14 @@
+[Controls]
+Style=Material
+[Material]
+Theme=Dark
+
+[Triton]
+Theme=Dark
+FontSize=22
+FontFactor=1.0
+FontFamily="Open Sans"
+WindowWidth=1280
+WindowHeight=800
+Dark/BrightColor=#FEFEFE
+Light/BrightColor=#3E3E3E
diff --git a/styles/768x1024Triton.conf b/styles/768x1024Triton.conf
new file mode 100644
index 00000000..731788b4
--- /dev/null
+++ b/styles/768x1024Triton.conf
@@ -0,0 +1,14 @@
+[Controls]
+Style=Material
+[Material]
+Theme=Dark
+
+[Triton]
+Theme=Dark
+FontSize=20
+FontFactor=1.0
+FontFamily="Open Sans"
+WindowWidth=768
+WindowHeight=1024
+Dark/BrightColor=#FEFEFE
+Light/BrightColor=#3E3E3E
diff --git a/styles/triton/Button.qml b/styles/triton/Button.qml
new file mode 100644
index 00000000..753512a7
--- /dev/null
+++ b/styles/triton/Button.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.3 as T
+import com.pelagicore.styles.triton 1.0
+
+T.Button {
+ id: control
+ implicitWidth: TritonStyle.cellWidth + leftPadding + rightPadding
+ implicitHeight: TritonStyle.cellHeight + leftPadding + rightPadding
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ leftPadding: padding + 2
+ rightPadding: padding + 2
+ font.pixelSize: TritonStyle.fontSizeM
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ opacity: enabled || control.highlighted || control.checked ? 1 : 0.3
+ color: control.TritonStyle.brightColor
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ wrapMode: Text.WordWrap
+ }
+
+ background: Rectangle {
+ visible: !control.flat || control.down || control.checked || control.highlighted
+ color: control.checked ? control.TritonStyle.lighter25(control.TritonStyle.darkColor) : control.TritonStyle.darkColor
+ border.color: control.TritonStyle.lighter25(color)
+ border.width: control.visualFocus ? 2 : 1
+ }
+}
diff --git a/styles/triton/ComboBox.qml b/styles/triton/ComboBox.qml
new file mode 100644
index 00000000..e7802709
--- /dev/null
+++ b/styles/triton/ComboBox.qml
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.9
+import QtQuick.Window 2.3
+import QtQuick.Controls 2.2
+import QtQuick.Controls.impl 2.2
+import QtQuick.Templates 2.2 as T
+import com.pelagicore.styles.triton 1.0
+
+T.ComboBox {
+ id: control
+
+ font.pixelSize: TritonStyle.fontSizeM
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
+ rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
+
+ delegate: ItemDelegate {
+ width: parent.width
+ text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
+ font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
+ highlighted: control.highlightedIndex === index
+ hoverEnabled: control.hoverEnabled
+ }
+
+ indicator: Image {
+ x: control.mirrored ? control.padding : control.width - width - control.padding
+ y: control.topPadding + (control.availableHeight - height) / 2
+ source: "image://default/double-arrow/" + (!control.editable && control.visualFocus ? Default.focusColor : Default.textColor)
+ sourceSize.width: width
+ sourceSize.height: height
+ opacity: enabled ? 1 : 0.3
+ }
+
+ contentItem: T.TextField {
+ leftPadding: !control.mirrored ? 12 : control.editable && activeFocus ? 3 : 1
+ rightPadding: control.mirrored ? 12 : control.editable && activeFocus ? 3 : 1
+ topPadding: 6 - control.padding
+ bottomPadding: 6 - control.padding
+
+ text: control.editable ? control.editText : control.displayText
+
+ enabled: control.editable
+ autoScroll: control.editable
+ readOnly: control.popup.visible
+ inputMethodHints: control.inputMethodHints
+ validator: control.validator
+
+ font: control.font
+ color: !control.editable && control.visualFocus ? Default.focusColor : control.TritonStyle.brightColor
+ selectionColor: control.TritonStyle.accentColor
+ selectedTextColor: control.TritonStyle.brightColor
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ opacity: control.enabled ? 1 : 0.3
+
+ background: Rectangle {
+ visible: control.editable && !control.flat
+ border.width: parent && parent.activeFocus ? 2 : 1
+ border.color: parent && parent.activeFocus ? control.TritonStyle.accentColor : control.TritonStyle.darkColor
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 120
+ implicitHeight: 40
+
+ color: !control.editable && control.visualFocus ? (control.pressed ? Default.focusPressedColor : Default.focusLightColor) :
+ (control.down || popup.visible ? Default.buttonPressedColor : control.TritonStyle.darkColor)
+ border.color: control.TritonStyle.lighter25(color)
+ border.width: !control.editable && control.visualFocus ? 2 : 0
+ visible: !control.flat || control.down
+ }
+
+ popup: T.Popup {
+ y: control.height
+ width: control.width
+ height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin)
+ topMargin: 6
+ bottomMargin: 6
+
+ font: control.font
+
+ contentItem: ListView {
+ clip: true
+ implicitHeight: contentHeight
+ model: control.popup.visible ? control.delegateModel : null
+ currentIndex: control.highlightedIndex
+ highlightRangeMode: ListView.ApplyRange
+ highlightMoveDuration: 0
+
+ Rectangle {
+ z: 10
+ width: parent.width
+ height: parent.height
+ color: "transparent"
+ border.color: control.TritonStyle.lighter25(color)
+ }
+
+ T.ScrollIndicator.vertical: ScrollIndicator { }
+ }
+
+ background: Rectangle { color: control.TritonStyle.darkColor}
+ }
+}
diff --git a/styles/triton/Control.qml b/styles/triton/Control.qml
new file mode 100644
index 00000000..be4d5ed1
--- /dev/null
+++ b/styles/triton/Control.qml
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick.Templates 2.0 as T
+import com.pelagicore.styles.triton 1.0
+
+T.Control {
+ font.family: TritonStyle.fontFamily
+}
diff --git a/styles/triton/Dialog.qml b/styles/triton/Dialog.qml
new file mode 100644
index 00000000..cb70de09
--- /dev/null
+++ b/styles/triton/Dialog.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.9
+import QtQuick.Templates 2.2 as T
+import QtQuick.Controls 2.2
+import QtQuick.Controls.impl 2.2
+import com.pelagicore.styles.triton 1.0
+import utils 1.0
+
+T.Dialog {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ header && header.visible ? header.implicitWidth : 0,
+ footer && footer.visible ? footer.implicitWidth : 0,
+ contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ (header && header.visible ? header.implicitHeight + spacing : 0)
+ + (footer && footer.visible ? footer.implicitHeight + spacing : 0)
+ + (contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0))
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ padding: 12
+
+ background: Rectangle {
+ color: 'black'
+ opacity: 0.85
+ }
+
+ header: Label {
+ visible: control.title
+ elide: Label.ElideRight
+ height: Style.vspan(2)
+ text: control.title
+ font.pixelSize: Style.fontSizeM
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ footer: DialogButtonBox {
+ visible: count > 0
+ }
+
+ enter: Transition {
+ NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 200 }
+ NumberAnimation { property: "scale"; from: 0.0; to: 1.0; duration: 200 }
+ }
+
+ exit: Transition {
+ NumberAnimation { property: "opacity"; to: 0.0; duration: 200 }
+ NumberAnimation { property: "scale"; to: 0.0; duration: 200 }
+ }
+}
diff --git a/styles/triton/Frame.qml b/styles/triton/Frame.qml
new file mode 100644
index 00000000..39f8f647
--- /dev/null
+++ b/styles/triton/Frame.qml
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Templates 2.1 as T
+import com.pelagicore.styles.triton 1.0
+
+T.Frame {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ padding: 12
+
+ background: Rectangle {
+ color: TritonStyle.lighter50(TritonStyle.darkColor)
+ border.color: TritonStyle.darkColor
+ }
+}
diff --git a/styles/triton/ItemDelegate.qml b/styles/triton/ItemDelegate.qml
new file mode 100644
index 00000000..3c913c83
--- /dev/null
+++ b/styles/triton/ItemDelegate.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Templates 2.1 as T
+import com.pelagicore.styles.triton 1.0
+
+T.ItemDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 12
+
+ padding: 12
+ topPadding: padding - 1
+ bottomPadding: padding + 1
+
+ contentItem: Text {
+ leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ rightPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ opacity: enabled ? 1.0 : 0.2
+ color: control.TritonStyle.brightColor
+ }
+
+ background: Rectangle {
+ visible: control.down || control.highlighted || control.visualFocus || control.hovered
+ color: control.down ? TritonStyle.lighter25(TritonStyle.darkColor) :
+ control.hovered ? TritonStyle.lighter50(TritonStyle.darkColor) : TritonStyle.lighter50(TritonStyle.darkColor)
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ visible: control.visualFocus || control.highlighted
+ color: control.TritonStyle.accentColor
+ opacity: control.TritonStyle.theme === TritonStyle.Light ? 0.4 : 0.6
+ }
+
+ }
+}
diff --git a/styles/triton/Label.qml b/styles/triton/Label.qml
new file mode 100644
index 00000000..4d6702d8
--- /dev/null
+++ b/styles/triton/Label.qml
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import com.pelagicore.styles.triton 1.0
+
+T.Label {
+ id: control
+ verticalAlignment: Text.AlignVCenter
+ color: TritonStyle.brightColor
+ font.pixelSize: TritonStyle.fontSizeM
+ font.family: TritonStyle.fontFamily
+}
diff --git a/styles/triton/Page.qml b/styles/triton/Page.qml
new file mode 100644
index 00000000..3b491141
--- /dev/null
+++ b/styles/triton/Page.qml
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Templates 2.1 as T
+import com.pelagicore.styles.triton 1.0
+
+T.Page {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ Math.max(contentWidth,
+ header && header.visible ? header.implicitWidth : 0,
+ footer && footer.visible ? footer.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight + topPadding + bottomPadding
+ + (header && header.visible ? header.implicitHeight + spacing : 0)
+ + (footer && footer.visible ? footer.implicitHeight + spacing : 0))
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ background: Rectangle {
+ color: control.TritonStyle.darkColor
+ }
+}
diff --git a/styles/triton/PageIndicator.qml b/styles/triton/PageIndicator.qml
new file mode 100644
index 00000000..34344c1f
--- /dev/null
+++ b/styles/triton/PageIndicator.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Templates 2.1 as T
+import com.pelagicore.styles.triton 1.0
+
+T.PageIndicator {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ padding: 6
+ spacing: 6
+
+ delegate: Rectangle {
+ implicitWidth: 8
+ implicitHeight: 8
+
+ radius: width / 2
+ color: control.TritonStyle.accentColor
+
+ opacity: index === currentIndex ? 0.95 : pressed ? 0.7 : 0.45
+ Behavior on opacity { OpacityAnimator { duration: 100 } }
+ }
+
+ contentItem: Row {
+ spacing: control.spacing
+
+ Repeater {
+ model: control.count
+ delegate: control.delegate
+ }
+ }
+}
diff --git a/styles/triton/Pane.qml b/styles/triton/Pane.qml
new file mode 100644
index 00000000..15dae058
--- /dev/null
+++ b/styles/triton/Pane.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Templates 2.1 as T
+import com.pelagicore.styles.triton 1.0
+
+T.Pane {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ padding: 12
+}
diff --git a/styles/triton/Popup.qml b/styles/triton/Popup.qml
new file mode 100644
index 00000000..7b086880
--- /dev/null
+++ b/styles/triton/Popup.qml
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.9
+import QtQuick.Controls 2.2
+import QtQuick.Controls.impl 2.2
+import QtQuick.Templates 2.2 as T
+import com.pelagicore.styles.triton 1.0
+
+T.Popup {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentHeight > 0 ? contentHeight + topPadding + bottomPadding : 0)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ padding: 12
+
+ background: Rectangle {
+ border.color: control.TritonStyle.darkColor
+ }
+}
diff --git a/styles/triton/Switch.qml b/styles/triton/Switch.qml
new file mode 100644
index 00000000..8dbe20c3
--- /dev/null
+++ b/styles/triton/Switch.qml
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls 2.1
+import QtQuick.Layouts 1.0
+import utils 1.0
+
+T.Switch {
+ id: root
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ spacing: 6
+
+
+ background: Item {
+ implicitWidth: Style.hspan(3)
+ implicitHeight: Style.hspan(2)
+ }
+ indicator: Item {
+ implicitWidth: Style.hspan(3)
+ implicitHeight: Style.hspan(2)
+ }
+
+ contentItem: Item {
+ implicitWidth: Style.hspan(3)
+ implicitHeight: Style.hspan(2)
+
+ RowLayout {
+ anchors.fill: parent
+ Label {
+ Layout.preferredWidth: Style.hspan(1)
+ Layout.fillHeight: true
+ text: root.checked? 'ON':'OFF'
+ verticalAlignment: Text.AlignVCenter
+ font.pixelSize: Style.fontSizeS
+ horizontalAlignment: Qt.AlignHCenter
+ }
+ Item {
+ Layout.preferredWidth: Style.hspan(2)
+ Layout.fillHeight: true
+ Image {
+ id: background
+ anchors.centerIn: parent
+ source: Style.icon('cloud_switch_background')
+ rotation: 180
+ asynchronous: true
+ }
+ Image {
+ id: iconOff
+ anchors.verticalCenter: background.verticalCenter
+ anchors.right: background.horizontalCenter
+ anchors.rightMargin: -10
+ source: Style.icon('cloud_switch_toggle_off')
+ asynchronous: true
+ }
+ Image {
+ id: iconOn
+ anchors.verticalCenter: background.verticalCenter
+ anchors.left: background.horizontalCenter
+ anchors.leftMargin: -10
+ source: Style.icon('cloud_switch_toggle_on')
+ asynchronous: true
+ visible: false
+ }
+ }
+ }
+ }
+
+ states: [
+ State {
+ name: "checked"
+ when: root.checked
+
+ PropertyChanges { target: iconOn; visible: true }
+ PropertyChanges { target: iconOff; visible: false }
+ PropertyChanges { target: background; rotation: 0 }
+ }
+ ]
+}
diff --git a/styles/triton/SwitchDelegate.qml b/styles/triton/SwitchDelegate.qml
new file mode 100644
index 00000000..0e2acbe0
--- /dev/null
+++ b/styles/triton/SwitchDelegate.qml
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Templates 2.1 as T
+import com.pelagicore.styles.triton 1.0
+
+T.SwitchDelegate {
+ id: control
+
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 16
+ topPadding: 8
+ bottomPadding: 8
+ spacing: 16
+
+ indicator: SwitchIndicator {
+ x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
+ rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+
+ text: control.text
+ font: control.font
+ color: control.TritonStyle.brightColor
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: Rectangle {
+ implicitHeight: 48
+
+ color: control.highlighted ? control.TritonStyle.lighter50(control.TritonStyle.darkColor) : "transparent"
+ }
+}
diff --git a/styles/triton/SwitchIndicator.qml b/styles/triton/SwitchIndicator.qml
new file mode 100644
index 00000000..9195c2cd
--- /dev/null
+++ b/styles/triton/SwitchIndicator.qml
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Controls 2.1
+import QtQuick.Controls.impl 2.1
+
+Item {
+ implicitWidth: 56
+ implicitHeight: 28
+
+ property Item control
+
+ Rectangle {
+ y: parent.height / 2 - height / 2
+ width: 56
+ height: 16
+ radius: 8
+ color: control.checked ? (control.visualFocus ? Default.focusColor : Default.buttonCheckedColor) : Default.buttonColor
+ border.width: control.visualFocus ? 2 : 0
+ border.color: Default.focusColor
+ }
+
+ Rectangle {
+ x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+ width: 28
+ height: 28
+ radius: 16
+ color: control.enabled ? (control.down
+ ? (control.visualFocus ? Default.focusPressedColor : Default.indicatorPressedColor)
+ : (control.visualFocus ? Default.focusLightColor : Default.backgroundColor)) : Default.indicatorDisabledColor
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.enabled ? (control.visualFocus
+ ? Default.focusColor
+ : (control.down ? Default.indicatorFramePressedColor : Default.indicatorFrameColor)) : Default.indicatorFrameDisabledColor
+
+ Behavior on x {
+ enabled: !control.down
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
+}
diff --git a/styles/triton/ToolBar.qml b/styles/triton/ToolBar.qml
new file mode 100644
index 00000000..57054f4c
--- /dev/null
+++ b/styles/triton/ToolBar.qml
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Templates 2.1 as T
+import com.pelagicore.styles.triton 1.0
+
+T.ToolBar {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+
+ background: Rectangle {
+ implicitHeight: 48
+ color: control.TritonStyle.darkColor
+ }
+}
diff --git a/styles/triton/ToolButton.qml b/styles/triton/ToolButton.qml
new file mode 100644
index 00000000..6bebefcc
--- /dev/null
+++ b/styles/triton/ToolButton.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Controls.impl 2.3
+import QtQuick.Templates 2.3 as T
+import com.pelagicore.styles.triton 1.0
+import controls 1.0
+
+T.ToolButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 6
+ font.pixelSize: control.TritonStyle.fontSizeM
+ font.family: control.TritonStyle.fontFamily
+
+ scale: pressed ? 1.1 : 1.0
+ Behavior on scale { NumberAnimation { duration: 50 } }
+
+ //icon.width: Symbol.symbolSizeM
+ //icon.height: Symbol.symbolSizeM
+ icon.color: checked ? "#f07d00" : "transparent"
+
+ contentItem: IconLabel {
+ spacing: control.spacing
+ mirrored: control.mirrored
+ display: control.display
+
+ icon: control.icon
+ text: control.text
+ font: control.font
+ color: control.enabled ? (control.visualFocus ? Default.focusColor : Default.textDarkColor) : Default.textDisabledLightColor
+ }
+}
diff --git a/sync.profile b/sync.profile
new file mode 100644
index 00000000..634b3da5
--- /dev/null
+++ b/sync.profile
@@ -0,0 +1,20 @@
+%modules = ( # path to module name map
+);
+%moduleheaders = ( # restrict the module headers to those found in relative path
+);
+%classnames = (
+);
+%deprecatedheaders = (
+);
+$publicclassregexp = "Q.+";
+# Module dependencies.
+# Every module that is required to build this module should have one entry.
+# Each of the module version specifiers can take one of the following values:
+# - A specific Git revision.
+# - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch)
+#
+%dependencies = (
+ "qtbase" => "",
+ "qtdeclarative" => ""
+);
+
diff --git a/sysui/climate/ClimateBar.qml b/sysui/climate/ClimateBar.qml
new file mode 100755
index 00000000..0813a7ca
--- /dev/null
+++ b/sysui/climate/ClimateBar.qml
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import utils 1.0
+import models.climate 1.0
+import models.startup 1.0
+
+Control {
+ id: root
+
+ width: Style.screenWidth
+ height: Style.vspan(2.5)
+
+ Item {
+ id: climateBarContent
+ height: Style.climateCollapsedVspan
+ width: Style.hspan(23)
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ TemperatureLevel {
+ id: tempLevelCenter
+ value: ClimateModel.calculateUnitValue(ClimateModel.leftSeat.value)
+ anchors.centerIn: parent
+ }
+
+// BHS: TODO: Check with the designer about the use-case when we have two / more climate zone
+// TemperatureLevel {
+// id: tempLevelRight
+// horizontalAlignment: Qt.AlignRight
+// value: ClimateModel.calculateUnitValue(ClimateModel.rightSeat.value)
+// anchors.right: parent.right
+// anchors.verticalCenter: parent.verticalCenter
+// onClicked: SystemModel.climateExpanded = !SystemModel.climateExpanded
+// }
+ }
+
+ Component.onCompleted: {
+ StartupTimer.checkpoint("Climate bar created!");
+ StartupTimer.createReport();
+ }
+}
diff --git a/sysui/climate/TemperatureLevel.qml b/sysui/climate/TemperatureLevel.qml
new file mode 100755
index 00000000..55bd78dd
--- /dev/null
+++ b/sysui/climate/TemperatureLevel.qml
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+import controls 1.0
+import utils 1.0
+import models.climate 1.0
+
+Control {
+ id: root
+
+ property real value: 0
+ property int horizontalAlignment: Qt.AlignLeft
+
+ width: Style.hspan(2)
+ height: Style.vspan(3)
+
+ signal clicked()
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: root.clicked()
+ }
+
+ Item {
+ id: content
+
+ readonly property var values: value.toFixed(1).toString().split(".")
+ readonly property bool showDecimal: values[1] !== '0'
+
+ anchors.left: horizontalAlignment === Qt.AlignLeft ? parent.left : undefined
+ anchors.right: horizontalAlignment === Qt.AlignRight ? parent.right : undefined
+ anchors.horizontalCenter: horizontalAlignment === Qt.AlignHCenter ? parent.horizontalCenter : undefined
+
+ width: childrenRect.width
+ height: parent.height
+
+ Text {
+ id: integerPart
+
+ anchors.verticalCenter: parent.verticalCenter
+ verticalAlignment: Text.AlignVCenter
+ height: Style.vspan(1)
+
+ text: content.values[0]
+
+ color: Style.colorBlack
+ font.pixelSize: Style.fontSizeXXL
+ font.family: Style.fontFamily
+ font.weight: Style.fontWeight
+
+ }
+
+ Text {
+ id: decimalPart
+
+ anchors.left: integerPart.right
+ anchors.baseline: integerPart.baseline
+ height: Style.vspan(1)
+
+ text: Qt.locale().decimalPoint + content.values[1]
+
+ visible: content.showDecimal
+ color: Style.colorBlack
+ font.pixelSize: Style.fontSizeXXL
+ font.family: Style.fontFamily
+ font.weight: Style.fontWeight
+ }
+
+ Text {
+ id: unit
+ anchors.left: decimalPart.right
+ anchors.leftMargin: Style.padding
+ anchors.baseline: integerPart.baseline
+ height: Style.vspan(1)
+
+ text: ClimateModel.tempSuffix
+
+ color: Style.colorBlack
+ font.pixelSize: Style.fontSizeXXL*0.97 //RG: the 0.97 is there to get around a font rendering bug on the iMX6
+ font.family: Style.fontFamily
+ font.weight: Style.fontWeight
+ }
+ }
+ Tracer {}
+}
diff --git a/sysui/climate/qmldir b/sysui/climate/qmldir
new file mode 100644
index 00000000..6d757355
--- /dev/null
+++ b/sysui/climate/qmldir
@@ -0,0 +1 @@
+ClimateBar 1.0 ClimateBar.qml
diff --git a/sysui/display/ApplicationWidget.qml b/sysui/display/ApplicationWidget.qml
new file mode 100644
index 00000000..23b59381
--- /dev/null
+++ b/sysui/display/ApplicationWidget.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.7
+import QtQuick.Controls 2.3
+import QtApplicationManager 1.0
+
+Item {
+ id: root
+
+ readonly property bool active: appInfo ? appInfo.active : false
+ property var appInfo
+
+ // TODO: Restart if crashed
+ Timer {
+ interval: 1000; running: root.appInfo; repeat: false
+ onTriggered: {
+ root.appInfo.canBeActive = false
+ d.application = root.appInfo.application
+ ApplicationManager.startApplication(d.application.id);
+ }
+ }
+
+ QtObject {
+ id: d
+ property var application
+ }
+ Connections {
+ target: root.appInfo
+ onWindowChanged: {
+ var window = root.appInfo.window
+ if (window) {
+ window.parent = root;
+ window.width = Qt.binding(function() { return root.width; });
+ window.height = Qt.binding(function() { return root.height; });
+ window.z = 2
+ root.state = "live"
+ root.appInfo.canBeActive = true;
+ } else {
+ root.state = "loading"
+ }
+ }
+ }
+
+ BusyIndicator {
+ id: busyIndicator
+ running: true
+ anchors.fill: parent
+ z: 1
+ }
+
+ state: "loading"
+ states: [
+ State {
+ name: "loading"
+ },
+ State {
+ name: "live"
+ PropertyChanges { target: busyIndicator; running: false; visible: false }
+ }
+ ]
+}
diff --git a/sysui/display/Display.qml b/sysui/display/Display.qml
new file mode 100644
index 00000000..743ac7a3
--- /dev/null
+++ b/sysui/display/Display.qml
@@ -0,0 +1,229 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.7
+import QtGraphicalEffects 1.0
+import QtQuick.Controls 2.3
+
+import controls 1.0
+import utils 1.0
+import climate 1.0
+import statusbar 1.0
+import notification 1.0
+import popup 1.0
+import windowoverview 1.0
+
+import models.application 1.0
+import models.system 1.0
+import models.startup 1.0
+
+Image {
+ id: root
+
+ source: Style.gfx2(Style.displayBackground)
+
+ property bool widgetEditingMode: false
+
+ // Content Elements
+ StatusBar {
+ id: statusBar
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+
+ Launcher {
+ id: launcher
+ anchors.top: statusBar.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+ Button {
+ text: "Edit Widgets"
+ anchors.centerIn: root
+ width: Style.hspan(5)
+ opacity: launcher.open ? 1.0 : 0.0
+ Behavior on opacity { NumberAnimation { duration: 270; easing.type: Easing.InOutQuad } }
+ visible: opacity > 0
+ onClicked: {
+ launcher.goHome()
+ root.widgetEditMode = true;
+ }
+ }
+
+ Item {
+ id: mainContentArea
+ y: launcher.y + Style.launcherHeight
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: root.height - Style.statusBarHeight - Style.launcherHeight - Style.climateCollapsedVspan
+ opacity: launcher.open ? 0 : 1
+ Behavior on opacity { NumberAnimation { duration: 270; easing.type: Easing.InOutQuad } }
+ enabled: !launcher.open
+
+ Item {
+ y: launcher.height - Style.launcherHeight
+ width: parent.width
+ height: parent.height
+
+ StageLoader {
+ id: windowStackLoader
+
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: widgetDrawer.open ? parent.height - widgetDrawer.height : parent.height
+ active: StagedStartupModel.loadRest
+ source: "WindowStack.qml"
+ Behavior on height { SmoothedAnimation { easing.type: Easing.InOutQuad; duration: 270 } }
+ Binding { target: windowStackeLoader.item; property: "widgetEditingMode"; value: root.widgetEditingMode }
+ }
+
+ WidgetDrawer {
+ id: widgetDrawer
+ width: parent.width
+ height: Style.vspan(3)
+ anchors.bottom: parent.bottom
+
+ dragEnabled: !musicAppWindow.active
+
+ ApplicationWidget {
+ id: musicAppWindow
+ width: parent.width - Style.hspan(1)
+ height: active ? expandedHeight : Style.vspan(3)
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ appInfo: ApplicationManagerModel.application('com.pelagicore.music')
+
+ // when active the top edge will go all the way up to the bottom of the launcher
+ property real expandedHeight: mainContentArea.height
+
+ onActiveChanged: {
+ if (active) {
+ widgetDrawer.open = true;
+ }
+ }
+
+ Behavior on height {
+ SmoothedAnimation {
+ easing.type: Easing.InOutQuad
+ duration: 500
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ Rectangle {
+ id: mainContentMask
+ anchors.fill: mainContentArea
+ gradient: Gradient {
+ GradientStop { position: 0.8; color: "#ffffffff" }
+ GradientStop { position: 0.95; color: "#00ffffff" }
+ }
+ visible: false
+ }
+
+ OpacityMask {
+ anchors.fill: mainContentArea
+ source: mainContentArea
+ maskSource: mainContentMask
+ opacity: launcher.open ? 0.1 : 1
+ Behavior on opacity { NumberAnimation { duration: 270; easing.type: Easing.InOutQuad } }
+ }
+
+ StageLoader {
+ id: settingsLoader
+ anchors.top: statusBar.bottom
+ active: StagedStartupModel.loadBackgroundElements
+ source: "../settings/Settings.qml"
+ }
+
+ ClimateBar {
+ id: climateBar
+ }
+
+ StageLoader {
+ id: toolBarMonitorLoader
+ width: parent.width
+ height: 200
+ anchors.bottom: parent.bottom
+ active: SystemModel.toolBarMonitorVisible
+ source: "../dev/ProcessMonitor/ToolBarMonitor.qml"
+ }
+
+ StageLoader {
+ id: windowOverviewLoader
+ anchors.fill: parent
+ active: StagedStartupModel.loadBackgroundElements
+ source: "../windowoverview/WindowOverview.qml"
+ }
+
+ StageLoader {
+ id: popupContainerLoader
+ width: Style.popupWidth
+ height: Style.popupHeight
+ anchors.centerIn: parent
+ active: StagedStartupModel.loadBackgroundElements
+ source: "../popup/PopupContainer.qml"
+ }
+
+ StageLoader {
+ id: notificationContainerLoader
+ width: Style.screenWidth
+ height: Style.vspan(2)
+ active: StagedStartupModel.loadBackgroundElements
+ source: "../notification/NotificationContainer.qml"
+ }
+
+ StageLoader {
+ id: notificationCenterLoader
+ width: Style.isPotrait ? Style.hspan(Style.notificationCenterSpan + 5) : Style.hspan(12)
+ height: Style.screenHeight - Style.statusBarHeight
+ anchors.top: statusBar.bottom
+ active: StagedStartupModel.loadBackgroundElements
+ source: "../notification/NotificationCenter.qml"
+ }
+
+ StageLoader {
+ id: keyboardLoader
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ active: StagedStartupModel.loadBackgroundElements
+ source: "../keyboard/Keyboard.qml"
+ }
+
+ Component.onCompleted: StagedStartupModel.enterMenuState()
+}
diff --git a/sysui/display/HomePage.qml b/sysui/display/HomePage.qml
new file mode 100644
index 00000000..5dc652c4
--- /dev/null
+++ b/sysui/display/HomePage.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.1
+
+import controls 1.0
+import utils 1.0
+import widgets 1.0
+
+import models.application 1.0
+
+Item {
+ id: root
+
+ property bool widgetEditingMode: false
+
+ // The widget grid
+ Item {
+ id: widgetGrid
+ anchors.fill: parent
+ anchors.margins: Style.hspan(2)
+
+ readonly property int numRows: 5
+ readonly property int numColumns: 2
+ readonly property int columnWidth: width / numColumns
+ readonly property int rowHeight: height / numRows
+
+ ApplicationWidget {
+ id: mapWidget
+ x: topLeftColumnIndex * widgetGrid.columnWidth
+ y: topLeftRowIndex * widgetGrid.rowHeight
+ width: widthColumns * widgetGrid.columnWidth
+ height: heightRows * widgetGrid.rowHeight
+ property int topLeftRowIndex: 0
+ property int topLeftColumnIndex: 0
+ property int widthColumns: 2
+ property int heightRows: 3
+ property int minWidthColumns: 1
+ property int minHeightRows: 1
+
+ appInfo: ApplicationManagerModel.application('com.pelagicore.maps')
+
+ Behavior on x { SmoothedAnimation { easing.type: Easing.InOutQuad; duration: 270 } }
+ Behavior on y { SmoothedAnimation { easing.type: Easing.InOutQuad; duration: 270 } }
+ Behavior on width { SmoothedAnimation { easing.type: Easing.InOutQuad; duration: 270 } }
+ Behavior on height { SmoothedAnimation { easing.type: Easing.InOutQuad; duration: 270 } }
+
+ }
+ Resizer {
+ anchors.fill: mapWidget
+ target: mapWidget
+ grid: widgetGrid
+ visible: root.widgetEditMode
+ }
+ }
+
+}
diff --git a/sysui/display/Launcher.qml b/sysui/display/Launcher.qml
new file mode 100644
index 00000000..c425c9f1
--- /dev/null
+++ b/sysui/display/Launcher.qml
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.3
+import utils 1.0
+import QtApplicationManager 1.0
+import QtQuick.Layouts 1.0
+
+import models.application 1.0
+
+RowLayout {
+ id: root
+ height: gridButton.checked ? expandedHeight : Style.launcherHeight
+
+ readonly property real expandedHeight: Style.vspan(10)
+ readonly property bool open: gridButton.checked
+
+ function goHome() {
+ homeButton.checked = true;
+ homeButton.clicked();
+ }
+
+ Behavior on height {
+ SmoothedAnimation {
+ easing.type: Easing.InOutQuad
+ duration: 270
+ }
+ }
+
+ ButtonGroup {
+ id: buttonGroup
+ buttons: [homeButton]
+ }
+
+ ToolButton {
+ id: homeButton
+ Layout.alignment: Qt.AlignTop
+ icon.name: "home"
+ checked: true
+ onClicked: {
+ gridButton.checked = false;
+ ApplicationManagerModel.goHome()
+ }
+ }
+ GridView {
+ id: grid
+ Layout.alignment: Qt.AlignTop
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ interactive: false
+ clip: true
+ model: ApplicationManager
+ cellWidth: width / 4
+ cellHeight: Style.vspan(1)
+ delegate: ToolButton {
+ id: appButton
+ width: grid.cellWidth
+ height: grid.cellHeight
+ icon.source: model.icon
+ checkable: true
+ onClicked: {
+ gridButton.checked = false;
+ ApplicationManager.startApplication(model.applicationId)
+ }
+ Component.onCompleted: buttonGroup.addButton(appButton)
+ Component.onDestruction: buttonGroup.removeButton(appButton)
+
+ property var appInfo: ApplicationManagerModel.application(model.applicationId)
+ Connections {
+ target: appInfo
+ onActiveChanged: {
+ if (appInfo.active) {
+ appButton.checked = true;
+ }
+ }
+ }
+ }
+ }
+ ToolButton {
+ id: gridButton
+ Layout.alignment: Qt.AlignTop
+ icon.name: "launcher-icongrid"
+ checkable: true
+ }
+}
diff --git a/sysui/display/Resizer.qml b/sysui/display/Resizer.qml
new file mode 100644
index 00000000..c4c99bce
--- /dev/null
+++ b/sysui/display/Resizer.qml
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+import utils 1.0
+
+/*
+ Resizes a given target item while respecting the boundaries of a given grid item
+ */
+MultiPointTouchArea {
+ id: root
+
+ // The item to be resized
+ property Item target
+
+ /*
+ A grid item is expected to have the following properties:
+ numRows: number of rows
+ numColumns: number of columns
+ columnWidth: width of each column
+ rowHeight: height of each row
+ */
+ property Item grid
+
+ property int borderThickness: Style.hspan(3)
+
+ touchPoints: [
+ TouchPoint {
+ id: touch1
+ onXChanged: d.onTouchMoved()
+ onYChanged: d.onTouchMoved()
+ onPressedChanged: {
+ if (pressed) {
+ d.updateBorders();
+ d.dragging = true;
+ } else {
+ d.dragging = false;
+ }
+ }
+ }
+ ]
+
+ QtObject {
+ id: d
+
+ readonly property int widthIncrement: root.grid ? root.grid.columnWidth : 0
+ readonly property int heightIncrement: root.grid ? root.grid.rowHeight : 0
+
+ property bool leftBorder: false
+ property bool rightBorder: false
+ property bool topBorder: false
+ property bool bottomBorder: false
+
+ property bool dragging: false
+
+ function updateBorders() {
+ var pos = mapToItem(root.target, touch1.x, touch1.y);
+ leftBorder = pos.x <= root.borderThickness;
+ rightBorder = pos.x >= root.target.width - root.borderThickness;
+ topBorder = pos.y <= root.borderThickness;
+ bottomBorder = pos.y >= root.target.height - root.borderThickness;
+ }
+
+ function onTouchMoved() {
+ if (!d.dragging) {
+ return;
+ }
+
+ var bounds = grid.mapToItem(root.target.parent, 0, 0, grid.width, grid.height);
+ var pos = mapToItem(root.target.parent, touch1.x, touch1.y);
+
+ var snappedPosX = Math.min(bounds.x + bounds.width, Math.max(bounds.x, pos.x));
+ snappedPosX = bounds.x + Math.round((snappedPosX - bounds.x) / d.widthIncrement)*d.widthIncrement;
+
+ var snappedPosY = Math.min(bounds.y + bounds.height, Math.max(bounds.y, pos.y));
+ snappedPosY = bounds.y + Math.round((snappedPosY - bounds.y) / d.heightIncrement)*d.heightIncrement;
+
+ if (d.leftBorder) {
+ var curRightBorder = root.target.topLeftColumnIndex + root.target.widthColumns;
+ var desiredTopLeftColumnIndex = (snappedPosX - bounds.x) / d.widthIncrement;
+ var maxTopLeftColumnIndex = curRightBorder - root.target.minWidthColumns;
+
+ root.target.topLeftColumnIndex = Math.min(desiredTopLeftColumnIndex, maxTopLeftColumnIndex);
+ root.target.widthColumns = curRightBorder - root.target.topLeftColumnIndex;
+ } else if (d.rightBorder) {
+ var desiredRightBorder = (snappedPosX - bounds.x) / d.widthIncrement;
+ var desiredWidth = desiredRightBorder - root.target.topLeftColumnIndex;
+
+ root.target.widthColumns = Math.max(root.target.minWidthColumns, desiredWidth);
+ }
+
+ if (d.topBorder) {
+ var curBottomIndex = root.target.topLeftRowIndex + root.target.heightRows;
+ var desiredTopLeftRowIndex = (snappedPosY - bounds.y) / d.heightIncrement;
+ var maxTopLeftRowIndex = curBottomIndex - root.target.minHeightRows;
+
+ root.target.topLeftRowIndex = Math.min(desiredTopLeftRowIndex, maxTopLeftRowIndex);
+ root.target.heightRows = curBottomIndex - root.target.topLeftRowIndex;
+ } else if (d.bottomBorder) {
+ var desiredBottomBorder = (snappedPosY - bounds.y) / d.heightIncrement;
+ var desiredHeight = desiredBottomBorder - root.target.topLeftRowIndex;
+
+ root.target.heightRows = Math.max(root.target.minHeightRows, desiredHeight);
+ }
+
+ }
+ }
+}
diff --git a/sysui/display/WidgetDrawer.qml b/sysui/display/WidgetDrawer.qml
new file mode 100644
index 00000000..916ff9ab
--- /dev/null
+++ b/sysui/display/WidgetDrawer.qml
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import utils 1.0
+
+/*
+ Displays a child item on the screen which can be dismissed by swiping it to the right.
+
+ It will them remain on the right side of the screen, with just a small part of its left
+ side sticking out so that it can be dragged back into full view.
+
+ Usage:
+
+ WidgetDrawer {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: someHeight
+ SomeItem {}
+ }
+ */
+MouseArea {
+ id: root
+ drag.target: root
+ drag.axis: Drag.XAxis
+ drag.filterChildren: dragEnabled
+ drag.minimumX: 0
+ drag.maximumX: root.width - stickOutWidth
+
+ // Whether the drag behavior is enabled.
+ property bool dragEnabled: true
+
+ // how much of it should be sticking out from the right side of the display when
+ // the widget drawer has been closed
+ readonly property real stickOutWidth: Style.hspan(2)
+
+ // true if in full view, false if it's tucked away on the right side of the display
+ property bool open: true
+ onOpenChanged: d.applyOpenState()
+
+ Connections {
+ target: drag
+ onActiveChanged: {
+ if (root.drag.active) {
+ d.lastX = root.x;
+ d.direction = 0;
+ d.dragging = true;
+ } else {
+ d.dragging = false;
+ var delta = Math.abs(d.lastX - d.startX);
+ if (delta >= d.minimumDrag) {
+ if (d.direction == 1) {
+ root.open = false;
+ } else {
+ root.open = true;
+ }
+ } else {
+ d.applyOpenState();
+ }
+ }
+ }
+ }
+
+ QtObject {
+ id: d
+ property real startX
+ property real lastX
+ property int direction
+ property bool dragging: false
+ readonly property real minimumDrag: Style.hspan(2)
+
+ function applyOpenState() {
+ if (root.open) {
+ root.x = root.drag.minimumX;
+ } else {
+ root.x = root.drag.maximumX;
+ }
+ }
+ }
+ onXChanged: {
+ if (!d.dragging) {
+ return;
+ }
+ if (x > d.lastX) {
+ if (d.direction !== 1) {
+ d.direction = 1;
+ d.startX = x;
+ }
+ } else if (d.direction !== -1) {
+ d.direction = -1;
+ d.startX = x;
+ }
+ d.lastX = x;
+ }
+
+ Behavior on x {
+ SmoothedAnimation {
+ easing.type: Easing.InOutQuad
+ velocity: Style.hspan(40)
+ }
+ enabled: !d.dragging
+ }
+}
diff --git a/sysui/display/WindowStack.qml b/sysui/display/WindowStack.qml
new file mode 100644
index 00000000..df93827a
--- /dev/null
+++ b/sysui/display/WindowStack.qml
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.5
+import QtGraphicalEffects 1.0
+
+import QtQuick.Controls 2.1
+import controls 1.0
+import utils 1.0
+import models.application 1.0
+import models.settings 1.0
+import models.system 1.0
+
+import QtApplicationManager 1.0
+
+/*
+ A window stack with the home page at the bottom and at most an application window on top of it
+*/
+StackView {
+ id: root
+
+ property alias widgetEditingMode: homePage.widgetEditingMode
+
+ initialItem: HomePage {
+ id: homePage
+ opacity: 0
+
+ OpacityAnimator {
+ target: homePage;
+ from: 0;
+ to: 1;
+ duration: 1000
+ running: true
+ }
+ }
+
+ focus: true
+
+ /*
+ pushEnter: windowTransitions ? windowTransitions.pushEnter : null
+ pushExit: windowTransitions ? windowTransitions.pushExit : null
+ popEnter: windowTransitions ? windowTransitions.popEnter : null
+ popExit: windowTransitions ? windowTransitions.popExit : null
+ replaceEnter: pushEnter
+ replaceExit: pushExit
+ */
+
+ /*
+ Loader {
+ id: windowTransitionsLoader
+ source: "windowtransitions/" + SettingsModel.windowTransitions.get(SettingsModel.windowTransitionsIndex).name + ".qml"
+ Binding {
+ target: windowTransitionsLoader.item
+ property: "itemWidth"
+ value: root.itemWidth
+ }
+ }
+ property alias windowTransitions: windowTransitionsLoader.item
+ */
+
+ Item {
+ id: dummyitem
+ anchors.fill: parent
+ //visible: false
+ }
+
+ Shortcut {
+ context: Qt.ApplicationShortcut
+ sequence: StandardKey.Cancel
+ onActivated: { root.pop(); }
+ }
+
+ Connections {
+ target: ApplicationManagerModel
+
+ onActiveAppIdChanged: {
+ if (ApplicationManagerModel.activeAppId === "" && root.depth > 1) {
+ // go back to the home screen
+ root.pop();
+ }
+ }
+
+ onApplicationSurfaceReady: {
+ if (WindowManager.windowProperty(item, "windowType") === "widget") {
+ // leave it alone. Widgets are displayed by their own separate components elsewhere.
+ return;
+ }
+
+ if (root.currentItem === item) {
+ // NOOP
+ return;
+ }
+
+ item.width = Qt.binding(function() { return root.width; });
+ item.height = Qt.binding(function() { return root.height; });
+ if (root.depth === 1) {
+ root.push(item)
+ } else if (root.depth > 1) {
+ root.replace(item)
+ }
+ }
+
+ onReleaseApplicationSurface: {
+ if (root.currentItem === item) {
+ root.pop()
+ }
+ }
+
+ onUnhandledSurfaceReceived: {
+ item.visible = false
+ item.parent = dummyitem
+ }
+ }
+}
diff --git a/sysui/display/qmldir b/sysui/display/qmldir
new file mode 100644
index 00000000..8a9ef1f7
--- /dev/null
+++ b/sysui/display/qmldir
@@ -0,0 +1 @@
+Display 1.0 Display.qml
diff --git a/sysui/popup/PopupContainer.qml b/sysui/popup/PopupContainer.qml
new file mode 100644
index 00000000..d825f0fc
--- /dev/null
+++ b/sysui/popup/PopupContainer.qml
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.2
+import utils 1.0
+import controls 1.0
+import models.popup 1.0
+
+Dialog {
+ id: root
+
+ width: Style.popupWidth
+ height: Style.popupHeight
+
+ property bool contentAvailable: root.popupContent !== undefined
+
+ property var popupContent: PopupModel.currentPopup.summary
+ property var popupBody: PopupModel.currentPopup.body
+ property real progressValue: PopupModel.currentPopup.progressValue
+ property var buttonsModel: PopupModel.buttonModel
+
+ Connections {
+ target: PopupModel
+ onPopupVisibleChanged: {
+ if (target.popupVisible) {
+ root.open();
+ } else {
+ root.close();
+ }
+ }
+ }
+
+ closePolicy: Popup.NoAutoClose
+
+ title: root.contentAvailable && root.popupBody !== undefined && root.popupBody.title !== undefined ? root.popupBody.title : ""
+
+ header: PopupHeader {
+ height: Style.vspan(2)
+ anchors.horizontalCenter: parent.horizontalCenter
+ title: root.title
+ subtitle: root.contentAvailable && root.popupBody !== undefined && root.popupBody.subtitle !== undefined ? root.popupBody.subtitle : ""
+ }
+
+ Label {
+ id: body
+
+ width: parent.width
+ height: paintedHeight
+ anchors.topMargin: 10
+ font.pixelSize: Style.fontSizeM
+ text: root.contentAvailable !== undefined && root.popupContent !== undefined ? root.popupContent.toString() : ""
+ horizontalAlignment: Text.AlignHCenter
+ elide: Text.ElideRight
+ wrapMode: Text.WordWrap
+ visible: PopupModel.popupVisible
+ }
+
+ ProgressBar {
+ id: progressBar
+
+ width: parent.width - Style.screenMargin
+ height: Style.vspan(0.5)
+ anchors.top: body.bottom
+ anchors.topMargin: 5
+ anchors.horizontalCenter: parent.horizontalCenter
+ visible: root.progressValue > 0.0
+
+ opacity: visible ? 1.0 : 0.0
+ Behavior on opacity {
+ NumberAnimation {
+ duration: 200
+ }
+ }
+
+ from: 0
+ to: 100
+ value: root.contentAvailable && root.popupContent !== undefined ? root.progressValue : ""
+ }
+
+ footer: PopupFooter {
+ id: buttonsRow
+
+ popupWidth: root.width
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ model: root.buttonsModel
+
+ onButtonClicked: PopupModel.buttonPressed(buttonIndex)
+ }
+}
diff --git a/sysui/popup/PopupFooter.qml b/sysui/popup/PopupFooter.qml
new file mode 100644
index 00000000..7968a0c0
--- /dev/null
+++ b/sysui/popup/PopupFooter.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+
+Row {
+ id: root
+
+ property int popupWidth: 0
+ property alias model: buttonModel.model
+ signal buttonClicked(var buttonIndex)
+
+ spacing: 2
+
+ Repeater {
+ id: buttonModel
+
+ property int buttonWidth: model ? root.popupWidth / model.length : 0
+
+ delegate: Button {
+ width: buttonModel.buttonWidth
+ height: Style.vspan(1)
+ text: modelData.text
+ onClicked: root.buttonClicked(index)
+ }
+ }
+}
diff --git a/sysui/popup/PopupHeader.qml b/sysui/popup/PopupHeader.qml
new file mode 100644
index 00000000..664458d6
--- /dev/null
+++ b/sysui/popup/PopupHeader.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import controls 1.0
+import utils 1.0
+
+Item {
+ id: root
+
+ property alias title: title.text
+ property alias subtitle: subtitle.text
+ property int headerMargin: subtitle.text !== "" ? 10 : 8
+ property int verticalOffset: subtitle.text !== "" ? 2 : 3
+
+ Column {
+ id: titleSubtitleColumn
+ height: subtitle.text !== "" ? title.paintedHeight + subtitle.paintedHeight + spacing : title.paintedHeight
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenterOffset: root.verticalOffset
+ spacing: root.headerMargin
+
+ Label {
+ id: title
+ font.pixelSize: Style.fontSizeM
+ anchors.horizontalCenter: parent.horizontalCenter
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignTop
+ }
+
+ Label {
+ id: subtitle
+ font.pixelSize: Style.fontSizeS
+ anchors.horizontalCenter: parent.horizontalCenter
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignTop
+ }
+ }
+}
+
diff --git a/sysui/popup/qmldir b/sysui/popup/qmldir
new file mode 100644
index 00000000..b125544b
--- /dev/null
+++ b/sysui/popup/qmldir
@@ -0,0 +1 @@
+PopupContainer 1.0 PopupContainer.qml
diff --git a/sysui/statusbar/DateAndTime.qml b/sysui/statusbar/DateAndTime.qml
new file mode 100644
index 00000000..69a8e6d3
--- /dev/null
+++ b/sysui/statusbar/DateAndTime.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+import utils 1.0
+
+Control {
+ id: root
+
+ property string timeFormat: "hh:mm"
+ property var currentDate: new Date()
+
+ width: Style.isPotrait ? Style.hspan(2) : Style.hspan(1.5)
+ height: Style.vspan(0.9)
+
+ Label {
+ id: clock
+
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: Style.fontSizeM
+ font.weight: Style.fontWeight
+ text: Qt.formatTime(root.currentDate, root.timeFormat)
+ }
+}
diff --git a/sysui/statusbar/IndicatorTray.qml b/sysui/statusbar/IndicatorTray.qml
new file mode 100644
index 00000000..268cacb3
--- /dev/null
+++ b/sysui/statusbar/IndicatorTray.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+import controls 1.0
+import utils 1.0
+
+Control {
+ id: root
+
+ property alias model: repeater.model
+
+ width: Style.hspan(model ? model.length : 0)
+ height: Style.vspan(2)
+
+ RowLayout {
+ spacing: Style.paddingXL
+ height: parent.height
+
+ Repeater {
+ id: repeater
+
+ delegate: Image {
+ source: Style.symbolXS(modelData.name)
+ opacity: modelData.active ? 1 : 0.4
+ }
+ }
+ }
+}
diff --git a/sysui/statusbar/StatusBar.qml b/sysui/statusbar/StatusBar.qml
new file mode 100644
index 00000000..215c0a4c
--- /dev/null
+++ b/sysui/statusbar/StatusBar.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+
+import utils 1.0
+import controls 1.0
+import models.statusbar 1.0
+import models.settings 1.0
+import models.system 1.0
+
+Pane {
+ id: root
+
+ height: Style.statusBarHeight
+
+ MouseArea {
+ anchors.fill: parent
+ onPressAndHold: SystemModel.toolBarMonitorVisible = !SystemModel.toolBarMonitorVisible
+ }
+
+ IndicatorTray {
+ model: StatusBarModel.indicators
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.topMargin: Style.padding
+ anchors.bottomMargin: Style.padding
+ }
+
+ RowLayout {
+ spacing: Style.paddingXL * 2
+ Layout.maximumWidth: Style.hspan(12)
+ Layout.maximumHeight: Style.statusBarHeight
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.topMargin: Style.padding
+ anchors.bottomMargin: Style.padding
+
+ Weather {
+ visible: !Style.isPotrait
+ }
+
+ DateAndTime {
+ Layout.fillHeight: true
+ timeFormat: SettingsModel.clockOption.format
+ currentDate: StatusBarModel.currentDate
+ }
+ }
+}
diff --git a/sysui/statusbar/Weather.qml b/sysui/statusbar/Weather.qml
new file mode 100644
index 00000000..031275b5
--- /dev/null
+++ b/sysui/statusbar/Weather.qml
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Triton IVI UI.
+**
+** $QT_BEGIN_LICENSE:GPL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: GPL-3.0
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Layouts 1.0
+import utils 1.0
+import models.climate 1.0
+
+Control {
+ id: root
+
+ width: Style.hspan(1.5)
+ height: Style.vspan(0.9)
+
+ RowLayout {
+ spacing: Style.padding
+ anchors.centerIn: parent
+
+ Image {
+ source: Style.icon(ClimateModel.weatherIcon)
+ asynchronous: true
+ }
+
+ Text {
+ font.family: Style.fontFamily
+ font.pixelSize: Style.fontSizeL
+
+ color: Style.colorWhite
+
+ text: ClimateModel.outsideTempText
+
+ clip: Style.debugMode
+ font.weight: Style.fontWeight
+ }
+ }
+}
diff --git a/sysui/statusbar/qmldir b/sysui/statusbar/qmldir
new file mode 100644
index 00000000..d8ddf973
--- /dev/null
+++ b/sysui/statusbar/qmldir
@@ -0,0 +1 @@
+StatusBar 1.0 StatusBar.qml
diff --git a/tests/tests.pro b/tests/tests.pro
new file mode 100644
index 00000000..96710850
--- /dev/null
+++ b/tests/tests.pro
@@ -0,0 +1 @@
+TEMPLATE = subdirs
diff --git a/triton-ui.pro b/triton-ui.pro
new file mode 100644
index 00000000..a9c8d3f1
--- /dev/null
+++ b/triton-ui.pro
@@ -0,0 +1,33 @@
+requires(linux:!android|win32-msvc2013:!winrt|win32-msvc2015:!winrt|macos|win32-g++*)
+
+TEMPLATE = subdirs
+
+include(config.pri)
+
+SUBDIRS += plugins
+
+copydata.file = copydata.pro
+copydata.depends = plugins
+
+# HACK: CI does not have appman in dependency list, which is why
+# we are not building the executable to avoid failing integration tests.
+qtHaveModule(appman_main-private) {
+ message("Module appman_main-private found.")
+ SUBDIRS += src
+ copydata.depends += src
+} else {
+ message("Module appman_main-private not found. Custom executable won't be build.")
+}
+
+SUBDIRS += copydata
+
+# Install all required files
+qml.files = apps imports sysui styles am-config.yaml Main.qml
+qml.path = $$INSTALL_PREFIX/triton
+INSTALLS += qml
+
+OTHER_FILES += $$files($$PWD/*.qml, true)
+OTHER_FILES += $$PWD/plugins.yaml.in
+OTHER_FILES += .qmake.conf
+PLUGINS_DIR = $$OUT_PWD/qml
+QMAKE_SUBSTITUTES += $$PWD/plugins.yaml.in