Rework QtDS Splash Screen to show telemetry options

* clean up Design to a more minimal style
* remove some unused components

Change-Id: I37af39a1cae6b6f14f769383ac73c00570729f4f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Brook Cronin
2022-04-26 14:50:29 +02:00
committed by Thomas Hartmann
parent 8908a38bfb
commit 7a5cfebc9d
9 changed files with 1079 additions and 106 deletions

View File

@@ -0,0 +1,36 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick Designer Components.
**
** $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 Qt5Compat.GraphicalEffects
ColorOverlay {
id: colorOverlay
color: "#80fff000"
}

View File

@@ -0,0 +1,201 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick Studio Components.
**
** $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.10
import QtQuick.Shapes 1.0
/*!
\qmltype EllipseItem
\inqmlmodule QtQuick.Studio.Components
\since QtQuick.Studio.Components 1.0
\inherits Shape
\brief A filled ellipse with an optional border.
*/
Shape {
id: root
width: 200
height: 150
/*!
The gradient of the rectangle fill color.
By default, no gradient is enabled and the value is null. In this case, the
fill uses a solid color based on the value of \l fillColor.
When set, \l fillColor is ignored and filling is done using one of the
\l ShapeGradient subtypes.
\note The \l Gradient type cannot be used here. Rather, prefer using one of
the advanced subtypes, like \l LinearGradient.
*/
property alias gradient: path.fillGradient
/*!
The style of the rectangle border.
\value ShapePath.SolidLine
A solid line. This is the default value.
\value ShapePath.DashLine
Dashes separated by a few pixels.
The \l dashPattern property specifies the dash pattern.
\sa Qt::PenStyle
*/
property alias strokeStyle: path.strokeStyle
/*!
The width of the border of the rectangle.
The default value is 4.
A width of 1 creates a thin line. For no line, use a negative value or a
transparent color.
\note The width of the rectangle's border does not affect the geometry of
the rectangle itself or its position relative to other items if anchors are
used.
The border is rendered within the rectangle's boundaries.
*/
property alias strokeWidth: path.strokeWidth
/*!
The color used to draw the border of the rectangle.
When set to \c transparent, no line is drawn.
The default value is \c red.
\sa QColor
*/
property alias strokeColor: path.strokeColor
/*!
The dash pattern of the rectangle border specified as the dashes and the
gaps between them.
The dash pattern is specified in units of the pen's width. That is, a dash
with the length 5 and width 10 is 50 pixels long.
The default value is (4, 2), meaning a dash of 4 * \l strokeWidth pixels
followed by a space of 2 * \l strokeWidth pixels.
\sa QPen::setDashPattern()
*/
property alias dashPattern: path.dashPattern
/*!
The rectangle fill color.
A gradient for the fill can be specified by using \l gradient. If both a
color and a gradient are specified, the gradient is used.
When set to \c transparent, no filling occurs.
The default value is \c white.
*/
property alias fillColor: path.fillColor
/*!
The starting point of the dash pattern for the rectangle border.
The offset is measured in terms of the units used to specify the dash
pattern. For example, a pattern where each stroke is four units long,
followed by a gap of two units, will begin with the stroke when drawn
as a line. However, if the dash offset is set to 4.0, any line drawn
will begin with the gap. Values of the offset up to 4.0 will cause part
of the stroke to be drawn first, and values of the offset between 4.0 and
6.0 will cause the line to begin with part of the gap.
The default value is 0.
\sa QPen::setDashOffset()
*/
property alias dashOffset: path.dashOffset
layer.enabled: root.antialiasing
layer.smooth: root.antialiasing
layer.samples: root.antialiasing ? 4 : 0
/*!
The border is rendered within the rectangle's boundaries, outside of them,
or on top of them.
*/
property int borderMode: 0
property real borderOffset: {
if (root.borderMode === 0)
return root.strokeWidth * 0.5
if (root.borderMode === 1)
return 0
return -root.strokeWidth * 0.5
}
Item {
anchors.fill: parent
anchors.margins: {
if (root.borderMode === 0)
return 0
if (root.borderMode === 1)
return -root.strokeWidth * 0.5
return -root.strokeWidth
}
}
ShapePath {
id: path
joinStyle: ShapePath.MiterJoin
strokeWidth: 4
strokeColor: "red"
startX: root.width * 0.5
startY: root.borderOffset
PathArc {
x: path.startX
y: root.height - root.borderOffset
radiusX: root.width * 0.5 - root.borderOffset
radiusY: root.height * 0.5 - root.borderOffset
useLargeArc: true
}
PathArc {
x: path.startX
y: path.startY
radiusX: root.width * 0.5 - root.borderOffset
radiusY: root.height * 0.5 - root.borderOffset
useLargeArc: true
}
}
}

View File

@@ -0,0 +1,36 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick Designer Components.
**
** $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.8
import Qt5Compat.GraphicalEffects
FastBlur {
id: fastBlur
radius: 20
}

View File

@@ -0,0 +1,46 @@
/****************************************************************************
**
** Copyright (C) 2022 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.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import StudioFonts 1.0
import projectmodel 1.0
import usagestatistics 1.0
EllipseItem {
id: ellipse
width: 529
height: 391
opacity: 0.495
layer.enabled: true
layer.effect: FastBlurEffect {
id: fastBlur
radius: 66
transparentBorder: true
cached: true
}
fillColor: "#878787"
strokeColor: "#00ff0000"
}

View File

@@ -0,0 +1,117 @@
/****************************************************************************
**
** Copyright (C) 2022 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.15
import QtQuick.Templates 2.15
Button {
id: control
implicitWidth: Math.max(
buttonBackground ? buttonBackground.implicitWidth : 0,
textItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(
buttonBackground ? buttonBackground.implicitHeight : 0,
textItem.implicitHeight + topPadding + bottomPadding)
leftPadding: 4
rightPadding: 4
text: "My Button"
property alias fontpixelSize: textItem.font.pixelSize
property bool forceHover: false
state: "normal"
background: buttonBackground
Rectangle {
id: buttonBackground
color: "#00000000"
implicitWidth: 100
implicitHeight: 40
opacity: enabled ? 1 : 0.3
radius: 2
border.color: "#047eff"
anchors.fill: parent
}
contentItem: textItem
Text {
id: textItem
text: control.text
font.pixelSize: 18
opacity: enabled ? 1.0 : 0.3
color: "#ffffff"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
rightPadding: 5
leftPadding: 5
}
states: [
State {
name: "normal"
when: !control.down && !control.hovered && !control.forceHover
PropertyChanges {
target: buttonBackground
color: "#323232"
border.color: "#868686"
}
PropertyChanges {
target: textItem
color: "#ffffff"
}
},
State {
name: "hover"
when: (control.hovered || control.forceHover) && !control.down
PropertyChanges {
target: textItem
color: "#ffffff"
}
PropertyChanges {
target: buttonBackground
color: "#474747"
border.color: "#adadad"
}
},
State {
name: "activeQds"
when: control.down
PropertyChanges {
target: textItem
color: "#111111"
}
PropertyChanges {
target: buttonBackground
color: "#2e769e"
border.color: "#2e769e"
}
}
]
}

View File

@@ -0,0 +1,418 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick Studio Components.
**
** $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.10
import QtQuick.Shapes 1.0
/*!
\qmltype RectangleItem
\inqmlmodule QtQuick.Studio.Components
\since QtQuick.Studio.Components 1.0
\inherits Shape
\brief A filled rectangle with an optional border.
Rectangle items are used to fill areas with solid color or gradients and
to provide a rectangular border.
Each Rectangle item is painted using either a solid fill color, specified
using the \l fillColor property, or a gradient, defined using one of the
\l ShapeGradient subtypes and set using the \l gradient property.
If both a color and a gradient are specified, the gradient is used.
An optional border can be added to a rectangle with its own color and
thickness by setting the \l strokeColor and \l strokeWidth properties.
Setting the color to \c transparent creates a border without a fill color.
Rounded rectangles can be drawn using the \l radius property. The radius
can also be specified separately for each corner. Because this introduces
curved edges to the corners of a rectangle, it may be appropriate to set
the \c antialiasing property that is inherited from \l Item to improve the
appearance of the rectangle.
\section2 Example Usage
You can use the Rectangle component in \QDS to create different kinds of
rectangles.
\image studio-rectangle.png
The QML code looks as follows:
\code
RectangleItem {
id: rectangle
gradient: RadialGradient {
focalRadius: 0
centerY: 38.5
focalY: 38.5
centerX: 51.5
centerRadius: 38.5
GradientStop {
position: 0
color: "#ffffff"
}
GradientStop {
position: 1
color: "#000000"
}
focalX: 51.5
}
bottomRightRadius: 0
topLeftRadius: 0
strokeColor: "gray"
}
RectangleItem {
id: rectangle1
gradient: LinearGradient {
y1: 0
y2: 77
x2: 103
x1: 0
GradientStop {
position: 0
color: "#ffffff"
}
GradientStop {
position: 1
color: "#000000"
}
}
topRightRadius: 0
bottomLeftRadius: 0
strokeColor: "#808080"
}
RectangleItem {
id: rectangle2
topLeftRadius: 0
bottomRightRadius: 0
fillColor: "#d3d3d3"
strokeColor: "#808080"
}
RectangleItem {
id: rectangle3
fillColor: "#000000"
gradient: LinearGradient {
y1: 0
y2: 77
x2: 103
x1: 0
GradientStop {
position: 0
color: "#000000"
}
GradientStop {
position: 1
color: "#fdf9f9"
}
}
topRightRadius: 0
bottomLeftRadius: 0
strokeColor: "#808080"
}
\endcode
*/
Shape {
id: root
width: 200
height: 150
/*!
The radius used to draw rounded corners.
The default value is 10.
If radius is non-zero, the corners will be rounded, otherwise they will
be sharp. The radius can also be specified separately for each corner by
using the \l bottomLeftRadius, \l bottomRightRadius, \l topLeftRadius, and
\l topRightRadius properties.
*/
property int radius: 10
/*!
The radius of the top left rectangle corner.
*/
property int topLeftRadius: root.radius
/*!
The radius of the bottom left rectangle corner.
*/
property int bottomLeftRadius: root.radius
/*!
The radius of the top right rectangle corner.
*/
property int topRightRadius: root.radius
/*!
The radius of the bottom right rectangle corner.
*/
property int bottomRightRadius: root.radius
/*!
The gradient of the rectangle fill color.
By default, no gradient is enabled and the value is null. In this case, the
fill uses a solid color based on the value of \l fillColor.
When set, \l fillColor is ignored and filling is done using one of the
\l ShapeGradient subtypes.
\note The \l Gradient type cannot be used here. Rather, prefer using one of
the advanced subtypes, like \l LinearGradient.
*/
property alias gradient: path.fillGradient
/*!
The style of the rectangle border.
\value ShapePath.SolidLine
A solid line. This is the default value.
\value ShapePath.DashLine
Dashes separated by a few pixels.
The \l dashPattern property specifies the dash pattern.
\sa Qt::PenStyle
*/
property alias strokeStyle: path.strokeStyle
/*!
The width of the border of the rectangle.
The default value is 4.
A width of 1 creates a thin line. For no line, use a negative value or a
transparent color.
\note The width of the rectangle's border does not affect the geometry of
the rectangle itself or its position relative to other items if anchors are
used.
The border is rendered within the rectangle's boundaries.
*/
property alias strokeWidth: path.strokeWidth
/*!
The color used to draw the border of the rectangle.
When set to \c transparent, no line is drawn.
The default value is \c red.
\sa QColor
*/
property alias strokeColor: path.strokeColor
/*!
The dash pattern of the rectangle border specified as the dashes and the
gaps between them.
The dash pattern is specified in units of the pen's width. That is, a dash
with the length 5 and width 10 is 50 pixels long.
The default value is (4, 2), meaning a dash of 4 * \l strokeWidth pixels
followed by a space of 2 * \l strokeWidth pixels.
\sa QPen::setDashPattern()
*/
property alias dashPattern: path.dashPattern
property alias joinStyle: path.joinStyle
/*!
The rectangle fill color.
A gradient for the fill can be specified by using \l gradient. If both a
color and a gradient are specified, the gradient is used.
When set to \c transparent, no filling occurs.
The default value is \c white.
*/
property alias fillColor: path.fillColor
/*!
The starting point of the dash pattern for the rectangle border.
The offset is measured in terms of the units used to specify the dash
pattern. For example, a pattern where each stroke is four units long,
followed by a gap of two units, will begin with the stroke when drawn
as a line. However, if the dash offset is set to 4.0, any line drawn
will begin with the gap. Values of the offset up to 4.0 will cause part
of the stroke to be drawn first, and values of the offset between 4.0 and
6.0 will cause the line to begin with part of the gap.
The default value is 0.
\sa QPen::setDashOffset()
*/
property alias dashOffset: path.dashOffset
/*!
Whether the border corner is beveled.
*/
property bool bevel: false
/*!
The bevel of the top left border corner.
\sa bevel
*/
property bool topLeftBevel: root.bevel
/*!
The bevel of the top right border corner.
\sa bevel
*/
property bool topRightBevel: root.bevel
/*!
The bevel of the bottom right border corner.
\sa bevel
*/
property bool bottomRightBevel: root.bevel
/*!
The bevel of the bottom left border corner.
\sa bevel
*/
property bool bottomLeftBevel: root.bevel
layer.enabled: root.antialiasing
layer.smooth: root.antialiasing
layer.samples: root.antialiasing ? 4 : 0
/*!
The border is rendered within the rectangle's boundaries, outside of them,
or on top of them.
*/
property int borderMode: 0
property real borderOffset: {
if (root.borderMode === 0)
return root.strokeWidth * 0.5
if (root.borderMode === 1)
return 0
return -root.strokeWidth * 0.5
}
Item {
anchors.fill: parent
anchors.margins: {
if (root.borderMode === 0)
return 0
if (root.borderMode === 1)
return -root.strokeWidth * 0.5
return -root.strokeWidth
}
}
ShapePath {
id: path
property int __maxRadius: Math.floor(Math.min(root.width, root.height) / 2)
property int __topLeftRadius: Math.min(root.topLeftRadius, path.__maxRadius)
property int __topRightRadius: Math.min(root.topRightRadius, path.__maxRadius)
property int __bottomRightRadius: Math.min(root.bottomRightRadius, path.__maxRadius)
property int __bottomLeftRadius: Math.min(root.bottomLeftRadius, path.__maxRadius)
joinStyle: ShapePath.MiterJoin
strokeWidth: 4
strokeColor: "red"
startX: path.__topLeftRadius + root.borderOffset
startY: root.borderOffset
PathLine {
x: root.width - path.__topRightRadius - root.borderOffset
y: root.borderOffset
}
PathArc {
x: root.width - root.borderOffset
y: path.__topRightRadius + root.borderOffset
radiusX: root.topRightBevel ? 50000 : path.__topRightRadius
radiusY: root.topRightBevel ? 50000 : path.__topRightRadius
}
PathLine {
x: root.width - root.borderOffset
y: root.height - path.__bottomRightRadius - root.borderOffset
}
PathArc {
x: root.width - path.__bottomRightRadius - root.borderOffset
y: root.height - root.borderOffset
radiusX: root.bottomRightBevel ? 50000 : path.__bottomRightRadius
radiusY: root.bottomRightBevel ? 50000 : path.__bottomRightRadius
}
PathLine {
x: path.__bottomLeftRadius + root.borderOffset
y: root.height - root.borderOffset
}
PathArc {
x: root.borderOffset
y: root.height - path.__bottomLeftRadius - root.borderOffset
radiusX: root.bottomLeftBevel ? 50000 : path.__bottomLeftRadius
radiusY: root.bottomLeftBevel ? 50000 : path.__bottomLeftRadius
}
PathLine {
x: root.borderOffset
y: path.__topLeftRadius + root.borderOffset
}
PathArc {
x: path.__topLeftRadius + root.borderOffset
y: root.borderOffset
radiusX: root.topLeftBevel ? 50000 : path.__topLeftRadius
radiusY: root.topLeftBevel ? 50000 : path.__topLeftRadius
}
}
}

View File

@@ -22,7 +22,6 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
import QtQuick 2.3 import QtQuick 2.3
Rectangle { Rectangle {
@@ -30,6 +29,7 @@ Rectangle {
width: 460 width: 460
height: 480 height: 480
color: "transparent" color: "transparent"
scale: 1.2
layer.enabled: true layer.enabled: true
layer.textureSize: Qt.size(width * 2, height * 2) layer.textureSize: Qt.size(width * 2, height * 2)
@@ -40,21 +40,27 @@ Rectangle {
anchors.centerIn: parent anchors.centerIn: parent
width: 460 width: 460
height: 480 height: 480
visible: true
anchors.verticalCenterOffset: -1
anchors.horizontalCenterOffset: 14
clip: true
layer.enabled: true layer.enabled: true
layer.textureSize: Qt.size(width * 2, height * 2) layer.textureSize: Qt.size(width * 2, height * 2)
layer.smooth: true layer.smooth: true
Splash_Image2d_png { Splash_Image2d_png {
x: 25 x: -22
y: 15 y: -33
antialiasing: false width: 461
scale: 1.4 height: 427
transform: Matrix4x4 { layer.enabled: true
matrix: Qt.matrix4x4(1.12606, 0.06371, 0, 0, 0.26038, 0.90592, layer.effect: ColorOverlayEffect {
0, 0, 0.00000, 0.0000, 1.0, 0, id: colorOverlay
0.00121, -0.00009, 0.0, 1) visible: true
color: "#41cd52"
} }
scale: 1
} }
} }
} }

View File

@@ -22,23 +22,30 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
import QtQuick 2.15 import QtQuick 2.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
import StudioFonts 1.0 import StudioFonts 1.0
import projectmodel 1.0 import projectmodel 1.0
import usagestatistics 1.0 import usagestatistics 1.0
import QtQuick.Shapes 1.0
Rectangle { Rectangle {
id: welcome_splash id: welcome_splash
anchors.fill: parent anchors.fill: parent
clip: true
gradient: Gradient { gradient: Gradient {
orientation: Gradient.Horizontal orientation: Gradient.Horizontal
GradientStop { position: 0.0; color: "#1d212a" } GradientStop {
GradientStop { position: 1.0; color: "#232c56" } position: 0.0
color: "#1d212a"
}
GradientStop {
position: 1.0
color: "#232c56"
}
} }
signal goNext signal goNext
@@ -47,52 +54,118 @@ Rectangle {
property bool doNotShowAgain: true property bool doNotShowAgain: true
property bool loadingPlugins: true property bool loadingPlugins: true
width: 600
height: 720
visible: true
color: "#1d212a" color: "#1d212a"
Rectangle {
id: qtGreen
color: "#515151"
anchors.fill: parent
anchors.rightMargin: 0
anchors.bottomMargin: 0
anchors.leftMargin: 0
anchors.topMargin: 0
}
RectangleItem {
id: background
opacity: 0.825
anchors.fill: parent
gradient: LinearGradient {
x1: 0
stops: [
GradientStop {
position: 0
color: "#29323c"
},
GradientStop {
position: 1
color: "#485563"
}
]
x2: 640
y2: 800
y1: 0
}
topRightRadius: 0
anchors.topMargin: 0
bottomLeftRadius: 0
borderMode: 1
fillColor: "#2d2d2d"
bottomRightRadius: 0
topLeftRadius: 0
topRightBevel: true
bottomLeftBevel: true
strokeColor: "#00ff0000"
}
RectangleItem {
id: topBar
opacity: 0.239
anchors.fill: parent
anchors.bottomMargin: 550
strokeColor: "#00ff0000"
bottomRightRadius: 0
topRightBevel: true
fillColor: "#2d2d2d"
bottomLeftRadius: 0
topRightRadius: 0
borderMode: 1
anchors.topMargin: 0
topLeftRadius: 0
bottomLeftBevel: true
}
RectangleItem {
id: bottomBar
opacity: 0.534
visible: true
anchors.fill: parent
anchors.rightMargin: 0
anchors.leftMargin: 0
strokeColor: "#00ff0000"
anchors.bottomMargin: 0
bottomRightRadius: 0
bottomLeftRadius: 0
fillColor: "#2d2d2d"
topRightBevel: true
topRightRadius: 0
borderMode: 1
anchors.topMargin: 539
topLeftRadius: 0
bottomLeftBevel: true
}
MyEllipse {
id: ellipse
x: 0
y: 204
width: 640
height: 391
opacity: 0.05
}
Image { Image {
id: logo id: logo
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left
anchors.margins: 10 anchors.margins: 10
width: 66 * 2
height: 50 * 2
smooth: true smooth: true
source: "welcome_windows/logo.png" source: "welcome_windows/logo.png"
} anchors.topMargin: 10
anchors.horizontalCenter: parent.horizontalCenter
Text {
id: qt_design_studio_text
anchors.top: logo.top
anchors.left: logo.right
anchors.leftMargin: 10
color: "#25709a"
text: qsTr("Qt Design Studio")
font.pixelSize: 36
font.family: StudioFonts.titilliumWeb_light
}
Text {
id: qt_design_studio_version_text
anchors.left: qt_design_studio_text.right
anchors.baseline: qt_design_studio_text.baseline
anchors.leftMargin: 10
color: "#25709a"
text: usageStatisticModel.version
font.family: StudioFonts.titilliumWeb_light
font.pixelSize: 36
} }
Text { Text {
id: license_variant_text id: license_variant_text
anchors.left: qt_design_studio_text.left anchors.top: designStudioVersion.bottom
anchors.top: qt_design_studio_text.bottom
anchors.leftMargin: 5
color: "#ffffff" color: "#ffffff"
font.family: StudioFonts.titilliumWeb_light font.family: StudioFonts.titilliumWeb_light
font.pixelSize: 20 font.pixelSize: 20
anchors.horizontalCenter: parent.horizontalCenter
text: { text: {
if (projectModel.communityVersion) if (projectModel.communityVersion)
@@ -111,56 +184,94 @@ Rectangle {
} }
} }
Dof_Effect { //DOF seems to do nothing, we should probably just remove it.
id: dof_effect Splash_Image25d {
anchors.top: qt_design_studio_text.bottom id: animated_artwork
anchors.horizontalCenter: welcome_splash.horizontalCenter width: 628
width: 442 height: 377
height: 480 anchors.top: license_variant_text.bottom
maskBlurSamples: 64 anchors.horizontalCenterOffset: 0
maskBlurRadius: 32 scale: 1.1
anchors.horizontalCenter: parent.horizontalCenter
Splash_Image25d { anchors.topMargin: 50
id: animated_artwork clip: true
width: dof_effect.width
height: dof_effect.height
clip: true
}
} }
Text { Text {
id: help_us_text id: help_us_text
anchors.left: welcome_splash.left anchors.left: welcome_splash.left
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 10 anchors.leftMargin: 20
anchors.top: dof_effect.bottom anchors.top: bottomBar.top
anchors.topMargin: 10
color: "#FFFFFF" color: "#FFFFFF"
text: qsTr("Before we let you move on to your wonderful designs, help us make Qt Design Studio even better by letting us know how you're using it.") text: qsTr("Before we let you move on to your wonderful designs, help us make Qt Design Studio even betterby letting us know how you're using it. To do this, we would like to turn on automatic collection of pseudonymized Analytics and Crash Report Data.")
font.family: StudioFonts.titilliumWeb_light font.family: StudioFonts.titilliumWeb_light
font.pixelSize: 18 font.pixelSize: 16
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
anchors.rightMargin: 10 anchors.topMargin: 25
anchors.rightMargin: 20
} }
ColumnLayout { RowLayout {
id: columnLayout anchors.right: parent.right
anchors.bottom: welcome_splash.bottom
anchors.rightMargin: 20
anchors.bottomMargin: 20
spacing: 20
PushButton {
text: qsTr("Turn Off")
fontpixelSize: 14
onClicked: {
usageStatisticModel.setTelemetryEnabled(false)
usageStatisticModel.setCrashReporterEnabled(false)
welcome_splash.closeClicked()
}
}
PushButton {
text: qsTr("Turn On")
forceHover: false
fontpixelSize: 14
onClicked: {
usageStatisticModel.setTelemetryEnabled(true)
usageStatisticModel.setCrashReporterEnabled(true)
welcome_splash.closeClicked()
}
}
}
PushButton {
y: 430
text: qsTr("Learn More")
anchors.left: parent.left anchors.left: parent.left
anchors.top: help_us_text.bottom anchors.bottom: parent.bottom
anchors.leftMargin: 10 fontpixelSize: 14
anchors.topMargin: 20 anchors.bottomMargin: 20
spacing: 3 anchors.leftMargin: 20
onClicked: Qt.openUrlExternally(
"https://www.qt.io/terms-conditions/telemetry-privacy")
}
Row {
y: 690
visible: false
anchors.horizontalCenter: parent.horizontalCenter
spacing: 20
layoutDirection: Qt.LeftToRight
CheckBox { CheckBox {
visible: false visible: true
id: usageStatisticCheckBox id: usageStatisticCheckBox
text: qsTr("Send Usage Statistics") text: qsTr("Send Usage Statistics")
checked: usageStatisticModel.usageStatisticEnabled checked: usageStatisticModel.usageStatisticEnabled
padding: 0 padding: 0
spacing: 12 spacing: 12
onCheckedChanged: usageStatisticModel.setTelemetryEnabled(usageStatisticCheckBox.checked) onCheckedChanged: usageStatisticModel.setTelemetryEnabled(
usageStatisticCheckBox.checked)
contentItem: Text { contentItem: Text {
text: usageStatisticCheckBox.text text: usageStatisticCheckBox.text
@@ -171,15 +282,17 @@ Rectangle {
} }
CheckBox { CheckBox {
visible: false visible: true
id: crashReportCheckBox id: crashReportCheckBox
text: qsTr("Send Crash Reports") text: qsTr("Send Crash Reports")
spacing: 12 spacing: 12
checked: usageStatisticModel.crashReporterEnabled checked: usageStatisticModel.crashReporterEnabled
onCheckedChanged: { onCheckedChanged: {
usageStatisticModel.setCrashReporterEnabled(crashReportCheckBox.checked) usageStatisticModel.setCrashReporterEnabled(
welcome_splash.onPluginInitialized(true, crashReportCheckBox.checked) crashReportCheckBox.checked)
welcome_splash.onPluginInitialized(true,
crashReportCheckBox.checked)
} }
contentItem: Text { contentItem: Text {
@@ -192,39 +305,39 @@ Rectangle {
} }
} }
RowLayout { Row {
anchors.right: parent.right id: designStudioVersion
anchors.bottom: welcome_splash.bottom anchors.top: logo.bottom
anchors.rightMargin: 10 anchors.topMargin: 5
anchors.bottomMargin: 10 spacing: 10
spacing: 20 anchors.horizontalCenter: parent.horizontalCenter
CustomButton { Text {
text: qsTr("Don't send") id: qt_design_studio_text
onClicked: { height: 45
usageStatisticModel.setTelemetryEnabled(false) color: "#ffffff"
usageStatisticModel.setCrashReporterEnabled(false) text: qsTr("Qt Design Studio")
welcome_splash.closeClicked() font.pixelSize: 36
} horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.family: StudioFonts.titilliumWeb_light
} }
CustomButton { Text {
text: qsTr("Send analytics data") id: qt_design_studio_version_text
onClicked: { height: 45
usageStatisticModel.setTelemetryEnabled(true) color: "#fbfbfb"
usageStatisticModel.setCrashReporterEnabled(true) text: usageStatisticModel.version
welcome_splash.closeClicked() font.family: StudioFonts.titilliumWeb_light
} font.pixelSize: 36
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
} }
} }
CustomButton {
y: 430
text: qsTr("Learn More")
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.bottomMargin: 10
anchors.leftMargin: 10
onClicked: Qt.openUrlExternally("https://www.qt.io/terms-conditions/telemetry-privacy")
}
} }
/*##^##
Designer {
D{i:0;formeditorZoom:1.33}D{i:22}
}
##^##*/

View File

@@ -27,7 +27,7 @@ import QtQuick 2.0
Item { Item {
id: root id: root
width: 720 width: 600
height: 720 height: 720
signal closeClicked signal closeClicked