aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/studiowelcome/qml/splashscreen/Welcome_splash.qml
blob: e6bedf2074ca0a1a055ba2786de4e8a4e7ec24e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
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
import QtQuick.Shapes 1.0

Rectangle {
    id: welcome_splash
    width: 600
    height: 720
    clip: true

    gradient: Gradient {
        orientation: Gradient.Horizontal

        GradientStop {
            position: 0.0
            color: "#1d212a"
        }
        GradientStop {
            position: 1.0
            color: "#232c56"
        }
    }

    signal goNext
    signal closeClicked
    signal configureClicked

    property bool doNotShowAgain: true
    property bool loadingPlugins: true

    visible: true
    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 {
        id: logo
        anchors.top: parent.top
        anchors.margins: 10
        smooth: true
        source: "welcome_windows/logo.png"
        anchors.topMargin: 10
        anchors.horizontalCenter: parent.horizontalCenter
    }

    Text {
        id: license_variant_text
        anchors.top: designStudioVersion.bottom
        color: "#ffffff"

        font.family: StudioFonts.titilliumWeb_light
        font.pixelSize: 20
        anchors.horizontalCenter: parent.horizontalCenter

        text: {
            if (projectModel.communityVersion)
                return qsTr("Community Edition")
            if (projectModel.enterpriseVersion)
                return qsTr("Enterprise Edition")
            return qsTr("Professional Edition")
        }

        ProjectModel {
            id: projectModel
        }

        UsageStatisticModel {
            id: usageStatisticModel
        }
    }

    //DOF seems to do nothing, we should probably just remove it.
    Splash_Image25d {
        id: animated_artwork
        width: 628
        height: 377
        anchors.top: license_variant_text.bottom
        anchors.horizontalCenterOffset: 0
        scale: 1.1
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.topMargin: 50
        clip: true
    }

    Text {
        id: help_us_text
        anchors.left: welcome_splash.left
        anchors.right: parent.right
        anchors.leftMargin: 20
        anchors.top: bottomBar.top
        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. To do this, we would like to turn on automatic collection of pseudonymized Analytics and Crash Report Data.")
        font.family: StudioFonts.titilliumWeb_light
        font.pixelSize: 16
        horizontalAlignment: Text.AlignHCenter
        verticalAlignment: Text.AlignVCenter
        wrapMode: Text.WordWrap
        anchors.topMargin: 25
        anchors.rightMargin: 20
    }

    RowLayout {
        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.bottom: parent.bottom
        fontpixelSize: 14
        anchors.bottomMargin: 20
        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 {
            visible: true
            id: usageStatisticCheckBox
            text: qsTr("Send Usage Statistics")
            checked: usageStatisticModel.usageStatisticEnabled
            padding: 0
            spacing: 12

            onCheckedChanged: usageStatisticModel.setTelemetryEnabled(
                                  usageStatisticCheckBox.checked)

            contentItem: Text {
                text: usageStatisticCheckBox.text
                color: "#ffffff"
                leftPadding: usageStatisticCheckBox.indicator.width + usageStatisticCheckBox.spacing
                font.pixelSize: 12
            }
        }

        CheckBox {
            visible: true
            id: crashReportCheckBox
            text: qsTr("Send Crash Reports")
            spacing: 12
            checked: usageStatisticModel.crashReporterEnabled

            onCheckedChanged: {
                usageStatisticModel.setCrashReporterEnabled(
                            crashReportCheckBox.checked)
                welcome_splash.onPluginInitialized(true,
                                                   crashReportCheckBox.checked)
            }

            contentItem: Text {
                color: "#ffffff"
                text: crashReportCheckBox.text
                leftPadding: crashReportCheckBox.indicator.width + crashReportCheckBox.spacing
                font.pixelSize: 12
            }
            padding: 0
        }
    }

    Row {
        id: designStudioVersion
        anchors.top: logo.bottom
        anchors.topMargin: 5
        spacing: 10
        anchors.horizontalCenter: parent.horizontalCenter

        Text {
            id: qt_design_studio_text
            height: 45
            color: "#ffffff"
            text: qsTr("Qt Design Studio")
            font.pixelSize: 36
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
            font.family: StudioFonts.titilliumWeb_light
        }

        Text {
            id: qt_design_studio_version_text
            height: 45
            color: "#fbfbfb"
            text: usageStatisticModel.version
            font.family: StudioFonts.titilliumWeb_light
            font.pixelSize: 36
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
        }
    }
}

/*##^##
Designer {
    D{i:0;height:720;width:600}D{i:22}
}
##^##*/