Commit cf56178d authored by Jens Bache-Wiig's avatar Jens Bache-Wiig Committed by Thomas Hartmann
Browse files

Port welcome screen to Qt Quick 2



This ports the welcome screen to use QtQuick 2.0.
I have disabled the plugin on Qt4 builds.

Change-Id: Ia921d0747c8f7d4441c88fc9fb77b822496091f4
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 328a24ed
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.1
Rectangle {
id: myApp
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.1
import widgets 1.0
Rectangle {
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.1
ListModel {
ListElement {
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.1
ListModel {
ListElement {
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.1
ListModel {
ListElement {
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.1
ListModel {
ListElement {
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.1
ListModel {
ListElement {
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.1
import widgets 1.0
Rectangle {
......@@ -82,6 +82,8 @@ Rectangle {
anchors.rightMargin: 80
anchors.right: parent.right
model: qtVersionModel
textRole: "text"
onCurrentIndexChanged: {
if (comboBox.model === undefined)
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.1
import widgets 1.0
Rectangle {
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.1
import widgets 1.0
Rectangle {
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.1
import widgets 1.0
Rectangle {
......@@ -36,13 +36,13 @@ Rectangle {
color: "#edf0f2"
id: root
property var fonts: CustomFonts {}
property var colors: CustomColors { }
Rectangle {
id: canvas
width: Math.min(1024, parent.width)
//this is a workaround for QTCREATORBUG-6803
anchors.topMargin: (root.height > 700) ? 0 : 0
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
......
......@@ -27,8 +27,8 @@
**
****************************************************************************/
import QtQuick 1.0
import qtcomponents 1.0
import QtQuick 2.1
import QtQuick.Controls 1.0
ChoiceList {
ComboBox {
}
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.0
import QtQuick 2.1
QtObject {
property color linkColor: "#445ba8"
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.1
QtObject {
property alias linkFont: linkText.font
......
......@@ -27,7 +27,7 @@
**
****************************************************************************/
import QtQuick 1.1
import QtQuick 2.1
Row {
id: customTab
......
......@@ -27,64 +27,36 @@
**
****************************************************************************/
import QtQuick 1.0
import qtcomponents 1.0
GridView {
id: gridView
interactive: false
clip: true
cellHeight: 240
cellWidth: 216
property int columns: Math.max(Math.floor(width / cellWidth), 1)
cacheBuffer: 1000
import QtQuick 2.1
import QtQuick.Controls 1.0
ScrollView {
x: Math.max((width - (cellWidth * columns)) / 2, 0);
delegate: Delegate {
id: delegate
property bool isHelpImage: model.imageUrl.search(/qthelp/) != -1
property string sourcePrefix: isHelpImage ? "image://helpimage/" : ""
property string mockupSource: model.imageSource
property string helpSource: model.imageUrl !== "" ? sourcePrefix + encodeURI(model.imageUrl) : ""
imageSource: model.imageSource === undefined ? helpSource : mockupSource
videoSource: model.imageSource === undefined ? model.imageUrl : mockupSource
caption: model.name;
description: model.description
isVideo: model.isVideo === true
videoLength: model.videoLength !== undefined ? model.videoLength : ""
tags: model.tags
}
WheelArea {
id: wheelarea
anchors.fill: parent
verticalMinimumValue: vscrollbar.minimumValue
verticalMaximumValue: vscrollbar.maximumValue
onVerticalValueChanged: gridView.contentY = verticalValue
verticalValue: gridView.contentY
}
ScrollBar {
id: vscrollbar
orientation: Qt.Vertical
property int availableHeight : gridView.height
visible: contentHeight > availableHeight
maximumValue: contentHeight > availableHeight ? gridView.contentHeight - availableHeight : 0
minimumValue: 0
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.topMargin: styleitem.style == "mac" ? 1 : 0
onValueChanged: gridView.contentY = value
anchors.rightMargin: styleitem.frameoffset
anchors.bottomMargin: hscrollbar.visible ? hscrollbar.height : styleitem.frameoffset
value: gridView.contentY
property alias model: gridView.model
GridView {
id: gridView
interactive: false
cellHeight: 240
cellWidth: 216
property int columns: Math.max(Math.floor(width / cellWidth), 1)
delegate: Delegate {
id: delegate
property bool isHelpImage: model.imageUrl.search(/qthelp/) != -1
property string sourcePrefix: isHelpImage ? "image://helpimage/" : ""
property string mockupSource: model.imageSource
property string helpSource: model.imageUrl !== "" ? sourcePrefix + encodeURI(model.imageUrl) : ""
imageSource: model.imageSource === undefined ? helpSource : mockupSource
videoSource: model.imageSource === undefined ? model.imageUrl : mockupSource
caption: model.name;
description: model.description
isVideo: model.isVideo === true
videoLength: model.videoLength !== undefined ? model.videoLength : ""
tags: model.tags
}
}
}
......@@ -27,8 +27,7 @@
**
****************************************************************************/
import QtQuick 1.1
import qtcomponents 1.0
import QtQuick 2.1
Rectangle {
id: delegate
......@@ -64,17 +63,6 @@ Rectangle {
searchBar.text += " " + tagStr
}
CustomColors {
id: colors
}
CustomFonts {
id: fonts
}
QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
BorderImage {
id: image1
x: 11
......@@ -228,6 +216,7 @@ Rectangle {
id: mousearea1
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: {
delegate.state="hover"
}
......
import QtQuick 1.1
import qtcomponents 1.0
import QtQuick 2.1
Item {
id: gettingStartedItem
......@@ -13,16 +12,6 @@ Item {
signal clicked
CustomColors {
id: colors
}
CustomFonts {
id: fonts
}
QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
Rectangle {
y: 170
width: 20
......@@ -106,6 +95,7 @@ Item {
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: {
gettingStartedItem.state="hover"
}
......
import QtQuick 1.1
import QtQuick 2.1
import widgets 1.0
Row {
......
......@@ -27,8 +27,7 @@
**
****************************************************************************/
import QtQuick 1.1
import qtcomponents 1.0
import QtQuick 2.1
Text {
id: root
......@@ -52,14 +51,6 @@ Text {
property bool enlargeMouseArea: true
CustomFonts {
id: fonts
}
CustomColors {
id: colors
}
Rectangle {
color: "#909090"
radius: 6
......@@ -89,8 +80,7 @@ Text {
anchors.margins: enlargeMouseArea ? -8 : 0
hoverEnabled: true
QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
cursorShape: Qt.PointingHandCursor
onEntered: {
if (!root.active)
mouseArea.state = "hovered"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment