summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKimmo Ollila <kimmo.ollila@qt.io>2022-12-02 12:16:07 +0200
committerKimmo Ollila <kimmo.ollila@qt.io>2023-12-13 07:18:24 +0000
commit2af89a712358461bfea60e7c2906406f521011dd (patch)
treece503633446890b1c4473e55d1099cae6ea717cc
parentabbfc9fea93e5e72b6669d0cd086f7ba21805578 (diff)
New Boot2Qt Demo Launcher app for Qt 6
Task-number: QTBUG-106373 Change-Id: I4867d60b351a92f363e4c1891cb3e0280325e0fd Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
-rw-r--r--CMakeLists.txt38
-rw-r--r--QtLauncher/ApplicationIcon.qml53
-rw-r--r--QtLauncher/Background.qml21
-rw-r--r--QtLauncher/BootScreen.qml37
-rw-r--r--QtLauncher/BusyIndicator.qml62
-rw-r--r--QtLauncher/CMakeLists.txt94
-rw-r--r--QtLauncher/CornerFrameImage.qml87
-rw-r--r--QtLauncher/DemoHeader.qml (renamed from qml/DemoHeader.qml)75
-rw-r--r--QtLauncher/DemoInfoPopup.qml99
-rw-r--r--QtLauncher/DemoSurface.qml59
-rw-r--r--QtLauncher/DetailView.qml138
-rw-r--r--QtLauncher/DetailViewIcon.qml42
-rw-r--r--QtLauncher/FlickSlider.qml18
-rw-r--r--QtLauncher/GridViewIcon.qml37
-rw-r--r--QtLauncher/Header.qml158
-rw-r--r--QtLauncher/Keyboard.qml11
-rw-r--r--QtLauncher/LaunchScreen.qml35
-rw-r--r--QtLauncher/LauncherCompositor.qml37
-rw-r--r--QtLauncher/Main.qml54
-rw-r--r--QtLauncher/MainWindow.qml131
-rw-r--r--QtLauncher/QtImageProviders/CMakeLists.txt31
-rw-r--r--QtLauncher/QtImageProviders/imageproviders.cpp (renamed from src/imageproviders.cpp)125
-rw-r--r--QtLauncher/QtImageProviders/imageproviders.h37
-rw-r--r--QtLauncher/QtImageProviders/plugin.cpp25
-rw-r--r--QtLauncher/QtImageProviders/thumbnail.pngbin0 -> 9517 bytes
-rw-r--r--QtLauncher/SettingsButton.qml20
-rw-r--r--QtLauncher/ViewSettings.qml22
-rw-r--r--QtLauncher/applicationsmodel.cpp (renamed from src/applicationsmodel.cpp)96
-rw-r--r--QtLauncher/applicationsmodel.h66
-rw-r--r--QtLauncher/applicationsmodel_p.h29
-rw-r--r--QtLauncher/circularindicator.cpp (renamed from src/circularindicator.cpp)31
-rw-r--r--QtLauncher/circularindicator.h (renamed from src/circularindicator.h)33
-rw-r--r--QtLauncher/engine.cpp76
-rw-r--r--QtLauncher/engine.h37
-rw-r--r--QtLauncher/icons/Built_with_Qt_RGB_logo_white.svg (renamed from qml/icons/Built_with_Qt_RGB_logo_white.svg)0
-rw-r--r--QtLauncher/icons/close_icon.svg (renamed from qml/icons/close_icon.svg)0
-rw-r--r--QtLauncher/icons/detail_icon.svg (renamed from qml/icons/detail_icon.svg)0
-rw-r--r--QtLauncher/icons/grid_icon.svg (renamed from qml/icons/grid_icon.svg)0
-rw-r--r--QtLauncher/icons/header_toggle_icon.svg (renamed from qml/icons/header_toggle_icon.svg)0
-rw-r--r--QtLauncher/icons/info_icon.svg (renamed from qml/icons/info_icon.svg)0
-rw-r--r--QtLauncher/icons/mouse_icon.svg (renamed from qml/icons/mouse_icon.svg)0
-rw-r--r--QtLauncher/icons/qt_logo_green_rgb.svg (renamed from qml/icons/qt_logo_green_rgb.svg)2
-rw-r--r--QtLauncher/icons/settings_icon.svg (renamed from qml/icons/settings_icon.svg)0
-rw-r--r--QtLauncher/icons/stop_icon.svg (renamed from qml/icons/stop_icon.svg)0
-rw-r--r--QtLauncher/icons/touch_icon.svg (renamed from qml/icons/touch_icon.svg)0
-rw-r--r--QtLauncher/images/QtCorner.pngbin0 -> 3242 bytes
-rw-r--r--QtLauncher/images/backImg.jpgbin0 -> 58447 bytes
-rw-r--r--QtLauncher/images/glow.pngbin0 -> 14711 bytes
-rw-r--r--QtLauncher/settingsmanager.cpp54
-rw-r--r--QtLauncher/settingsmanager.h39
-rw-r--r--README23
-rw-r--r--fonts.qrc24
-rw-r--r--icons.qrc24
-rw-r--r--images.qrc5
-rw-r--r--main.cpp71
-rw-r--r--qml.qrc29
-rw-r--r--qml/AboutQt.qml105
-rw-r--r--qml/ApplicationIcon.qml74
-rw-r--r--qml/AutoScroller.qml75
-rw-r--r--qml/Background.qml45
-rw-r--r--qml/BootScreen.qml61
-rw-r--r--qml/BusyIndicator.qml84
-rw-r--r--qml/DemoInfoPopup.qml130
-rw-r--r--qml/DemoMode.qml393
-rw-r--r--qml/DetailView.qml166
-rw-r--r--qml/DetailViewIcon.qml60
-rw-r--r--qml/FlickSlider.qml56
-rw-r--r--qml/GlobalIndicator.qml55
-rw-r--r--qml/GridViewIcon.qml47
-rw-r--r--qml/HandwritingModeButton.qml164
-rw-r--r--qml/Header.qml62
-rw-r--r--qml/HighlightShader.qml62
-rw-r--r--qml/ImageTextDelegate.qml73
-rw-r--r--qml/LaunchScreen.qml61
-rw-r--r--qml/LauncherCheckBox.qml74
-rw-r--r--qml/LayoutSettings.qml198
-rw-r--r--qml/Main.qml84
-rw-r--r--qml/MainWindow.qml378
-rw-r--r--qml/ViewSettings.qml49
-rw-r--r--qml/fonts/Montserrat-Bold.ttfbin191648 -> 0 bytes
-rw-r--r--qml/fonts/Montserrat-Light.ttfbin192116 -> 0 bytes
-rw-r--r--qml/fonts/Montserrat-Medium.ttfbin192488 -> 0 bytes
-rw-r--r--qml/fonts/Montserrat-Regular.ttfbin190648 -> 0 bytes
-rw-r--r--qml/fonts/Teko-Bold.ttfbin305800 -> 0 bytes
-rw-r--r--qml/fonts/Teko-Light.ttfbin301528 -> 0 bytes
-rw-r--r--qml/fonts/Teko-Medium.ttfbin310028 -> 0 bytes
-rw-r--r--qml/fonts/Teko-Regular.ttfbin311780 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-Black.ttfbin49356 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-Bold.ttfbin59908 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-BoldItalic.ttfbin69796 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-ExtraLight.ttfbin63124 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-ExtraLightItalic.ttfbin67788 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-Italic.ttfbin72416 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-Light.ttfbin64032 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-LightItalic.ttfbin71720 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-Regular.ttfbin63752 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-SemiBold.ttfbin63044 -> 0 bytes
-rw-r--r--qml/fonts/TitilliumWeb-SemiBoldItalic.ttfbin71812 -> 0 bytes
-rw-r--r--qml/fonts/fontawesome-webfont.ttfbin165548 -> 0 bytes
-rw-r--r--qml/icons/FloatingButton_Active.svg41
-rw-r--r--qml/icons/FloatingButton_Available.svg41
-rw-r--r--qml/icons/FloatingButton_Unavailable.svg39
-rw-r--r--qml/icons/back_icon.svg1
-rw-r--r--qml/icons/bluetooth_icon.svg1
-rw-r--r--qml/icons/checkmark.svg10
-rw-r--r--qml/icons/date-time_icon.svg1
-rw-r--r--qml/icons/detail.svg1
-rw-r--r--qml/icons/detail_icon_disabled.svg91
-rw-r--r--qml/icons/display_icon.svg1
-rw-r--r--qml/icons/grid_icon_disabled.svg63
-rw-r--r--qml/icons/header_toggle.pngbin675 -> 0 bytes
-rw-r--r--qml/icons/language_icon.svg1
-rw-r--r--qml/icons/mouse_icon_disabled.svg92
-rw-r--r--qml/icons/mute_icon.svg1
-rw-r--r--qml/icons/network_icon.svg1
-rw-r--r--qml/icons/pause_icon.svg1
-rw-r--r--qml/icons/play_icon.svg1
-rw-r--r--qml/icons/power_icon.svg1
-rw-r--r--qml/icons/settingsmenu_launcher_icon.svg95
-rw-r--r--qml/icons/spinner.pngbin11738 -> 0 bytes
-rw-r--r--qml/icons/touch_icon_disabled.svg68
-rw-r--r--qml/icons/volume_icon.svg1
-rw-r--r--qml/images/backImg.jpgbin127975 -> 0 bytes
-rw-r--r--qml/settings.xml53
-rw-r--r--screenshot/Button.qml65
-rw-r--r--screenshot/Main.qml191
-rw-r--r--screenshot/plugin/plugin.cpp77
-rw-r--r--screenshot/plugin/qmldir3
-rw-r--r--screenshot/plugin/screenshot.pro17
-rw-r--r--src/applicationsettings.cpp81
-rw-r--r--src/applicationsettings.h63
-rw-r--r--src/applicationsmodel.h90
-rw-r--r--src/applicationsmodel_p.h54
-rw-r--r--src/automationhelper.cpp91
-rw-r--r--src/automationhelper.h47
-rw-r--r--src/engine.cpp176
-rw-r--r--src/engine.h126
-rw-r--r--src/fpscounter.cpp46
-rw-r--r--src/fpscounter.h56
-rw-r--r--src/imageproviders.h55
-rw-r--r--src/main.cpp167
-rw-r--r--src/settingsmanager.cpp121
-rw-r--r--src/settingsmanager.h77
-rw-r--r--startup.pro45
144 files changed, 1896 insertions, 5098 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..5ea404a
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,38 @@
+cmake_minimum_required(VERSION 3.16)
+
+project(qtlauncher VERSION 1.0 LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick QuickControls2 WaylandCompositor)
+qt_standard_project_setup(REQUIRES 6.5)
+
+if(NOT DEFINED USE_SHARED_BUILD)
+ message("Doing STATIC build")
+ set(USE_STATIC_BUILD_FLAG TRUE)
+ set(BUILD_TYPE_FLAG "STATIC")
+else()
+ message("Doing SHARED build")
+ set(USE_STATIC_BUILD_FLAG FALSE)
+ set(BUILD_TYPE_FLAG "SHARED")
+endif()
+
+qt_add_executable(${PROJECT_NAME}
+ main.cpp
+)
+
+if(NOT DEFINED USE_SHARED_BUILD)
+ target_compile_definitions(${PROJECT_NAME} PRIVATE USE_STATIC_BUILD_FLAG)
+endif()
+
+target_link_libraries(${PROJECT_NAME} PRIVATE
+ Qt6::Gui
+ Qt6::Qml
+ $<$<BOOL:${USE_STATIC_BUILD_FLAG}>:QtLauncherplugin>
+ $<$<BOOL:${USE_STATIC_BUILD_FLAG}>:QtImageProvidersPlugin>
+)
+
+add_subdirectory(QtLauncher)
+
+install(TARGETS ${PROJECT_NAME}
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+)
diff --git a/QtLauncher/ApplicationIcon.qml b/QtLauncher/ApplicationIcon.qml
new file mode 100644
index 0000000..824b69e
--- /dev/null
+++ b/QtLauncher/ApplicationIcon.qml
@@ -0,0 +1,53 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+pragma ComponentBehavior: Bound
+
+import QtQuick
+
+Item {
+ id: appIcon
+ required property string name
+ required property string icon
+ required property real pageMargin
+
+ property bool highlight: false
+ property bool isSelected: false
+ property alias preview: previewImage
+ property alias hoverSource: hoverItem.source
+
+ signal clicked()
+
+ Image {
+ id: previewImage;
+ anchors.fill: parent
+ anchors.margins: appIcon.pageMargin * 0.5
+ source: appIcon.highlight ? "image://QtSquareImage/%1".arg(appIcon.icon) :
+ "image://QtSquareImage/gradient/%1".arg(appIcon.icon)
+ sourceSize: Qt.size(width, height)
+
+ Image {
+ id: hoverItem
+ anchors.fill: parent
+ source: "image://QtImageMask/hover"
+ sourceSize: Qt.size(width, height)
+ opacity: appIcon.highlight ? 1.0 : 0.0
+ visible: !appIcon.isSelected && appIcon.highlight
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: SettingsManager.mouseSelected
+
+ onClicked: appIcon.clicked()
+
+ onEntered: {
+ if (hoverEnabled)
+ appIcon.highlight = true;
+ }
+ onExited: {
+ if (hoverEnabled)
+ appIcon.highlight = false
+ }
+ }
+}
diff --git a/QtLauncher/Background.qml b/QtLauncher/Background.qml
new file mode 100644
index 0000000..189d122
--- /dev/null
+++ b/QtLauncher/Background.qml
@@ -0,0 +1,21 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Image {
+ required property Engine engine
+ anchors.fill: parent
+ source: "images/backImg.jpg"
+ fillMode: Image.PreserveAspectCrop
+
+ // QTBUG-63585, background image causes poor performance of flickable items
+ // on low-end gpu devices
+ visible: engine.state !== "running"
+
+ Rectangle {
+ anchors.fill: parent
+ color: ViewSettings.backgroundColor
+ opacity: 0.9
+ }
+}
diff --git a/QtLauncher/BootScreen.qml b/QtLauncher/BootScreen.qml
new file mode 100644
index 0000000..d706a69
--- /dev/null
+++ b/QtLauncher/BootScreen.qml
@@ -0,0 +1,37 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtLauncher
+
+Item {
+ id: bootScreen
+ opacity: 0.95
+ property alias applicationName: applicationNameText.text
+
+ Column {
+ anchors.centerIn: parent
+
+ BusyIndicator {
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: bootScreen.width * 0.1
+ }
+
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.family: ViewSettings.appFont
+ font.pixelSize: bootScreen.height * 0.05
+ color: "white"
+ text: qsTr("Loading")
+ }
+
+ Text {
+ id: applicationNameText
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.family: ViewSettings.appFont
+ font.pixelSize: bootScreen.height * 0.05
+ font.styleName: "Bold"
+ color: "white"
+ }
+ }
+}
diff --git a/QtLauncher/BusyIndicator.qml b/QtLauncher/BusyIndicator.qml
new file mode 100644
index 0000000..a581708
--- /dev/null
+++ b/QtLauncher/BusyIndicator.qml
@@ -0,0 +1,62 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtLauncher
+
+CircularIndicator {
+ id: circularIndicator
+ height: width
+ padding: width * 0.1
+ lineWidth: width * 0.05
+ backgroundColor: ViewSettings.loaderBackgroundColor
+ progressColor: ViewSettings.loaderForegroundColor
+
+ SequentialAnimation {
+ running: circularIndicator.visible
+
+ // Fill 20 degrees of the circle before starting looping
+ NumberAnimation {
+ target: circularIndicator
+ property: "spanAngle"
+ from: 0
+ to: 20
+ duration: 200
+ }
+
+ SequentialAnimation {
+ loops: Animation.Infinite
+
+ // Fill the circle, except have both caps still visible
+ NumberAnimation {
+ target: circularIndicator
+ property: "spanAngle"
+ from: 20
+ to: 345
+ duration: 800
+ }
+
+ // Clear the circle, except for a 20 degree head start. The head start is to
+ // avoid an abrupt change in the cap of the indicator arc from an end to a beginning.
+ ParallelAnimation {
+
+ NumberAnimation {
+ target: circularIndicator
+ property: "startAngle"
+ from: 0
+ to: 360
+ duration: 800
+ onStopped: circularIndicator.startAngle = 0
+ }
+
+ NumberAnimation {
+ target: circularIndicator
+ property: "spanAngle"
+ from: 345
+ to: 20
+ duration: 800
+ }
+ }
+ }
+ }
+}
diff --git a/QtLauncher/CMakeLists.txt b/QtLauncher/CMakeLists.txt
new file mode 100644
index 0000000..b0a40a2
--- /dev/null
+++ b/QtLauncher/CMakeLists.txt
@@ -0,0 +1,94 @@
+cmake_minimum_required(VERSION 3.16)
+
+project(QtLauncher VERSION 1.0 LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick QuickControls2 WaylandCompositor)
+qt_standard_project_setup(REQUIRES 6.5)
+
+set_source_files_properties("ViewSettings.qml" PROPERTIES
+ QT_QML_SINGLETON_TYPE TRUE
+)
+
+set(qml_files
+ "Main.qml"
+ "BootScreen.qml"
+ "BusyIndicator.qml"
+ "Keyboard.qml"
+ "MainWindow.qml"
+ "DemoHeader.qml"
+ "DetailView.qml"
+ "Header.qml"
+ "LaunchScreen.qml"
+ "LauncherCompositor.qml"
+ "Background.qml"
+ "DemoInfoPopup.qml"
+ "DemoSurface.qml"
+ "GridViewIcon.qml"
+ "FlickSlider.qml"
+ "ApplicationIcon.qml"
+ "DetailViewIcon.qml"
+ "SettingsButton.qml"
+ "ViewSettings.qml"
+ "CornerFrameImage.qml"
+)
+
+set(images
+ "images/backImg.jpg"
+ "images/QtCorner.png"
+ "images/glow.png"
+)
+
+set(icons
+ "icons/close_icon.svg"
+ "icons/Built_with_Qt_RGB_logo_white.svg"
+ "icons/header_toggle_icon.svg"
+ "icons/info_icon.svg"
+ "icons/qt_logo_green_rgb.svg"
+ "icons/mouse_icon.svg"
+ "icons/detail_icon.svg"
+ "icons/settings_icon.svg"
+ "icons/grid_icon.svg"
+ "icons/touch_icon.svg"
+)
+
+add_subdirectory(QtImageProviders)
+
+qt_add_qml_module(${PROJECT_NAME}
+ URI QtLauncher
+ VERSION 1.0
+ ${BUILD_TYPE_FLAG}
+ DEPENDENCIES
+ QtQml
+ QtQuick
+ QML_FILES
+ ${qml_files}
+ RESOURCES
+ ${images}
+ ${icons}
+ SOURCES
+ engine.cpp engine.h
+ applicationsmodel.cpp applicationsmodel.h
+ settingsmanager.cpp settingsmanager.h
+ circularindicator.cpp circularindicator.h
+)
+
+target_link_libraries(${PROJECT_NAME} PRIVATE
+ Qt${QT_VERSION_MAJOR}::Core
+ Qt${QT_VERSION_MAJOR}::Gui
+ Qt${QT_VERSION_MAJOR}::Quick
+)
+
+if(NOT ${USE_STATIC_BUILD_FLAG})
+ install(TARGETS ${PROJECT_NAME}
+ BUNDLE DESTINATION .
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+
+ install(TARGETS ${PROJECT_NAME}plugin
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/qml/${PROJECT_NAME}"
+ )
+
+ install(FILES $<TARGET_FILE_DIR:${PROJECT_NAME}plugin>/qmldir
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/qml/${PROJECT_NAME}"
+ )
+endif()
diff --git a/QtLauncher/CornerFrameImage.qml b/QtLauncher/CornerFrameImage.qml
new file mode 100644
index 0000000..31b2d8f
--- /dev/null
+++ b/QtLauncher/CornerFrameImage.qml
@@ -0,0 +1,87 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ id: root
+ property alias source: contentRect.newImageSource
+
+ onWidthChanged: contentRect.openChanged()
+ onHeightChanged: contentRect.openChanged()
+
+ Image {
+ id: contentRect
+ width: -root.width * .006
+ height: -root.width * .006
+ anchors.centerIn: parent
+ smooth: !imageAnimation.running
+ property bool open: false
+ property string newImageSource: ""
+
+ onNewImageSourceChanged: {
+ if (contentRect.open && contentRect.newImageSource) {
+ changeImageAnimation.restart()
+ } else if (!contentRect.newImageSource.endsWith("_missing")) {
+ contentRect.source = contentRect.newImageSource
+ }
+ }
+
+ onStatusChanged: {
+ if (status == Image.Ready)
+ contentRect.open = true
+ else if (status == Image.Error)
+ contentRect.open = false
+ }
+
+ onOpenChanged: {
+ if (open) {
+ var scaleFactor = Math.min(root.width / sourceSize.width, root.height / sourceSize.height)
+ contentRect.width = sourceSize.width * scaleFactor
+ contentRect.height = sourceSize.height * scaleFactor
+ } else {
+ contentRect.width = -root.width * .006
+ contentRect.height = -root.width * .006
+ }
+ }
+
+ Behavior on width { NumberAnimation { id: imageAnimation; duration: 500; easing.type: Easing.InOutSine }}
+ Behavior on height { NumberAnimation { duration: 500; easing.type: Easing.InOutSine }}
+
+ SequentialAnimation {
+ id: changeImageAnimation
+
+ PropertyAction { target: contentRect; property: "open"; value: false}
+ PauseAnimation { duration: 500 }
+
+ ScriptAction {
+ script: {
+ if (contentRect.newImageSource.endsWith("_missing")) contentRect.newImageSource = ""
+ contentRect.source = contentRect.newImageSource
+ }
+ }
+ }
+
+ Image {
+ id: topCorner
+ width: contentRect.open && contentRect.status == Image.Ready ? root.width * .2: root.width * .25
+ height: width
+ x: -width*.124
+ y: x
+ source: "images/QtCorner.png"
+
+ Behavior on width { NumberAnimation { duration: 500; easing.type: Easing.InOutSine }}
+ }
+
+ Image {
+ id: bottomCorner
+ width: topCorner.width
+ height: width
+ x: parent.width - width + width * .124
+ y: parent.height - height + width * .124
+ source: "images/QtCorner.png"
+ mirror: true
+ mirrorVertically: true
+ }
+ }
+}
diff --git a/qml/DemoHeader.qml b/QtLauncher/DemoHeader.qml
index 0ee83bc..ad4a625 100644
--- a/qml/DemoHeader.qml
+++ b/QtLauncher/DemoHeader.qml
@@ -1,44 +1,24 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+pragma ComponentBehavior: Bound
+
+import QtQuick
Rectangle {
id: demoHeaderBar
+ required property Engine engine
+ required property real pageMargin
width: parent.width
- height: viewSettings.demoHeaderHeight
- color: viewSettings.backgroundColor
+ height: demoHeaderBar.pageMargin * 2.5
+ color: ViewSettings.backgroundColor
opacity: 0.9
y: 0
z: 1
- visible: engine.state === "app-running"
- Behavior on y { NumberAnimation { duration: 100 } }
+ visible: engine.state === "app-running" || engine.state === "app-launching"
+
+ Behavior on y { YAnimator { duration: 100 } }
+ property alias title: demoName.text
property bool open: y > -height/2
signal infoClicked()
@@ -48,8 +28,8 @@ Rectangle {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
- anchors.margins: viewSettings.pageMargin * 0.3
- spacing: viewSettings.pageMargin
+ anchors.margins: demoHeaderBar.pageMargin * 0.3
+ spacing: demoHeaderBar.pageMargin
Image {
id: headerLogo
@@ -63,10 +43,9 @@ Rectangle {
height: parent.height
verticalAlignment: Text.AlignVCenter
font.pixelSize: parent.height * 0.5
- font.family: viewSettings.appFont
+ font.family: ViewSettings.appFont
font.styleName: "SemiBold"
color: "white"
- text: engine.applicationName
}
}
@@ -74,30 +53,31 @@ Rectangle {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
- anchors.margins: viewSettings.pageMargin * 0.3
- spacing: viewSettings.pageMargin
+ anchors.margins: demoHeaderBar.pageMargin * 0.3
+ spacing: demoHeaderBar.pageMargin
Image {
id: infoImg
height: parent.height
width: height
source: "icons/info_icon.svg"
+
MouseArea {
anchors.fill: parent
- anchors.margins: -parent.height * 0.2
+ anchors.margins: -parent.height * 0.5
onClicked: demoHeaderBar.infoClicked()
}
}
Image {
id: applicationCloseButton
- objectName: "applicationCloseButton"
height: parent.height
width: height
source: "icons/close_icon.svg"
+
MouseArea {
anchors.fill: parent
- anchors.margins: -parent.height * 0.2
+ anchors.margins: -parent.height * 0.5
onClicked: demoHeaderBar.closeClicked()
}
}
@@ -109,12 +89,12 @@ Rectangle {
height: parent.height * 0.5
width: height / sourceSize.height * sourceSize.width
anchors.horizontalCenter: parent.horizontalCenter
- y: open ? parent.height - height/2 : parent.height
- rotation: open ? 180 : 0
+ y: demoHeaderBar.open ? parent.height - height/2 : parent.height
+ rotation: demoHeaderBar.open ? 180 : 0
Drag.active: headerToggleMouseArea.drag.active
- Behavior on rotation { NumberAnimation { duration: 100 } }
- Behavior on y { NumberAnimation { duration: 100 } }
+ Behavior on rotation { RotationAnimator { duration: 100 } }
+ Behavior on y { YAnimator { duration: 100 } }
MouseArea {
id: headerToggleMouseArea
@@ -138,6 +118,7 @@ Rectangle {
demoHeaderBar.y = -demoHeaderBar.height
}
}
+
onReleased: {
demoHeaderBar.y = demoHeaderBar.y > -demoHeaderBar.height / 4 ? 0 : -demoHeaderBar.height
parent.Drag.drop()
@@ -149,7 +130,7 @@ Rectangle {
Timer {
id: demoHeaderVisibilityDelay
- interval: viewSettings.headerAutoHideDelay
+ interval: 3000
onTriggered: {
if (!demoHeaderVisibilityDelay.running)
demoHeaderBar.y = -demoHeaderBar.height
diff --git a/QtLauncher/DemoInfoPopup.qml b/QtLauncher/DemoInfoPopup.qml
new file mode 100644
index 0000000..cc6c899
--- /dev/null
+++ b/QtLauncher/DemoInfoPopup.qml
@@ -0,0 +1,99 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+pragma ComponentBehavior: Bound
+
+import QtQuick
+
+Item {
+ id: demoInfoPopup
+ required property real pageMargin
+ property alias description: tt.text
+
+ function open()
+ {
+ visible = true;
+ }
+
+ function close()
+ {
+ visible = false;
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: ViewSettings.backgroundColor
+ opacity: 0.3
+ }
+
+ // Prevent user from interacting with the transparent demo on the background
+ MouseArea {
+ anchors.fill: parent
+ }
+
+ Image {
+ id: frame
+ source : "image://QtButtonImage/20/%1/%1".arg(ViewSettings.pine)
+ anchors.centerIn: parent
+ width: parent.width * 0.5
+ height: parent.height * 0.8
+ sourceSize: Qt.size(width, height)
+
+ Image {
+ id: builtWithQtIcon
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.margins: demoInfoPopup.pageMargin
+ source: "icons/Built_with_Qt_RGB_logo_white.svg"
+ height: parent.height * 0.1
+ width: height / sourceSize.height * sourceSize.width
+ }
+
+ Image {
+ anchors.right: parent.right
+ anchors.verticalCenter: builtWithQtIcon.verticalCenter
+ anchors.margins: demoInfoPopup.pageMargin
+ source: "icons/close_icon.svg"
+ height: parent.height * 0.1
+ width: height / sourceSize.height * sourceSize.width
+
+ MouseArea {
+ anchors.fill: parent
+ anchors.margins: -demoInfoPopup.pageMargin * 0.5
+
+ onClicked: demoInfoPopup.close()
+ }
+ }
+
+ Text {
+ id: infoTitle
+ anchors.top: builtWithQtIcon.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.margins: demoInfoPopup.pageMargin
+ verticalAlignment: Text.AlignVCenter
+ height: builtWithQtIcon.height
+ font.pixelSize: height * 0.8
+ color: "white"
+ font.family: ViewSettings.appFont
+ font.styleName: "SemiBold"
+ text: qsTr("About Current Demo")
+ wrapMode: Text.WordWrap
+ }
+
+ Text {
+ id: tt
+ anchors.top: infoTitle.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ anchors.margins: demoInfoPopup.pageMargin
+ font.family: ViewSettings.appFont
+ font.styleName: "SemiBold"
+ font.pixelSize: infoTitle.font.pixelSize * 0.5
+ color: "white"
+ text: ""
+ wrapMode: Text.WordWrap
+ elide: Text.ElideRight
+ }
+ }
+}
diff --git a/QtLauncher/DemoSurface.qml b/QtLauncher/DemoSurface.qml
new file mode 100644
index 0000000..938b887
--- /dev/null
+++ b/QtLauncher/DemoSurface.qml
@@ -0,0 +1,59 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+pragma ComponentBehavior: Bound
+
+import QtQuick
+import QtWayland.Compositor
+
+Repeater {
+ id: root
+ property string filename: ""
+ anchors.fill: parent
+
+ signal surfaceVisible(visible: bool)
+ signal surfaceDestroyed(index: int)
+
+ function scheduleScreenshot(filename: string) {
+ root.filename = filename
+ }
+
+ delegate: ShellSurfaceItem {
+ id: chrome
+ required property var modelData
+ required property int index
+ anchors.centerIn: parent
+ shellSurface: modelData
+
+ onWidthChanged: downscaleIfNeeded()
+ onHeightChanged: downscaleIfNeeded()
+
+ function downscaleIfNeeded() {
+ if (width <= root.width && height <= root.height) {
+ scale = 1.0
+ return;
+ }
+ scale = Math.min(root.width / width, root.height / height)
+ }
+
+ onSurfaceChanged: {
+ if (root.filename) ssTimer.start()
+ root.surfaceVisible(false)
+ }
+
+ onSurfaceDestroyed: root.surfaceDestroyed(index)
+
+ Timer {
+ id: ssTimer
+ interval: 5000
+ running: false
+
+ onTriggered: {
+ chrome.grabToImage(function(result) {
+ result.saveToFile(root.filename);
+ root.filename = ""
+ demoHeader.title = qsTr("Screenshot taken. Thumbnail for this demo will be updated on next startup.")
+ })
+ }
+ }
+ }
+}
diff --git a/QtLauncher/DetailView.qml b/QtLauncher/DetailView.qml
new file mode 100644
index 0000000..7a1ddf0
--- /dev/null
+++ b/QtLauncher/DetailView.qml
@@ -0,0 +1,138 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+pragma ComponentBehavior: Bound
+
+import QtQuick
+import QtQuick.Controls.Basic
+import QtLauncher
+
+Item {
+ id: detailRoot
+ anchors.fill: parent
+ property alias appsModel: thumbList.model
+ required property real pageMargin
+
+ Item {
+ id: detailInformation
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: listHolder.top
+ anchors.margins: detailRoot.pageMargin
+
+ CornerFrameImage {
+ id: largeImg
+ anchors.right: parent.right
+ height: parent.height
+ width: parent.width * 0.5
+ }
+
+ Flickable {
+ id: detailFlickable
+ anchors.left: parent.left
+ anchors.right: largeImg.left
+ anchors.top: parent.top
+ anchors.bottom: startButton.top
+ anchors.bottomMargin: detailRoot.pageMargin * 0.5
+ anchors.rightMargin: detailRoot.pageMargin
+ contentHeight: descriptionHolder.height
+ contentWidth: width
+ clip: true
+
+ ScrollBar.vertical: FlickSlider { pageMargin: detailRoot.pageMargin }
+
+ Column {
+ id: descriptionHolder
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.rightMargin: detailRoot.pageMargin * 0.5
+ spacing: detailRoot.pageMargin * 0.5
+
+ Text {
+ id: descriptionTitle
+ font.pixelSize: detailInformation.height * 0.11
+ width: descriptionHolder.width
+ text: qsTr("Demo Title")
+ color: ViewSettings.neon
+ font.family: ViewSettings.appFont
+ font.styleName: "SemiBold"
+ wrapMode: Text.WordWrap
+ }
+
+ Rectangle {
+ id: btmLine
+ width: descriptionTitle.paintedWidth
+ height: 2
+ }
+
+ Text {
+ id: descriptionText
+ anchors.margins: detailRoot.pageMargin * 0.5
+ font.pixelSize: detailInformation.height * 0.05
+ font.family: ViewSettings.appFont
+ width: descriptionHolder.width
+ wrapMode: Text.WordWrap
+ color: "white"
+ elide: Text.ElideRight
+ }
+ }
+ }
+
+ Image {
+ id: startButton
+ height: detailInformation.height * 0.14
+ width: height * 3
+ sourceSize: Qt.size(width,height)
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ anchors.margins: detailRoot.pageMargin * 0.5
+ source : "image://QtButtonImage/10/%1/%1".arg(ViewSettings.buttonGreenColor)
+
+ Text {
+ anchors.centerIn: parent
+ text: qsTr("Start")
+ color: "white"
+ font.pixelSize: parent.height * .5
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: detailRoot.appsModel.launchFromIndex(thumbList.currentIndex)
+ }
+ }
+ }
+
+ Rectangle {
+ id: listHolder
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: parent.height * 0.35
+ color: ViewSettings.demolistBackgroundColor
+
+ ListView {
+ id: thumbList
+ anchors.fill: parent
+ anchors.margins: detailRoot.pageMargin * 0.5
+ orientation: ListView.Horizontal
+ onCurrentIndexChanged: {
+ descriptionTitle.text = model.query(currentIndex, "name")
+ descriptionText.text = model.query(currentIndex, "description")
+ largeImg.source = model.query(currentIndex, "icon")
+ }
+
+ delegate: DetailViewIcon {
+ required property var model
+ required property int index
+ pageMargin: detailRoot.pageMargin
+ height: thumbList.height
+ width: height
+ isSelected: thumbList.currentIndex === index
+
+ onClicked: thumbList.currentIndex = index
+ }
+
+ ScrollBar.horizontal: FlickSlider { pageMargin: detailRoot.pageMargin }
+ }
+ }
+}
diff --git a/QtLauncher/DetailViewIcon.qml b/QtLauncher/DetailViewIcon.qml
new file mode 100644
index 0000000..39f8e8c
--- /dev/null
+++ b/QtLauncher/DetailViewIcon.qml
@@ -0,0 +1,42 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+pragma ComponentBehavior: Bound
+
+import QtQuick
+
+ApplicationIcon {
+ id: root
+
+ Image {
+ id: selectedItem
+ anchors.fill: root.preview
+ source: "image://QtImageMask/"
+ sourceSize: Qt.size(width, height)
+ visible: root.isSelected
+ }
+
+ Image {
+ id: glow
+ anchors.centerIn: root.preview
+ width: root.preview.width * 2.1
+ height: root.preview.height * 2.1
+ source: "images/glow.png"
+ opacity: root.isSelected
+ z: -1
+
+ Behavior on opacity { OpacityAnimator { duration: 200; easing.type: Easing.InOutSine }}
+ }
+
+ Text {
+ anchors.fill: parent
+ anchors.margins: root.pageMargin
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: parent.height * 0.1
+ text: root.name
+ font.family: ViewSettings.appFont
+ color: ViewSettings.pine
+ wrapMode: Text.WordWrap
+ visible: root.highlight && !root.isSelected
+ }
+}
diff --git a/QtLauncher/FlickSlider.qml b/QtLauncher/FlickSlider.qml
new file mode 100644
index 0000000..d8e45d6
--- /dev/null
+++ b/QtLauncher/FlickSlider.qml
@@ -0,0 +1,18 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Controls.Basic
+
+ScrollBar {
+ id: root
+ required property real pageMargin
+ contentItem: Rectangle {
+ color: ViewSettings.scrollBarColor
+ implicitWidth: root.orientation === Qt.Horizontal ? root.availableWidth : root.pageMargin * 0.25
+ implicitHeight: root.orientation === Qt.Vertical ? root.availableHeight : root.pageMargin * 0.25
+ opacity: (root.active && root.size < 1.0) ? 1.0 : 0
+
+ Behavior on opacity { OpacityAnimator { duration: 500 } }
+ }
+}
diff --git a/QtLauncher/GridViewIcon.qml b/QtLauncher/GridViewIcon.qml
new file mode 100644
index 0000000..d8c5317
--- /dev/null
+++ b/QtLauncher/GridViewIcon.qml
@@ -0,0 +1,37 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+pragma ComponentBehavior: Bound
+
+import QtQuick
+
+ApplicationIcon {
+ id: root
+ hoverSource: "image://QtImageMask/hover"
+
+ Image {
+ id: glow
+ anchors.centerIn: root.preview
+ width: root.preview.width * 2.1
+ height: root.preview.height * 2.1
+ source: "images/glow.png"
+ sourceSize: Qt.size(width, height)
+ opacity: root.highlight ? 1 : 0
+ z: -100
+
+ Behavior on opacity { OpacityAnimator { duration: 200; easing.type: Easing.InOutSine }}
+ }
+
+ Text {
+ anchors.fill: parent
+ anchors.margins: root.pageMargin * 2
+ font.pixelSize: parent.height * 0.08
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ text: root.name
+ font.family: ViewSettings.appFont
+ font.styleName: "SemiBold"
+ color: ViewSettings.pine
+ wrapMode: Text.WordWrap
+ visible: root.highlight
+ }
+}
diff --git a/QtLauncher/Header.qml b/QtLauncher/Header.qml
new file mode 100644
index 0000000..64150df
--- /dev/null
+++ b/QtLauncher/Header.qml
@@ -0,0 +1,158 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ id: root
+ required property real pageMargin
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: root.pageMargin * 5
+
+ Rectangle {
+ anchors.fill: parent
+ visible: SettingsManager.gridSelected
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: ViewSettings.backgroundColor }
+ GradientStop { position: 1.0; color: "transparent" }
+ }
+ }
+
+ Item {
+ anchors.fill: parent
+ anchors.margins: root.pageMargin
+
+ Item {
+ id: settingsMenu
+ anchors.left: parent.left
+ anchors.top: parent.top
+ height: parent.height
+ width: opened ? parent.width - qtLogo.width : height
+ clip: true
+
+ property bool opened: false
+
+ Behavior on width {NumberAnimation { duration: 500 } }
+
+ function close() {
+ closeTimer.stop()
+ settingsMenu.opened = false
+ gearAnimation.direction = RotationAnimator.Counterclockwise
+ gearAnimation.restart()
+ }
+
+ function open() {
+ settingsMenu.opened = true
+ gearAnimation.direction = RotationAnimator.Clockwise
+ gearAnimation.restart()
+ closeTimer.restart()
+ }
+
+ Timer {
+ id: closeTimer
+ interval: 10000
+ onTriggered: settingsMenu.close()
+ }
+
+ MouseArea {
+ id: hoverMouseArea
+ anchors.fill: parent
+ hoverEnabled: true
+ enabled: SettingsManager.mouseSelected
+ onEntered: if (!settingsMenu.opened) settingsMenu.open()
+ onExited: if (settingsMenu.opened) settingsMenu.close()
+ }
+
+ MouseArea {
+ anchors.left: parent.left
+ anchors.top: parent.top
+ height: parent.height
+ width: height
+
+ onClicked: {
+ if (settingsMenu.opened)
+ settingsMenu.close()
+ else
+ settingsMenu.open()
+ }
+ }
+
+ Image {
+ id: menuIcon
+ anchors.left: parent.left
+ anchors.top: parent.top
+ source: "icons/settings_icon.svg"
+ height: parent.height
+ width: height
+ sourceSize: Qt.size(width, height)
+
+ RotationAnimator {
+ id: gearAnimation
+ target: menuIcon
+ duration: 500
+ from: 0
+ to: 180
+ }
+ }
+
+ Row {
+ id: settingsRow
+ anchors.top: parent.top
+ anchors.left: menuIcon.right
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ anchors.leftMargin: height * .5
+ spacing: height
+
+ Rectangle {
+ width: 2
+ height: parent.height
+ color: "white"
+ }
+
+ SettingsButton {
+ id: layoutIcon
+ source: SettingsManager.gridSelected ? "icons/grid_icon.svg" : "icons/detail_icon.svg"
+
+ onClicked: {
+ closeTimer.restart()
+ SettingsManager.gridSelected = !SettingsManager.gridSelected
+ }
+ }
+
+ Rectangle {
+ width: 2
+ height: parent.height
+ color: "white"
+ }
+
+ SettingsButton {
+ id: mouseIcon
+ source: SettingsManager.mouseSelected ? "icons/mouse_icon.svg" : "icons/touch_icon.svg"
+
+ onClicked: {
+ closeTimer.restart()
+ SettingsManager.mouseSelected = !SettingsManager.mouseSelected
+ }
+ }
+
+ Rectangle {
+ width: 2
+ height: parent.height
+ color: "white"
+ }
+ }
+ }
+
+ Image {
+ id: qtLogo
+ anchors.right: parent.right
+ anchors.top: parent.top
+ source: "icons/qt_logo_green_rgb.svg"
+ height: parent.height
+ width: height / sourceSize.height * sourceSize.width
+ }
+ }
+}
diff --git a/QtLauncher/Keyboard.qml b/QtLauncher/Keyboard.qml
new file mode 100644
index 0000000..6252deb
--- /dev/null
+++ b/QtLauncher/Keyboard.qml
@@ -0,0 +1,11 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick.VirtualKeyboard
+
+InputPanel {
+ visible: active
+ y: active ? parent.height - height : parent.height
+ anchors.left: parent.left
+ anchors.right: parent.right
+}
diff --git a/QtLauncher/LaunchScreen.qml b/QtLauncher/LaunchScreen.qml
new file mode 100644
index 0000000..817bf06
--- /dev/null
+++ b/QtLauncher/LaunchScreen.qml
@@ -0,0 +1,35 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+pragma ComponentBehavior: Bound
+
+import QtQuick
+import QtQuick.Controls.Basic
+
+Item {
+ id: gridroot
+ anchors.fill: parent
+ property alias appsModel: grid.model
+ required property real pageMargin
+
+ GridView {
+ id: grid
+ anchors.fill: parent
+ anchors.leftMargin: gridroot.pageMargin * 1.5
+ anchors.rightMargin: gridroot.pageMargin * 0.5
+ cacheBuffer: 10000
+ cellWidth: width / 3
+ cellHeight: cellWidth
+
+ ScrollBar.vertical: FlickSlider { pageMargin: gridroot.pageMargin }
+
+ delegate: GridViewIcon {
+ required property var model
+ required property int index
+
+ pageMargin: gridroot.pageMargin
+ height: grid.cellHeight *.9
+ width: grid.cellWidth *.9
+ onClicked: gridroot.appsModel.launchFromIndex(index)
+ }
+ }
+}
diff --git a/QtLauncher/LauncherCompositor.qml b/QtLauncher/LauncherCompositor.qml
new file mode 100644
index 0000000..fc7ca15
--- /dev/null
+++ b/QtLauncher/LauncherCompositor.qml
@@ -0,0 +1,37 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtWayland.Compositor
+import QtWayland.Compositor.IviApplication
+
+WaylandCompositor {
+ id: waylandCompositor
+ property bool scalableDemo: false
+ property string appsRoot: ""
+ property ListModel shellSurfaces: ListModel {}
+ property alias waylandOutput: output
+
+ IviApplication {
+
+ onIviSurfaceCreated: function(iviSurface) {
+ if (waylandCompositor.scalableDemo) iviSurface.sendConfigure(Qt.size(output.window.width, output.window.height))
+ waylandCompositor.shellSurfaces.append({shellSurface: iviSurface});
+ }
+ }
+
+ extensions: [
+ TextInputManager {},
+ QtTextInputMethodManager {}
+ ]
+ WaylandOutput {
+ id: output
+
+
+ function handleShellSurface(shellSurface) {
+ waylandCompositor.shellSurfaces.append({shellSurface: shellSurface});
+ }
+
+ sizeFollowsWindow: false
+ }
+}
diff --git a/QtLauncher/Main.qml b/QtLauncher/Main.qml
new file mode 100644
index 0000000..f2c6c2c
--- /dev/null
+++ b/QtLauncher/Main.qml
@@ -0,0 +1,54 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Window
+import QtWayland.Compositor
+
+LauncherCompositor {
+ id: compositor
+
+ waylandOutput.window: Window {
+ id: window
+ visible: true
+ width: Screen.desktopAvailableWidth
+ height: Screen.desktopAvailableHeight
+ color: ViewSettings.backgroundColor
+
+ property real pageMargin: ViewSettings.margin * Math.min(window.width, window.height)
+
+ Loader {
+ id: mainWindowLoader
+ anchors.fill: parent
+ active: false
+ asynchronous: true
+
+ onLoaded: {
+ splashScreenLoader.item.visible = false;
+ splashScreenLoader.source = "";
+ }
+ }
+
+ Loader {
+ id: splashScreenLoader
+ anchors.fill: parent
+ sourceComponent: Item {
+ anchors.fill: parent
+
+ BootScreen {
+ anchors.fill: parent
+ applicationName: qsTr("Qt Launcher")
+ }
+ }
+ onLoaded: {
+ mainWindowLoader.setSource("qrc:/qt/qml/QtLauncher/MainWindow.qml", {"compositor" : compositor, "shellSurfaces" : compositor.shellSurfaces, "window" : window, "pageMargin" : window.pageMargin})
+ mainWindowLoader.active = true;
+ }
+ }
+
+ Loader {
+ anchors.fill: parent
+ source: "qrc:/qt/qml/QtLauncher/Keyboard.qml"
+ }
+ }
+}
diff --git a/QtLauncher/MainWindow.qml b/QtLauncher/MainWindow.qml
new file mode 100644
index 0000000..8502605
--- /dev/null
+++ b/QtLauncher/MainWindow.qml
@@ -0,0 +1,131 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+pragma ComponentBehavior: Bound
+
+import QtQuick
+import QtQuick.Window
+import QtLauncher
+import QtLauncher.QtImageProviders
+
+Item {
+ id: mainWindow
+ anchors.fill: parent
+ required property LauncherCompositor compositor
+ required property ListModel shellSurfaces
+ required property Window window
+ required property real pageMargin
+
+ ApplicationsModel {
+ id: applicationsModel
+
+ onReady: {
+ engine.markApplicationsModelReady();
+ contentLoader.active = true
+ }
+
+ Component.onCompleted: {
+ //Set the directory to parse for apps
+ initialize(mainWindow.compositor.appsRoot);
+ }
+
+ function launchFromIndex(index: int) {
+ demoInfoPopup.description = applicationsModel.query(index, "description")
+ demoHeader.title = applicationsModel.query(index, "name")
+ mainWindow.compositor.scalableDemo = applicationsModel.query(index, "scalable")
+
+ var iconFile = "" + applicationsModel.query(index, "icon")
+
+ //We don't have thumbnail image for this demo, let's schedule a screenshot
+ if (iconFile.endsWith("_missing")) {
+ demoSurface.scheduleScreenshot(iconFile.replace("_missing", ""))
+ }
+
+ appLoadScreen.applicationName = applicationsModel.query(index, "name")
+ appLoadScreen.visible = true
+
+ engine.launchApplication(applicationsModel.query(index, "binary"),
+ applicationsModel.query(index, "arguments"),
+ applicationsModel.query(index, "environment")
+ )
+ }
+ }
+
+ Background {
+ engine: engine
+ BootScreen {
+ id: appLoadScreen
+ visible: false
+ anchors.fill: parent
+ }
+ }
+
+ Component {
+ id: gridComponent
+
+ LaunchScreen {
+ id: launchScreen
+ appsModel: applicationsModel
+ pageMargin: mainWindow.pageMargin
+ }
+ }
+
+ Component {
+ id: detailComponent
+
+ DetailView {
+ id: detailView
+ appsModel: applicationsModel
+ pageMargin: mainWindow.pageMargin
+ }
+ }
+
+ Engine {
+ id: engine
+ }
+
+ Item {
+ id: root
+ anchors.fill: parent
+
+ Loader {
+ id: contentLoader
+ visible: engine.state === "running"
+ anchors.fill: parent
+ anchors.topMargin: header.height + mainWindow.pageMargin
+ sourceComponent: SettingsManager.gridSelected ? gridComponent : detailComponent
+ active: false
+ }
+
+ Header {
+ id: header
+ pageMargin: mainWindow.pageMargin
+ visible: engine.state === "running"
+ }
+
+ DemoSurface {
+ id: demoSurface
+ model: mainWindow.shellSurfaces
+ anchors.fill: parent
+ onSurfaceVisible: (visible)=> { appLoadScreen.visible = visible; }
+ onSurfaceDestroyed: (index)=> { mainWindow.shellSurfaces.remove(index); }
+ }
+
+ DemoHeader {
+ id: demoHeader
+ engine: engine
+ pageMargin: mainWindow.pageMargin
+ visible: engine.state === "app-running"
+ onInfoClicked: demoInfoPopup.open()
+ onCloseClicked: engine.closeApplication();
+ }
+
+ DemoInfoPopup {
+ id: demoInfoPopup
+ pageMargin: mainWindow.pageMargin
+ visible: false
+ height: mainWindow.height
+ width: mainWindow.width
+ z: demoHeader.z + 1
+ }
+ }
+}
diff --git a/QtLauncher/QtImageProviders/CMakeLists.txt b/QtLauncher/QtImageProviders/CMakeLists.txt
new file mode 100644
index 0000000..d095dc3
--- /dev/null
+++ b/QtLauncher/QtImageProviders/CMakeLists.txt
@@ -0,0 +1,31 @@
+cmake_minimum_required(VERSION 3.16)
+project(QtImageProviders LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Qml Quick)
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_qml_module(${PROJECT_NAME}Plugin
+ URI QtLauncher.QtImageProviders
+ VERSION 1.0
+ ${BUILD_TYPE_FLAG}
+ PLUGIN_TARGET ${PROJECT_NAME}Plugin
+ NO_PLUGIN_OPTIONAL
+ NO_GENERATE_PLUGIN_SOURCE
+ CLASS_NAME ${PROJECT_NAME}Plugin
+ SOURCES
+ imageproviders.cpp imageproviders.h
+ plugin.cpp
+ RESOURCES
+ thumbnail.png
+)
+
+target_link_libraries(${PROJECT_NAME}Plugin PRIVATE Qt::Quick)
+
+if(NOT ${USE_STATIC_BUILD_FLAG})
+ install(TARGETS ${PROJECT_NAME}Plugin
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/qml/QtLauncher/${PROJECT_NAME}"
+ )
+ install(FILES $<TARGET_FILE_DIR:${PROJECT_NAME}Plugin>/qmldir
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/qml/QtLauncher/${PROJECT_NAME}"
+ )
+endif()
diff --git a/src/imageproviders.cpp b/QtLauncher/QtImageProviders/imageproviders.cpp
index bd3bb60..6dcd038 100644
--- a/src/imageproviders.cpp
+++ b/QtLauncher/QtImageProviders/imageproviders.cpp
@@ -1,31 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
#include "imageproviders.h"
#include <QImage>
@@ -89,7 +64,11 @@ QPixmap QtImageProvider::requestPixmap(const QString &id, QSize *size, const QSi
QString idd = id;
idd.remove("file://");
+ if (idd.endsWith("_missing"))
+ idd = ":/qt/qml/QtLauncher/QtImageProviders/thumbnail.png";
+
QImage image(idd);
+
if (!image.isNull()) {
image = image.copy(BORDERSIZE, BORDERSIZE, image.width() - BORDERSIZE * 2, image.height() - BORDERSIZE * 2)
.convertToFormat(QImage::Format_ARGB32);
@@ -109,13 +88,19 @@ QPixmap QtSquareImageProvider::requestPixmap(const QString &id, QSize *size, con
Q_UNUSED(requestedSize);
QString idd = id;
+
idd.remove("file://");
idd.remove("gradient/");
+ if (idd.endsWith("_missing"))
+ idd = ":/qt/qml/QtLauncher/QtImageProviders/thumbnail.png";
+
QImage image(idd);
+
if (!image.isNull()) {
const int min = qMin(image.width(), image.height());
- image = image.copy(BORDERSIZE, BORDERSIZE, min - BORDERSIZE * 2, min - BORDERSIZE * 2)
+
+ image = image.copy(image.width() / 2 + BORDERSIZE - min / 2, image.height() / 2 + BORDERSIZE - min / 2, min - BORDERSIZE * 2, min - BORDERSIZE * 2)
.scaled(requestedSize.width(), requestedSize.height())
.convertToFormat(QImage::Format_ARGB32);
@@ -123,8 +108,9 @@ QPixmap QtSquareImageProvider::requestPixmap(const QString &id, QSize *size, con
QPainter p(&image);
QRect r = image.rect();
QLinearGradient gradient(r.topLeft(), r.bottomLeft());
- gradient.setColorAt(0, QColor("#99FFFFFF"));
- gradient.setColorAt(0.25, Qt::transparent);
+ gradient.setColorAt(0, QColor(0xff, 0xff, 0xff, 0x99));
+ gradient.setColorAt(0.5, Qt::transparent);
+ gradient.setColorAt(1, QColor(0x0, 0x41, 0x4a, 0x88));
p.fillRect(r, gradient);
}
@@ -152,16 +138,77 @@ QPixmap QtImageMaskProvider::requestPixmap(const QString &id, QSize *size, const
if (id.contains("hover")) {
QRect r = image.rect().adjusted(1, 1, -1, -1);
- QLinearGradient gradient(r.topLeft(), r.bottomRight());
- gradient.setColorAt(0, QColor("#99000000"));
- gradient.setColorAt(1, QColor("#9941cd52"));
- p.fillRect(r, gradient);
+ QColor color(44,222,133, 200);
+ p.fillRect(r, color);
}
- if (id.contains("namebox"))
- p.fillRect(QRectF(0, image.height() * 0.65, image.width(), image.height() * 0.35), QBrush(QColor("#99000000")));
-
cutEdges(image, CORNER_CUTSIZE);
- drawBorders(p, image.width(), image.height(), CORNER_CUTSIZE, QColor("#41cd52"));
+ drawBorders(p, image.width(), image.height(), CORNER_CUTSIZE, QColor(0x2c, 0xde, 0x85));
return QPixmap::fromImage(image);
}
+
+QtButtonImageProvider::QtButtonImageProvider() : QQuickImageProvider(QQuickImageProvider::Pixmap)
+{
+}
+
+QPixmap QtButtonImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
+{
+ bool ok = false;
+
+ QStringList params = id.split("/");
+
+ int cutSize = params.at(0).toInt(&ok);
+
+ if (!ok)
+ cutSize = 10;
+
+ QColor fillColor;
+ QColor borderColor;
+
+ if (params.length() > 1) {
+ fillColor = QColor(params.at(1));
+ }
+
+ if (params.length() > 2)
+ borderColor = QColor(params.at(2));
+
+ if (!fillColor.isValid())
+ fillColor = QColor(0x41, 0xcd, 0x52);
+
+ if (!borderColor.isValid())
+ borderColor ="white";
+
+ int width = 100;
+ int height = 50;
+
+ if (size)
+ *size = QSize(requestedSize.width(), requestedSize.height());
+
+ QPixmap pixmap(requestedSize.width() > 0 ? requestedSize.width() : width,
+ requestedSize.height() > 0 ? requestedSize.height() : height);
+ pixmap.fill(Qt::transparent);
+
+ QPainter painter(&pixmap);
+ const qreal borderPenWidth = 2;
+ QPen borderPen(QBrush(borderColor), borderPenWidth);
+ borderPen.setJoinStyle(Qt::MiterJoin);
+ painter.setRenderHint(QPainter::Antialiasing, true);
+ painter.setPen(borderPen);
+ painter.setBrush(fillColor);
+
+ QPainterPath path;
+ qreal top = borderPenWidth - 1;
+ qreal left = borderPenWidth - 1;
+ qreal bottom = pixmap.height() - borderPenWidth;
+ qreal right = pixmap.width() - borderPenWidth;
+ path.moveTo(left + cutSize, top);
+ path.lineTo(right, top);
+ path.lineTo(right, bottom - cutSize);
+ path.lineTo(right - cutSize, bottom);
+ path.lineTo(left, bottom);
+ path.lineTo(left, top + cutSize);
+ path.lineTo(left + cutSize, top);
+ painter.drawPath(path);
+
+ return pixmap;
+}
diff --git a/QtLauncher/QtImageProviders/imageproviders.h b/QtLauncher/QtImageProviders/imageproviders.h
new file mode 100644
index 0000000..efb91fd
--- /dev/null
+++ b/QtLauncher/QtImageProviders/imageproviders.h
@@ -0,0 +1,37 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef IMAGEPROVIDERS_H
+#define IMAGEPROVIDERS_H
+
+#include <QQuickImageProvider>
+
+class QtImageProvider : public QQuickImageProvider
+{
+public:
+ QtImageProvider();
+ QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
+};
+
+class QtSquareImageProvider : public QQuickImageProvider
+{
+public:
+ QtSquareImageProvider();
+ QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
+};
+
+class QtImageMaskProvider : public QQuickImageProvider
+{
+public:
+ QtImageMaskProvider();
+ QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
+};
+
+class QtButtonImageProvider : public QQuickImageProvider
+{
+public:
+ QtButtonImageProvider();
+ QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
+};
+
+#endif // IMAGEPROVIDERS_H
diff --git a/QtLauncher/QtImageProviders/plugin.cpp b/QtLauncher/QtImageProviders/plugin.cpp
new file mode 100644
index 0000000..e17732d
--- /dev/null
+++ b/QtLauncher/QtImageProviders/plugin.cpp
@@ -0,0 +1,25 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include <imageproviders.h>
+#include <QtQml/qqmlextensionplugin.h>
+
+void qml_register_types_QtLauncher_QtImageProviders();
+
+class QtImageProvidersPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid)
+public:
+ void initializeEngine(QQmlEngine *engine, const char *uri) final
+ {
+ volatile auto registration = &qml_register_types_QtLauncher_QtImageProviders;
+ Q_UNUSED(registration);
+ Q_UNUSED(uri);
+
+ engine->addImageProvider("QtSquareImage", new QtSquareImageProvider);
+ engine->addImageProvider("QtImageMask", new QtImageMaskProvider);
+ engine->addImageProvider("QtButtonImage", new QtButtonImageProvider);
+ }
+};
+#include "plugin.moc"
diff --git a/QtLauncher/QtImageProviders/thumbnail.png b/QtLauncher/QtImageProviders/thumbnail.png
new file mode 100644
index 0000000..5353f85
--- /dev/null
+++ b/QtLauncher/QtImageProviders/thumbnail.png
Binary files differ
diff --git a/QtLauncher/SettingsButton.qml b/QtLauncher/SettingsButton.qml
new file mode 100644
index 0000000..74a7492
--- /dev/null
+++ b/QtLauncher/SettingsButton.qml
@@ -0,0 +1,20 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Image {
+ id: root
+ height: parent.height
+ width: height
+ sourceSize: Qt.size(width, height)
+
+ signal clicked()
+
+ MouseArea {
+ anchors.fill: parent
+ anchors.margins: - width * 0.3
+
+ onClicked: root.clicked()
+ }
+}
diff --git a/QtLauncher/ViewSettings.qml b/QtLauncher/ViewSettings.qml
new file mode 100644
index 0000000..bd6d2b4
--- /dev/null
+++ b/QtLauncher/ViewSettings.qml
@@ -0,0 +1,22 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+pragma Singleton
+
+import QtQuick
+
+QtObject {
+ readonly property real margin: 0.03
+ readonly property string appFont: "TitilliumWeb"
+ readonly property color backgroundColor: "#00414a"
+ readonly property color demolistBackgroundColor: "#002e34"
+ readonly property color borderColor: "#9d9faa"
+ readonly property color buttonGreenColor: "#2cde85"
+ readonly property color buttonGrayColor: "#9d9faa"
+ readonly property color buttonActiveColor: "#216729"
+ readonly property color loaderBackgroundColor: "#0a8550"
+ readonly property color loaderForegroundColor: "#2cde85"
+ readonly property color scrollBarColor: "#2cde85"
+ readonly property color neon: "#2cde85"
+ readonly property color pine: "#00414a"
+}
diff --git a/src/applicationsmodel.cpp b/QtLauncher/applicationsmodel.cpp
index 5c29c93..a706255 100644
--- a/src/applicationsmodel.cpp
+++ b/QtLauncher/applicationsmodel.cpp
@@ -1,31 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
#include "applicationsmodel.h"
#include "applicationsmodel_p.h"
@@ -34,7 +9,6 @@
#include <QEvent>
#include <QThread>
#include <QDebug>
-#include <QRegExp>
#include <QJsonDocument>
#include <QJsonObject>
#include <QXmlStreamReader>
@@ -66,6 +40,7 @@ void IndexingThread::run()
}
void IndexingThread::parseDemo(QString path, QList<AppData> &results) {
+
QFile file(path + "/demo.xml");
if (!file.open(QIODevice::ReadOnly))
@@ -81,17 +56,37 @@ void IndexingThread::parseDemo(QString path, QList<AppData> &results) {
if (xml.name().toString().toLower() == "application") {
data.location = QUrl::fromLocalFile(path);
data.name = xml.attributes().value("title").toString().trimmed();
- data.main = QString("/%1").arg(xml.attributes().value("main").toString());
+
+ QString fileName = xml.attributes().value("icon").toString();
+ if (fileName.isEmpty())
+ fileName = "screenshot.png";
QString imageName = QString("%1/%2")
- .arg(path, xml.attributes().value("icon").toString());
+ .arg(path, fileName);
data.icon = QFile::exists(imageName)
? QUrl::fromLocalFile(imageName)
- : QUrl();
+ : QUrl::fromLocalFile(imageName.append("_missing"));
data.priority = xml.attributes().value("priority").toInt();
+ data.binary = xml.attributes().value("binary").toString();
+ data.arguments = xml.attributes().value("arguments").toString();
+ data.scalable = xml.attributes().value("scalable").toInt();
+
+ } else if (xml.name().toString().toLower() == "environment") {
+
+ while (xml.readNextStartElement()) {
+ if (xml.name().toString().toLower() == "variable" &&
+ xml.attributes().hasAttribute("name") &&
+ xml.attributes().hasAttribute("value")) {
+ data.environment.insert(xml.attributes().value("name").toString(), xml.attributes().value("value").toString());
+ xml.skipCurrentElement();
+ } else {
+ xml.skipCurrentElement();
+ }
+ }
+
} else if (xml.name().toString().toLower() == "description") {
data.description = xml.readElementText().trimmed();
}
@@ -121,10 +116,13 @@ QHash<int, QByteArray> ApplicationsModel::roleNames() const
QHash<int, QByteArray> names;
names[NameRole] = "name";
names[DescriptionRole] = "description";
- names[MainFileRole] = "mainFile";
names[LocationRole] = "location";
names[IconRole] = "icon";
names[PriorityRole] = "priority";
+ names[BinaryRole] = "binary";
+ names[ArgumentsRole] = "arguments";
+ names[EnvironmentRole] = "environment";
+ names[ScalableRole] = "scalable";
return names;
}
@@ -151,31 +149,19 @@ QVariant ApplicationsModel::data(const QModelIndex &index, int role) const
case NameRole: return ad.name;
case DescriptionRole: return ad.description;
case LocationRole: return ad.location;
- case MainFileRole: return ad.main;
case IconRole: return ad.icon;
case PriorityRole: return ad.priority;
+ case BinaryRole: return ad.binary;
+ case ArgumentsRole: return ad.arguments;
+ case EnvironmentRole: return ad.environment;
+ case ScalableRole: return ad.scalable;
+
default: qDebug() << "ApplicationsModel::data: unhandled role" << role;
}
return QVariant();
}
-QString ApplicationsModel::nameAt(int i) const
-{
- if (i < 0 || i >= m_data.size()) {
- return "ERROR: out-of-range";
- }
- return m_data[i].name;
-}
-
-QString ApplicationsModel::locationAt(int i) const
-{
- if (i < 0 || i >= m_data.size()) {
- return "ERROR: out-of-range";
- }
- return m_data[i].location.toLocalFile();
-}
-
QVariant ApplicationsModel::query(int i, const QString &name) const
{
if (i < 0 || i >= m_data.size()) {
@@ -189,12 +175,18 @@ QVariant ApplicationsModel::query(int i, const QString &name) const
return ad.name;
if (name == QStringLiteral("location"))
return ad.location;
- if (name == QStringLiteral("mainFile"))
- return ad.main;
if (name == QStringLiteral("icon"))
return ad.icon;
if (name == QStringLiteral("priority"))
return ad.priority;
+ if (name == QStringLiteral("binary"))
+ return ad.binary;
+ if (name == QStringLiteral("arguments"))
+ return ad.arguments;
+ if (name == QStringLiteral("environment"))
+ return ad.environment;
+ if (name == QStringLiteral("scalable"))
+ return ad.scalable;
qWarning("ApplicationsModel::query: Asking for bad name %s", qPrintable(name));
diff --git a/QtLauncher/applicationsmodel.h b/QtLauncher/applicationsmodel.h
new file mode 100644
index 0000000..e1ea24b
--- /dev/null
+++ b/QtLauncher/applicationsmodel.h
@@ -0,0 +1,66 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef APPLICATIONSMODEL_H
+#define APPLICATIONSMODEL_H
+
+#include "qqmlintegration.h"
+#include <QAbstractItemModel>
+#include <QUrl>
+
+struct AppData {
+ QString name;
+ QString description;
+ QUrl location;
+ QUrl icon;
+ int priority;
+ QString binary;
+ QString arguments;
+ QMap<QString, QVariant> environment;
+ bool scalable;
+};
+
+class ApplicationsModel : public QAbstractItemModel
+{
+ Q_OBJECT
+ QML_ELEMENT
+
+public:
+ enum {
+ NameRole = Qt::UserRole + 1,
+ DescriptionRole,
+ LocationRole,
+ IconRole,
+ PriorityRole,
+ BinaryRole,
+ ArgumentsRole,
+ EnvironmentRole,
+ ScalableRole
+ };
+
+ explicit ApplicationsModel(QObject *parent = 0);
+
+ Q_INVOKABLE void initialize(const QString &appsRoot);
+
+ QModelIndex index(int r, int c, const QModelIndex &) const { return createIndex(r, c); }
+ QModelIndex parent(const QModelIndex&) const { return QModelIndex(); }
+ int rowCount(const QModelIndex&) const { return m_data.size(); }
+ int columnCount(const QModelIndex&) const { return 1; }
+ QVariant data(const QModelIndex &index, int role) const;
+
+ QHash<int, QByteArray> roleNames() const;
+
+ Q_INVOKABLE QVariant query(int i, const QString &name) const;
+
+signals:
+ void ready();
+
+private slots:
+ void handleIndexingResult(QList<AppData> results);
+
+private:
+
+ QList<AppData> m_data;
+};
+
+#endif // APPLICATIONSMODEL_H
diff --git a/QtLauncher/applicationsmodel_p.h b/QtLauncher/applicationsmodel_p.h
new file mode 100644
index 0000000..f462034
--- /dev/null
+++ b/QtLauncher/applicationsmodel_p.h
@@ -0,0 +1,29 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef APPLICATIONSMODEL_P_H
+#define APPLICATIONSMODEL_P_H
+
+#include "applicationsmodel.h"
+
+#include <QThread>
+
+class IndexingThread : public QThread
+{
+ Q_OBJECT
+public:
+ virtual ~IndexingThread() = default;
+ void run() final;
+
+private:
+ void parseDemo(QString path, QList<AppData> &results);
+
+signals:
+ void indexingFinished(QList<AppData> results);
+
+public:
+ QString root;
+ ApplicationsModel *model = nullptr;
+};
+
+#endif // APPLICATIONSMODEL_P_H
diff --git a/src/circularindicator.cpp b/QtLauncher/circularindicator.cpp
index 9afef84..b32b14c 100644
--- a/src/circularindicator.cpp
+++ b/QtLauncher/circularindicator.cpp
@@ -1,31 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
#include "circularindicator.h"
CircularIndicator::CircularIndicator(QQuickItem *parent)
diff --git a/src/circularindicator.h b/QtLauncher/circularindicator.h
index 00d3077..dfe02c8 100644
--- a/src/circularindicator.h
+++ b/QtLauncher/circularindicator.h
@@ -1,31 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
#ifndef CIRCULARINDICATOR_H
#define CIRCULARINDICATOR_H
@@ -41,6 +16,7 @@ class CircularIndicator : public QQuickPaintedItem
Q_PROPERTY(QColor progressColor READ progressColor WRITE setProgressColor NOTIFY progressColorChanged)
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged)
Q_PROPERTY(int padding READ padding WRITE setPadding NOTIFY paddingChanged)
+ QML_ELEMENT
public:
CircularIndicator(QQuickItem *parent = 0);
@@ -53,7 +29,6 @@ public:
QColor backgroundColor() const;
int padding() const;
-public slots:
void setStartAngle(int angle);
void setSpanAngle(int angle);
void setLineWidth(int width);
diff --git a/QtLauncher/engine.cpp b/QtLauncher/engine.cpp
new file mode 100644
index 0000000..1aadfa0
--- /dev/null
+++ b/QtLauncher/engine.cpp
@@ -0,0 +1,76 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "engine.h"
+
+#include <QFileInfo>
+#include <QDir>
+
+#define ENGINE_STATE_RUNNING QStringLiteral("running")
+#define ENGINE_STATE_APPLAUNCHING QStringLiteral("app-launching")
+#define ENGINE_STATE_APPRUNNING QStringLiteral("app-running")
+#define ENGINE_STATE_APPCLOSING QStringLiteral("app-closing")
+
+Engine::Engine(QQuickItem *parent)
+ : QQuickItem(parent)
+{
+ m_state = ENGINE_STATE_RUNNING;
+
+ connect(&m_process, &QProcess::stateChanged, this,
+ [=](QProcess::ProcessState newState) {
+ if (newState == QProcess::Starting) setState(ENGINE_STATE_APPLAUNCHING);
+ if (newState == QProcess::Running) setState(ENGINE_STATE_APPRUNNING);
+ if (newState == QProcess::NotRunning) setState(ENGINE_STATE_RUNNING);
+ }
+ );
+
+ connect(&m_process, &QProcess::errorOccurred, this,
+ [=](QProcess::ProcessError error) {
+ qWarning() << m_process.readAllStandardError();
+ m_process.close();
+ setState(ENGINE_STATE_RUNNING);
+ }
+ );
+}
+
+void Engine::setState(const QString &state)
+{
+ if (state == m_state)
+ return;
+ m_state = state;
+ emit engineStateChanged(m_state);
+}
+
+void Engine::markApplicationsModelReady()
+{
+ m_state = ENGINE_STATE_RUNNING;
+ emit engineStateChanged(m_state);
+}
+
+void Engine::launchApplication(const QString &binary, const QString &arguments, const QVariantMap &env)
+{
+ if (m_state != ENGINE_STATE_RUNNING)
+ return;
+
+ setState(ENGINE_STATE_APPLAUNCHING);
+
+ QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
+ environment.insert("QT_IM_MODULE", "");
+ environment.insert("QT_QPA_PLATFORM", "wayland-egl");
+
+ for (QVariantMap::const_iterator i = env.begin(); i !=env.end(); ++i) {
+ environment.insert(i.key(), i.value().toString());
+ }
+
+ QFileInfo info(binary);
+ m_process.setProcessEnvironment(environment);
+ m_process.setProgram(info.absoluteFilePath());
+ m_process.setWorkingDirectory(info.dir().path());
+ m_process.setArguments(arguments.split(" "));
+ m_process.start();
+}
+
+void Engine::closeApplication()
+{
+ m_process.close();
+}
diff --git a/QtLauncher/engine.h b/QtLauncher/engine.h
new file mode 100644
index 0000000..4410644
--- /dev/null
+++ b/QtLauncher/engine.h
@@ -0,0 +1,37 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef ENGINE_H
+#define ENGINE_H
+
+#include <QQuickItem>
+#include <QProcess>
+
+class Engine : public QQuickItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QString state READ state WRITE setState NOTIFY engineStateChanged)
+ Q_PROPERTY(const QString qtVersion READ qtVersion CONSTANT)
+ QML_ELEMENT
+
+public:
+ explicit Engine(QQuickItem *parent = nullptr);
+
+ QString state() const { return m_state; }
+ void setState(const QString &state);
+ QString qtVersion() const { return QT_VERSION_STR; }
+
+signals:
+ void engineStateChanged(const QString &state);
+
+public slots:
+ void markApplicationsModelReady();
+ void launchApplication(const QString &binary, const QString &arguments = "", const QVariantMap &env = QVariantMap());
+ void closeApplication();
+
+private:
+ QString m_state;
+ QProcess m_process;
+};
+
+#endif // ENGINE_H
diff --git a/qml/icons/Built_with_Qt_RGB_logo_white.svg b/QtLauncher/icons/Built_with_Qt_RGB_logo_white.svg
index cd972bd..cd972bd 100644
--- a/qml/icons/Built_with_Qt_RGB_logo_white.svg
+++ b/QtLauncher/icons/Built_with_Qt_RGB_logo_white.svg
diff --git a/qml/icons/close_icon.svg b/QtLauncher/icons/close_icon.svg
index 311721e..311721e 100644
--- a/qml/icons/close_icon.svg
+++ b/QtLauncher/icons/close_icon.svg
diff --git a/qml/icons/detail_icon.svg b/QtLauncher/icons/detail_icon.svg
index f62ec81..f62ec81 100644
--- a/qml/icons/detail_icon.svg
+++ b/QtLauncher/icons/detail_icon.svg
diff --git a/qml/icons/grid_icon.svg b/QtLauncher/icons/grid_icon.svg
index fe08f0c..fe08f0c 100644
--- a/qml/icons/grid_icon.svg
+++ b/QtLauncher/icons/grid_icon.svg
diff --git a/qml/icons/header_toggle_icon.svg b/QtLauncher/icons/header_toggle_icon.svg
index 18f71c5..18f71c5 100644
--- a/qml/icons/header_toggle_icon.svg
+++ b/QtLauncher/icons/header_toggle_icon.svg
diff --git a/qml/icons/info_icon.svg b/QtLauncher/icons/info_icon.svg
index 8a7d960..8a7d960 100644
--- a/qml/icons/info_icon.svg
+++ b/QtLauncher/icons/info_icon.svg
diff --git a/qml/icons/mouse_icon.svg b/QtLauncher/icons/mouse_icon.svg
index 8d5d088..8d5d088 100644
--- a/qml/icons/mouse_icon.svg
+++ b/QtLauncher/icons/mouse_icon.svg
diff --git a/qml/icons/qt_logo_green_rgb.svg b/QtLauncher/icons/qt_logo_green_rgb.svg
index bdb07d1..06ba1ff 100644
--- a/qml/icons/qt_logo_green_rgb.svg
+++ b/QtLauncher/icons/qt_logo_green_rgb.svg
@@ -3,7 +3,7 @@
<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="0 0 293.4 216.1" style="enable-background:new 0 0 293.4 216.1;" xml:space="preserve">
<style type="text/css">
- .st0{fill:#41CD52;}
+ .st0{fill:#2CDE85;}
.st1{fill:#FFFFFF;}
</style>
<g>
diff --git a/qml/icons/settings_icon.svg b/QtLauncher/icons/settings_icon.svg
index 7862920..7862920 100644
--- a/qml/icons/settings_icon.svg
+++ b/QtLauncher/icons/settings_icon.svg
diff --git a/qml/icons/stop_icon.svg b/QtLauncher/icons/stop_icon.svg
index c694e55..c694e55 100644
--- a/qml/icons/stop_icon.svg
+++ b/QtLauncher/icons/stop_icon.svg
diff --git a/qml/icons/touch_icon.svg b/QtLauncher/icons/touch_icon.svg
index 0237b64..0237b64 100644
--- a/qml/icons/touch_icon.svg
+++ b/QtLauncher/icons/touch_icon.svg
diff --git a/QtLauncher/images/QtCorner.png b/QtLauncher/images/QtCorner.png
new file mode 100644
index 0000000..ea361fa
--- /dev/null
+++ b/QtLauncher/images/QtCorner.png
Binary files differ
diff --git a/QtLauncher/images/backImg.jpg b/QtLauncher/images/backImg.jpg
new file mode 100644
index 0000000..877afe7
--- /dev/null
+++ b/QtLauncher/images/backImg.jpg
Binary files differ
diff --git a/QtLauncher/images/glow.png b/QtLauncher/images/glow.png
new file mode 100644
index 0000000..0ed878f
--- /dev/null
+++ b/QtLauncher/images/glow.png
Binary files differ
diff --git a/QtLauncher/settingsmanager.cpp b/QtLauncher/settingsmanager.cpp
new file mode 100644
index 0000000..9d9c52e
--- /dev/null
+++ b/QtLauncher/settingsmanager.cpp
@@ -0,0 +1,54 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "settingsmanager.h"
+
+SettingsManager::SettingsManager(QObject *parent) :
+ QObject(parent),
+ m_settings("The Qt Company", "Qt Demo Launcher")
+{
+}
+
+SettingsManager::~SettingsManager()
+{
+ m_settings.sync();
+}
+
+QVariant SettingsManager::getValue(const QString &key, const QVariant &defaultValue)
+{
+ return m_settings.value(key, defaultValue);
+}
+
+void SettingsManager::setValue(const QString &key, const QVariant &value)
+{
+ m_settings.setValue(key, value);
+ m_settings.sync();
+}
+
+bool SettingsManager::gridSelected()
+{
+ return getValue("gridSelected", false).toBool();
+}
+
+void SettingsManager::setGridSelected(bool enabled)
+{
+ if (gridSelected() == enabled)
+ return;
+
+ setValue("gridSelected", enabled);
+ emit gridSelectedChanged(enabled);
+}
+
+bool SettingsManager::mouseSelected()
+{
+ return getValue("mouseSelected", false).toBool();
+}
+
+void SettingsManager::setMouseSelected(bool enabled)
+{
+ if (mouseSelected() == enabled)
+ return;
+
+ setValue("mouseSelected", enabled);
+ emit mouseSelectedChanged(enabled);
+}
diff --git a/QtLauncher/settingsmanager.h b/QtLauncher/settingsmanager.h
new file mode 100644
index 0000000..f65a707
--- /dev/null
+++ b/QtLauncher/settingsmanager.h
@@ -0,0 +1,39 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef SETTINGSMANAGER_H
+#define SETTINGSMANAGER_H
+
+#include "qqmlintegration.h"
+#include <QObject>
+#include <QSettings>
+
+class SettingsManager : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(bool gridSelected READ gridSelected WRITE setGridSelected NOTIFY gridSelectedChanged)
+ Q_PROPERTY (bool mouseSelected READ mouseSelected WRITE setMouseSelected NOTIFY mouseSelectedChanged)
+
+ QML_ELEMENT
+ QML_SINGLETON
+public:
+ explicit SettingsManager(QObject *parent = nullptr);
+ ~SettingsManager();
+
+ bool gridSelected();
+ void setGridSelected(bool enabled);
+ bool mouseSelected();
+ void setMouseSelected(bool enabled);
+
+ Q_INVOKABLE QVariant getValue(const QString& key, const QVariant &defaultValue);
+ Q_INVOKABLE void setValue(const QString& key, const QVariant &value);
+
+signals:
+ void gridSelectedChanged(bool enabled);
+ void mouseSelectedChanged(bool enabled);
+
+private:
+ QSettings m_settings;
+};
+
+#endif // SETTINGSMANAGER_H
diff --git a/README b/README
index 98d097c..d414b5b 100644
--- a/README
+++ b/README
@@ -1,20 +1,21 @@
-This is the Boot to Qt launcher, it can launch in-process QML applications
+This is the Boot to Qt 6 Demo Launcher, it's a Wayland compositor that can launch Qt demo applications as Wayland clients.
Command line options:
--main-file [.qml file] Specify an optional qml file
--applications-root [dir] The root of your directories, multiple can
be given, separated by ':'
- --no-boot-animation If you think it is boring, disable it
+Each demo added to the launcher uses the following XML format named as demo.xml and located in <applications-root/demoname>
-Generating new screenshots:
----------------------------
+---------------------------------------------------------------------------------------------------------------------------
+<?xml version="1.0" encoding="UTF-8"?>
-First, cd into screenshot/plugin and compile/make install that plugin, then
-run the launcher with the command line options:
+<application title="TITLE" priority="1" icon="preview.png" binary="PATH/TO/BINARY" arguments="-COMMANDLINE ARGS">
+<environment>
+ <variable name="CUSTOM_ENV_VARIABLE" value="ENV_VALUE"/>
+</environment>
+<description>SHORT DESCRIPTION OF THE DEMO APPEARING ON LAUNCHER</description>
+</application>
+---------------------------------------------------------------------------------------------------------------------------
-> qtlauncher --main-file screenshot/Main.qml --applications-root [your apps]
-
-When you hit the "grab" button, it will grab a highres "preview_l.jpg" and
-a lowres copy into the application's directory. Resize to portrait to get
-a portrait version, named "preview_p.jpg".
+If icon image is not found, the launcher app creates one automatically on first demo startup.
diff --git a/fonts.qrc b/fonts.qrc
deleted file mode 100644
index 51030a9..0000000
--- a/fonts.qrc
+++ /dev/null
@@ -1,24 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/fonts/TitilliumWeb-Black.ttf</file>
- <file>qml/fonts/TitilliumWeb-Bold.ttf</file>
- <file>qml/fonts/TitilliumWeb-BoldItalic.ttf</file>
- <file>qml/fonts/TitilliumWeb-ExtraLight.ttf</file>
- <file>qml/fonts/TitilliumWeb-ExtraLightItalic.ttf</file>
- <file>qml/fonts/TitilliumWeb-Italic.ttf</file>
- <file>qml/fonts/TitilliumWeb-Light.ttf</file>
- <file>qml/fonts/TitilliumWeb-LightItalic.ttf</file>
- <file>qml/fonts/TitilliumWeb-Regular.ttf</file>
- <file>qml/fonts/TitilliumWeb-SemiBold.ttf</file>
- <file>qml/fonts/TitilliumWeb-SemiBoldItalic.ttf</file>
- <file>qml/fonts/fontawesome-webfont.ttf</file>
- <file>qml/fonts/Montserrat-Bold.ttf</file>
- <file>qml/fonts/Montserrat-Light.ttf</file>
- <file>qml/fonts/Montserrat-Medium.ttf</file>
- <file>qml/fonts/Montserrat-Regular.ttf</file>
- <file>qml/fonts/Teko-Bold.ttf</file>
- <file>qml/fonts/Teko-Light.ttf</file>
- <file>qml/fonts/Teko-Medium.ttf</file>
- <file>qml/fonts/Teko-Regular.ttf</file>
- </qresource>
-</RCC>
diff --git a/icons.qrc b/icons.qrc
deleted file mode 100644
index 40f8b2f..0000000
--- a/icons.qrc
+++ /dev/null
@@ -1,24 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/icons/close_icon.svg</file>
- <file>qml/icons/detail_icon.svg</file>
- <file>qml/icons/grid_icon.svg</file>
- <file>qml/icons/info_icon.svg</file>
- <file>qml/icons/settingsmenu_launcher_icon.svg</file>
- <file>qml/icons/qt_logo_green_rgb.svg</file>
- <file>qml/icons/header_toggle_icon.svg</file>
- <file>qml/icons/spinner.png</file>
- <file>qml/icons/FloatingButton_Active.svg</file>
- <file>qml/icons/FloatingButton_Available.svg</file>
- <file>qml/icons/FloatingButton_Unavailable.svg</file>
- <file>qml/icons/Built_with_Qt_RGB_logo_white.svg</file>
- <file>qml/icons/mouse_icon.svg</file>
- <file>qml/icons/touch_icon.svg</file>
- <file>qml/icons/mouse_icon_disabled.svg</file>
- <file>qml/icons/detail_icon_disabled.svg</file>
- <file>qml/icons/touch_icon_disabled.svg</file>
- <file>qml/icons/grid_icon_disabled.svg</file>
- <file>qml/icons/display_icon.svg</file>
- <file>qml/icons/checkmark.svg</file>
- </qresource>
-</RCC>
diff --git a/images.qrc b/images.qrc
deleted file mode 100644
index f686255..0000000
--- a/images.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/images/backImg.jpg</file>
- </qresource>
-</RCC>
diff --git a/main.cpp b/main.cpp
new file mode 100644
index 0000000..179c1cc
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,71 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include <QtCore/QFile>
+#include <QtCore/QStandardPaths>
+#include <QtCore/QSettings>
+#include <QtGui/QFont>
+#include <QtGui/QIcon>
+#include <QtGui/QFontDatabase>
+#include <QtGui/QGuiApplication>
+#include <QtQml/QQmlApplicationEngine>
+
+#if defined(USE_STATIC_BUILD_FLAG)
+#include <QtQml/QQmlEngineExtensionPlugin>
+Q_IMPORT_QML_PLUGIN(QtLauncherPlugin)
+Q_IMPORT_QML_PLUGIN(QtImageProvidersPlugin)
+#endif
+
+void displayHelp(const char *appName)
+{
+ printf("Usage: \n"
+ " > %s [options]\n"
+ "\n"
+ "Options:\n"
+ " --applications-root [path] Specify a different applications root\n"
+ , appName
+ );
+}
+
+int main(int argc, char **argv)
+{
+ QGuiApplication app(argc, argv);
+
+ QString appsRoot;
+
+ const QStringList args = app.arguments();
+ for (int i = 1; i < args.size(); ++i) {
+ const QString arg = args.at(i);
+ if (arg == QStringLiteral("--applications-root")) {
+ ++i;
+ appsRoot = args.at(i);
+ } else if (arg == QStringLiteral("-h")
+ || arg == QStringLiteral("--help")
+ || arg == QStringLiteral("-?")) {
+ displayHelp(argv[0]);
+ return 0;
+ } else {
+ qCritical() << "Unknown command line argument:" << args.at(i);
+ displayHelp(argv[0]);
+ return 0;
+ }
+ }
+
+ if (appsRoot.isEmpty()) {
+ QSettings settings("Qt", "QtLauncher");
+ appsRoot = settings.value("defaultApplicationRoot").toString();
+ }
+
+ if (appsRoot.isEmpty()) {
+ appsRoot = "/usr/examples/data";
+ }
+
+ qInfo() << "Applications Root:" << appsRoot;
+
+ QQmlApplicationEngine engine;
+
+ engine.setInitialProperties({{"appsRoot", appsRoot}});
+ engine.loadFromModule("QtLauncher", "Main");
+
+ return app.exec();
+}
diff --git a/qml.qrc b/qml.qrc
deleted file mode 100644
index 102bd9d..0000000
--- a/qml.qrc
+++ /dev/null
@@ -1,29 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/Main.qml</file>
- <file>qml/ApplicationIcon.qml</file>
- <file>qml/BootScreen.qml</file>
- <file>qml/LaunchScreen.qml</file>
- <file>qml/HighlightShader.qml</file>
- <file>qml/AutoScroller.qml</file>
- <file>qml/HandwritingModeButton.qml</file>
- <file>qml/Background.qml</file>
- <file>qml/Header.qml</file>
- <file>qml/ViewSettings.qml</file>
- <file>qml/DetailView.qml</file>
- <file>qml/GridViewIcon.qml</file>
- <file>qml/DetailViewIcon.qml</file>
- <file>qml/DemoHeader.qml</file>
- <file>qml/DemoInfoPopup.qml</file>
- <file>qml/AboutQt.qml</file>
- <file>qml/LayoutSettings.qml</file>
- <file>qml/settings.xml</file>
- <file>qml/ImageTextDelegate.qml</file>
- <file>qml/BusyIndicator.qml</file>
- <file>qml/MainWindow.qml</file>
- <file>qml/FlickSlider.qml</file>
- <file>qml/LauncherCheckBox.qml</file>
- <file>qml/DemoMode.qml</file>
- <file>qml/GlobalIndicator.qml</file>
- </qresource>
-</RCC>
diff --git a/qml/AboutQt.qml b/qml/AboutQt.qml
deleted file mode 100644
index 04614f3..0000000
--- a/qml/AboutQt.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Item {
- id: root
-
- Flickable {
- width: parent.width
- height: parent.height
- contentHeight: aboutQtColumn.height
- contentWidth: aboutQtColumn.width
- clip: true
-
- Column {
- id: aboutQtColumn
- spacing: pluginMain.spacing
- Image {
- height: root.height * 0.125
- source: "icons/qt_logo_green_rgb.svg"
- fillMode: Image.PreserveAspectFit
- }
-
- Text {
- text: qsTr("This is Qt for Device Creation feature 'Boot to Qt (B2Qt)' Demo Launcher application. " +
- "In addition to providing a host for various demo applications demonstrating Qt capabilities " +
- "for embedded use cases, this application itself is manifesting how to create a booting, " +
- "embedded application and a launcher with Qt on top of various different hardware and operating " +
- "systems. In other words, this same application can be seen on several different hardware and " +
- "operating system combinations either as a launchable app from the OS or as a full boot experience.")
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- width: root.width
- wrapMode: Text.Wrap
- }
-
- Text {
- text: qsTr("Qt version: ") + engine.qtVersion
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- }
-
- Text {
- text: qsTr("Demo Launcher application version: ") + Qt.application.version
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- }
-
- Text {
- text: qsTr("The Qt Company")
- color: "white"
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- }
-
- Text {
- text: qsTr("The Qt Company develops and delivers the Qt development framework " +
- "under commercial and open source licenses. We enable the reuse of " +
- "software code across all operating systems, platforms and screen " +
- "types, from desktops and embedded systems to wearables and mobile " +
- "devices. Qt is used by approximately one million developers worldwide " +
- "and is the platform of choice for in-vehicle digital cockpits, " +
- "automation systems, medical devices, Digital TV/STB and other " +
- "business critical applications in 70+ industries. With more than 250 " +
- "employees worldwide, the company is headquartered in Espoo, Finland " +
- "and is listed on Nasdaq Helsinki Stock Exchange. To learn more visit " +
- "http://qt.io")
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- width: root.width
- wrapMode: Text.Wrap
- }
- }
- }
-}
diff --git a/qml/ApplicationIcon.qml b/qml/ApplicationIcon.qml
deleted file mode 100644
index c755a10..0000000
--- a/qml/ApplicationIcon.qml
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Controls 2.1
-
-Item {
- id: appIcon
- signal clicked(string sLocation, string sMainFile, string sName, string sDescription)
- property bool highlight: false
- property bool isSelected: false
- property alias preview: preview
- property alias hoverSource: hoverItem.source
-
- Image {
- id: preview;
- anchors.fill: parent
- anchors.margins: viewSettings.pageMargin*0.5
- source: highlight ? "image://QtSquareImage/" + icon :
- "image://QtSquareImage/gradient/" + icon
- sourceSize: Qt.size(width, height)
-
- Image {
- id: hoverItem
- anchors.fill: parent
- source: "image://QtImageMask/hover/namebox"
- sourceSize: Qt.size(width, height)
- opacity: highlight ? 1.0 : 0.0
- visible: !isSelected && opacity > 0.01
-
- Behavior on opacity { NumberAnimation { duration: 300 } }
- }
- }
-
-
- MouseArea {
- anchors.fill: parent
- onClicked: appIcon.clicked(location, mainFile, name, description)
- hoverEnabled: globalSettings.mouseSelected
- onEntered: {
- if (globalSettings.mouseSelected)
- highlight = true;
- }
- onExited: {
- if (globalSettings.mouseSelected)
- highlight = false
- }
- }
-}
diff --git a/qml/AutoScroller.qml b/qml/AutoScroller.qml
deleted file mode 100644
index 9f5c698..0000000
--- a/qml/AutoScroller.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.VirtualKeyboard 2.0
-
-Item {
- property var inputItem: InputContext.priv.inputItem
- property var appLoader
-
- onInputItemChanged: open();
-
- function open() {
- appLoader = null
- if (inputItem) {
- var parent_ = inputItem.parent
- var found = false
- while (parent_) {
- if (parent_.objectName == "applicationLoader") {
- appLoader = parent_
- found = true
- break;
- }
- parent_ = parent_.parent
- }
- if (found) delayedLoading.triggered()
- }
- }
-
- function ensureVisible(loader) {
- if (Qt.inputMethod.visible && inputItem && loader) {
-
- //Check if the text field is under the virtual keyboard. Also add some margin just to make sure.
- if (inputItem.mapToItem(loader, 0,0).y > root.height - inputPanel.height - root.height * 0.125) {
-
- //Scroll the text field to the vertical center of the remaining screen space above the virtual keyboard.
- loader.anchors.topMargin = ((root.height - inputPanel.height) / 2) - inputItem.mapToItem(loader, 0,0).y - (inputItem.height / 2);
- } else {
- loader.anchors.topMargin = 0;
- }
- }
- }
- Timer {
- id: delayedLoading
- interval: 10
- onTriggered: {
- ensureVisible(appLoader)
- }
- }
-}
diff --git a/qml/Background.qml b/qml/Background.qml
deleted file mode 100644
index f7f86fa..0000000
--- a/qml/Background.qml
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Image {
- anchors.fill: parent
- source: "images/backImg.jpg"
- fillMode: Image.PreserveAspectCrop
-
- // QTBUG-63585, background image causes poor performance of flickable items
- // on low-end gpu devices
- visible: false
-
- Rectangle {
- anchors.fill: parent
- color: viewSettings.backgroundColor
- opacity: 0.9
- }
-}
diff --git a/qml/BootScreen.qml b/qml/BootScreen.qml
deleted file mode 100644
index 1318495..0000000
--- a/qml/BootScreen.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Rectangle {
- id: bootScreen
- color: viewSettings.backgroundColor
- opacity: 0.95
- property string applicationName: ""
-
- Column {
- anchors.centerIn: parent
-
- BusyIndicator {
- anchors.horizontalCenter: parent.horizontalCenter
- width: bootScreen.width * 0.1
- }
-
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- font.family: viewSettings.appFont
- font.pixelSize: bootScreen.height * 0.05
- color: "white"
- text: qsTr("Loading")
- }
- Text {
- anchors.horizontalCenter: parent.horizontalCenter
- font.family: viewSettings.appFont
- font.pixelSize: bootScreen.height * 0.05
- font.styleName: "Bold"
- color: "white"
- text: applicationName
- }
- }
-}
diff --git a/qml/BusyIndicator.qml b/qml/BusyIndicator.qml
deleted file mode 100644
index 2d45ef6..0000000
--- a/qml/BusyIndicator.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.4
-import Circle 1.0
-
-CircularIndicator {
- id: circularIndicator
- height: width
- padding: 23
- backgroundColor: viewSettings.loaderBackgroundColor
- progressColor: viewSettings.loaderForegroundColor
-
- SequentialAnimation {
- running: true
-
- // Fill 20 degrees of the circle before starting looping
- NumberAnimation {
- target: circularIndicator
- property: "spanAngle"
- from: 0
- to: 20
- duration: 200
- }
-
- SequentialAnimation {
- loops: Animation.Infinite
-
- // Fill the circle, except have both caps still visible
- NumberAnimation {
- target: circularIndicator
- property: "spanAngle"
- from: 20
- to: 345
- duration: 800
- }
-
- // Clear the circle, except for a 20 degree head start. The head start is to
- // avoid an abrupt change in the cap of the indicator arc from an end to a beginning.
- ParallelAnimation {
- NumberAnimation {
- target: circularIndicator
- property: "startAngle"
- from: 0
- to: 360
- duration: 800
- onStopped: circularIndicator.startAngle = 0
- }
- NumberAnimation {
- target: circularIndicator
- property: "spanAngle"
- from: 345
- to: 20
- duration: 800
- }
- }
- }
- }
-}
diff --git a/qml/DemoInfoPopup.qml b/qml/DemoInfoPopup.qml
deleted file mode 100644
index c850221..0000000
--- a/qml/DemoInfoPopup.qml
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Controls 2.2
-
-Rectangle {
- id: demoInfoPopup
- color: viewSettings.backgroundColor
- opacity: 0.9
-
- // Prevent user from interacting with the transparent demo on the background
- MouseArea {
- anchors.fill: parent
- }
-
- function open()
- {
- visible = true;
- }
-
- function close()
- {
- visible = false;
- }
-
- Rectangle {
- id: frame
- color: viewSettings.backgroundColor
- border.color: viewSettings.borderColor
- border.width: 3
- anchors.centerIn: parent
- width: parent.width * 0.5
- height: parent.height * 0.8
-
- Image {
- id: builtWithQtIcon
- anchors.left: parent.left
- anchors.top: parent.top
- anchors.margins: viewSettings.pageMargin
- source: "icons/Built_with_Qt_RGB_logo_white.svg"
- height: parent.height * 0.1
- width: height / sourceSize.height * sourceSize.width
- }
-
- Image {
- anchors.right: parent.right
- anchors.verticalCenter: builtWithQtIcon.verticalCenter
- anchors.margins: viewSettings.pageMargin
- source: "icons/close_icon.svg"
- height: parent.height * 0.1
- width: height / sourceSize.height * sourceSize.width
- MouseArea {
- anchors.fill: parent
- anchors.margins: -viewSettings.pageMargin * 0.5
- onClicked: demoInfoPopup.close()
- }
- }
-
- Text {
- id: infoTitle
- anchors.top: builtWithQtIcon.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: viewSettings.pageMargin
- verticalAlignment: Text.AlignVCenter
- height: builtWithQtIcon.height
- font.pixelSize: height * 0.8
- color: "white"
- font.family: viewSettings.appFont
- font.styleName: "SemiBold"
- text: qsTr("About Current Demo")
- }
-
- Flickable {
- id: flickable
- anchors.top: infoTitle.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- anchors.margins: viewSettings.pageMargin
- contentWidth: tt.width
- contentHeight: tt.height
- flickableDirection: Flickable.VerticalFlick
- clip: true
-
- Text {
- id: tt
- font.family: viewSettings.appFont
- font.styleName: "SemiBold"
- font.pixelSize: infoTitle.font.pixelSize * 0.5
- color: "#bbbbbb"
- text: engine.applicationDescription
- width: frame.width * 0.9
- wrapMode: Text.WordWrap
- }
- }
-
- FlickSlider {
- flickItem: flickable
- anchors.right: frame.right
- width: viewSettings.pageMargin * 0.5
- }
- }
-}
diff --git a/qml/DemoMode.qml b/qml/DemoMode.qml
deleted file mode 100644
index 5199ae3..0000000
--- a/qml/DemoMode.qml
+++ /dev/null
@@ -1,393 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-import AutomationHelper 1.0
-
-Item {
- property var visibleItem
- property var demoHeader
- property var launcherHeader
- property var visibleItemName: visibleItem ? visibleItem.objectName : 0
- property bool demoModeSeleted: globalSettings.demoModeSelected
- property bool demoIsRunning: false
-
- property int demoStepDuration: 2000
- property int applicationWaitDuration: 1000
- property int verticalFlickVelocity: 1000
- property int horizontalFlickVelocity: 1000
-
- onDemoModeSeletedChanged: {
- if (demoModeSeleted) {
- demoStartCounter.restart()
- } else {
- demoStartCounter.stop()
- stopDemos()
- }
- }
-
- /*
- Start the demo sequence. First demo to start depends on the current screen.
- */
- function startDemos() {
- console.log("Start automatic demo mode")
- if (visibleItemName === "settingsView") {
- settingsDemoAnimation.start()
- } else if ((visibleItemName === "launchScreen") || (visibleItemName === "detailView")) {
- switchToSettingScreenAnimation.start()
- } else {
- exitFromRunningDemoAnimation.start()
- }
-
- demoIsRunning = true
- }
-
- /*
- Stop all currently running demos
- */
- function stopDemos() {
- if (demoIsRunning) {
- switchToSettingScreenAnimation.stop()
- settingsDemoAnimation.stop()
- gridViewDemoAnimation.stop()
- graphicsEffectsDemoAnimation.stop()
- qtChartsDemoAnimation.stop()
- switchToDetailViewAnimation.stop()
- detailViewDemoAnimation.stop()
- eBikeViewDemoAnimation.stop()
- demoIsRunning = false
- }
-
- // Postpone restarting
- if (demoModeSeleted) {
- demoStartCounter.restart()
- }
- }
-
- Timer {
- id: demoStartCounter
- interval: globalSettings.demoModeStartupTime * 1000
- repeat: false
- onTriggered: startDemos()
- }
-
- /*
- Cet index of with \a title from the \a applicationList
- */
- function applicationIndex(applicationList, title) {
- var i
- var applicationListModel = applicationList.model
-
- // count and get() do not work on QAbstractItemModel, rowCount and query must be used
- for (i=0; i<applicationListModel.rowCount(); i++) {
- if (applicationListModel.query(i, "name") === title) {
- return i
- }
- }
- return -1
- }
-
- /*
- Click application with \a title from the launcher with \a launcherName
-
- Returns \c true if application launcher was clicked
- */
- function clickApplicationLauncher(launcherName, title) {
- var applicationList = automationHelper.findChildObject(visibleItem, launcherName)
- var index = applicationIndex(applicationList, title)
-
- if (index !== -1) {
- applicationList.currentIndex = index;
- automationHelper.click(applicationList.currentItem)
- return true
- }
- return false
- }
-
- /*
- Flick flickable with objectName \a objName with \a amountHorizontal and \a amountVertical
- */
- function flickUpDown(objName, amountHorizontal, amountVertical) {
- var gridView = automationHelper.findChildObject(visibleItem, objName)
- if (gridView)
- gridView.flick(amountHorizontal, amountVertical)
- else
- console.log("no child " + objName)
- }
-
- AutomationHelper {
- id: automationHelper
- }
-
- // Exit from already running demo
- SequentialAnimation {
- id: exitFromRunningDemoAnimation
- ScriptAction { script: console.log("Exit from running demo") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: automationHelper.clickChildObject(demoHeader, "applicationCloseButton") }
- PauseAnimation { duration: applicationWaitDuration }
-
- // Start next demo
- ScriptAction { script: switchToSettingScreenAnimation.start() }
- }
-
- // Switch to settings screen
- SequentialAnimation {
- id: switchToSettingScreenAnimation
- ScriptAction { script: console.log("Switch to settings screen") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: automationHelper.clickChildObject(launcherHeader, "settingsMenuIcon") }
- PauseAnimation { duration: applicationWaitDuration }
-
- // Start next demo
- ScriptAction { script: settingsDemoAnimation.start() }
- }
-
- // Settings screen
- SequentialAnimation {
- id: settingsDemoAnimation
-
- function clickSettingsItem(title) {
- var i
- var settingsList = automationHelper.findChildObject(visibleItem, "settingsList")
- var settingsModel = settingsList.model
-
- // count + get() can be used on ListModel
- for (i=0; i<settingsModel.count; i++) {
- if (settingsModel.get(i).title === title) {
- settingsList.currentIndex = i
- automationHelper.click(settingsList.currentItem)
- }
- }
- }
-
- ScriptAction { script: console.log("Settings demo") }
- PauseAnimation { duration: applicationWaitDuration }
-
- // Make sure the grid layout is on
- ScriptAction { script: automationHelper.clickChildObject(visibleItem, "gridLayoutButton") }
- PauseAnimation { duration: demoStepDuration }
-
- // Show some settings pages
- ScriptAction { script: settingsDemoAnimation.clickSettingsItem("Network") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: settingsDemoAnimation.clickSettingsItem("Date & Time") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: settingsDemoAnimation.clickSettingsItem("About Qt") }
- PauseAnimation { duration: demoStepDuration }
-
- // Go back to launcher screen and start next demo
- ScriptAction { script: automationHelper.clickChildObject(visibleItem, "settingsBackButton") }
- ScriptAction { script: gridViewDemoAnimation.start() }
- }
-
- // Grid view demo
- SequentialAnimation {
- id: gridViewDemoAnimation
-
- // Flick the grid up and down
- ScriptAction { script: console.log("Grid view demo") }
- PauseAnimation { duration: applicationWaitDuration }
- ScriptAction { script: flickUpDown("launcherGridView", 0, -verticalFlickVelocity) }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: flickUpDown("launcherGridView", 0, verticalFlickVelocity) }
-
- // Start next demo
- ScriptAction { script: graphicsEffectsDemoAnimation.start() }
- }
-
- // Graphics effects demo
- SequentialAnimation {
- id: graphicsEffectsDemoAnimation
-
- function clickGraphicsEffectItem(title) {
- var i
- var effectList = automationHelper.findChildObject(visibleItem, "graphicsEffectsList")
- var effectListModel = effectList.model
-
- // count + get() can be used on ListModel
- for (i=0; i<effectListModel.count; i++) {
- if (effectListModel.get(i).name === title) {
- effectList.currentIndex = i
- automationHelper.click(effectList.currentItem)
- }
- }
- }
-
- // Start the demo application
- ScriptAction { script: console.log("Graphics effects demo") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction {
- script: {
- // If the application does not exist, move on to next demo
- if (!clickApplicationLauncher("launcherGridView", "Graphical Effects")) {
- qtChartsDemoAnimation.start()
- graphicsEffectsDemoAnimation.stop()
- }
- }
- }
- PauseAnimation { duration: applicationWaitDuration }
-
- // Show few graphics effects
- ScriptAction { script: graphicsEffectsDemoAnimation.clickGraphicsEffectItem("Colorize") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: graphicsEffectsDemoAnimation.clickGraphicsEffectItem("Gaussian Blur") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: graphicsEffectsDemoAnimation.clickGraphicsEffectItem("Wave (custom)") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: automationHelper.clickChildObject(demoHeader, "applicationCloseButton") }
-
- // Start next demo
- ScriptAction { script: qtChartsDemoAnimation.start() }
- }
-
- // Qt charts demo
- SequentialAnimation {
- id: qtChartsDemoAnimation
- property var chartsList
-
- // Start the demo application and get the chart list
- ScriptAction { script: console.log("Qt charts demo") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: flickUpDown("launcherGridView", 0, -1.5 * verticalFlickVelocity) }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction {
- script: {
- // If the application does not exist, move on to next demo
- if (!clickApplicationLauncher("launcherGridView", "Qt Charts - Gallery")) {
- switchToDetailViewAnimation.start()
- qtChartsDemoAnimation.stop()
- }
- }
- }
- PauseAnimation { duration: applicationWaitDuration }
- ScriptAction { script: qtChartsDemoAnimation.chartsList = automationHelper.findChildObject(visibleItem, "chartsListView") }
-
- // Flick through some of the charts
- ScriptAction { script: qtChartsDemoAnimation.chartsList.currentIndex = 1 }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: qtChartsDemoAnimation.chartsList.currentIndex = 2 }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: qtChartsDemoAnimation.chartsList.currentIndex = 3 }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: qtChartsDemoAnimation.chartsList.currentIndex = 4 }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: qtChartsDemoAnimation.chartsList.currentIndex = 5 }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: qtChartsDemoAnimation.chartsList.currentIndex = 6 }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: qtChartsDemoAnimation.chartsList.currentIndex = 7 }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: qtChartsDemoAnimation.chartsList.currentIndex = 8 }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: qtChartsDemoAnimation.chartsList.currentIndex = 9 }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: automationHelper.clickChildObject(demoHeader, "applicationCloseButton") }
-
- // Start next demo
- ScriptAction { script: switchToDetailViewAnimation.start() }
- }
-
- // Switch to detail view demo
- SequentialAnimation {
- id: switchToDetailViewAnimation
- ScriptAction { script: console.log("Switch to detail view demo") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: automationHelper.clickChildObject(launcherHeader, "settingsMenuIcon") }
- PauseAnimation { duration: applicationWaitDuration }
- ScriptAction { script: automationHelper.clickChildObject(visibleItem, "detailLayoutButton") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: automationHelper.clickChildObject(visibleItem, "settingsBackButton") }
-
- // Start next demo
- ScriptAction { script: detailViewDemoAnimation.start() }
- }
-
- // Detail view demo
- SequentialAnimation {
- id: detailViewDemoAnimation
-
- // Flick the list left and right
- ScriptAction { script: console.log("Detail view demo") }
- PauseAnimation { duration: applicationWaitDuration }
- ScriptAction { script: flickUpDown("detailListView", -horizontalFlickVelocity, 0) }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: flickUpDown("detailListView", horizontalFlickVelocity, 0) }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: clickApplicationLauncher("detailListView", "Media Player") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: clickApplicationLauncher("detailListView", "Quick Controls 2") }
-
- // Start next demo
- ScriptAction { script: eBikeViewDemoAnimation.start() }
- }
-
- // E-Bike view demo
- SequentialAnimation {
- id: eBikeViewDemoAnimation
-
- // Start the demo application
- ScriptAction { script: console.log("E-Bike demo") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction {
- script: {
- // If the application does not exist, move on to next demo
- if (!clickApplicationLauncher("detailListView", "E-Bike")) {
- startDemos()
- eBikeViewDemoAnimation.stop()
- }
- }
- }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: automationHelper.clickChildObject(visibleItem, "detailStartButton") }
- PauseAnimation { duration: 3 * applicationWaitDuration } // E-Bike is slower to start than other demos
-
- // Turn on lights
- ScriptAction { script: automationHelper.clickChildObject(visibleItem, "ebikeLightsButton") }
- PauseAnimation { duration: demoStepDuration }
-
- // Go to navigation view and come back
- ScriptAction { script: automationHelper.clickChildObject(visibleItem, "ebikeNaviButton") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: automationHelper.clickChildObject(visibleItem, "ebikeSpeedView") }
- PauseAnimation { duration: demoStepDuration }
-
- // Go to stats view and come back
- ScriptAction { script: automationHelper.clickChildObject(visibleItem, "ebikeStatsButton") }
- PauseAnimation { duration: demoStepDuration }
- ScriptAction { script: automationHelper.clickChildObject(visibleItem, "ebikeSpeedView") }
- PauseAnimation { duration: 5*demoStepDuration }
-
- // Go back to main view
- ScriptAction { script: automationHelper.clickChildObject(demoHeader, "applicationCloseButton") }
-
- // Start demos again
- PauseAnimation { duration: 2 * demoStepDuration }
- ScriptAction { script: startDemos() }
- }
-}
diff --git a/qml/DetailView.qml b/qml/DetailView.qml
deleted file mode 100644
index cd39e9d..0000000
--- a/qml/DetailView.qml
+++ /dev/null
@@ -1,166 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Controls 2.1
-import QtDeviceUtilities.QtButtonImageProvider 1.0
-
-Item {
- id: detailRoot
- anchors.fill: parent
-
- Item {
- id: detailInformation
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: listHolder.top
- anchors.margins: viewSettings.pageMargin
-
- Image {
- id: largeImg
- anchors.right: parent.right
- height: parent.height
- width: height / sourceSize.height * sourceSize.width
- source: ""
- }
-
- Flickable {
- id: detailFlickable
- anchors.left: parent.left
- anchors.right: largeImg.left
- anchors.top: parent.top
- anchors.bottom: startButton.top
- anchors.bottomMargin: viewSettings.pageMargin * 0.5
- anchors.rightMargin: viewSettings.pageMargin
- contentHeight: descriptionHolder.height
- contentWidth: width
- clip: true
-
- Column {
- id: descriptionHolder
- width: parent.width
- spacing: viewSettings.pageMargin * 0.5
-
- Text {
- id: descriptionTitle
- font.pixelSize: detailInformation.height * 0.11
- width: descriptionHolder.width
- text: "Demo Title"
- color: "white"
- font.family: viewSettings.appFont
- font.styleName: "SemiBold"
- wrapMode: Text.WordWrap
- }
-
- Rectangle {
- id: btmLine
- width: parent.width * 0.5
- height: 2
- }
-
- Text {
- id: descriptionText
- anchors.margins: viewSettings.pageMargin * 0.5
- font.pixelSize: detailInformation.height * 0.05
- font.family: viewSettings.appFont
- width: descriptionHolder.width
- wrapMode: Text.WordWrap
- color: "white"
- elide: Text.ElideRight
- }
- }
- }
-
- FlickSlider {
- flickItem: detailFlickable
- anchors.right: largeImg.left
- anchors.rightMargin: viewSettings.pageMargin * 0.35
- }
-
- QtButton {
- id: startButton
- objectName: "detailStartButton"
- height: detailInformation.height * 0.14
- width: height * 3
- anchors.left: parent.left
- anchors.bottom: parent.bottom
- anchors.margins: viewSettings.pageMargin * 0.5
- text: qsTr("START")
- onClicked: root.launchApplication(startButton.loc, startButton.main, startButton.name, startButton.desc)
- property string loc
- property string main
- property string name
- property string desc
- }
- }
-
- Rectangle {
- id: listHolder
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- height: parent.height * 0.35
- color: "black"
-
- ListView {
- id: thumbList
- objectName: "detailListView"
- anchors.fill: parent
- anchors.margins: viewSettings.pageMargin * 0.5
- orientation: ListView.Horizontal
- model: applicationsModel
-
- delegate: DetailViewIcon {
- id: iconRoot2
- height: thumbList.height
- width: height
- isSelected: thumbList.currentIndex == index
-
- onClicked: {
- descriptionTitle.text = name
- descriptionText.text = description
- largeImg.source = "image://QtImage/" + icon
-
- startButton.loc = location
- startButton.main = mainFile
- startButton.name = name
- startButton.desc = description
-
- thumbList.currentIndex = index
- }
- }
- }
-
- FlickSlider {
- flickItem: thumbList
- anchors.bottom: listHolder.bottom
- isVertical: false
- }
- }
-}
diff --git a/qml/DetailViewIcon.qml b/qml/DetailViewIcon.qml
deleted file mode 100644
index bcfa632..0000000
--- a/qml/DetailViewIcon.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-ApplicationIcon {
-
- Image {
- id: selectedItem
- anchors.fill: preview
- source: "image://QtImageMask/"
- sourceSize: Qt.size(width, height)
- visible: isSelected
- }
-
- Text {
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: viewSettings.pageMargin
- height: parent.height * 0.2
- font.pixelSize: parent.height * 0.08
- text: name
- font.family: viewSettings.appFont
- font.styleName: "SemiBold"
- color: "white"
- wrapMode: Text.Wrap
- visible: highlight && !isSelected
- }
-
- Component.onCompleted: {
- if (index == 0)
- clicked(location, mainFile, name, description)
- }
-}
diff --git a/qml/FlickSlider.qml b/qml/FlickSlider.qml
deleted file mode 100644
index 5db0096..0000000
--- a/qml/FlickSlider.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-// QTBUG-50992, using customized ScrollBar inside Loader does not work, implement with rectangle
-Rectangle {
- property var flickItem
- property bool isVertical: true
-
- color: viewSettings.scrollBarColor
- anchors.margins: viewSettings.pageMargin * 0.375
- height: isVertical ? flickItem.height * 0.3 : viewSettings.pageMargin * 0.25
- width: isVertical ? viewSettings.pageMargin * 0.25 : flickItem.width * 0.2
-
- // How much (0...1) the view area covers from the content height/width
- property real visibilityRatio: isVertical ? flickItem.visibleArea.heightRatio : flickItem.visibleArea.widthRatio
-
- // How many pixels the slider can move in the view area
- property real moveSize: isVertical ? flickItem.height - height : flickItem.width - width
-
- // Coefficient between x/y position (0...1) and slider move pixels
- property real slideCoefficient: (visibilityRatio < 1) ? (moveSize)/(1 - visibilityRatio) : 1
-
- // Slider is only visible if view area is smaller than the content
- visible: (visibilityRatio < 1)
-
- // Actual calculation of the slider position
- x: isVertical ? 0 : slideCoefficient * flickItem.visibleArea.xPosition + flickItem.x
- y: isVertical ? slideCoefficient * flickItem.visibleArea.yPosition + flickItem.y : 0
-}
diff --git a/qml/GlobalIndicator.qml b/qml/GlobalIndicator.qml
deleted file mode 100644
index 271aae4..0000000
--- a/qml/GlobalIndicator.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.4
-
-Item {
- id: fps
- property bool enabled
- property alias text: globalIndicatorLabel.text
-
- opacity: enabled ? 1 : 0
- Behavior on opacity { NumberAnimation { duration: 500 } }
-
- anchors.bottom: parent.bottom;
- anchors.left: parent.left;
- width: globalIndicatorLabel.width
- height: globalIndicatorLabel.height
-
- Rectangle {
- color: "black"
- opacity: 0.5
- anchors.fill: globalIndicatorLabel
- }
-
- Text {
- id: globalIndicatorLabel;
- color: "white"
- font.pointSize: 18
- }
-}
diff --git a/qml/GridViewIcon.qml b/qml/GridViewIcon.qml
deleted file mode 100644
index 94e0136..0000000
--- a/qml/GridViewIcon.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-ApplicationIcon {
-
- hoverSource: "image://QtImageMask/hover"
- Text{
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: viewSettings.pageMargin
- height: parent.height * 0.2
- font.pixelSize: parent.height * 0.08
- text: name
- font.family: viewSettings.appFont
- font.styleName: "SemiBold"
- color: highlight ? "white" : "black"
- wrapMode: Text.Wrap
- }
-}
diff --git a/qml/HandwritingModeButton.qml b/qml/HandwritingModeButton.qml
deleted file mode 100644
index 61645e7..0000000
--- a/qml/HandwritingModeButton.qml
+++ /dev/null
@@ -1,164 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Item {
- id: handwritingModeButton
- state: "unavailable"
- property bool floating
- property bool flipable
- readonly property real __minWidthHeight: Math.min(width, height)
-
- signal clicked()
- signal doubleClicked()
-
- Flipable {
- id: flipableImage
- anchors.fill: parent
-
- property bool flipped
-
- front: Image {
- sourceSize.width: handwritingModeButton.__minWidthHeight
- sourceSize.height: handwritingModeButton.__minWidthHeight
- smooth: false
- source: "qrc:/qml/icons/FloatingButton_Unavailable.svg"
- }
-
- back: Image {
- id: buttonImage
- sourceSize.width: handwritingModeButton.__minWidthHeight
- sourceSize.height: handwritingModeButton.__minWidthHeight
- smooth: false
- source: "qrc:/qml/icons/FloatingButton_Available.svg"
- }
-
- states: State {
- PropertyChanges { target: rotation; angle: 180 }
- when: flipableImage.flipped
- }
-
- transform: Rotation {
- id: rotation
- origin.x: flipableImage.width / 2
- origin.y: flipableImage.height / 2
- axis { x: 0; y: 1; z: 0 }
- angle: 0
- }
-
- transitions: Transition {
- enabled: handwritingModeButton.flipable
- NumberAnimation { target: rotation; property: "angle"; duration: 400 }
- }
- }
-
- states: [
- State {
- name: "available"
- PropertyChanges { target: flipableImage; flipped: true }
- },
- State {
- name: "active"
- PropertyChanges { target: flipableImage; flipped: true }
- PropertyChanges { target: buttonImage; source: "qrc:/qml/icons/FloatingButton_Active.svg" }
- }
- ]
-
- function snapHorizontal() {
- if (!floating)
- return
- if (mouseArea.drag.maximumX > mouseArea.drag.minimumX) {
- if (x + 20 >= mouseArea.drag.maximumX) {
- anchors.left = undefined
- anchors.right = parent.right
- } else if (x - 20 <= mouseArea.drag.minimumX) {
- anchors.right = undefined
- anchors.left = parent.left
- }
- }
- }
-
- function snapVertical() {
- if (!floating)
- return
- if (mouseArea.drag.maximumY > mouseArea.drag.minimumY) {
- if (y + 20 >= mouseArea.drag.maximumY) {
- anchors.top = undefined
- anchors.bottom = parent.bottom
- } else if (y - 20 <= mouseArea.drag.minimumY) {
- anchors.bottom = undefined
- anchors.top = parent.top
- }
- }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- drag {
- target: handwritingModeButton.floating ? handwritingModeButton : undefined
- axis: Drag.XAxis | Drag.YAxis
- minimumX: 0
- maximumX: handwritingModeButton.parent.width - handwritingModeButton.width
- onMaximumXChanged: !mouseArea.drag.active && handwritingModeButton.snapHorizontal()
- minimumY: 0
- maximumY: handwritingModeButton.parent.height - handwritingModeButton.height
- onMaximumYChanged: !mouseArea.drag.active && handwritingModeButton.snapVertical()
- }
- onPressed: {
- if (!handwritingModeButton.floating)
- return
- handwritingModeButton.anchors.left = undefined
- handwritingModeButton.anchors.top = undefined
- handwritingModeButton.anchors.right = undefined
- handwritingModeButton.anchors.bottom = undefined
- }
- onReleased: {
- handwritingModeButton.snapHorizontal()
- handwritingModeButton.snapVertical()
- }
- onClicked: {
- handwritingModeButton.snapHorizontal()
- handwritingModeButton.snapVertical()
- clickTimer.restart()
- }
- onDoubleClicked: {
- clickTimer.stop()
- handwritingModeButton.snapHorizontal()
- handwritingModeButton.snapVertical()
- handwritingModeButton.doubleClicked()
- }
- Timer {
- id: clickTimer
- interval: Qt.styleHints ? Qt.styleHints.mouseDoubleClickInterval / 3 : 0
- repeat: false
- onTriggered: handwritingModeButton.clicked()
- }
- }
-}
diff --git a/qml/Header.qml b/qml/Header.qml
deleted file mode 100644
index f9cf920..0000000
--- a/qml/Header.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Item {
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: viewSettings.pageMargin
- height: viewSettings.headerHeight
-
- signal menuClicked()
-
- Image {
- objectName: "settingsMenuIcon"
- anchors.left: parent.left
- anchors.top: parent.top
- source: "icons/settingsmenu_launcher_icon.svg"
- height: parent.height * 0.7
- width: height / sourceSize.height * sourceSize.width
-
- MouseArea {
- anchors.fill: parent
- anchors.margins: -parent.height*0.2
- onClicked: menuClicked()
- }
- }
-
- Image {
- anchors.right: parent.right
- anchors.top: parent.top
- source: "icons/qt_logo_green_rgb.svg"
- height: parent.height
- width: height / sourceSize.height * sourceSize.width
- }
-}
diff --git a/qml/HighlightShader.qml b/qml/HighlightShader.qml
deleted file mode 100644
index 7c7d662..0000000
--- a/qml/HighlightShader.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-ShaderEffect {
- id: root
-
- property variant source;
-
- property alias interval: shaderTrigger.interval
- property bool running: true;
-
- property real t: -1;
- NumberAnimation on t { id: shaderAnimation; from: -2; to: 3; duration: 2000; loops: 1; running: false }
-
- Timer {
- id: shaderTrigger
- repeat: true
- interval: 10000
- running: visible && root.running;
- onTriggered: shaderAnimation.running = true
- }
-
- fragmentShader:
- "
- uniform lowp sampler2D source;
- uniform highp float t;
- uniform lowp float qt_Opacity;
- varying highp vec2 qt_TexCoord0;
- void main() {
- lowp vec4 p = texture2D(source, qt_TexCoord0) * qt_Opacity;
- highp float l = max(0.0, 1.0 - length(qt_TexCoord0.x + qt_TexCoord0.y - t));
- gl_FragColor = p + pow(l, 3.0) * p.w;
- }
- "
-}
diff --git a/qml/ImageTextDelegate.qml b/qml/ImageTextDelegate.qml
deleted file mode 100644
index 4f9353d..0000000
--- a/qml/ImageTextDelegate.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Item {
- id: itt
- property alias sourceSelected: img.source
- property alias sourceDisabled: img2.source
- property alias text: tt.text
- property bool selected
-
- signal clicked()
-
- Image {
- id: img
- width: parent.width
- height: width
- sourceSize: Qt.size(width, height)
- visible: selected
- }
-
- Image {
- id: img2
- width: parent.width
- height: width
- sourceSize: Qt.size(width, height)
- visible: !selected
- }
-
- Text {
- id: tt
- width: parent.width
- height: parent.height * 0.3
- anchors.top: img.bottom
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignTop
- fontSizeMode: Text.Fit
- minimumPixelSize: 1
- font.pixelSize: height
- color: selected ? "white" : "#848895"
- font.family: appFont
- }
- MouseArea {
- anchors.fill: parent
- onClicked: itt.clicked()
- }
-}
diff --git a/qml/LaunchScreen.qml b/qml/LaunchScreen.qml
deleted file mode 100644
index 70e9c71..0000000
--- a/qml/LaunchScreen.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-import QtQuick.Controls 2.3
-
-Item {
- id: gridroot
- anchors.fill: parent
-
- GridView {
- id: grid
- objectName: "launcherGridView"
- anchors.fill: parent
- anchors.margins: viewSettings.pageMargin * 0.5
- anchors.topMargin: viewSettings.pageMargin
- cacheBuffer: 10000
-
- cellWidth: width / 3
- cellHeight: cellWidth
- clip: true
- model: applicationsModel;
-
- delegate: GridViewIcon {
- id: iconRoot2;
- height: grid.cellHeight
- width: grid.cellWidth
- onClicked: root.launchApplication(sLocation, sMainFile, sName, sDescription)
- }
- }
-
- FlickSlider {
- flickItem: grid
- anchors.right: parent.right
- }
-}
diff --git a/qml/LauncherCheckBox.qml b/qml/LauncherCheckBox.qml
deleted file mode 100644
index bf81b80..0000000
--- a/qml/LauncherCheckBox.qml
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-
-CheckBox {
- id: checkBox
- text: qsTr("Flip screen")
-
- indicator: Rectangle {
- implicitHeight: 26
- implicitWidth: 26
- height: pluginMain.buttonHeight
- width: height
- x: checkBox.leftPadding
- y: parent.height / 2 - height / 2
- color: "transparent"
- border.color: "#9d9faa"
- border.width: 2
- radius: 4
-
- Image {
- anchors.centerIn: parent
- sourceSize.width: parent.width
- sourceSize.height: parent.height
- width: parent.width * 0.9
- height: width
- source: "icons/checkmark.svg"
- visible: checkBox.checked
- antialiasing: true
- smooth: true
- fillMode: Image.PreserveAspectFit
- }
- }
-
- contentItem: Text {
- text: checkBox.text
- font.family: appFont
- font.pixelSize: pluginMain.subTitleFontSize
- opacity: enabled ? 1.0 : 0.3
- color: checkBox.down ? "#17a81a" : "#41cd52"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- leftPadding: checkBox.indicator.width + checkBox.spacing
- height: pluginMain.fieldTextHeight
- font.styleName: checkBox.checked ? "Bold" : "Regular"
- }
-}
diff --git a/qml/LayoutSettings.qml b/qml/LayoutSettings.qml
deleted file mode 100644
index 09606aa..0000000
--- a/qml/LayoutSettings.qml
+++ /dev/null
@@ -1,198 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.9
-import QtQuick.Controls 2.2
-
-Item {
- id: root
- property string title: qsTr("Display Settings")
- property int titleWidth: width * 0.382
- property int margin: root.width * 0.05
- property int buttonSize: height * 0.15
-
- property bool gridSelected: globalSettings.gridSelected
- property bool mouseSelected: globalSettings.mouseSelected
-
- onGridSelectedChanged: updateTimer.start()
- onMouseSelectedChanged: updateTimer.start();
-
- Timer {
- id: updateTimer
- interval: 10
- onTriggered: {
- globalSettings.gridSelected = root.gridSelected
- globalSettings.mouseSelected = root.mouseSelected
- }
- }
-
- Column {
- id: column
- spacing: root.margin * 0.2
-
- Text {
- color: "white"
- text: qsTr("Layout")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- }
-
- Row {
- id: layoutRow
- spacing: root.margin
-
- ImageTextDelegate {
- objectName: "gridLayoutButton"
- height: root.buttonSize
- width: height
- onClicked: root.gridSelected = true
- sourceSelected: "icons/grid_icon.svg"
- sourceDisabled: "icons/grid_icon_disabled.svg"
- selected: root.gridSelected
- text: qsTr("GRID")
- }
-
- ImageTextDelegate {
- objectName: "detailLayoutButton"
- height: root.buttonSize
- width: height
- onClicked: root.gridSelected = false
- sourceSelected: "icons/detail_icon.svg"
- sourceDisabled: "icons/detail_icon_disabled.svg"
- selected: !root.gridSelected
- text: qsTr("DETAIL")
- }
- }
-
- Item {
- height: root.margin
- width: 1
- }
-
- Text {
- color: "white"
- text: qsTr("Input")
- font.pixelSize: pluginMain.subTitleFontSize
- font.family: appFont
- }
-
- Row {
- id: inputRow
- spacing: root.margin
-
- ImageTextDelegate {
- height: root.buttonSize
- width: height
- onClicked: root.mouseSelected = true
- sourceSelected: "icons/mouse_icon.svg"
- sourceDisabled: "icons/mouse_icon_disabled.svg"
- selected: root.mouseSelected
- text: qsTr("MOUSE")
- }
- ImageTextDelegate {
- id: detailButton
- height: root.buttonSize
- width: height
- onClicked: root.mouseSelected = false
- sourceSelected: "icons/touch_icon.svg"
- sourceDisabled: "icons/touch_icon_disabled.svg"
- selected: !root.mouseSelected
- text: qsTr("TOUCH")
- }
- }
-
- Item {
- height: root.margin
- width: 1
- }
-
- Row {
- spacing: root.margin
-
- LauncherCheckBox {
- id: demoModeCheckBox
- text: qsTr("Demo mode")
- checked: globalSettings.demoModeSelected
-
- onCheckedChanged: {
- globalSettings.demoModeSelected = checked
- }
- }
-
- LauncherCheckBox {
- id: flipScreenCheckBox
- text: qsTr("Flip screen")
- checked: globalSettings.rotationSelected
-
- onCheckedChanged: {
- globalSettings.rotationSelected = checked
- }
- }
- }
-
- Row {
- spacing: root.margin * 0.2
- Text {
- height: pluginMain.buttonHeight
- text: qsTr("Demo startup time:")
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- verticalAlignment: Text.AlignVCenter
- }
-
- TextField {
- id: demoStartupTime
- rightPadding: 6
- bottomPadding: 6
- topPadding: 6
- height: pluginMain.buttonHeight
- width: root.width * 0.1
- color: "black"
- font.pixelSize: pluginMain.valueFontSize
- text: globalSettings.demoModeStartupTime
- horizontalAlignment: Text.AlignRight
- inputMethodHints: Qt.ImhDigitsOnly
- background: Rectangle {
- border.color: demoStartupTime.focus ? viewSettings.buttonGreenColor : "transparent"
- border.width: parent.width * 0.05
- }
- onAccepted: globalSettings.demoModeStartupTime = text
- }
-
- Text {
- height: pluginMain.buttonHeight
- text: qsTr("s")
- color: "white"
- font.pixelSize: pluginMain.valueFontSize
- font.family: appFont
- verticalAlignment: Text.AlignVCenter
- }
- }
- }
-}
diff --git a/qml/Main.qml b/qml/Main.qml
deleted file mode 100644
index 7764363..0000000
--- a/qml/Main.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQml 2.2
-import QtQuick 2.6
-import QtQuick.Window 2.2
-
-Window {
- id: window
-
- visible: true
- width: Screen.desktopAvailableWidth
- height: Screen.desktopAvailableHeight
-
- color: viewSettings.backgroundColor
- property alias appFont: viewSettings.appFont
- contentOrientation: Screen.desktopAvailableHeight > Screen.desktopAvailableWidth ?
- (globalSettings.rotationSelected ? Qt.InvertedLandscapeOrientation : Qt.LandscapeOrientation) :
- (globalSettings.rotationSelected ? Qt.InvertedPortraitOrientation : Qt.PortraitOrientation)
-
- ViewSettings {
- id: viewSettings
- }
-
- Loader {
- id: mainWindowLoader
- anchors.fill: parent
- active: false
- source: "qrc:///qml/MainWindow.qml"
- asynchronous: true
- onLoaded: {
- item.visible = true;
- splashScreenLoader.item.visible = false;
- splashScreenLoader.source = "";
- }
- }
-
- Loader {
- id: splashScreenLoader
- anchors.fill: parent
- sourceComponent: Item {
- anchors.fill: parent
-
- Image {
- anchors.fill: parent
- source: "images/backImg.jpg"
- fillMode: Image.PreserveAspectCrop
- }
-
- BootScreen {
- anchors.fill: parent
- applicationName: qsTr("Qt Launcher")
- }
- }
- onLoaded: {
- mainWindowLoader.active = true;
- }
- }
-}
diff --git a/qml/MainWindow.qml b/qml/MainWindow.qml
deleted file mode 100644
index 686dd87..0000000
--- a/qml/MainWindow.qml
+++ /dev/null
@@ -1,378 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.4
-import QtQuick.Window 2.2
-import QtQuick.VirtualKeyboard 2.1
-import QtDeviceUtilities.SettingsUI 1.0
-import com.qtcompany.B2QtLauncher 1.0
-
-Item {
- id: mainWindow
- anchors.fill: parent
- Component {
- id: emptyComponent
- Item {
- objectName: "empty"
- }
- }
-
- Component {
- id: gridComponent
- LaunchScreen {
- objectName: "launchScreen"
- id: launchScreen
- }
- }
-
- Component {
- id: detailComponent
- DetailView {
- objectName: "detailView"
- id: detailView
- }
- }
-
- Component {
- id: settingsUIComponent
- SettingsUI {
- id: settingsUI
- objectName: "settingsView"
- anchors.fill: parent
- model: "settings.xml"
- margin: viewSettings.pageMargin
- onClosed: root.closeApplication()
- }
- }
-
- LauncherApplicationsModel {
- id: applicationsModel
- onReady: engine.markApplicationsModelReady();
- Component.onCompleted: {
- //Set the directory to parse for apps
- initialize(applicationSettings.appsRoot);
- }
- }
-
- LauncherEngine {
- id: engine
- fpsEnabled: applicationSettings.isShowFPSEnabled
- }
-
- Item {
- id: root
- anchors.centerIn: parent
- property bool portraitMode: Screen.desktopAvailableHeight > Screen.desktopAvailableWidth ? true : false
- property bool demoHeaderEnabled: applicationLoader.sourceComponent !== settingsUIComponent
- property int rotateAmount: globalSettings.rotationSelected ? 180 : 0
- rotation: portraitMode ? 90 + rotateAmount : 0 + rotateAmount
- width: portraitMode ? window.height : window.width
- height: portraitMode ? window.width : window.height
-
- function closeApplication()
- {
- engine.closeApplication()
- applicationLoader.setSource("")
- applicationLoader.sourceComponent = emptyComponent
- }
-
- function launchApplication(loc, mainFile, name, desc)
- {
- engine.launchApplication(loc, mainFile, name, desc)
- applicationLoader.source = engine.applicationMain
- }
-
- function launchSettings()
- {
- engine.state = "app-launching"
- applicationLoader.sourceComponent = settingsUIComponent
- }
-
- Background {}
-
- Header {
- id: header
- enabled: engine.state == "running"
- onMenuClicked: root.launchSettings()
- }
-
- Loader {
- id: contentLoader
- anchors.fill: parent
- anchors.topMargin: header.height + viewSettings.pageMargin
- sourceComponent: globalSettings.gridSelected ? gridComponent : detailComponent
- enabled: engine.state != "settings"
- }
-
- states: [
- State {
- name: "running"
- PropertyChanges { target: applicationLoader; opacity: 0; }
- PropertyChanges { target: contentLoader; opacity: 1 }
- PropertyChanges { target: header; opacity: 1 }
- PropertyChanges { target: bootScreenLoader; opacity: 0 }
- },
- State {
- name: "app-launching"
- PropertyChanges { target: header; opacity: 0 }
- PropertyChanges { target: bootScreenLoader; opacity: 1 }
- },
- State {
- name: "app-running"
- PropertyChanges { target: applicationLoader; opacity: 1 }
- PropertyChanges { target: contentLoader; opacity: 0 }
- PropertyChanges { target: header; opacity: 0 }
- PropertyChanges { target: bootScreenLoader; opacity: 0 }
- },
- State {
- name: "settings"
- PropertyChanges { target: applicationLoader; opacity: 1 }
- PropertyChanges { target: contentLoader; opacity: 1 }
- PropertyChanges { target: header; opacity: 0 }
- PropertyChanges { target: bootScreenLoader; opacity: 0 }
- },
- State {
- name: "app-closing"
- PropertyChanges { target: applicationLoader; opacity: 0; source: "" }
- PropertyChanges { target: contentLoader; opacity: 0 }
- PropertyChanges { target: header; opacity: 0 }
- PropertyChanges { target: bootScreenLoader; opacity: 0 }
- }
- ]
-
- state: engine.state
-
- Timer {
- id: failedAppLaunchTrigger;
- interval: viewSettings.stateDelay;
- running: false
- repeat: false
- onTriggered: root.closeApplication()
- }
-
- Loader {
- id: applicationLoader
- objectName: "applicationLoader"
- opacity: 0;
- visible: opacity > 0.1
- anchors.fill: parent
-
- asynchronous: true;
- onStatusChanged: {
- if (status == Loader.Error)
- failedAppLaunchTrigger.start();
- }
- onLoaded: {
- if (applicationLoader.item.objectName == "settingsView")
- engine.state = "settings"
- else if (applicationLoader.item.objectName !== "empty")
- engine.state = "app-running";
- }
- Behavior on anchors.topMargin {NumberAnimation{ duration: 200 } }
- }
-
- DemoHeader {
- id: demoHeader
- visible: applicationLoader.visible && root.demoHeaderEnabled
- onInfoClicked: demoInfoPopup.open()
- onCloseClicked: root.closeApplication();
- }
- Loader {
- id: bootScreenLoader
- visible: opacity > 0
- anchors.fill: parent
- sourceComponent: BootScreen {
- applicationName: engine.applicationName
- }
- }
-
- DemoInfoPopup {
- id: demoInfoPopup
- visible: false
- height: mainWindow.height
- width: mainWindow.width
- z: demoHeader.z + 1
- }
-
- /* Handwriting input panel for full screen handwriting input.
-
- This component is an optional add-on for the InputPanel component, that
- is, its use does not affect the operation of the InputPanel component,
- but it also can not be used as a standalone component.
-
- The handwriting input panel is positioned to cover the entire area of
- application. The panel itself is transparent, but once it is active the
- user can draw handwriting on it.
- */
- HandwritingInputPanel {
- z: 79
- id: handwritingInputPanel
- anchors.fill: parent
- inputPanel: inputPanel
- Rectangle {
- z: -1
- anchors.fill: parent
- color: "black"
- opacity: 0.10
- }
- }
-
- /* Container area for the handwriting mode button.
-
- Handwriting mode button can be moved freely within the container area.
- In this example, a single click changes the handwriting mode and a
- double-click changes the availability of the full screen handwriting input.
- */
- Item {
- z: 89
- visible: handwritingInputPanel.enabled && Qt.inputMethod.visible
- anchors { left: parent.left; top: parent.top; right: parent.right; bottom: inputPanel.top; }
- HandwritingModeButton {
- id: handwritingModeButton
- anchors.top: parent.top
- anchors.right: parent.right
- anchors.margins: 10
- floating: true
- flipable: true
- width: 76
- height: width
- state: handwritingInputPanel.state
- onClicked: handwritingInputPanel.active = !handwritingInputPanel.active
- onDoubleClicked: handwritingInputPanel.available = !handwritingInputPanel.available
- }
- onVisibleChanged: console.log("hw visible: "+visible)
- Component.onCompleted: console.log("input visible " +visible)
- }
-
- /* Keyboard input panel.
- The keyboard is anchored to the bottom of the application.
- */
- InputPanel {
- id: inputPanel
- z: 99
- x: root.portraitMode ?
- (globalSettings.rotationSelected ?
- inputPanel.height + root.height : -inputPanel.height - root.height) :
- 0
- y: root.portraitMode ?
- (globalSettings.rotationSelected ? inputPanel.height : inputPanel.height) :
- (globalSettings.rotationSelected ? -root.height : root.height)
- width: root.portraitMode ? window.height : window.width
- rotation: root.rotation
- property real alignmentWorkaround: height * 0.1
- onActiveChanged: {
- if (!active)
- applicationLoader.anchors.topMargin = 0;
- else {
- autoScroller.open();
- }
- }
- states: State {
- name: "visible"
- /* The visibility of the InputPanel can be bound to the Qt.inputMethod.visible property,
- but then the handwriting input panel and the keyboard input panel can be visible
- at the same time. Here the visibility is bound to InputPanel.active property instead,
- which allows the handwriting panel to control the visibility when necessary.
- */
- when: inputPanel.active
- PropertyChanges {
- target: inputPanel
- x: root.portraitMode ?
- (globalSettings.rotationSelected ?
- root.height - inputPanel.height * 2 - inputPanel.alignmentWorkaround :
- -inputPanel.height - inputPanel.alignmentWorkaround) :
- 0
- y: root.portraitMode ?
- inputPanel.height + inputPanel.alignmentWorkaround :
- (globalSettings.rotationSelected ? 0 : root.height - inputPanel.height)
- }
- }
-
- transitions: Transition {
- from: ""
- to: "visible"
- reversible: true
- ParallelAnimation {
- NumberAnimation {
- properties: "x"
- duration: 250
- easing.type: Easing.InOutQuad
- }
- NumberAnimation {
- properties: "y"
- duration: 250
- easing.type: Easing.InOutQuad
- }
- }
- }
- AutoScroller {
- id: autoScroller
- }
- }
-
- GlobalIndicator {
- id: fps
- enabled: engine.fpsEnabled
- text: "FPS: " + engine.fps
- }
-
- GlobalIndicator {
- id: demoModeIndicator
- enabled: demoMode.demoIsRunning
- text: qsTr("DEMO MODE - Tap screen to use")
- anchors.bottom: fps.enabled ? fps.top : parent.bottom
- }
- }
-
- DemoMode {
- id: demoMode
- demoHeader: demoHeader
- launcherHeader: header
- visibleItem: (applicationLoader.item && (applicationLoader.item.objectName !== "empty")) ?
- applicationLoader.item : contentLoader.item
- }
-
- // MouseArea for capturing mouse clicks/presses
- MouseArea {
- anchors.fill: parent
- propagateComposedEvents: true
-
- // Press or click
- function pressedOrClicked(mouse) {
- if (mouse.source === Qt.MouseEventSynthesizedByApplication) {
- mouse.accepted = false
- return
- }
- mouse.accepted = demoMode.demoIsRunning
- demoMode.stopDemos()
- }
-
- onClicked: pressedOrClicked(mouse)
- onPressed: pressedOrClicked(mouse)
- }
-}
diff --git a/qml/ViewSettings.qml b/qml/ViewSettings.qml
deleted file mode 100644
index 82f4241..0000000
--- a/qml/ViewSettings.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Item {
- id: viewSettings
-
- property real pageMargin: 0.03 * Math.min(window.width, window.height)
- property real headerHeight: 3 * pageMargin
- property real spacing: pageMargin * 0.5
- property real demoHeaderHeight: 2.5 * pageMargin
- property string appFont: "TitilliumWeb"
- property int stateDelay: 200;
- property int headerAutoHideDelay: 3000
- property string backgroundColor: "#09102b"
- property string borderColor: "#9d9faa"
- property string buttonGreenColor: "#41cd52"
- property string buttonGrayColor: "#9d9faa"
- property string buttonActiveColor: "#216729"
- property string loaderBackgroundColor: "#848895"
- property string loaderForegroundColor: "#41cd52"
- property string scrollBarColor: "#41cd52"
-}
diff --git a/qml/fonts/Montserrat-Bold.ttf b/qml/fonts/Montserrat-Bold.ttf
deleted file mode 100644
index 8e9a5f3..0000000
--- a/qml/fonts/Montserrat-Bold.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/Montserrat-Light.ttf b/qml/fonts/Montserrat-Light.ttf
deleted file mode 100644
index e66dc5b..0000000
--- a/qml/fonts/Montserrat-Light.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/Montserrat-Medium.ttf b/qml/fonts/Montserrat-Medium.ttf
deleted file mode 100644
index 88d70b8..0000000
--- a/qml/fonts/Montserrat-Medium.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/Montserrat-Regular.ttf b/qml/fonts/Montserrat-Regular.ttf
deleted file mode 100644
index 626355a..0000000
--- a/qml/fonts/Montserrat-Regular.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/Teko-Bold.ttf b/qml/fonts/Teko-Bold.ttf
deleted file mode 100644
index d061824..0000000
--- a/qml/fonts/Teko-Bold.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/Teko-Light.ttf b/qml/fonts/Teko-Light.ttf
deleted file mode 100644
index ec5194a..0000000
--- a/qml/fonts/Teko-Light.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/Teko-Medium.ttf b/qml/fonts/Teko-Medium.ttf
deleted file mode 100644
index cc38086..0000000
--- a/qml/fonts/Teko-Medium.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/Teko-Regular.ttf b/qml/fonts/Teko-Regular.ttf
deleted file mode 100644
index 3161e63..0000000
--- a/qml/fonts/Teko-Regular.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-Black.ttf b/qml/fonts/TitilliumWeb-Black.ttf
deleted file mode 100644
index fc5c4b5..0000000
--- a/qml/fonts/TitilliumWeb-Black.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-Bold.ttf b/qml/fonts/TitilliumWeb-Bold.ttf
deleted file mode 100644
index 0af0fe7..0000000
--- a/qml/fonts/TitilliumWeb-Bold.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-BoldItalic.ttf b/qml/fonts/TitilliumWeb-BoldItalic.ttf
deleted file mode 100644
index 77425ea..0000000
--- a/qml/fonts/TitilliumWeb-BoldItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-ExtraLight.ttf b/qml/fonts/TitilliumWeb-ExtraLight.ttf
deleted file mode 100644
index 2b506ef..0000000
--- a/qml/fonts/TitilliumWeb-ExtraLight.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-ExtraLightItalic.ttf b/qml/fonts/TitilliumWeb-ExtraLightItalic.ttf
deleted file mode 100644
index c1be5ba..0000000
--- a/qml/fonts/TitilliumWeb-ExtraLightItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-Italic.ttf b/qml/fonts/TitilliumWeb-Italic.ttf
deleted file mode 100644
index 42f2c10..0000000
--- a/qml/fonts/TitilliumWeb-Italic.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-Light.ttf b/qml/fonts/TitilliumWeb-Light.ttf
deleted file mode 100644
index ca67971..0000000
--- a/qml/fonts/TitilliumWeb-Light.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-LightItalic.ttf b/qml/fonts/TitilliumWeb-LightItalic.ttf
deleted file mode 100644
index 2ea724f..0000000
--- a/qml/fonts/TitilliumWeb-LightItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-Regular.ttf b/qml/fonts/TitilliumWeb-Regular.ttf
deleted file mode 100644
index 6da8219..0000000
--- a/qml/fonts/TitilliumWeb-Regular.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-SemiBold.ttf b/qml/fonts/TitilliumWeb-SemiBold.ttf
deleted file mode 100644
index dfdcdbe..0000000
--- a/qml/fonts/TitilliumWeb-SemiBold.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/TitilliumWeb-SemiBoldItalic.ttf b/qml/fonts/TitilliumWeb-SemiBoldItalic.ttf
deleted file mode 100644
index b68a669..0000000
--- a/qml/fonts/TitilliumWeb-SemiBoldItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/fonts/fontawesome-webfont.ttf b/qml/fonts/fontawesome-webfont.ttf
deleted file mode 100644
index 35acda2..0000000
--- a/qml/fonts/fontawesome-webfont.ttf
+++ /dev/null
Binary files differ
diff --git a/qml/icons/FloatingButton_Active.svg b/qml/icons/FloatingButton_Active.svg
deleted file mode 100644
index 76a38eb..0000000
--- a/qml/icons/FloatingButton_Active.svg
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 19.1.0, 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"
- width="391px" height="391px" viewBox="0 0 390 390" style="enable-background:new 0 0 390 390;" xml:space="preserve">
-<style type="text/css">
- .st0{opacity:0.3;enable-background:new ;}
- .st1{opacity:0.5;}
- .st2{fill:#FFFFFF;}
- .st3{fill:#5CAA15;}
- .st4{fill:none;}
-</style>
-<g id="Active">
- <g>
- <circle class="st0" cx="195" cy="195" r="191"/>
- <g class="st1">
- <path class="st2" d="M195,4c105.5,0,191,85.5,191,191s-85.5,191-191,191S4,300.5,4,195S89.5,4,195,4 M195,0
- c-26.3,0-51.9,5.2-75.9,15.3c-23.2,9.8-44.1,23.9-62,41.8s-32,38.8-41.8,62C5.2,143.1,0,168.7,0,195s5.2,51.9,15.3,75.9
- c9.8,23.2,23.9,44.1,41.8,62s38.8,32,62,41.8c24,10.2,49.6,15.3,75.9,15.3s51.9-5.2,75.9-15.3c23.2-9.8,44.1-23.9,62-41.8
- s32-38.8,41.8-62c10.2-24,15.3-49.6,15.3-75.9s-5.2-51.9-15.3-75.9c-9.8-23.2-23.9-44.1-41.8-62s-38.8-32-62-41.8
- C246.9,5.2,221.3,0,195,0L195,0z"/>
- </g>
- </g>
- <circle class="st3" cx="195" cy="195" r="141"/>
-</g>
-<g id="icon">
- <g>
- <g>
- <path class="st2" d="M155.6,247.3c-10.1,0-18.9-5-23.1-13.6c-10.1-21,5.4-37.4,21.7-54.7c1.2-1.2,2.4-2.5,3.6-3.8
- c5.3-5.7,5.2-11.5,3.5-14.8c-1.8-3.4-5.5-4.9-10.2-4.2c-16.5,2.6-21.2,26.4-21.2,26.6l-11.9-2.2c0.3-1.3,6.4-32.3,31.2-36.3
- c9.8-1.6,18.5,2.4,22.7,10.4c4.7,8.9,2.6,20.1-5.3,28.6c-1.2,1.3-2.4,2.6-3.6,3.8c-16.7,17.8-25.9,28.5-19.6,41.4
- c3.3,6.8,11.1,7.6,16.9,6.3c9.2-2.1,19.8-11.1,19.7-29.5c-0.2-28.1,16.2-41.8,30.2-44.9c14.5-3.2,28.4,3.6,34.7,17
- c1.3,2.8,2.3,5.4,3.1,8.1c13.3,0.7,25.5,4.3,26,4.4l-3.4,11.5c-0.1,0-9.7-2.8-20.6-3.8c0.5,16.5-8.6,28.9-20.1,34.7
- c-11.9,6-24,3.8-28.9-5.2c-3.1-5.6-1.9-14.7,2.9-22.5c7.9-13,21.3-17.4,31.5-18.8c-0.4-1.2-0.9-2.4-1.4-3.4
- c-3.9-8.3-12.2-12.4-21.1-10.4c-9.7,2.2-21,12.1-20.8,33.1c0.2,25.5-15.6,38.1-29,41.3C160.5,247,158,247.3,155.6,247.3z
- M237.8,197.7c-14,1.5-20.6,8.5-23.4,12.9c-3.3,5.2-3.4,9.8-2.9,10.9c1.6,2.9,7.3,3,13,0.2C235.3,216.2,238.3,206.6,237.8,197.7z
- "/>
- </g>
- <rect x="118" y="144" class="st4" width="156" height="104"/>
- </g>
-</g>
-</svg>
diff --git a/qml/icons/FloatingButton_Available.svg b/qml/icons/FloatingButton_Available.svg
deleted file mode 100644
index 1178c8c..0000000
--- a/qml/icons/FloatingButton_Available.svg
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 19.1.0, 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"
- width="390px" height="390px" viewBox="0 0 390 390" style="enable-background:new 0 0 390 390;" xml:space="preserve">
-<style type="text/css">
- .st0{opacity:0.3;enable-background:new ;}
- .st1{opacity:0.5;}
- .st2{fill:#FFFFFF;}
- .st3{fill:#26282A;}
- .st4{fill:none;}
-</style>
-<g id="Available">
- <g>
- <circle class="st0" cx="195" cy="195" r="191"/>
- <g class="st1">
- <path class="st2" d="M195,4c105.5,0,191,85.5,191,191s-85.5,191-191,191S4,300.5,4,195S89.5,4,195,4 M195,0
- c-26.3,0-51.9,5.2-75.9,15.3c-23.2,9.8-44.1,23.9-62,41.8s-32,38.8-41.8,62C5.2,143.1,0,168.7,0,195s5.2,51.9,15.3,75.9
- c9.8,23.2,23.9,44.1,41.8,62s38.8,32,62,41.8c24,10.2,49.6,15.3,75.9,15.3s51.9-5.2,75.9-15.3c23.2-9.8,44.1-23.9,62-41.8
- s32-38.8,41.8-62c10.2-24,15.3-49.6,15.3-75.9s-5.2-51.9-15.3-75.9c-9.8-23.2-23.9-44.1-41.8-62s-38.8-32-62-41.8
- C246.9,5.2,221.3,0,195,0L195,0z"/>
- </g>
- </g>
- <circle class="st3" cx="195" cy="195" r="141"/>
-</g>
-<g id="icon">
- <g>
- <g>
- <path class="st2" d="M155.6,247.3c-10.1,0-18.9-5-23.1-13.6c-10.1-21,5.4-37.4,21.7-54.7c1.2-1.2,2.4-2.5,3.6-3.8
- c5.3-5.7,5.2-11.5,3.5-14.8c-1.8-3.4-5.5-4.9-10.2-4.2c-16.5,2.6-21.2,26.4-21.2,26.6l-11.9-2.2c0.3-1.3,6.4-32.3,31.2-36.3
- c9.8-1.6,18.5,2.4,22.7,10.4c4.7,8.9,2.6,20.1-5.3,28.6c-1.2,1.3-2.4,2.6-3.6,3.8c-16.7,17.8-25.9,28.5-19.6,41.4
- c3.3,6.8,11.1,7.6,16.9,6.3c9.2-2.1,19.8-11.1,19.7-29.5c-0.2-28.1,16.2-41.8,30.2-44.9c14.5-3.2,28.4,3.6,34.7,17
- c1.3,2.8,2.3,5.4,3.1,8.1c13.3,0.7,25.5,4.3,26,4.4l-3.4,11.5c-0.1,0-9.7-2.8-20.6-3.8c0.5,16.5-8.6,28.9-20.1,34.7
- c-11.9,6-24,3.8-28.9-5.2c-3.1-5.6-1.9-14.7,2.9-22.5c7.9-13,21.3-17.4,31.5-18.8c-0.4-1.2-0.9-2.4-1.4-3.4
- c-3.9-8.3-12.2-12.4-21.1-10.4c-9.7,2.2-21,12.1-20.8,33.1c0.2,25.5-15.6,38.1-29,41.3C160.5,247,158,247.3,155.6,247.3z
- M237.8,197.7c-14,1.5-20.6,8.5-23.4,12.9c-3.3,5.2-3.4,9.8-2.9,10.9c1.6,2.9,7.3,3,13,0.2C235.3,216.2,238.3,206.6,237.8,197.7z
- "/>
- </g>
- <rect x="118" y="144" class="st4" width="156" height="104"/>
- </g>
-</g>
-</svg>
diff --git a/qml/icons/FloatingButton_Unavailable.svg b/qml/icons/FloatingButton_Unavailable.svg
deleted file mode 100644
index d8149b5..0000000
--- a/qml/icons/FloatingButton_Unavailable.svg
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 19.1.0, 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"
- width="390px" height="390px" viewBox="0 0 390 390" style="enable-background:new 0 0 390 390;" xml:space="preserve">
-<style type="text/css">
- .st0{opacity:0.3;enable-background:new ;}
- .st1{opacity:0.5;}
- .st2{fill:#FFFFFF;}
- .st3{fill:none;}
-</style>
-<g id="Unavailable">
- <g>
- <circle class="st0" cx="195" cy="195" r="191"/>
- <g class="st1">
- <path class="st2" d="M195,4c105.5,0,191,85.5,191,191s-85.5,191-191,191S4,300.5,4,195S89.5,4,195,4 M195,0
- c-26.3,0-51.9,5.2-75.9,15.3c-23.2,9.8-44.1,23.9-62,41.8s-32,38.8-41.8,62C5.2,143.1,0,168.7,0,195s5.2,51.9,15.3,75.9
- c9.8,23.2,23.9,44.1,41.8,62s38.8,32,62,41.8c24,10.2,49.6,15.3,75.9,15.3s51.9-5.2,75.9-15.3c23.2-9.8,44.1-23.9,62-41.8
- s32-38.8,41.8-62c10.2-24,15.3-49.6,15.3-75.9s-5.2-51.9-15.3-75.9c-9.8-23.2-23.9-44.1-41.8-62s-38.8-32-62-41.8
- C246.9,5.2,221.3,0,195,0L195,0z"/>
- </g>
- </g>
-</g>
-<g id="icon">
- <g>
- <g>
- <path class="st2" d="M155.6,247.3c-10.1,0-18.9-5-23.1-13.6c-10.1-21,5.4-37.4,21.7-54.7c1.2-1.2,2.4-2.5,3.6-3.8
- c5.3-5.7,5.2-11.5,3.5-14.8c-1.8-3.4-5.5-4.9-10.2-4.2c-16.5,2.6-21.2,26.4-21.2,26.6l-11.9-2.2c0.3-1.3,6.4-32.3,31.2-36.3
- c9.8-1.6,18.5,2.4,22.7,10.4c4.7,8.9,2.6,20.1-5.3,28.6c-1.2,1.3-2.4,2.6-3.6,3.8c-16.7,17.8-25.9,28.5-19.6,41.4
- c3.3,6.8,11.1,7.6,16.9,6.3c9.2-2.1,19.8-11.1,19.7-29.5c-0.2-28.1,16.2-41.8,30.2-44.9c14.5-3.2,28.4,3.6,34.7,17
- c1.3,2.8,2.3,5.4,3.1,8.1c13.3,0.7,25.5,4.3,26,4.4l-3.4,11.5c-0.1,0-9.7-2.8-20.6-3.8c0.5,16.5-8.6,28.9-20.1,34.7
- c-11.9,6-24,3.8-28.9-5.2c-3.1-5.6-1.9-14.7,2.9-22.5c7.9-13,21.3-17.4,31.5-18.8c-0.4-1.2-0.9-2.4-1.4-3.4
- c-3.9-8.3-12.2-12.4-21.1-10.4c-9.7,2.2-21,12.1-20.8,33.1c0.2,25.5-15.6,38.1-29,41.3C160.5,247,158,247.3,155.6,247.3z
- M237.8,197.7c-14,1.5-20.6,8.5-23.4,12.9c-3.3,5.2-3.4,9.8-2.9,10.9c1.6,2.9,7.3,3,13,0.2C235.3,216.2,238.3,206.6,237.8,197.7z
- "/>
- </g>
- <rect x="118" y="144" class="st3" width="156" height="104"/>
- </g>
-</g>
-</svg>
diff --git a/qml/icons/back_icon.svg b/qml/icons/back_icon.svg
deleted file mode 100644
index 7670ff3..0000000
--- a/qml/icons/back_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="back" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>back</title><polyline points="24.52 35 15.07 22.28 24.93 9" style="fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:3.6055682617479508px"/></svg> \ No newline at end of file
diff --git a/qml/icons/bluetooth_icon.svg b/qml/icons/bluetooth_icon.svg
deleted file mode 100644
index 2cdf7f9..0000000
--- a/qml/icons/bluetooth_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="bluetooth" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>bluetooth</title><polyline points="13.72 29.33 30.33 14.97 22.27 8 22.27 36 30.33 29.03 13.67 14.62" style="fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.535902062387811px"/></svg> \ No newline at end of file
diff --git a/qml/icons/checkmark.svg b/qml/icons/checkmark.svg
deleted file mode 100644
index 830ecd0..0000000
--- a/qml/icons/checkmark.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 22.0.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="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
-<style type="text/css">
- .st0{fill:#5ABA53;}
-</style>
-<path class="st0" d="M5.6,14c-0.2,0-0.3-0.1-0.4-0.2l-4-4.2C1,9.3,1,9,1.2,8.7c0.2-0.2,0.6-0.2,0.9,0l3.5,3.7l8.3-10.2
- C14.1,2,14.5,2,14.8,2.2C15,2.4,15.1,2.8,14.8,3L6.1,13.7C6,13.9,5.8,13.9,5.6,14C5.6,14,5.6,14,5.6,14"/>
-</svg>
diff --git a/qml/icons/date-time_icon.svg b/qml/icons/date-time_icon.svg
deleted file mode 100644
index 3af7afc..0000000
--- a/qml/icons/date-time_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="date_time" data-name="date time" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>date-time</title><path d="M27.81,14.93a1.18,1.18,0,0,1-1.18-1.18V9.84a1.18,1.18,0,0,1,2.35,0v3.92a1.18,1.18,0,0,1-1.18,1.18h0Z" style="fill:#fff"/><path d="M12.82,14.93a1.18,1.18,0,0,1-1.18-1.18V9.84a1.18,1.18,0,0,1,2.35,0v3.92a1.18,1.18,0,0,1-1.18,1.18h0Z" style="fill:#fff"/><path d="M32.25,18.74H8.34a0.59,0.59,0,1,1,0-1.18H32.25a0.59,0.59,0,0,1,0,1.18h0Z" style="fill:#fff"/><polygon points="13.68 21.13 11.39 21.13 11.39 23.41 13.68 23.41 13.68 21.13 13.68 21.13" style="fill:#fff"/><polygon points="17.62 21.13 15.34 21.13 15.34 23.41 17.62 23.41 17.62 21.13 17.62 21.13" style="fill:#fff"/><polygon points="21.57 21.13 19.29 21.13 19.29 23.41 21.57 23.41 21.57 21.13 21.57 21.13" style="fill:#fff"/><polygon points="25.52 21.13 23.24 21.13 23.24 23.41 25.52 23.41 25.52 21.13 25.52 21.13" style="fill:#fff"/><polygon points="13.68 24.79 11.39 24.79 11.39 27.07 13.68 27.07 13.68 24.79 13.68 24.79" style="fill:#fff"/><polygon points="17.62 24.79 15.34 24.79 15.34 27.07 17.62 27.07 17.62 24.79 17.62 24.79" style="fill:#fff"/><polygon points="21.57 24.79 19.29 24.79 19.29 27.07 21.57 27.07 21.57 24.79 21.57 24.79" style="fill:#fff"/><path d="M29.7,35.34A7.3,7.3,0,1,1,37,28a7.31,7.31,0,0,1-7.3,7.3h0Zm0-13.42A6.12,6.12,0,1,0,35.82,28a6.13,6.13,0,0,0-6.12-6.12h0Z" style="fill:#fff"/><path d="M23.69,32.18H8.18A1.18,1.18,0,0,1,7,31V11.8a1.18,1.18,0,0,1,1.18-1.18H32.32a1.18,1.18,0,0,1,1.18,1.18V21.85H31.14V13H9.35V29.83H23.69v2.35h0Z" style="fill:#fff"/><line x1="29.7" y1="28.04" x2="33.49" y2="28.04" style="fill:none;stroke:#fff;stroke-linecap:round;stroke-width:1.763880513519565px"/><line x1="29.7" y1="28.04" x2="29.7" y2="24.24" style="fill:none;stroke:#fff;stroke-linecap:round;stroke-width:1.763880513519565px"/></svg> \ No newline at end of file
diff --git a/qml/icons/detail.svg b/qml/icons/detail.svg
deleted file mode 100644
index 142a1a0..0000000
--- a/qml/icons/detail.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><title>detail</title><rect width="64" height="64" style="fill:#09102b"/><path d="M34.92,11.23H9.08A1.08,1.08,0,0,0,8,12.31V31.69a1.08,1.08,0,0,0,1.08,1.08H34.92A1.08,1.08,0,0,0,36,31.69V12.31A1.08,1.08,0,0,0,34.92,11.23ZM33.85,25H23.29V13.39H33.85V25Zm-4.56,5.62h-6V26h6v4.62Zm-8,0h-4V26h4v4.62Zm0-17.23V25H10.15V13.39H21.29ZM10.15,26h5.13v4.62H10.15V26Zm20.13,4.62V26h3.56v4.62H30.29Z" transform="translate(10.1 10)" style="fill:#fff"/><rect x="22.39" y="25" width="8" height="1" style="fill:#fff"/><rect x="22.39" y="30" width="8" height="1" style="fill:#fff"/><rect x="22.39" y="27" width="8" height="1" style="fill:#fff"/><rect x="22.39" y="32" width="8" height="1" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/qml/icons/detail_icon_disabled.svg b/qml/icons/detail_icon_disabled.svg
deleted file mode 100644
index 697a0a0..0000000
--- a/qml/icons/detail_icon_disabled.svg
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<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"
- id="detail"
- viewBox="0 0 44 44"
- version="1.1"
- sodipodi:docname="detail_icon_disabled.svg"
- width="44"
- height="44"
- inkscape:version="0.92.1 r15371">
- <metadata
- id="metadata4521">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title>detail</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs4519" />
- <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="1137"
- id="namedview4517"
- showgrid="false"
- inkscape:zoom="5.3636364"
- inkscape:cx="-8.29661"
- inkscape:cy="22"
- inkscape:window-x="-8"
- inkscape:window-y="-8"
- inkscape:window-maximized="1"
- inkscape:current-layer="detail"
- inkscape:pagecheckerboard="true"
- fit-margin-top="5.08"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="5.08" />
- <title
- id="title4504">detail</title>
- <path
- d="M 42.31,5.08 H 1.69 A 1.69,1.69 0 0 0 0,6.77 v 30.46 a 1.69,1.69 0 0 0 1.69,1.69 H 42.31 A 1.69,1.69 0 0 0 44,37.23 V 6.77 A 1.69,1.69 0 0 0 42.31,5.08 Z m -1.7,21.63 H 24 V 8.46 h 16.61 z m -7.16,8.82 H 24 v -7.24 h 9.43 z m -12.57,0 h -6.29 v -7.24 h 6.29 z m 0,-27.08 V 26.71 H 3.38 V 8.46 Z M 3.38,28.29 h 8.07 v 7.25 H 3.38 Z M 35,35.54 v -7.25 h 5.59 v 7.25 z"
- style="fill:#848895;fill-opacity:1"
- id="path4506"
- inkscape:connector-curvature="0" />
- <rect
- x="6.7399998"
- y="11"
- width="12.57"
- height="1.5700001"
- style="fill:#848895;fill-opacity:1"
- id="rect4508" />
- <rect
- x="6.7399998"
- y="18.860001"
- width="12.57"
- height="1.5700001"
- style="fill:#848895;fill-opacity:1"
- id="rect4510" />
- <rect
- x="6.7399998"
- y="14.140001"
- width="12.57"
- height="1.5700001"
- style="fill:#848895;fill-opacity:1"
- id="rect4512" />
- <rect
- x="6.7399998"
- y="22"
- width="12.57"
- height="1.5700001"
- style="fill:#848895;fill-opacity:1"
- id="rect4514" />
-</svg>
diff --git a/qml/icons/display_icon.svg b/qml/icons/display_icon.svg
deleted file mode 100644
index 598d2ee..0000000
--- a/qml/icons/display_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="display" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>display_icon</title><path d="M42.16,32.5H1.83A1.83,1.83,0,0,1,0,30.67V5A1.83,1.83,0,0,1,1.83,3.17H42.16A1.83,1.83,0,0,1,44,5V30.67a1.83,1.83,0,0,1-1.84,1.83ZM3.67,28.84H40.33v-22H3.67v22Z" style="fill:#fff"/><path d="M28.76,40.83H15.24a1.83,1.83,0,1,1,0-3.67H28.76a1.83,1.83,0,1,1,0,3.67Z" style="fill:#fff"/><path d="M17.34,40.29a1.83,1.83,0,0,1-1.83-1.83V31.05a1.83,1.83,0,1,1,3.67,0v7.41a1.83,1.83,0,0,1-1.83,1.83Z" style="fill:#fff"/><path d="M26.66,40.29a1.83,1.83,0,0,1-1.83-1.83V31.05a1.83,1.83,0,1,1,3.67,0v7.41a1.83,1.83,0,0,1-1.83,1.83Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/qml/icons/grid_icon_disabled.svg b/qml/icons/grid_icon_disabled.svg
deleted file mode 100644
index 942b2ed..0000000
--- a/qml/icons/grid_icon_disabled.svg
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<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"
- id="grid"
- viewBox="0 0 44 43.999999"
- version="1.1"
- sodipodi:docname="grid_icon_disabled.svg"
- width="44"
- height="44"
- inkscape:version="0.92.1 r15371">
- <metadata
- id="metadata3744">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title>grid_icon</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3742" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1267"
- inkscape:window-height="873"
- id="namedview3740"
- showgrid="false"
- inkscape:pagecheckerboard="true"
- inkscape:zoom="5.3636364"
- inkscape:cx="22"
- inkscape:cy="22.000003"
- inkscape:window-x="232"
- inkscape:window-y="137"
- inkscape:window-maximized="0"
- inkscape:current-layer="grid"
- fit-margin-top="5.08"
- fit-margin-bottom="5.08"
- fit-margin-left="0"
- fit-margin-right="0" />
- <title
- id="title3735">grid_icon</title>
- <path
- d="M 42.31,5.08 H 1.69 A 1.69,1.69 0 0 0 0,6.77 v 30.46 a 1.69,1.69 0 0 0 1.69,1.69 H 42.31 A 1.69,1.69 0 0 0 44,37.23 V 6.77 A 1.69,1.69 0 0 0 42.31,5.08 Z M 40.62,21.26 H 29.19 V 8.46 h 11.43 z m -23.79,0 V 8.46 h 10.41 v 12.8 z m 10.41,1.3 v 13 H 16.83 v -13 z M 14.88,8.46 v 12.8 H 3.39 V 8.46 Z M 3.39,22.56 h 11.49 v 13 H 3.39 Z m 25.81,13 v -13 h 11.42 v 13 z"
- style="fill:#848895;fill-opacity:1"
- id="path3737"
- inkscape:connector-curvature="0" />
-</svg>
diff --git a/qml/icons/header_toggle.png b/qml/icons/header_toggle.png
deleted file mode 100644
index 0482820..0000000
--- a/qml/icons/header_toggle.png
+++ /dev/null
Binary files differ
diff --git a/qml/icons/language_icon.svg b/qml/icons/language_icon.svg
deleted file mode 100644
index 2d287b6..0000000
--- a/qml/icons/language_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="language" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>language</title><path d="M22,36A14,14,0,1,1,36,22,14,14,0,0,1,22,36h0Zm0-25.64A11.64,11.64,0,1,0,33.64,22,11.66,11.66,0,0,0,22,10.36h0Z" style="fill:#fff"/><path d="M22,35.41c-4.41,0-8-6-8-13.41S17.59,8.59,22,8.59s8,6,8,13.41-3.59,13.41-8,13.41h0ZM22,9.77c-3.76,0-6.83,5.49-6.83,12.23S18.24,34.23,22,34.23,28.83,28.74,28.83,22,25.76,9.77,22,9.77h0Z" style="fill:#fff"/><path d="M22,35.41a0.59,0.59,0,0,1-.59-0.59V9.18A0.59,0.59,0,0,1,22,8.59a13.41,13.41,0,0,1,0,26.82h0ZM22.59,9.78V34.22a12.23,12.23,0,0,0,0-24.44h0Z" style="fill:#fff"/><path d="M34,27.11H10a0.59,0.59,0,0,1-.55-0.38,13.26,13.26,0,0,1,0-9.45A0.59,0.59,0,0,1,10,16.89H34a0.59,0.59,0,0,1,.55.38,13.24,13.24,0,0,1,0,9.46,0.59,0.59,0,0,1-.55.38h0ZM10.43,25.93H33.57a12,12,0,0,0,0-7.86H10.43a12,12,0,0,0,0,7.86h0Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/qml/icons/mouse_icon_disabled.svg b/qml/icons/mouse_icon_disabled.svg
deleted file mode 100644
index 49c8a39..0000000
--- a/qml/icons/mouse_icon_disabled.svg
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<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"
- id="mouse"
- viewBox="0 0 38.22797 38.29335"
- version="1.1"
- sodipodi:docname="mouse_icon_disabled.svg"
- width="38.22797"
- height="38.29335"
- inkscape:version="0.92.1 r15371">
- <metadata
- id="metadata3733">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title>mouse_icon</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1196"
- inkscape:window-height="669"
- id="namedview3731"
- showgrid="false"
- inkscape:pagecheckerboard="true"
- inkscape:zoom="5.3636364"
- inkscape:cx="20.760087"
- inkscape:cy="12.211613"
- inkscape:window-x="281"
- inkscape:window-y="283"
- inkscape:window-maximized="0"
- inkscape:current-layer="mouse"
- fit-margin-top="3.9"
- fit-margin-bottom="3.9"
- fit-margin-left="0"
- fit-margin-right="0" />
- <defs
- id="defs3706">
- <clipPath
- id="clip-path">
- <polygon
- points="30.87,5.33 28.23,5.83 22.8,4.3 18.92,7.24 9.96,3.31 29,-5.98 42.56,8.54 26.94,20.62 29.12,14.45 "
- style="fill:none"
- id="polygon3703" />
- </clipPath>
- </defs>
- <title
- id="title3708">mouse_icon</title>
- <path
- d="m 0.31093391,25.622418 a 1.06,1.06 0 0 1 0,-1.5 l 4.22999999,-4.25 a 1.06,1.06 0 0 1 1.5,0 l 8.4800001,8.46 v 0 a 1.06,1.06 0 0 1 0,1.5 l -4.21,4.25 a 1.06,1.06 0 0 1 -1.5000001,0 z m 4.99999999,-3.5 -2.76,2.75 7,7 2.7300001,-2.74 -7.0000001,-7 z"
- style="fill:#848895;fill-opacity:1"
- id="path3710"
- inkscape:connector-curvature="0" />
- <path
- d="m 19.490934,8.8724178 a 1,1 0 0 1 0,1.3600002 l -4.41,4.41 a 3.68,3.68 0 0 1 0.77,0.48 l 4.33,-4.44 a 1,1 0 0 1 1.36,1.36 l -4.31,4.42 0.62,0.62 4.12,-4.23 a 1,1 0 1 1 1.34,1.35 l -4.15,4.26 a 6,6 0 0 1 0.5,0.81 l 4,-4 a 0.86,0.86 0 0 1 1.27,0 1,1 0 0 1 0,1.36 l -5.62,5.69 -1.27,1.2 -3.23,3.26 a 2.38,2.38 0 0 1 -1.39,0.66 l -6.5700001,-6.56 a 2.59,2.59 0 0 1 0.22,-0.76 l 1.38,-5 a 1,1 0 0 1 0.26,-0.44 l 3.0500001,-3.05 a 0.91216775,0.91216775 0 1 1 1.29,1.29 l -1.24,1.22 -0.22,1.26 6.54,-6.5400002 a 1,1 0 0 1 1.36,0 m 1.5,-1.5 a 3.09,3.09 0 0 0 -4.36,0 l -2.4,2.4 a 3.07,3.07 0 0 0 -4,0.3400002 l -3.0200001,3.06 a 3.12,3.12 0 0 0 -0.81,1.36 l -1.33,4.89 a 4.74,4.74 0 0 0 -0.32,1.19 2.12,2.12 0 0 0 0.6,1.79 v 0 l 6.5600001,6.56 a 2.12,2.12 0 0 0 1.78,0.6 4.48,4.48 0 0 0 2.62,-1.27 l 3.23,-3.23 1.23,-1.23 5.41,-5.49 a 3.09,3.09 0 0 0 0,-4.36 3,3 0 0 0 -0.7,-0.52 3.08,3.08 0 0 0 -1.85,-2.51 3.08,3.08 0 0 0 -0.64,-1.3100002 2.33,2.33 0 0 0 -1.14,-0.53 3.07,3.07 0 0 0 -0.87,-1.74 z"
- style="fill:#848895;fill-opacity:1"
- id="path3712"
- inkscape:connector-curvature="0" />
- <g
- clip-path="url(#clip-path)"
- id="g3716"
- transform="translate(-4.6890661,3.5224178)"
- style="fill:#848895;fill-opacity:1">
- <path
- d="M 18.34,16.84 A 9,9 0 0 1 16.4,14 c -1.14,-2.88 1,-6.75 2.41,-8.18 l 4.11,-4.11 a 4.79,4.79 0 0 1 6.63,0 l 4,4 a 4.8,4.8 0 0 1 0,6.66 l -4.1,4.1 c -1.44,1.41 -5.3,3.56 -8.17,2.42 a 9,9 0 0 1 -2.9,-1.95 z M 32.34,6.76 28.4,2.85 a 3.14,3.14 0 0 0 -4.28,0 L 20,7 c -1.32,1.35 -2.78,4.51 -2,6.37 a 7.43,7.43 0 0 0 3.92,3.91 c 1.84,0.73 5,-0.73 6.36,-2.06 l 4.1,-4.1 a 3.15,3.15 0 0 0 0,-4.32 z"
- style="fill:#848895;fill-opacity:1"
- id="path3714"
- inkscape:connector-curvature="0" />
- </g>
- <path
- d="m 32.310934,28.612418 a 1.16,1.16 0 0 1 -0.51,-0.12 5.58,5.58 0 0 1 -3.22,-3.78 7.76,7.76 0 0 1 1.65,-6.1 c 0.68,-0.86 1.4,-1.67 2.1,-2.44 2.18,-2.42 4.06,-4.51 3.51,-7.1100002 a 3.24,3.24 0 0 0 -2.21,-2.48 c -1.87,-0.62 -4.3,0.1 -6.35,1.88 a 1.1660296,1.1660296 0 1 1 -1.53,-1.76 c 2.66,-2.36 5.88,-3.24 8.56,-2.34 a 5.56,5.56 0 0 1 3.76,4.16 c 0.81,3.7600002 -1.66,6.5100002 -4.05,9.1600002 -0.67,0.75 -1.37,1.53 -2,2.33 a 5.5,5.5 0 0 0 -1.21,4.14 3.31,3.31 0 0 0 2,2.21 1.17,1.17 0 0 1 -0.5,2.25 z"
- style="fill:#848895;fill-opacity:1"
- id="path3718"
- inkscape:connector-curvature="0" />
-</svg>
diff --git a/qml/icons/mute_icon.svg b/qml/icons/mute_icon.svg
deleted file mode 100644
index 57cf348..0000000
--- a/qml/icons/mute_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="mute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>mute</title><path d="M19.57,33a1.18,1.18,0,0,1-.74-0.26l-5.41-4.33H10.09a1.18,1.18,0,0,1-1.18-1.18V16.78a1.18,1.18,0,0,1,1.18-1.18h3.33l5.41-4.33a1.18,1.18,0,0,1,1.92.92V31.82A1.18,1.18,0,0,1,19.57,33h0Zm-8.3-7h2.57a1.18,1.18,0,0,1,.74.26l3.81,3.05V14.64L14.57,17.7a1.18,1.18,0,0,1-.74.26H11.27V26h0Z" style="fill:#fff"/><path d="M33.91,28.19a1.18,1.18,0,0,1-.84-0.35l-10-10a1.18,1.18,0,1,1,1.67-1.67l10,10a1.18,1.18,0,0,1-.84,2h0Z" style="fill:#fff"/><path d="M24,28.26a1.18,1.18,0,0,1-.85-2L33,16.09a1.18,1.18,0,0,1,1.69,1.65L24.8,27.91a1.18,1.18,0,0,1-.85.36h0Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/qml/icons/network_icon.svg b/qml/icons/network_icon.svg
deleted file mode 100644
index 6492630..0000000
--- a/qml/icons/network_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="network" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>network</title><path d="M13,26.37A4.37,4.37,0,1,1,17.4,22,4.37,4.37,0,0,1,13,26.37h0Zm0-6.48A2.11,2.11,0,1,0,15.14,22,2.12,2.12,0,0,0,13,19.89h0Z" style="fill:#fff"/><path d="M31,16.74a4.37,4.37,0,1,1,4.37-4.37A4.37,4.37,0,0,1,31,16.74h0Zm0-6.48a2.11,2.11,0,1,0,2.11,2.11A2.12,2.12,0,0,0,31,10.26h0Z" style="fill:#fff"/><path d="M31,36a4.37,4.37,0,1,1,4.37-4.37A4.37,4.37,0,0,1,31,36h0Zm0-6.48a2.11,2.11,0,1,0,2.11,2.11A2.12,2.12,0,0,0,31,29.52h0Z" style="fill:#fff"/><path d="M27.64,31a1.13,1.13,0,0,1-.56-0.15L15.56,24.25a1.13,1.13,0,0,1,1.13-2L28.2,28.94a1.13,1.13,0,0,1-.56,2.1h0Z" style="fill:#fff"/><path d="M16.13,21.85a1.13,1.13,0,0,1-.57-2.1L27.07,13.1a1.13,1.13,0,1,1,1.13,2L16.69,21.7a1.12,1.12,0,0,1-.56.15h0Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/qml/icons/pause_icon.svg b/qml/icons/pause_icon.svg
deleted file mode 100644
index 1eeb71b..0000000
--- a/qml/icons/pause_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="pause" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>pause</title><path d="M18.68,33H15.74a2.38,2.38,0,0,1-2.38-2.37V13.37A2.38,2.38,0,0,1,15.74,11h2.94a2.38,2.38,0,0,1,2.38,2.37V30.63A2.38,2.38,0,0,1,18.68,33h0ZM15.74,13.07a0.31,0.31,0,0,0-.3.3V30.63a0.31,0.31,0,0,0,.3.3h2.94a0.31,0.31,0,0,0,.3-0.3V13.37a0.31,0.31,0,0,0-.3-0.3H15.74Z" style="fill:#fff"/><path d="M28.26,33H25.32a2.38,2.38,0,0,1-2.38-2.37V13.37A2.38,2.38,0,0,1,25.32,11h2.94a2.38,2.38,0,0,1,2.38,2.37V30.63A2.38,2.38,0,0,1,28.26,33h0ZM25.32,13.07a0.31,0.31,0,0,0-.3.3V30.63a0.31,0.31,0,0,0,.3.3h2.94a0.31,0.31,0,0,0,.3-0.3V13.37a0.31,0.31,0,0,0-.3-0.3H25.32Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/qml/icons/play_icon.svg b/qml/icons/play_icon.svg
deleted file mode 100644
index 2384991..0000000
--- a/qml/icons/play_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="play" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>play</title><path d="M14.22,33a2.12,2.12,0,0,1-2.05-2.34V13.34A2.12,2.12,0,0,1,14.22,11a2.67,2.67,0,0,1,1.33.39l15,8.66a2.14,2.14,0,0,1,0,3.91l-15,8.66a2.66,2.66,0,0,1-1.33.39h0Zm0-19.93a2.64,2.64,0,0,0,0,.28V30.66a0.79,0.79,0,0,0,0,.27,0.88,0.88,0,0,0,.26-0.11l15-8.66A0.81,0.81,0,0,0,29.75,22s-0.09-.08-0.23-0.16l-15-8.66a0.81,0.81,0,0,0-.27-0.11h0Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/qml/icons/power_icon.svg b/qml/icons/power_icon.svg
deleted file mode 100644
index 68c6755..0000000
--- a/qml/icons/power_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="power" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>power</title><path d="M22,18.83a1.25,1.25,0,0,1-1.25-1.26V8.45a1.25,1.25,0,0,1,2.51,0v9.13A1.26,1.26,0,0,1,22,18.83h0Z" style="fill:#fff"/><path d="M22,36.77a13.17,13.17,0,0,1-4.33-25.61,1.25,1.25,0,0,1,.83,2.37,10.67,10.67,0,1,0,7,0,1.25,1.25,0,0,1,.83-2.37A13.17,13.17,0,0,1,22,36.77h0Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/qml/icons/settingsmenu_launcher_icon.svg b/qml/icons/settingsmenu_launcher_icon.svg
deleted file mode 100644
index 83dcad5..0000000
--- a/qml/icons/settingsmenu_launcher_icon.svg
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<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"
- id="Layer_21"
- data-name="Layer 21"
- viewBox="0 0 28 25"
- version="1.1"
- sodipodi:docname="settingsmenu_launcher_icon.svg"
- width="28"
- height="25"
- inkscape:version="0.92.1 r15371">
- <metadata
- id="metadata4504">
- <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="defs4502" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1349"
- inkscape:window-height="913"
- id="namedview4500"
- showgrid="false"
- inkscape:zoom="11"
- inkscape:cx="14.044687"
- inkscape:cy="12.137757"
- inkscape:window-x="189"
- inkscape:window-y="90"
- inkscape:window-maximized="0"
- inkscape:current-layer="Layer_21" />
- <title
- id="title4485">settingsmenu_launcher</title>
- <rect
- x="0"
- y="0"
- width="28"
- height="6"
- style="fill:#9ca0aa;fill-opacity:1"
- id="rect4487" />
- <rect
- x="0"
- y="10"
- width="28"
- height="6"
- style="fill:#9ca0aa;fill-opacity:1"
- id="rect4489" />
- <rect
- x="0"
- y="20"
- width="28"
- height="5"
- style="fill:#9ca0aa;fill-opacity:1"
- id="rect4491" />
- <rect
- x="0"
- y="0"
- width="28"
- height="6"
- style="fill:#9ca0aa;fill-opacity:1"
- id="rect4493" />
- <rect
- x="0"
- y="10"
- width="28"
- height="6"
- style="fill:#9ca0aa;fill-opacity:1"
- id="rect4495" />
- <rect
- x="0"
- y="20"
- width="28"
- height="5"
- style="fill:#9ca0aa;fill-opacity:1"
- id="rect4497" />
-</svg>
diff --git a/qml/icons/spinner.png b/qml/icons/spinner.png
deleted file mode 100644
index f64144a..0000000
--- a/qml/icons/spinner.png
+++ /dev/null
Binary files differ
diff --git a/qml/icons/touch_icon_disabled.svg b/qml/icons/touch_icon_disabled.svg
deleted file mode 100644
index 77b27b2..0000000
--- a/qml/icons/touch_icon_disabled.svg
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<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"
- id="touch"
- viewBox="0 0 27.831027 27.886194"
- version="1.1"
- sodipodi:docname="touch_icon_disabled.svg"
- width="27.831026"
- height="27.886194"
- inkscape:version="0.92.1 r15371">
- <metadata
- id="metadata3701">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title>touch_icon</dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs3699" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1248"
- inkscape:window-height="885"
- id="namedview3697"
- showgrid="false"
- inkscape:pagecheckerboard="true"
- inkscape:zoom="11"
- inkscape:cx="7.6920146"
- inkscape:cy="10.117608"
- inkscape:window-x="392"
- inkscape:window-y="160"
- inkscape:window-maximized="0"
- inkscape:current-layer="touch"
- fit-margin-left="2.2"
- fit-margin-right="2.2"
- fit-margin-top="0"
- fit-margin-bottom="0" />
- <title
- id="title3680">touch_icon</title>
- <path
- d="m 2.5109339,19.115261 a 1.06,1.06 0 0 1 0,-1.5 l 4.23,-4.25 a 1.06,1.06 0 0 1 1.5,0 l 8.4800001,8.46 v 0 a 1.06,1.06 0 0 1 0,1.5 l -4.24,4.25 a 1.06,1.06 0 0 1 -1.5,0 l -8.4700001,-8.45 z m 5,-3.5 -2.74,2.74 7.0000001,7 2.73,-2.74 -7.0000001,-7 z"
- style="fill:#848895;fill-opacity:1"
- id="path3682"
- inkscape:connector-curvature="0" />
- <path
- d="m 21.700934,2.3652608 a 1,1 0 0 1 0,1.36 l -4.41,4.41 a 3.68,3.68 0 0 1 0.77,0.48 l 0.44,-0.44 a 1,1 0 0 1 1.37,1.35 l -0.42,0.42 0.62,0.6200002 0.23,-0.23 a 1,1 0 1 1 1.36,1.36 l -0.25,0.25 a 3.68,3.68 0 0 1 0.48,0.76 1,1 0 0 1 1.36,1.36 l -1.74,1.74 -1.23,1.23 -3.23,3.23 a 2.38,2.38 0 0 1 -1.39,0.66 l -6.5900001,-6.55 a 2.52,2.52 0 0 1 0.22,-0.76 L 10.660934,8.6152608 a 1,1 0 0 1 0.26,-0.44 l 3.05,-3.05 a 0.91,0.91 0 1 1 1.3,1.27 l -1.25,1.24 -0.22,1.25 6.54,-6.54 a 1,1 0 0 1 1.36,0 m 1.5,-1.46000001 a 3.09,3.09 0 0 0 -4.33,0 l -2.4,2.40000001 a 3.08,3.08 0 0 0 -4,0.34 l -3.0500001,3.03 a 3.13,3.13 0 0 0 -0.81,1.39 l -1.32,4.8400002 a 4.74,4.74 0 0 0 -0.32,1.19 2.12,2.12 0 0 0 0.6,1.81 v 0 l 6.5700001,6.56 a 2.11,2.11 0 0 0 1.78,0.6 4.49,4.49 0 0 0 2.61,-1.27 l 3.23,-3.23 1.23,-1.23 1.74,-1.74 a 3.09,3.09 0 0 0 0,-4.36 3,3 0 0 0 -0.7,-0.52 3.08,3.08 0 0 0 -1.85,-2.5100002 3.09,3.09 0 0 0 -0.63,-1.3 l 1.65,-1.65 a 3.09,3.09 0 0 0 0,-4.36000001 z"
- style="fill:#848895;fill-opacity:1"
- id="path3684"
- inkscape:connector-curvature="0" />
-</svg>
diff --git a/qml/icons/volume_icon.svg b/qml/icons/volume_icon.svg
deleted file mode 100644
index 095875a..0000000
--- a/qml/icons/volume_icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="volume" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>volume</title><path d="M28.63,32.79a1.18,1.18,0,0,1-.84-2,12.42,12.42,0,0,0,0-17.55,1.18,1.18,0,1,1,1.67-1.67,14.79,14.79,0,0,1,0,20.89,1.18,1.18,0,0,1-.84.35h0Z" style="fill:#fff"/><path d="M25.2,29.37a1.18,1.18,0,0,1-.84-2,7.57,7.57,0,0,0,0-10.7A1.18,1.18,0,1,1,26,15a9.93,9.93,0,0,1,0,14,1.18,1.18,0,0,1-.84.35h0Z" style="fill:#fff"/><path d="M20.89,33a1.17,1.17,0,0,1-.74-0.26l-5.41-4.33H11.4a1.18,1.18,0,0,1-1.18-1.18V16.78A1.18,1.18,0,0,1,11.4,15.6h3.33l5.42-4.33a1.18,1.18,0,0,1,1.92.92V31.82A1.18,1.18,0,0,1,20.89,33h0Zm-8.3-7h2.57a1.18,1.18,0,0,1,.74.26l3.82,3.05V14.64L15.89,17.7a1.18,1.18,0,0,1-.74.26H12.58V26h0Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/qml/images/backImg.jpg b/qml/images/backImg.jpg
deleted file mode 100644
index b41a4eb..0000000
--- a/qml/images/backImg.jpg
+++ /dev/null
Binary files differ
diff --git a/qml/settings.xml b/qml/settings.xml
deleted file mode 100644
index fb19ebc..0000000
--- a/qml/settings.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xml>
- <settings>
- <item>
- <title>Layout &amp; Input</title>
- <view>LayoutSettings</view>
- <path>qml</path>
- <icon>qml/icons/detail_icon.svg</icon>
- </item>
- <item>
- <title>Network</title>
- <view>NetworkSettings</view>
- <path>network</path>
- <icon>newIcons/network_icon.svg</icon>
- </item>
- <item>
- <title>Date &amp; Time</title>
- <view>TimeDate</view>
- <path>timedate</path>
- <icon>newIcons/date-time_icon.svg</icon>
- </item>
- <item>
- <title>Language</title>
- <view>Language</view>
- <path>locale</path>
- <icon>newIcons/language_icon.svg</icon>
- </item>
- <item>
- <title>Bluetooth</title>
- <view>Bluetooth</view>
- <path>bluetooth</path>
- <icon>newIcons/bluetooth_icon.svg</icon>
- </item>
- <item>
- <title>Display</title>
- <view>Display</view>
- <path>display</path>
- <icon>newIcons/display_icon.svg</icon>
- </item>
- <item>
- <title>About Qt</title>
- <view>AboutQt</view>
- <path>qml</path>
- <icon>qml/icons/info_icon.svg</icon>
- </item>
- <item>
- <title>Power</title>
- <view>Power</view>
- <path>power</path>
- <icon>newIcons/power_icon.svg</icon>
- </item>
- </settings>
-</xml>
diff --git a/screenshot/Button.qml b/screenshot/Button.qml
deleted file mode 100644
index 0c03ac1..0000000
--- a/screenshot/Button.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Rectangle {
-
- width: 100
- height: 40
-
- gradient: Gradient {
- GradientStop { position: 0; color: pressed ? "steelblue" : "white" }
- GradientStop { position: 1; color: pressed ? "lightsteelblue" : "darkgray" }
- }
-
- border.color: pressed ? "darkgray" : "lightgray"
- border.width: 1;
-
- radius: height / 4
-
- property alias text: label.text
- property alias pressed: mouse.pressed
-
- signal clicked;
-
- Text {
- id: label
- color: "black"
- font.pixelSize: parent.size / 2;
- anchors.centerIn: parent;
- }
-
- MouseArea {
- id: mouse
- anchors.fill: parent
-
- onClicked: parent.clicked()
-
- }
-}
diff --git a/screenshot/Main.qml b/screenshot/Main.qml
deleted file mode 100644
index 8aa0af5..0000000
--- a/screenshot/Main.qml
+++ /dev/null
@@ -1,191 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-import Qt.labs.screenshot 1.0
-import QtQuick.Window 2.0
-import com.qtcompany.B2QtLauncher 1.0
-
-
-Window
-{
- id: root
- visible: true
-
- width: 1280
- height: 720
-
- LauncherApplicationsModel {
- id: applicationsModel
- onReady: {
- engine.markApplicationsModelReady();
- }
- Component.onCompleted: {
- //Set the directory to parse for apps
- initialize(applicationSettings.appsRoot);
- }
- }
-
- LauncherEngine {
- id: engine
- bootAnimationEnabled: applicationSettings.isBootAnimationEnabled
- fpsEnabled: applicationSettings.isShowFPSEnabled
- }
-
- ListView {
- id: listView
-
- anchors.fill: parent;
-
- model: applicationsModel
-
- delegate: Loader {
- width: root.width
- height: root.height
- source: location + "/main.qml";
- focus: false
- clip: true
- }
-
- interactive: false
-
- property int listIndex: -1;
- onListIndexChanged: positionViewAtIndex(listIndex, ListView.Beginning);
- function next() {
- if (listIndex < count - 1)
- ++listIndex;
- print("next: updating list index to: ", listIndex, count);
- }
- function previous() {
- if (listIndex > 0)
- --listIndex;
- print("prev: updating list index to: ", listIndex);
- }
-
- }
-
- ScreenShot {
- id: screenshot;
- }
-
- SequentialAnimation {
- id: grabAnimation;
- PropertyAction{ target: controls; property: "visible"; value: false }
- PauseAnimation { duration: 100 }
- ScriptAction {
- script: {
- var isPortrait = root.width < root.height;
-
- var size = Qt.size(800, 450);
- var smallSize = Qt.size(128, 72);
- var loc = applicationsModel.locationAt(listView.listIndex) + "/"
- var name = "preview_l"
- var ext = ".jpg"
-
- if (isPortrait) {
- name = "preview_p"
- size = Qt.size(400, 225);
- smallSize = Qt.size(128, 72);
- }
-
- screenshot.grab(loc + name + ext, size); // medium resolution
- //screenshot.grab(loc + name + "_lr" + ext, smallSize); // low resolution
- }
- }
- PauseAnimation { duration: 100 }
- PropertyAction { target: controls; property: "visible"; value: true }
- }
-
- Item {
- id: controls
-
- height: 40
- width: parent.width
-
- Button {
- id: prevButton
- width: 100
- text: "<<";
- anchors.left: parent.left
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.margins: 2
-
- onClicked: listView.previous();
- }
-
- Button {
- id: nextButton
- width: 100
- height: parent.height
- text: ">>";
-
- anchors.right: parent.right
- anchors.margins: 2
- anchors.top: parent.top
- anchors.bottom: parent.bottom
-
- onClicked: listView.next();
- }
-
- Button {
- text: 'Grab: "' + applicationsModel.nameAt(listView.listIndex) + '"'
- height: parent.height
- anchors.left: prevButton.right
- anchors.right: nextButton.left
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.margins: 2
-
- onClicked: {
- grabAnimation.running = true;
- }
- }
- }
-
- Rectangle {
- id: blackOutLine
- anchors.fill: parent
- anchors.margins: 3
- color: "transparent"
- border.color: "black"
- border.width: 3
- visible: !controls.visible
- }
-
- Rectangle {
- id: whiteOutLine
- anchors.fill: parent
- color: "transparent"
- border.color: "white"
- border.width: 3
- visible: !controls.visible
- }
-
-}
diff --git a/screenshot/plugin/plugin.cpp b/screenshot/plugin/plugin.cpp
deleted file mode 100644
index f701b88..0000000
--- a/screenshot/plugin/plugin.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#include <QtQml/QQmlExtensionPlugin>
-
-#include <QtQuick/QQuickItem>
-#include <QtQuick/QQuickWindow>
-
-#include <QtGui/QImageWriter>
-
-class ScreenShot : public QQuickItem
-{
- Q_OBJECT
-
-public slots:
- bool grab(const QString &name, const QSize &size = QSize()) {
- if (window()) {
- QImage image = window()->grabWindow();
- if (size.width() > 0 && size.height() > 0)
- image = image.scaled(size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
-
- QImageWriter writer(name);
- writer.setQuality(95);
- bool ok = writer.write(image);
- if (ok)
- qDebug("ScreenShot::grab: saved '%s'", qPrintable(name));
- else
- qDebug("ScreenShot::grab: Failed to save '%s'", qPrintable(name));
- return ok;
- } else {
- qWarning("ScreenShot::grab: no window to grab !!");
- }
- return false;
- }
-};
-
-QML_DECLARE_TYPE(ScreenShot)
-
-class ScreenShotPlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface/1.0")
-
-public:
- virtual void registerTypes(const char *uri)
- {
- qmlRegisterType<ScreenShot>(uri, 1, 0, "ScreenShot");
- }
-};
-
-#include "plugin.moc"
-
diff --git a/screenshot/plugin/qmldir b/screenshot/plugin/qmldir
deleted file mode 100644
index 49db718..0000000
--- a/screenshot/plugin/qmldir
+++ /dev/null
@@ -1,3 +0,0 @@
-module Qt.labs.screenshot
-plugin screenshotplugin
-
diff --git a/screenshot/plugin/screenshot.pro b/screenshot/plugin/screenshot.pro
deleted file mode 100644
index 8d672dc..0000000
--- a/screenshot/plugin/screenshot.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = lib
-TARGET = screenshotplugin
-QT += quick
-CONFIG += qt plugin
-
-TARGETPATH=Qt/labs/screenshot
-
-SOURCES += plugin.cpp
-
-OTHER_FILES = qmldir
-
-target.path = $$[QT_INSTALL_QML]/$$TARGETPATH
-
-qmldir.files = qmldir
-qmldir.path = $$[QT_INSTALL_QML]/$$TARGETPATH
-
-INSTALLS = target qmldir
diff --git a/src/applicationsettings.cpp b/src/applicationsettings.cpp
deleted file mode 100644
index 957fcc7..0000000
--- a/src/applicationsettings.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#include "applicationsettings.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDebug>
-#include <QtCore/QStringList>
-
-ApplicationSettings::ApplicationSettings(QString appsRoot, QObject *parent)
- : QObject(parent)
- , m_mainFile(QUrl(QStringLiteral("qrc:///qml/Main.qml")))
- , m_appsRoot(appsRoot)
- , m_isShowFPSEnabled(false)
-{
-}
-
-QString ApplicationSettings::appsRoot() const
-{
- return m_appsRoot;
-}
-
-bool ApplicationSettings::isShowFPSEnabled() const
-{
- return m_isShowFPSEnabled;
-}
-
-bool ApplicationSettings::parseCommandLineArguments()
-{
- const QStringList args = QCoreApplication::arguments();
- for (int i = 1; i < args.size(); ++i) {
- const QString arg = args.at(i);
- if (arg == QStringLiteral("--main-file")) {
- ++i;
- m_mainFile = QUrl::fromUserInput(args.at(i));
- } else if (arg == QStringLiteral("--applications-root")) {
- ++i;
- m_appsRoot = args.at(i);
- } else if (arg == QStringLiteral("--show-fps")) {
- m_isShowFPSEnabled = true;
- } else if (arg == QStringLiteral("-h")
- || arg == QStringLiteral("--help")
- || arg == QStringLiteral("-?")) {
- return false;
- } else {
- qCritical() << "Unknown command line argument:" << args.at(i);
- return false;
- }
- }
- return true;
-}
-
-QUrl ApplicationSettings::mainFile() const
-{
- return m_mainFile;
-}
diff --git a/src/applicationsettings.h b/src/applicationsettings.h
deleted file mode 100644
index ad50e57..0000000
--- a/src/applicationsettings.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-
-#ifndef APPLICATIONSETTINGS_H
-#define APPLICATIONSETTINGS_H
-
-#include <QObject>
-#include <QUrl>
-
-class ApplicationSettings : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QUrl mainFile READ mainFile NOTIFY mainFileChanged)
- Q_PROPERTY(QString appsRoot READ appsRoot NOTIFY appsRootChanged)
- Q_PROPERTY(bool isShowFPSEnabled READ isShowFPSEnabled NOTIFY isShowFPSEnabledChanged)
-public:
- explicit ApplicationSettings(QString appsRoot, QObject *parent = 0);
-
- QUrl mainFile() const;
- QString appsRoot() const;
- bool isShowFPSEnabled() const;
-
- bool parseCommandLineArguments();
-
-signals:
- void mainFileChanged(QUrl newFile);
- void appsRootChanged(QString appRoot);
- void isShowFPSEnabledChanged(bool isEnabled);
-
-private:
- QUrl m_mainFile;
- QString m_appsRoot;
- bool m_isShowFPSEnabled;
-
-};
-
-#endif // APPLICATIONSETTINGS_H
diff --git a/src/applicationsmodel.h b/src/applicationsmodel.h
deleted file mode 100644
index 74122e1..0000000
--- a/src/applicationsmodel.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#ifndef APPLICATIONSMODEL_H
-#define APPLICATIONSMODEL_H
-
-#include <QAbstractItemModel>
-#include <QUrl>
-
-
-struct AppData {
- QString name;
- QString description;
- QString main;
- QUrl location;
- QUrl icon;
- int priority;
-};
-
-
-class ApplicationsModel : public QAbstractItemModel
-{
- Q_OBJECT
-public:
- enum {
- NameRole = Qt::UserRole + 1,
- DescriptionRole,
- MainFileRole,
- LocationRole,
- IconRole,
- LargeIconNameRole,
- PriorityRole
- };
-
- explicit ApplicationsModel(QObject *parent = 0);
-
- Q_INVOKABLE void initialize(const QString &appsRoot);
-
- QModelIndex index(int r, int c, const QModelIndex &) const { return createIndex(r, c); }
- QModelIndex parent(const QModelIndex&) const { return QModelIndex(); }
- int rowCount(const QModelIndex&) const { return m_data.size(); }
- int columnCount(const QModelIndex&) const { return 1; }
- QVariant data(const QModelIndex &index, int role) const;
-
- QHash<int, QByteArray> roleNames() const;
-
- Q_INVOKABLE QString nameAt(int i) const;
- Q_INVOKABLE QString locationAt(int i) const;
-
- Q_INVOKABLE QVariant query(int i, const QString &name) const;
-
-signals:
- void ready();
-
-private slots:
- void handleIndexingResult(QList<AppData> results);
-
-private:
-
- QList<AppData> m_data;
-};
-
-
-
-#endif // APPLICATIONSMODEL_H
diff --git a/src/applicationsmodel_p.h b/src/applicationsmodel_p.h
deleted file mode 100644
index ba1254b..0000000
--- a/src/applicationsmodel_p.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#ifndef APPLICATIONSMODEL_P_H
-#define APPLICATIONSMODEL_P_H
-
-#include "applicationsmodel.h"
-
-#include <QThread>
-
-class IndexingThread : public QThread
-{
- Q_OBJECT
-public:
- virtual ~IndexingThread() = default;
- void run() final;
-
-private:
- void parseDemo(QString path, QList<AppData> &results);
-
-signals:
- void indexingFinished(QList<AppData> results);
-
-public:
- QString root;
- ApplicationsModel *model = nullptr;
-};
-
-#endif // APPLICATIONSMODEL_P_H
diff --git a/src/automationhelper.cpp b/src/automationhelper.cpp
deleted file mode 100644
index b4c6a99..0000000
--- a/src/automationhelper.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#include "automationhelper.h"
-#include <QCoreApplication>
-#include <QApplication>
-#include <QQuickWindow>
-
-AutomationHelper::AutomationHelper(QObject* parent) :
- QObject(parent)
-{
-}
-
-/*!
- * \brief Click center of given QQuickItem
- * \param item Item to click
- */
-void AutomationHelper::click(QQuickItem* item)
-{
- QQuickWindow* window = item->window();
- if (!window) {
- qWarning()<<"No window for item "<<item;
- return;
- }
-
- int centerX = static_cast<int>(item->width()/2);
- int centerY = static_cast<int>(item->height()/2);
- QPointF globalCoordinates = item->mapToGlobal(QPoint(centerX, centerY));
- QPointF windowCoordinates = window->mapFromGlobal(globalCoordinates.toPoint());
-
- QMouseEvent pressEvent(QEvent::MouseButtonPress, windowCoordinates, windowCoordinates, windowCoordinates,
- Qt::MouseButton::LeftButton, Qt::NoButton, Qt::NoModifier, Qt::MouseEventSynthesizedByApplication);
- QMouseEvent releaseEvent(QEvent::MouseButtonRelease, windowCoordinates, windowCoordinates, windowCoordinates,
- Qt::MouseButton::LeftButton, Qt::NoButton, Qt::NoModifier, Qt::MouseEventSynthesizedByApplication);
- QApplication::instance()->sendEvent(window, &pressEvent);
- QApplication::instance()->sendEvent(window, &releaseEvent);
-}
-
-/*!
- * \brief Click center of child item of given QQuickItem
- * \param item Item which child to click
- * \param childObjectName Object name of the child to click
- */
-void AutomationHelper::clickChildObject(QQuickItem* item, QString childObjectName)
-{
- QQuickItem* obj = findChildObject(item, childObjectName);
- if (!obj) {
- qWarning()<<"No such child "<<childObjectName<<" for "<<item;
- return;
- }
-
- click(obj);
-}
-
-/*!
- * \brief Find child item of given QQuickItem
- *
- * This function is needed for exposing findChildObject to QML
- * \param item Item which child to find
- * \param childObjectName Object name of the child to find
- * \return found child
- */
-QQuickItem* AutomationHelper::findChildObject(QQuickItem* item, QString childObjectName)
-{
- return item->findChild<QQuickItem*>(childObjectName);
-}
diff --git a/src/automationhelper.h b/src/automationhelper.h
deleted file mode 100644
index 8ed5000..0000000
--- a/src/automationhelper.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#ifndef AUTOMATIONHELPER_H
-#define AUTOMATIONHELPER_H
-
-#include <QObject>
-#include <QQuickItem>
-
-class AutomationHelper : public QObject
-{
- Q_OBJECT
-public:
- AutomationHelper(QObject *parent = 0);
-
-public slots:
- void click(QQuickItem* item);
- void clickChildObject(QQuickItem* item, QString childObjectName);
- QQuickItem* findChildObject(QQuickItem* item, QString childObjectName);
-};
-
-#endif // AUTOMATIONHELPER_H
diff --git a/src/engine.cpp b/src/engine.cpp
deleted file mode 100644
index d51a034..0000000
--- a/src/engine.cpp
+++ /dev/null
@@ -1,176 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#include "engine.h"
-#include "fpscounter.h"
-
-#include <QFile>
-#include <QTimerEvent>
-#include <QDebug>
-
-#include <QGuiApplication>
-#include <QScreen>
-
-#include <QQmlEngine>
-
-#include <QQuickItem>
-#include <QQuickWindow>
-
-
-#define ENGINE_STATE_RUNNING QStringLiteral("running")
-#define ENGINE_STATE_SETTINGS QStringLiteral("settings")
-
-#define ENGINE_STATE_APPLAUNCHING QStringLiteral("app-launching")
-#define ENGINE_STATE_APPRUNNING QStringLiteral("app-running")
-#define ENGINE_STATE_APPCLOSING QStringLiteral("app-closing")
-
-Engine::Engine(QQuickItem *parent)
- : QQuickItem(parent)
- , m_fpsCounter(nullptr)
- , m_fps(0)
- , m_intro_done(false)
- , m_apps_ready(false)
- , m_fps_enabled(false)
-{
- m_state = ENGINE_STATE_RUNNING;
-
- QScreen *screen = QGuiApplication::primaryScreen();
- m_screenSize = screen->size();
- m_dpcm = screen->physicalDotsPerInchY() / 2.54f;
-
- // Make the buttons smaller for smaller screens to compensate for that
- // one typically holds it nearer to the eyes.
- float low = 5;
- float high = 20;
- float screenSizeCM = qMax<float>(qMin(m_screenSize.width(), m_screenSize.height()) / m_dpcm, low);
- m_dpcm *= (screenSizeCM - low) / (high - low) * 0.5 + 0.5;
-
- connect(this, SIGNAL(windowChanged(QQuickWindow*)), this, SLOT(windowChanged(QQuickWindow*)));
-}
-
-bool Engine::checkForGlAvailability()
-{
- QQuickWindow window;
- return ((window.sceneGraphBackend() != "software") &&
- (window.sceneGraphBackend() != "softwarecontext"));
-}
-
-void Engine::updateReadyness()
-{
- if (!m_intro_done)
- return;
- if (!m_apps_ready)
- return;
-
- m_state = ENGINE_STATE_RUNNING;
- emit stateChanged(m_state);
-}
-
-void Engine::updateFPSCounter()
-{
- if (m_fpsCounter) {
- delete m_fpsCounter;
- m_fpsCounter = nullptr;
- }
-
- if (m_fps_enabled && window()) {
- m_fpsCounter = new FpsCounter(window());
- connect(m_fpsCounter, SIGNAL(fps(qreal)), this, SLOT(setFps(qreal)));
- }
-}
-
-void Engine::setState(const QString &state)
-{
- if (state == m_state)
- return;
- m_state = state;
- emit stateChanged(m_state);
-}
-
-void Engine::setFps(qreal fps)
-{
- fps = qRound(fps);
- if (qFuzzyCompare(m_fps, fps))
- return;
- m_fps = fps;
- emit fpsChanged(m_fps);
-}
-
-void Engine::windowChanged(QQuickWindow *window)
-{
- Q_UNUSED(window)
- //When window changes we need to recreate the fps counters
- updateFPSCounter();
-}
-
-void Engine::setFpsEnabled(bool enabled)
-{
- if (m_fps_enabled == enabled)
- return;
- m_fps_enabled = enabled;
-
- updateFPSCounter();
-
- emit fpsEnabledChanged(m_fps_enabled);
-}
-
-bool Engine::fileExists(const QUrl &fileName)
-{
- QFile file(fileName.toLocalFile());
- return file.exists();
-}
-
-void Engine::launchApplication(const QUrl &path, const QString &mainFile, const QString &name, const QString &desc)
-{
- // only launch apps when in the homescreen...
- if (m_state != QStringLiteral("running"))
- return;
-
- m_applicationMain = path;
- m_applicationMain.setPath(path.path() + "/" + mainFile);
- m_applicationName = name;
- m_applicationDescription = desc;
- emit applicationMainChanged(m_applicationMain);
- emit applicationNameChanged(m_applicationName);
- emit applicationDescriptionChanged(m_applicationName);
- setState(ENGINE_STATE_APPLAUNCHING);
-}
-
-void Engine::closeApplication()
-{
- emit activeIconChanged(nullptr);
-
- m_applicationMain = QUrl();
- m_applicationName = QString();
- m_applicationDescription = QString();
- emit applicationMainChanged(m_applicationMain);
- emit applicationNameChanged(m_applicationName);
- emit applicationDescriptionChanged(m_applicationName);
-
- setState(ENGINE_STATE_RUNNING);
-}
diff --git a/src/engine.h b/src/engine.h
deleted file mode 100644
index 3ef185c..0000000
--- a/src/engine.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#ifndef ENGINE_H
-#define ENGINE_H
-
-#include <QQuickItem>
-#include <QUrl>
-#include <QSize>
-
-#include <QColor>
-
-class QQmlEngine;
-class FpsCounter;
-class QQuickWindow;
-
-class Engine : public QQuickItem
-{
- Q_OBJECT
-
- Q_PROPERTY(QString state READ state WRITE setState NOTIFY stateChanged)
-
- Q_PROPERTY(QUrl applicationMain READ applicationMain NOTIFY applicationMainChanged)
- Q_PROPERTY(QString applicationName READ applicationName NOTIFY applicationNameChanged)
- Q_PROPERTY(QString applicationDescription READ applicationDescription NOTIFY applicationDescriptionChanged)
-
- Q_PROPERTY(bool fpsEnabled READ isFpsEnabled WRITE setFpsEnabled NOTIFY fpsEnabledChanged)
- Q_PROPERTY(qreal fps READ fps NOTIFY fpsChanged)
-
- Q_PROPERTY(const QString qtVersion READ qtVersion CONSTANT)
-
-public:
- explicit Engine(QQuickItem *parent = nullptr);
-
- QString state() const { return m_state; }
- void setState(const QString &state);
-
- bool isFpsEnabled() const { return m_fps_enabled; }
- void setFpsEnabled(bool enabled);
-
- qreal fps() const { return m_fps; }
-
- QString qtVersion() const { return QT_VERSION_STR; }
-
- QUrl applicationMain() const { return m_applicationMain; }
- QString applicationName() const { return m_applicationName; }
- QString applicationDescription() const { return m_applicationDescription; }
-
- static bool checkForGlAvailability();
-
- Q_INVOKABLE int titleFontSize() const { return qMax<int>(m_dpcm * 0.9, 20); }
- Q_INVOKABLE int centimeter(int val = 1) const { return (m_dpcm * val); }
- Q_INVOKABLE int mm(int val) const { return (int)(m_dpcm * val * 0.1); }
-
-protected:
-
-signals:
- void stateChanged(const QString &state);
- void activeIconChanged(QQuickItem *item);
- void applicationMainChanged(const QUrl &applicationMain);
- void applicationNameChanged(const QString &applicationName);
- void applicationDescriptionChanged(const QString &applicationName);
- void fpsChanged(qreal fps);
- void fpsEnabledChanged(bool enabled);
-
-public slots:
- void markApplicationsModelReady() { m_apps_ready = true; updateReadyness(); }
- void markIntroAnimationDone() { m_intro_done = true; updateReadyness(); }
-
- void launchApplication(const QUrl &location, const QString &mainFile, const QString &name, const QString &desc);
- void closeApplication();
-
- void setFps(qreal fps);
-
- bool fileExists(const QUrl &fileName);
-
-private slots:
- void windowChanged(QQuickWindow *window);
-
-private:
- void updateReadyness();
- void updateFPSCounter();
-
- QString m_state;
-
- QUrl m_applicationMain;
- QString m_applicationName;
- QString m_applicationDescription;
-
- QSize m_screenSize;
- qreal m_dpcm;
-
- FpsCounter *m_fpsCounter;
- qreal m_fps;
-
- uint m_intro_done : 1;
- uint m_apps_ready : 1;
- uint m_fps_enabled : 1;
-};
-
-#endif // ENGINE_H
diff --git a/src/fpscounter.cpp b/src/fpscounter.cpp
deleted file mode 100644
index 9c764f7..0000000
--- a/src/fpscounter.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#include "fpscounter.h"
-
-#include <QtQuick/QQuickWindow>
-
-FpsCounter::FpsCounter(QQuickWindow *window)
-{
- connect(window, SIGNAL(frameSwapped()), this, SLOT(frameSwapped()));
- startTimer(1000);
- m_frameCounter = 0;
- m_timer.start();
-}
-
-void FpsCounter::timerEvent(QTimerEvent *)
-{
- emit fps(m_frameCounter * 1000.0 / m_timer.elapsed());
- m_frameCounter = 0;
- m_timer.start();
-}
diff --git a/src/fpscounter.h b/src/fpscounter.h
deleted file mode 100644
index a64719a..0000000
--- a/src/fpscounter.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#ifndef FPSCOUNTER_H
-#define FPSCOUNTER_H
-
-#include <QObject>
-#include <QElapsedTimer>
-
-class QQuickWindow;
-
-class FpsCounter : public QObject
-{
- Q_OBJECT
-public:
- FpsCounter(QQuickWindow *window);
-
- void timerEvent(QTimerEvent *);
-
-signals:
- void fps(qreal newFps);
-
-public slots:
- void frameSwapped() { ++m_frameCounter; }
-
-private:
- QElapsedTimer m_timer;
- int m_frameCounter;
-};
-
-#endif // FPSCOUNTER_H
diff --git a/src/imageproviders.h b/src/imageproviders.h
deleted file mode 100644
index 89ac6d1..0000000
--- a/src/imageproviders.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#ifndef IMAGEPROVIDERS_H
-#define IMAGEPROVIDERS_H
-
-#include <QQuickImageProvider>
-
-
-class QtImageProvider : public QQuickImageProvider
-{
-public:
- QtImageProvider();
- QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
-};
-
-class QtSquareImageProvider : public QQuickImageProvider
-{
-public:
- QtSquareImageProvider();
- QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
-};
-
-class QtImageMaskProvider : public QQuickImageProvider
-{
-public:
- QtImageMaskProvider();
- QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
-};
-#endif // IMAGEPROVIDERS_H
diff --git a/src/main.cpp b/src/main.cpp
deleted file mode 100644
index 154973c..0000000
--- a/src/main.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#include <QtCore/QDebug>
-
-#include <QtWidgets/QApplication>
-#include <QtGui/QFont>
-#include <QtGui/QFontDatabase>
-#include <QtCore/QFile>
-
-#include <QtQml/QQmlApplicationEngine>
-#include <QtQml/QQmlContext>
-#include <QtQml/QQmlComponent>
-#include <QStandardPaths>
-#include <QIcon>
-
-#include <QQuickStyle>
-
-#if defined(USE_QTWEBENGINE)
-#include <qtwebengineglobal.h>
-#endif
-
-#include "engine.h"
-#include "applicationsmodel.h"
-#include "applicationsettings.h"
-#include "settingsmanager.h"
-#include "imageproviders.h"
-#include "circularindicator.h"
-#include "automationhelper.h"
-
-void displayHelp(const char *appName)
-{
- printf("Usage: \n"
- " > %s [options]\n"
- "\n"
- "Options:\n"
- " --main-file [qml-file] Launches an alternative QML file\n"
- " --applications-root [path] Specify a different applications root\n"
- " --show-fps Show FPS\n"
- , appName
- );
-}
-
-int main(int argc, char **argv)
-{
-#if defined(USE_QTWEBENGINE)
- // This is currently needed by all QtWebEngine applications using the HW accelerated QQuickWebView.
- // It enables sharing the QOpenGLContext of all QQuickWindows of the application.
- // We have to do so until we expose public API for it in Qt or choose to enable it by default.
- QtWebEngine::initialize();
-#endif
- QSettings launcherSettings("Qt", "QtLauncher");
-
- qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));
-
- QByteArray applicationsRootStr = launcherSettings.value("defaultApplicationRoot").toByteArray();
- qputenv("QT_QUICK_CONTROLS_CONF", applicationsRootStr + "/qtquickcontrols2/qtquickcontrols2.conf");
- QIcon::setThemeSearchPaths(QStringList() << applicationsRootStr + "/qtquickcontrols2/icons");
-
- QIcon::setThemeName("gallery");
-
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
-
- QApplication app(argc, argv);
- app.setApplicationVersion(APPLICATION_VERSION);
-
- QFontDatabase::addApplicationFont(":/qml/fonts/TitilliumWeb-Light.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/TitilliumWeb-Regular.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/TitilliumWeb-SemiBold.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/TitilliumWeb-Bold.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/TitilliumWeb-Black.ttf");
-
- //For eBike demo
- QFontDatabase::addApplicationFont(":/qml/fonts/Montserrat-Bold.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/Montserrat-Light.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/Montserrat-Medium.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/Montserrat-Regular.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/Teko-Bold.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/Teko-Light.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/Teko-Medium.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/Teko-Regular.ttf");
- QFontDatabase::addApplicationFont(":/qml/fonts/fontawesome-webfont.ttf");
-
- ApplicationSettings applicationSettings(applicationsRootStr);
-
- if (!applicationSettings.parseCommandLineArguments()) {
- displayHelp(argv[0]);
- return 0;
- }
-
- qDebug() << "Main File:" << applicationSettings.mainFile();
- qDebug() << "Applications Root:" << applicationSettings.appsRoot();
- qDebug() << "Show FPS:" << (applicationSettings.isShowFPSEnabled() ? "yes" : "no");
-
-
- qmlRegisterType<ApplicationsModel>("com.qtcompany.B2QtLauncher", 1, 0, "LauncherApplicationsModel");
- qmlRegisterType<Engine>("com.qtcompany.B2QtLauncher", 1, 0, "LauncherEngine");
- qmlRegisterType<CircularIndicator>("Circle", 1, 0, "CircularIndicator");
- qmlRegisterType<AutomationHelper>("AutomationHelper", 1, 0, "AutomationHelper");
-
- QQmlApplicationEngine engine;
- SettingsManager settings;
-
- QtImageProvider imageProvider;
- QtSquareImageProvider squareImageProvider;
- QtImageMaskProvider imageMaskProvider;
-
- // Material style can be set only for devices supporting GL
- QString style = launcherSettings.value("style").toString();
- if (Engine::checkForGlAvailability()) {
- if (style.isEmpty())
- launcherSettings.setValue("style", "Material");
- } else {
- qDebug() << "No GL available, skipping Material style";
- launcherSettings.setValue("style", "Default");
- }
- QQuickStyle::setStyle(launcherSettings.value("style").toString());
-
- engine.rootContext()->setContextProperty("_backgroundColor", launcherSettings.value("backgroundColor", "#09102b"));
- engine.rootContext()->setContextProperty("_primaryGreen", launcherSettings.value("primaryGreen", "#41cd52"));
- engine.rootContext()->setContextProperty("_mediumGreen", launcherSettings.value("mediumGreen", "#21be2b"));
- engine.rootContext()->setContextProperty("_darkGreen", launcherSettings.value("darkGreen", "#17a81a"));
- engine.rootContext()->setContextProperty("_primaryGrey", launcherSettings.value("primaryGrey", "#9d9faa"));
- engine.rootContext()->setContextProperty("_secondaryGrey", launcherSettings.value("secondaryGrey", "#3a4055"));
-
- engine.rootContext()->setContextProperty("VideosLocation",
- launcherSettings.value("videosLocation"));
- engine.rootContext()->setContextProperty("DefaultVideoUrl",
- launcherSettings.value("defaultVideoUrl"));
-
-
- engine.addImageProvider("QtImage", &imageProvider);
- engine.addImageProvider("QtSquareImage", &squareImageProvider);
- engine.addImageProvider("QtImageMask", &imageMaskProvider);
- engine.rootContext()->setContextProperty("globalSettings", &settings);
- engine.rootContext()->setContextProperty("applicationSettings", &applicationSettings);
- engine.rootContext()->setContextProperty("qpa_platform", qGuiApp->platformName());
- engine.rootContext()->setContextProperty("availableStyles", QQuickStyle::availableStyles());
- engine.load(applicationSettings.mainFile());
-
- return app.exec();
-}
diff --git a/src/settingsmanager.cpp b/src/settingsmanager.cpp
deleted file mode 100644
index 58acbf1..0000000
--- a/src/settingsmanager.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#include "settingsmanager.h"
-
-static const int DEFAULT_DEMO_STARTUP_TIME = 2 * 60;
-
-SettingsManager::SettingsManager(QObject *parent) :
- QObject(parent),
- m_settings("The Qt Company", "Qt Demo Launcher")
-{
-}
-
-SettingsManager::~SettingsManager()
-{
- m_settings.sync();
-}
-
-QVariant SettingsManager::getValue(const QString &key, const QVariant &defaultValue)
-{
- return m_settings.value(key, defaultValue);
-}
-
-void SettingsManager::setValue(const QString &key, const QVariant &value)
-{
- m_settings.setValue(key, value);
- m_settings.sync();
-}
-
-
-bool SettingsManager::gridSelected()
-{
- return getValue("gridSelected", false).toBool();
-}
-
-void SettingsManager::setGridSelected(bool enabled)
-{
- if (gridSelected() == enabled)
- return;
-
- setValue("gridSelected", enabled);
- emit gridSelectedChanged(enabled);
-}
-
-bool SettingsManager::mouseSelected()
-{
- return getValue("mouseSelected", false).toBool();
-}
-
-void SettingsManager::setMouseSelected(bool enabled)
-{
- if (mouseSelected() == enabled)
- return;
-
- setValue("mouseSelected", enabled);
- emit mouseSelectedChanged(enabled);
-}
-
-bool SettingsManager::rotationSelected()
-{
- return getValue("rotationSelected", false).toBool();
-}
-
-void SettingsManager::setRotationSelected(bool enabled)
-{
- if (rotationSelected() == enabled)
- return;
- setValue("rotationSelected", enabled);
- emit rotationSelectedChanged(enabled);
-}
-
-bool SettingsManager::demoModeSelected()
-{
- return getValue("demoModeSelected", false).toBool();
-}
-
-void SettingsManager::setDemoModeSelected(bool enabled)
-{
- if (demoModeSelected() == enabled)
- return;
- setValue("demoModeSelected", enabled);
- emit demoModeSelectedChanged(enabled);
-}
-
-int SettingsManager::demoModeStartupTime()
-{
- return getValue("demoModeStartupTime", DEFAULT_DEMO_STARTUP_TIME).toInt();
-}
-
-void SettingsManager::setDemoModeStartupTime(int startupTime)
-{
- if (demoModeStartupTime() == startupTime)
- return;
- setValue("demoModeStartupTime", startupTime);
- emit demoModeStartupTimeChanged(startupTime);
-}
diff --git a/src/settingsmanager.h b/src/settingsmanager.h
deleted file mode 100644
index df6fcfa..0000000
--- a/src/settingsmanager.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Device Creation.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see 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$
-**
-****************************************************************************/
-#ifndef SETTINGSMANAGER_H
-#define SETTINGSMANAGER_H
-
-#include <QObject>
-#include <QSettings>
-
-class SettingsManager : public QObject
-{
- Q_OBJECT
-public:
- explicit SettingsManager(QObject *parent = nullptr);
- ~SettingsManager();
-
- Q_INVOKABLE QVariant getValue(const QString& key, const QVariant &defaultValue);
- Q_INVOKABLE void setValue(const QString& key, const QVariant &value);
-
- Q_PROPERTY(bool gridSelected READ gridSelected WRITE setGridSelected NOTIFY gridSelectedChanged)
-
- bool gridSelected();
- void setGridSelected(bool enabled);
-
- Q_PROPERTY (bool mouseSelected READ mouseSelected WRITE setMouseSelected NOTIFY mouseSelectedChanged)
-
- bool mouseSelected();
- void setMouseSelected(bool enabled);
-
- Q_PROPERTY (bool rotationSelected READ rotationSelected WRITE setRotationSelected NOTIFY rotationSelectedChanged)
- Q_PROPERTY (bool demoModeSelected READ demoModeSelected WRITE setDemoModeSelected NOTIFY demoModeSelectedChanged)
- Q_PROPERTY (int demoModeStartupTime READ demoModeStartupTime WRITE setDemoModeStartupTime NOTIFY demoModeStartupTimeChanged)
-
- bool rotationSelected();
- void setRotationSelected(bool enabled);
- bool demoModeSelected();
- void setDemoModeSelected(bool enabled);
- int demoModeStartupTime();
- void setDemoModeStartupTime(int startupTime);
-
-signals:
- void gridSelectedChanged(bool enabled);
- void mouseSelectedChanged(bool enabled);
- void rotationSelectedChanged(bool enabled);
- void demoModeSelectedChanged(bool enabled);
- void demoModeStartupTimeChanged(int startupTime);
-
-private:
- QSettings m_settings;
-};
-
-#endif // SETTINGSMANAGER_H
diff --git a/startup.pro b/startup.pro
deleted file mode 100644
index aecf0aa..0000000
--- a/startup.pro
+++ /dev/null
@@ -1,45 +0,0 @@
-QT += qml quick widgets quickcontrols2
-TARGET = qtlauncher
-
-DEFINES += APPLICATION_VERSION=\\\"2.0.1\\\"
-
-qtHaveModule(webengine) {
- DEFINES += USE_QTWEBENGINE
- QT += webengine
-}
-
-HEADERS += \
- src/engine.h \
- src/applicationsmodel.h \
- src/applicationsmodel_p.h \
- src/fpscounter.h \
- src/applicationsettings.h \
- src/settingsmanager.h \
- src/imageproviders.h \
- src/circularindicator.h \
- src/automationhelper.h
-
-SOURCES += src/main.cpp \
- src/engine.cpp \
- src/applicationsmodel.cpp \
- src/fpscounter.cpp \
- src/applicationsettings.cpp \
- src/settingsmanager.cpp \
- src/imageproviders.cpp \
- src/circularindicator.cpp \
- src/automationhelper.cpp
-
-target.path = $$[INSTALL_ROOT]/usr/bin
-
-INSTALLS += target
-
-RESOURCES += \
- icons.qrc \
- images.qrc \
- fonts.qrc \
- qml.qrc
-
-static {
- QTPLUGIN += qtvirtualkeyboardplugin
- QT += svg
-}