diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2020-11-18 16:52:47 +0100 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2020-11-19 11:41:39 +0000 |
commit | a369c5b10c62a100309b0da04fe50d7d2a5c87af (patch) | |
tree | 104fd8d16e3213047e82aadb5a8764b95b6a411e /src/plugins/studiowelcome/qml | |
parent | 3440baecd33cf7d93cb46f9c9ff9324c0ebc18b7 (diff) |
StudioWelcome: Add option for UsageStatistic plugin
Change-Id: I865d4594ca8cd40390b561731259ddb51c83641c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/studiowelcome/qml')
4 files changed, 49 insertions, 1 deletions
diff --git a/src/plugins/studiowelcome/qml/splashscreen/Welcome_splash.qml b/src/plugins/studiowelcome/qml/splashscreen/Welcome_splash.qml index 744fe6b2e2..a41f600323 100644 --- a/src/plugins/studiowelcome/qml/splashscreen/Welcome_splash.qml +++ b/src/plugins/studiowelcome/qml/splashscreen/Welcome_splash.qml @@ -28,6 +28,7 @@ import QtQuick.Controls 2.3 import StudioFonts 1.0 import QtQuick.Layouts 1.0 import projectmodel 1.0 +import usagestatistics 1.0 Image { id: welcome_splash @@ -249,5 +250,21 @@ Image { ProjectModel { id: projectModel } + + UsageStatisticModel { + id: usageStatisticModel + } + } + + NoShowCheckbox { + id: usageStatisticCheckBox + x: -47 + y: 391 + text: "Enable Usage Statistics" + padding: 0 + scale: 0.5 + checked: usageStatisticModel.usageStatisticEnabled + + onCheckedChanged: usageStatisticModel.setPluginEnabled(usageStatisticCheckBox.checked) } } diff --git a/src/plugins/studiowelcome/qml/splashscreen/welcome_screens.qmlproject b/src/plugins/studiowelcome/qml/splashscreen/welcome_screens.qmlproject index de393d88b0..d43d2914ba 100644 --- a/src/plugins/studiowelcome/qml/splashscreen/welcome_screens.qmlproject +++ b/src/plugins/studiowelcome/qml/splashscreen/welcome_screens.qmlproject @@ -39,7 +39,7 @@ Project { directory: "." } /* List of plugin directories passed to QML runtime */ - importPaths: [ "imports", "mockData", "../../../../share/3rdparty/studiofonts" ] + importPaths: [ "imports", "../welcomepage/mockData", "../../../../share/3rdparty/studiofonts" ] Environment { QT_AUTO_SCREEN_SCALE_FACTOR: "1" diff --git a/src/plugins/studiowelcome/qml/welcomepage/mockData/usagestatistics/UsageStatisticModel.qml b/src/plugins/studiowelcome/qml/welcomepage/mockData/usagestatistics/UsageStatisticModel.qml new file mode 100644 index 0000000000..c19250f214 --- /dev/null +++ b/src/plugins/studiowelcome/qml/welcomepage/mockData/usagestatistics/UsageStatisticModel.qml @@ -0,0 +1,30 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** 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 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** 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. +** +****************************************************************************/ + +import QtQuick 2.0 + +QtObject { + property bool usageStatisticEnabled: false +} diff --git a/src/plugins/studiowelcome/qml/welcomepage/mockData/usagestatistics/qmldir b/src/plugins/studiowelcome/qml/welcomepage/mockData/usagestatistics/qmldir new file mode 100644 index 0000000000..c83a43a8ae --- /dev/null +++ b/src/plugins/studiowelcome/qml/welcomepage/mockData/usagestatistics/qmldir @@ -0,0 +1 @@ +UsageStatisticModel 1.0 UsageStatisticModel.qml |