new design of the welcomepage
Design done by: Virva Auvinen Change-Id: I94ca75f50d3924088bc7d9be6cc884975480bcac Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
@@ -31,61 +31,137 @@
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import "widgets" as Widgets
|
||||
import qtcomponents 1.0 as Components
|
||||
import "widgets"
|
||||
|
||||
Item {
|
||||
id: floater
|
||||
|
||||
Image {
|
||||
source: "qrc:welcome/images/welcomebg.png"
|
||||
anchors.fill: parent
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
width: 920
|
||||
Rectangle {
|
||||
id: rectangle1
|
||||
width: 900
|
||||
height: 600
|
||||
|
||||
property int proposedWidth: 920
|
||||
property int proposedHeight: 600
|
||||
PageCaption {
|
||||
id: pageCaption
|
||||
|
||||
Rectangle {
|
||||
x: 32
|
||||
y: 8
|
||||
|
||||
width: Math.min(floater.width, floater.proposedWidth)
|
||||
height: Math.min(floater.height, floater.proposedHeight)
|
||||
id: root
|
||||
property int margin: 8
|
||||
anchors.centerIn: floater
|
||||
anchors.rightMargin: 16
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.left: parent.left
|
||||
|
||||
Components.ScrollArea {
|
||||
id: scrollArea
|
||||
anchors.fill: parent
|
||||
anchors.margins: - margin
|
||||
frame: true
|
||||
Item {
|
||||
id: baseitem
|
||||
height: Math.max(recentSessions.height, recentProjects.height)
|
||||
width: root.width - 20
|
||||
Widgets.RecentSessions {
|
||||
id: recentSessions
|
||||
width: Math.floor(root.width / 2.5)
|
||||
anchors.left: parent.left
|
||||
}
|
||||
Widgets.RecentProjects {
|
||||
id: recentProjects
|
||||
anchors.left: recentSessions.right
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: scrollArea.verticalScrollBar.visible ? 0 :
|
||||
-scrollArea.verticalScrollBar.width - 6
|
||||
}
|
||||
caption: qsTr("Develop")
|
||||
}
|
||||
|
||||
}
|
||||
Item {
|
||||
id: canvas
|
||||
|
||||
x: 12
|
||||
y: 0
|
||||
width: 1024
|
||||
|
||||
anchors.bottomMargin: 0
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0
|
||||
|
||||
RecentSessions {
|
||||
id: recentSessions
|
||||
|
||||
x: 87
|
||||
y: 144
|
||||
width: 274
|
||||
|
||||
anchors.right: recentlyUsedSessions.right
|
||||
anchors.rightMargin: -89
|
||||
anchors.top: recentlyUsedSessions.bottom
|
||||
anchors.topMargin: 20
|
||||
|
||||
model: sessionList
|
||||
}
|
||||
BorderImage {
|
||||
anchors.top: scrollArea.top
|
||||
height: root.height + 2 * margin
|
||||
width: 1
|
||||
x: recentProjects.x - margin
|
||||
|
||||
RecentProjects {
|
||||
x: 406
|
||||
y: 144
|
||||
width: 481
|
||||
height: 416
|
||||
|
||||
anchors.top: recentlyUsedProjects.bottom
|
||||
anchors.topMargin: 20
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 40
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 137
|
||||
|
||||
model: projectList
|
||||
}
|
||||
|
||||
Text {
|
||||
id: recentlyUsedSessions
|
||||
|
||||
x: pageCaption.x + pageCaption.textOffset
|
||||
y: 105
|
||||
|
||||
color: "#535353"
|
||||
text: qsTr("Recently used sessions")
|
||||
font.pixelSize: 16
|
||||
font.family: "Helvetica"
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
Text {
|
||||
id: recentlyUsedProjects
|
||||
x: 406
|
||||
|
||||
y: 105
|
||||
color: "#535353"
|
||||
text: qsTr("Recently used Projects")
|
||||
anchors.left: recentlyUsedSessions.right
|
||||
anchors.leftMargin: 134
|
||||
font.bold: true
|
||||
font.family: "Helvetica"
|
||||
font.pixelSize: 16
|
||||
}
|
||||
|
||||
Item {
|
||||
id: actions
|
||||
|
||||
x: 90
|
||||
y: 296
|
||||
width: 140
|
||||
height: 70
|
||||
|
||||
anchors.topMargin: 42
|
||||
anchors.top: recentSessions.bottom
|
||||
|
||||
LinkedText {
|
||||
id: openProject
|
||||
x: 51
|
||||
y: 49
|
||||
text: qsTr("Open Project")
|
||||
onClicked: welcomeMode.openProject();
|
||||
}
|
||||
|
||||
LinkedText {
|
||||
id: createProject
|
||||
x: 51
|
||||
y: 18
|
||||
text: qsTr("Create Project")
|
||||
onClicked: welcomeMode.newProject();
|
||||
}
|
||||
|
||||
Image {
|
||||
id: icon02
|
||||
x: 2
|
||||
y: 32
|
||||
source: "widgets/images/icons/openIcon.png"
|
||||
}
|
||||
|
||||
Image {
|
||||
id: icon01
|
||||
x: 0
|
||||
y: 0
|
||||
source: "widgets/images/icons/createIcon.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
105
share/qtcreator/welcomescreen/dummydata/examplesModel.qml
Normal file
@@ -0,0 +1,105 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
|
||||
ListModel {
|
||||
ListElement {
|
||||
name: "Main Windows"
|
||||
descriptionData: "All the standard features of application main windows are provided by Qt. Main windows can have pull down menus, tool bars, and dock windows. These separate forms of user input are unified in an integrated action system that also supports keyboard shortcuts and accelerator keys in menu items."
|
||||
imageSource: "images/mockup/mainwindow-examples.png"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Layouts"
|
||||
description: "t uses a layout-based approach to widget management. Widgets are arranged in the optimal positions in windows based on simple layout rules, leading to a consistent look and feel. Custom layouts can be used to provide more control over the positions and sizes of child widgets."
|
||||
imageSource: "images/mockup/layout-examples.png"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Item Views"
|
||||
description: "tem views are widgets that typically display data sets. Qt 4's model/view framework lets you handle large data sets by separating the underlying data from the way it is represented to the user, and provides support for customized rendering through the use of delegates."
|
||||
imageSource: "images/mockup/itemview-examples.png"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Drag and Drop"
|
||||
description: "Qt supports native drag and drop on all platforms via an extensible MIME-based system that enables applications to send data to each other in the most appropriate formats. Drag and drop can also be implemented for internal use by applications."
|
||||
imageSource: "images/mockup/draganddrop-examples.png"
|
||||
}
|
||||
ListElement {
|
||||
name: "Threading and Concurrent Programming"
|
||||
description: "Qt 4 makes it easier than ever to write multithreaded applications. More classes have been made usable from non-GUI threads, and the signals and slots mechanism can now be used to communicate between threads. The QtConcurrent namespace includes a collection of classes and functions for straightforward concurrent programming."
|
||||
imageSource: "images/mockup/thread-examples.png"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "OpenGL and OpenVG Examples"
|
||||
description: "Qt provides support for integration with OpenGL implementations on all platforms, giving developers the opportunity to display hardware accelerated 3D graphics alongside a more conventional user interface. Qt provides support for integration with OpenVG implementations on platforms with suitable drivers."
|
||||
imageSource: "images/mockup/opengl-examples.png"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Network"
|
||||
description: "Qt is provided with an extensive set of network classes to support both client-based and server side network programming."
|
||||
imageSource: "images/mockup/network-examples.png"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Qt Designer"
|
||||
description: "Qt Designer is a capable graphical user interface designer that lets you create and configure forms without writing code. GUIs created with Qt Designer can be compiled into an application or created at run-time."
|
||||
imageSource: "images/mockup/designer-examples.png"
|
||||
}
|
||||
ListElement {
|
||||
name: "Qt Script"
|
||||
description: "Qt is provided with a powerful embedded scripting environment through the QtScript classes."
|
||||
imageSource: "images/mockup/qtscript-examples.png"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Desktop"
|
||||
description: "Qt provides features to enable applications to integrate with the user's preferred desktop environment. Features such as system tray icons, access to the desktop widget, and support for desktop services can be used to improve the appearance of applications and take advantage of underlying desktop facilities."
|
||||
imageSource: "images/mockup/desktop-examples.png"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Caption"
|
||||
description: "Description"
|
||||
imageSource: "image/mockup/penguin.png"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Caption"
|
||||
description: "Description"
|
||||
imageSource: "images/mockup/penguin.png"
|
||||
}
|
||||
}
|
||||
@@ -30,23 +30,23 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents.custom 1.0 as Custom
|
||||
|
||||
|
||||
Custom.TextField {
|
||||
id: root
|
||||
leftMargin: 6
|
||||
rightMargin: 6
|
||||
topMargin: 6
|
||||
bottomMargin: 6
|
||||
property url backgroundSource: "qrc:welcome/images/lineedit.png"
|
||||
|
||||
background: BorderImage {
|
||||
anchors.fill: parent
|
||||
source: backgroundSource
|
||||
border.left: 5; border.top: 5
|
||||
border.right: 5; border.bottom: 5
|
||||
import QtQuick 1.0
|
||||
|
||||
ListModel {
|
||||
ListElement {
|
||||
title: "Getting Started"
|
||||
pageLocation: "../gettingstarted.qml"
|
||||
}
|
||||
ListElement {
|
||||
title: "Develop"
|
||||
pageLocation: "../develop.qml"
|
||||
}
|
||||
ListElement {
|
||||
title: "Examples"
|
||||
pageLocation: "../examples.qml"
|
||||
}
|
||||
ListElement {
|
||||
title: "Tutorials"
|
||||
pageLocation: "../tutorials.qml"
|
||||
}
|
||||
}
|
||||
68
share/qtcreator/welcomescreen/dummydata/projectList.qml
Normal file
@@ -0,0 +1,68 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
|
||||
ListModel {
|
||||
ListElement {
|
||||
prettyFilePath: "showing some path aka the link..."
|
||||
displayName: "Project name 01"
|
||||
}
|
||||
ListElement {
|
||||
prettyFilePath: "showing some path aka link..."
|
||||
displayName: "Project name 02"
|
||||
}
|
||||
ListElement {
|
||||
prettyFilePath: "showing some ... path aka link..."
|
||||
displayName: "Project name 03"
|
||||
}
|
||||
ListElement {
|
||||
prettyFilePath: "showing some ... path aka link..."
|
||||
displayName: "Project name 04"
|
||||
}
|
||||
ListElement {
|
||||
prettyFilePath: "showing some ... path aka link..."
|
||||
displayName: "Project name 05"
|
||||
}
|
||||
ListElement {
|
||||
prettyFilePath: "showing some ... path aka link test..."
|
||||
displayName: "Project name 06"
|
||||
}
|
||||
ListElement {
|
||||
prettyFilePath: "showing some ... path aka link... blup"
|
||||
displayName: "Project name 07"
|
||||
}
|
||||
ListElement {
|
||||
prettyFilePath: "showing some ... bla path aka link..."
|
||||
displayName: "Project name 08"
|
||||
}
|
||||
}
|
||||
57
share/qtcreator/welcomescreen/dummydata/sessionList.qml
Normal file
@@ -0,0 +1,57 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
|
||||
ListModel {
|
||||
ListElement {
|
||||
sessionName: "Session 01"
|
||||
}
|
||||
ListElement {
|
||||
sessionName: "Session 02"
|
||||
}
|
||||
ListElement {
|
||||
sessionName: "Session 03"
|
||||
}
|
||||
ListElement {
|
||||
sessionName: "Session 04"
|
||||
}
|
||||
ListElement {
|
||||
sessionName: "Session 05"
|
||||
}
|
||||
ListElement {
|
||||
sessionName: "Session 07"
|
||||
}
|
||||
ListElement {
|
||||
sessionName: "Session 08"
|
||||
}
|
||||
}
|
||||
121
share/qtcreator/welcomescreen/dummydata/tutorialsModel.qml
Normal file
@@ -0,0 +1,121 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
|
||||
ListModel {
|
||||
ListElement {
|
||||
name: "Main Windows"
|
||||
description: "All the standard features of application main windows are provided by Qt. Main windows can have pull down menus, tool bars, and dock windows. These separate forms of user input are unified in an integrated action system that also supports keyboard shortcuts and accelerator keys in menu items."
|
||||
imageSource: "images/mockup/mainwindow-examples.png"
|
||||
isVideo: false
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Layouts"
|
||||
description: "t uses a layout-based approach to widget management. Widgets are arranged in the optimal positions in windows based on simple layout rules, leading to a consistent look and feel. Custom layouts can be used to provide more control over the positions and sizes of child widgets."
|
||||
imageSource: "images/mockup/layout-examples.png"
|
||||
isVideo: false
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Some Video"
|
||||
description: "tem views are widgets that typically display data sets. Qt 4's model/view framework lets you handle large data sets by separating the underlying data from the way it is represented to the user, and provides support for customized rendering through the use of delegates."
|
||||
imageSource: "images/mockup/"
|
||||
isVideo: true
|
||||
videoLength: "2:20"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Drag and Drop"
|
||||
description: "Qt supports native drag and drop on all platforms via an extensible MIME-based system that enables applications to send data to each other in the most appropriate formats. Drag and drop can also be implemented for internal use by applications."
|
||||
imageSource: "images/mockup/draganddrop-examples.png"
|
||||
isVideo: false
|
||||
}
|
||||
ListElement {
|
||||
name: "Some Video"
|
||||
description: "Qt 4 makes it easier than ever to write multithreaded applications. More classes have been made usable from non-GUI threads, and the signals and slots mechanism can now be used to communicate between threads. The QtConcurrent namespace includes a collection of classes and functions for straightforward concurrent programming."
|
||||
imageSource: "images/mockup/"
|
||||
isVideo: true
|
||||
videoLength: "6:40"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Some Video"
|
||||
description: "Qt provides support for integration with OpenGL implementations on all platforms, giving developers the opportunity to display hardware accelerated 3D graphics alongside a more conventional user interface. Qt provides support for integration with OpenVG implementations on platforms with suitable drivers."
|
||||
imageSource: ""
|
||||
isVideo: true
|
||||
videoLength: "7:40"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Some Video"
|
||||
description: "Qt is provided with an extensive set of network classes to support both client-based and server side network programming."
|
||||
imageSource: "images/mockup/"
|
||||
isVideo: true
|
||||
videoLength: "2:30"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Qt Designer"
|
||||
description: "Qt Designer is a capable graphical user interface designer that lets you create and configure forms without writing code. GUIs created with Qt Designer can be compiled into an application or created at run-time."
|
||||
imageSource: "images/mockup/designer-examples.png"
|
||||
isVideo: false
|
||||
}
|
||||
ListElement {
|
||||
name: "Qt Script"
|
||||
description: "Qt is provided with a powerful embedded scripting environment through the QtScript classes."
|
||||
imageSource: "images/mockup/qtscript-examples.png"
|
||||
isVideo: false
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Desktop"
|
||||
description: "Qt provides features to enable applications to integrate with the user's preferred desktop environment. Features such as system tray icons, access to the desktop widget, and support for desktop services can be used to improve the appearance of applications and take advantage of underlying desktop facilities."
|
||||
imageSource: "images/mockup/desktop-examples.png"
|
||||
isVideo: false
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Caption"
|
||||
description: "Description"
|
||||
imageSource: "image/mockup/penguin.png"
|
||||
isVideo: false
|
||||
}
|
||||
|
||||
ListElement {
|
||||
name: "Caption"
|
||||
description: "Description"
|
||||
imageSource: "images/mockup/penguin.png"
|
||||
isVideo: false
|
||||
}
|
||||
}
|
||||
@@ -30,13 +30,100 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import "widgets" as Widgets
|
||||
import QtQuick 1.0
|
||||
import "widgets"
|
||||
|
||||
Item {
|
||||
Widgets.ExampleBrowser {
|
||||
model: examplesModel
|
||||
Rectangle {
|
||||
id: rectangle1
|
||||
width: 1024
|
||||
height: Math.min(920, parent.height - y)
|
||||
|
||||
PageCaption {
|
||||
id: pageCaption
|
||||
|
||||
x: 32
|
||||
y: 8
|
||||
|
||||
anchors.rightMargin: 16
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.left: parent.left
|
||||
|
||||
caption: qsTr("Examples")
|
||||
}
|
||||
|
||||
CustomScrollArea {
|
||||
id: scrollArea;
|
||||
|
||||
anchors.rightMargin: 38
|
||||
anchors.bottomMargin: 60
|
||||
anchors.leftMargin: 38
|
||||
anchors.topMargin: 102
|
||||
anchors.fill: parent
|
||||
anchors.margins: 8
|
||||
|
||||
CustomizedGridView {
|
||||
model: examplesModel
|
||||
}
|
||||
}
|
||||
|
||||
SearchBar {
|
||||
id: searchBar
|
||||
|
||||
y: 60
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 60
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 60
|
||||
|
||||
placeholderText: qsTr("Search in Examples...")
|
||||
onTextChanged: examplesModel.parseSearchString(text)
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: gradiant
|
||||
y: 102
|
||||
height: 10
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#ffffff"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#00ffffff"
|
||||
}
|
||||
}
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 38
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 38
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: gradiant1
|
||||
x: 38
|
||||
y: 570
|
||||
height: 10
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#00ffffff"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#ffffff"
|
||||
}
|
||||
}
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 60
|
||||
anchors.rightMargin: 38
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 38
|
||||
anchors.left: parent.left
|
||||
}
|
||||
}
|
||||
|
||||
@@ -843,7 +843,7 @@
|
||||
</example>
|
||||
</examples>
|
||||
<tutorials>
|
||||
<tutorial imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-part1-screenshot.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part1.html" projectPath="tutorials/addressbook/part1/part1.pro" name="Address Book Example">
|
||||
<tutorial imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-part1-screenshot.png" difficulty="?" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part1.html" projectPath="tutorials/addressbook/part1/part1.pro" name="Address Book Tutorial">
|
||||
<steps>
|
||||
<step imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-part1-screenshot.png" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part1.html" projectPath="tutorials/addressbook/part1/part1.pro"/>
|
||||
<step imageUrl="qthelp://com.trolltech.qt/qdoc/images/addressbook-tutorial-part2-add-contact.png" docUrl="qthelp://com.trolltech.qt/qdoc/tutorials-addressbook-part2.html" projectPath="tutorials/addressbook/part2/part2.pro"/>
|
||||
|
||||
@@ -31,12 +31,182 @@
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import "widgets" as Widgets
|
||||
import "widgets"
|
||||
import QtQuick 1.0
|
||||
|
||||
Rectangle {
|
||||
id: gettingStartedRoot
|
||||
width: 920
|
||||
height: 600
|
||||
|
||||
PageCaption {
|
||||
id: pageCaption
|
||||
|
||||
x: 32
|
||||
y: 8
|
||||
|
||||
anchors.rightMargin: 16
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.left: parent.left
|
||||
|
||||
caption: qsTr("Getting Started")
|
||||
}
|
||||
|
||||
Item {
|
||||
id: canvas
|
||||
|
||||
width: 920
|
||||
height: 200
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0
|
||||
|
||||
Feedback {
|
||||
id: feedback
|
||||
|
||||
x: 851
|
||||
y: 424
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 22
|
||||
|
||||
}
|
||||
|
||||
GettingStartedItem {
|
||||
x: 688
|
||||
y: 83
|
||||
|
||||
anchors.rightMargin: 32
|
||||
anchors.right: parent.right
|
||||
|
||||
description: qsTr("To select a tutorial and learn how to develop applications.")
|
||||
title: qsTr("Start Developing")
|
||||
number: 4
|
||||
imageUrl: "widgets/images/gettingStarted04.png"
|
||||
onClicked: tab.currentIndex = 3;
|
||||
|
||||
}
|
||||
|
||||
GettingStartedItem {
|
||||
x: 468
|
||||
y: 83
|
||||
|
||||
description: qsTr("To check that the Qt SDK installation was successful, open an example application and run it.")
|
||||
title: qsTr("Building and Running an Example Application")
|
||||
number: 3
|
||||
imageUrl: "widgets/images/gettingStarted03.png"
|
||||
onClicked: gettingStarted.openSplitHelp("qthelp://com.nokia.qtcreator/doc/creator-build-example-application.html")
|
||||
}
|
||||
|
||||
GettingStartedItem {
|
||||
id: gettingStartedItem
|
||||
|
||||
x: 30
|
||||
y: 83
|
||||
|
||||
imageUrl: "widgets/images/gettingStarted01.png"
|
||||
title: qsTr("IDE Overview")
|
||||
description: qsTr("To find out what kind of integrated enviroment (IDE) Qt Creator is.")
|
||||
number: 1
|
||||
|
||||
onClicked: gettingStarted.openHelp("qthelp://com.nokia.qtcreator/doc/creator-overview.html")
|
||||
}
|
||||
|
||||
GettingStartedItem {
|
||||
x: 250
|
||||
y: 83
|
||||
|
||||
description: qsTr("To become familar with the parts of the Qt Creator user interface and to learn how to use them.")
|
||||
title: qsTr("User Interface")
|
||||
imageUrl: "widgets/images/gettingStarted02.png"
|
||||
number: 2
|
||||
onClicked: gettingStarted.openHelp("qthelp://com.nokia.qtcreator/doc/creator-quick-tour.html")
|
||||
}
|
||||
|
||||
Grid {
|
||||
id: grid
|
||||
|
||||
x: 36
|
||||
y: 424
|
||||
|
||||
spacing: 24
|
||||
|
||||
rows: gettingStartedRoot.height > 640 ? 3 : 1
|
||||
|
||||
Row {
|
||||
id: userGuide
|
||||
spacing: 4
|
||||
Image {
|
||||
y: 10
|
||||
source: "widgets/images/icons/userguideIcon.png"
|
||||
}
|
||||
|
||||
LinkedText {
|
||||
x: 19
|
||||
y: 5
|
||||
height: 38
|
||||
text: qsTr("User Guide")
|
||||
verticalAlignment: Text.AlignBottom
|
||||
onClicked: gettingStarted.openHelp("qthelp://com.nokia.qtcreator/doc/index.html")
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
id: onlineCommunity
|
||||
spacing: 4
|
||||
Image {
|
||||
y: 10
|
||||
source: "widgets/images/icons/communityIcon.png"
|
||||
}
|
||||
|
||||
LinkedText {
|
||||
x: 19
|
||||
y: 5
|
||||
height: 38
|
||||
text: qsTr("Online Community")
|
||||
verticalAlignment: Text.AlignBottom
|
||||
onClicked: gettingStarted.openUrl("http://developer.qt.nokia.com/forums")
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
id: labs
|
||||
spacing: 4
|
||||
Image {
|
||||
y: 10
|
||||
source: "widgets/images/icons/labsIcon.png"
|
||||
}
|
||||
|
||||
LinkedText {
|
||||
x: 19
|
||||
y: 5
|
||||
height: 38
|
||||
text: qsTr("Labs")
|
||||
verticalAlignment: Text.AlignBottom
|
||||
onClicked: gettingStarted.openUrl("http://labs.qt.nokia.com")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
x: 231
|
||||
y: 155
|
||||
source: "widgets/images/arrowBig.png"
|
||||
}
|
||||
|
||||
Image {
|
||||
x: 451
|
||||
y: 155
|
||||
source: "widgets/images/arrowBig.png"
|
||||
}
|
||||
|
||||
Image {
|
||||
x: 669
|
||||
y: 155
|
||||
source: "widgets/images/arrowBig.png"
|
||||
}
|
||||
|
||||
Item {
|
||||
Widgets.ExampleBrowser {
|
||||
model: tutorialsModel
|
||||
anchors.fill: parent
|
||||
anchors.margins: 8
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<instructionals module="Qt">
|
||||
<tutorials>
|
||||
<tutorial imageUrl="qthelp://com.nokia.qtcreator/doc/images/qtcreator-qt-quick-editors.png" difficulty="" docUrl="qthelp://com.nokia.qtcreator/doc/creator-quick-tour.html" projectPath="" name="The Qt Creator User Interface">
|
||||
<description><![CDATA[This tutorial provides you with a principal summary of the Qt Creator User Interface.]]></description>
|
||||
<tags>qt creator,quick tour,ui</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="qthelp://com.nokia.qtcreator/doc/images/qtcreator-gs-build-example-select-qs.png" difficulty="" docUrl="qthelp://com.nokia.qtcreator/doc/creator-build-example-application.html" projectPath="" name="Building and Running an Example Application">
|
||||
<description><![CDATA[You can test that your installation is successful by opening an existing example application project.]]></description>
|
||||
<tags>qt creator,build,compile</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="qthelp://com.nokia.qtcreator/doc/images/qtcreator-textfinder-screenshot.png" difficulty="" docUrl="qthelp://com.nokia.qtcreator/doc/creator-writing-program.html" projectPath="" name="Creating a Qt Widget Based Application">
|
||||
<description><![CDATA[This tutorial describes how to use Qt Creator to create a small Qt application, Text Finder.]]></description>
|
||||
<tags>qt,c++,text,qt designer,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="qthelp://com.nokia.qtcreator/doc/images/qtcreator-batteryindicator-screenshot.png" difficulty="" docUrl="qthelp://com.nokia.qtcreator/doc/creator-mobile-example.html" projectPath="" name="Creating a Qt Widget Based Mobile Application">
|
||||
<description><![CDATA[This tutorial describes how to use Qt Creator to create a small Qt application, that uses the System Information Mobility API to fetch battery information from the device. The user interface for the application is designed using Qt widgets.]]></description>
|
||||
<tags>qt,c++,mobile,qt mobility,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="qthelp://com.nokia.qtcreator/doc/images/qmldesigner-tutorial.png" difficulty="" docUrl="qthelp://com.nokia.qtcreator/doc/creator-qml-application.html" projectPath="" name="Creating a Qt Quick Application">
|
||||
<description><![CDATA[This tutorial uses basic elements and illustrates basic concepts of Qt Quick.]]></description>
|
||||
<tags>qt quick,qml,states,transitions,visual designer,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="qthelp://com.nokia.qtcreator/doc/images/qtcreator-symbian-components-example.png" difficulty="" docUrl="qthelp://com.nokia.qtcreator/doc/creator-qml-components-example.html" projectPath="" name="Creating a Qt Quick Application Using Qt Quick Components">
|
||||
<description><![CDATA[This tutorial describes how to use Qt Creator to create a small Qt application, Battery Status, that uses the System Information Mobility API to fetch battery information from the device. The user interface for the application is designed using Qt Quick Components for Symbian.]]></description>
|
||||
<tags>qt quick,qml,components,symbian,visual designer,qt creator</tags>
|
||||
</tutorial>
|
||||
</tutorials>
|
||||
<tutorials>
|
||||
<tutorial imageUrl="qthelp://com.nokia.qtcreator/doc/images/qtcreator-gs-build-example-select-qs.png" difficulty="" docUrl="qthelp://com.nokia.qtcreator/doc/creator-build-example-application.html" projectPath="" name="Building and Running an Example Application">
|
||||
<description><![CDATA[You can test that your installation is successful by opening an existing example application project.]]></description>
|
||||
<tags>qt creator,build,compile</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="qthelp://com.nokia.qtcreator/doc/images/qtcreator-textfinder-screenshot.png" difficulty="" docUrl="qthelp://com.nokia.qtcreator/doc/creator-writing-program.html" projectPath="" name="Creating a Qt Widget Based Application">
|
||||
<description><![CDATA[This tutorial describes how to use Qt Creator to create a small Qt application, Text Finder.]]></description>
|
||||
<tags>qt,c++,text,qt designer,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="qthelp://com.nokia.qtcreator/doc/images/qmldesigner-tutorial.png" difficulty="" docUrl="qthelp://com.nokia.qtcreator/doc/creator-qml-application.html" projectPath="" name="Creating a Qt Quick Application">
|
||||
<description><![CDATA[This tutorial uses basic elements and illustrates basic concepts of Qt Quick.]]></description>
|
||||
<tags>qt quick,qml,states,transitions,visual designer,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="qthelp://com.nokia.qtcreator/doc/images/qtcreator-symbian-components-example.png" difficulty="" docUrl="qthelp://com.nokia.qtcreator/doc/creator-qml-components-example.html" projectPath="" name="Creating a Qt Quick Application Using Qt Quick Components">
|
||||
<description><![CDATA[This tutorial describes how to use Qt Creator to create a small Qt application, Battery Status, that uses the System Information Mobility API to fetch battery information from the device. ]]></description>
|
||||
<tags>qt quick,qml,components,symbian,visual designer,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="images/icons/developing_with_qt_creator.png" difficulty="" projectPath="" name="Qt SDK 1.1: Developing with Nokia's Qt Creator" isVideo="true" videoUrl="http://youtu.be/h0TxFBCyMWo" videoLength="3:40">
|
||||
<description><![CDATA[Lauri Jääskelä from Forum Nokia gives you a kick-start with Qt SDK 1.1 and Qt Quick. ]]></description>
|
||||
<tags>qt sdk,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="images/icons/qt_sdk.png" difficulty="" projectPath="" name="Qt SDK 1.1" isVideo="true" videoUrl="http://youtu.be/n-lPFyqG6Vs" videoLength="3:31">
|
||||
<description><![CDATA[Christian D. Kamm, software engineer at Nokia, Qt Development Frameworks, introduces the new features delivered in the Qt SDK 1.1. Christian discusses the capabilities of Qt Quick and the Qt Mobility APIs.]]></description>
|
||||
<tags>qt sdk,qt creator,qt quick</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="images/icons/qt_quick_1.png" difficulty="" projectPath="" name="Qt Quick Elements, Part 1" isVideo="true" videoUrl="http://youtu.be/vGIVWfLVZLM" videoLength="5:04">
|
||||
<description><![CDATA[In this video Nigel Hietala describes how QML Elements are used. Nigel creates a new Qt Quick based application project using Qt SDK, shows how a basic UI is built using elements and is previewed in the Qt Quick viewer.]]></description>
|
||||
<tags>qt quick,qml,qt sdk,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="images/icons/qt_quick_2.png" difficulty="" projectPath="" name="Qt Quick Elements, Part 2" isVideo="true" videoUrl="http://youtu.be/fakxsSDBC-Q" videoLength="5:14">
|
||||
<description><![CDATA[In this video Nigel Hietala describes how QML Components are created and used. Nigel shows how a reusable Qt Quick component is created by defining a separate QML file.]]></description>
|
||||
<tags>qt quick,qml,qt sdk,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="images/icons/qt_quick_3.png" difficulty="" projectPath="" name="Qt Quick Elements, Part 3" isVideo="true" videoUrl="http://youtu.be/UjjIk4e_6Q4" videoLength="5:50">
|
||||
<description><![CDATA[In this video Nigel Hietala describes how to use the States and Transitions of Qt Quick. Nigel creates a simple application using a state to control the visibility of an image when a button is clicked.]]></description>
|
||||
<tags>qt quick,qml,qt sdk,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="images/icons/ddays11.png" difficulty="" projectPath="" name="Qt Creator Bootcamp" isVideo="true" videoUrl="http://developer.qt.nokia.com/videos/watch/qt_creator_bootcamp" videoLength="58:29">
|
||||
<description><![CDATA[All you need to start with Qt Creator - a cross-platform IDE Are you developing cross-platform applications with Qt, but are missing a cross-platform development environment?]]></description>
|
||||
<tags>qt sdk,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="images/icons/ddays11.png" difficulty="" projectPath="" name="Qt Quick - Rapid User Interface Prototyping" isVideo="true" videoUrl="http://developer.qt.nokia.com/videos/watch/qt_quick_rapid_user_interface_prototyping" videoLength="1:09:53">
|
||||
<description><![CDATA[Skip Flash & PhotoShop. Go straight to Qt Quick! Creating an application with a great user experience is a challenge. Traditionally a lot of effort goes into upfront design where tools such as Flash or PhotoShop are used to prototype ideas.]]></description>
|
||||
<tags>qt quick,qml,qt sdk,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="images/icons/ddays11.png" difficulty="" projectPath="" name="Qt Creator! Getting the Most out" isVideo="true" videoUrl="http://developer.qt.nokia.com/videos/watch/getting_the_most_out_of_qt_creator" videoLength="1:16:27">
|
||||
<description><![CDATA[A quick intro plus hidden wonders! In this session, we will provide a very quick introduction to Qt Creator, then dive into the hidden wonders of this powerful and easy-to-use cross-platform Qt IDE.]]></description>
|
||||
<tags>qt sdk,qt creator</tags>
|
||||
</tutorial>
|
||||
<tutorial imageUrl="images/icons/ddays11.png" difficulty="" projectPath="" name="Meet Qt Quick" isVideo="true" videoUrl="http://developer.qt.nokia.com/videos/watch/meet_qt_quick" videoLength="1:08:24">
|
||||
<description><![CDATA[The fundamental elements behind Qt Quick and how to quickly create fluid, animated user interfaces! Qt Quick is a set of technologies that makes it easier for developers and designers to create modern and attractive UIs.]]></description>
|
||||
<tags>qt quick, qml</tags>
|
||||
</tutorial>
|
||||
</tutorials>
|
||||
</instructionals>
|
||||
|
||||
@@ -30,77 +30,104 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents 1.0 as Components
|
||||
import QtQuick 1.0
|
||||
import "widgets"
|
||||
|
||||
Item {
|
||||
property alias model: gridView.model
|
||||
id: exampleBrowserRoot
|
||||
function appendTag(tag) {
|
||||
var tagStr = "tag:" + '"' + tag + '"'
|
||||
if (exampleLineEdit.lineEdit.text === "")
|
||||
exampleLineEdit.lineEdit.text = tagStr
|
||||
else
|
||||
exampleLineEdit.lineEdit.text += " " + tagStr
|
||||
Rectangle {
|
||||
id: rectangle1
|
||||
width: 1024
|
||||
height: Math.min(920, parent.height - y)
|
||||
|
||||
PageCaption {
|
||||
id: pageCaption
|
||||
|
||||
x: 32
|
||||
y: 8
|
||||
|
||||
anchors.rightMargin: 16
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.left: parent.left
|
||||
|
||||
caption: qsTr("Tutorials")
|
||||
}
|
||||
|
||||
Image {
|
||||
source: "qrc:welcome/images/welcomebg.png"
|
||||
anchors.fill: parent
|
||||
opacity: 0.2
|
||||
}
|
||||
CustomScrollArea {
|
||||
id: scrollArea;
|
||||
|
||||
Components.ScrollArea {
|
||||
id: scrollArea
|
||||
anchors.topMargin: - 8
|
||||
anchors.margins: -8
|
||||
anchors.rightMargin: 38
|
||||
anchors.bottomMargin: 60
|
||||
anchors.leftMargin: 38
|
||||
anchors.topMargin: 102
|
||||
anchors.fill: parent
|
||||
|
||||
clip: true
|
||||
|
||||
horizontalScrollBar.visible: false
|
||||
frame: false
|
||||
ExampleGridView {
|
||||
id: gridView
|
||||
y: 16
|
||||
|
||||
CustomizedGridView {
|
||||
model: tutorialsModel
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: scrollArea.bottom
|
||||
height: 16
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0.00;
|
||||
color: "#00ffffff";
|
||||
}
|
||||
GradientStop {
|
||||
position: 1.00;
|
||||
color: "#ffffff";
|
||||
}
|
||||
}
|
||||
anchors.left: scrollArea.left
|
||||
anchors.right: scrollArea.right
|
||||
SearchBar {
|
||||
id: searchBar
|
||||
|
||||
y: 60
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 60
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 60
|
||||
|
||||
placeholderText: qsTr("Search in Tutorials...")
|
||||
onTextChanged: tutorialsModel.parseSearchString(text)
|
||||
}
|
||||
Rectangle {
|
||||
anchors.top: scrollArea.top
|
||||
height: 16
|
||||
anchors.left: scrollArea.left
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
anchors.right: scrollArea.right
|
||||
id: gradiant
|
||||
y: 102
|
||||
height: 10
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0.00;
|
||||
color: "#ffffff";
|
||||
position: 0
|
||||
color: "#ffffff"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1.00;
|
||||
color: "#00ffffff";
|
||||
position: 1
|
||||
color: "#00ffffff"
|
||||
}
|
||||
}
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 38
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 38
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: tagBrowserLoader
|
||||
anchors.fill: parent
|
||||
Rectangle {
|
||||
id: gradiant1
|
||||
x: 38
|
||||
y: 570
|
||||
height: 10
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#00ffffff"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#ffffff"
|
||||
}
|
||||
}
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 60
|
||||
anchors.rightMargin: 38
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 38
|
||||
anchors.left: parent.left
|
||||
}
|
||||
}
|
||||
@@ -32,92 +32,52 @@
|
||||
|
||||
import QtQuick 1.0
|
||||
import "widgets"
|
||||
import qtcomponents 1.0 as Components
|
||||
|
||||
Rectangle {
|
||||
width: 920
|
||||
height: 600
|
||||
id: root
|
||||
width: 1024
|
||||
height: 768
|
||||
color: "white"
|
||||
// work around the fact that we can't use
|
||||
// a property alias to welcomeMode.activePlugin
|
||||
property int current: 0
|
||||
onCurrentChanged: welcomeMode.activePlugin = current
|
||||
Component.onCompleted: current = welcomeMode.activePlugin
|
||||
|
||||
|
||||
LinksBar {
|
||||
id: navigationAndDevLinks
|
||||
property alias current: root.current
|
||||
anchors.topMargin: -1
|
||||
anchors.top: inner_background.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottomMargin: 4
|
||||
model: tabs.model
|
||||
}
|
||||
|
||||
|
||||
TabWidget {
|
||||
id: tabs
|
||||
property int current: root.current
|
||||
anchors.rightMargin: 0
|
||||
anchors.leftMargin: 0
|
||||
model: pagesModel
|
||||
anchors.top: feedback.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: news.left
|
||||
anchors.margins: 0
|
||||
}
|
||||
|
||||
Item {
|
||||
Image {
|
||||
source: "qrc:welcome/images/welcomebg.png"
|
||||
anchors.fill: parent
|
||||
opacity: 0.5
|
||||
id: canvas
|
||||
|
||||
|
||||
opacity: 0
|
||||
|
||||
Component.onCompleted: canvas.opacity = 1
|
||||
|
||||
Behavior on opacity {
|
||||
PropertyAnimation {
|
||||
duration: 450
|
||||
}
|
||||
}
|
||||
|
||||
anchors.right: parent.right
|
||||
id: news
|
||||
opacity: 0.7
|
||||
anchors.top: navigationAndDevLinks.bottom
|
||||
width: Math.min(1024, parent.width)
|
||||
anchors.topMargin: (root.height > 700) ? 32 : 0
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: 220
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
FeaturedAndNewsListing {
|
||||
CustomTab {
|
||||
id: tab
|
||||
x: 578
|
||||
y: 64
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 36
|
||||
model: pagesModel
|
||||
|
||||
}
|
||||
PageLoader {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 100
|
||||
model: pagesModel
|
||||
}
|
||||
Rectangle{
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: 1
|
||||
color: "black"
|
||||
anchors.left: parent.left
|
||||
Logo {
|
||||
id: logo
|
||||
x: 4
|
||||
y: 10
|
||||
}
|
||||
}
|
||||
|
||||
Feedback {
|
||||
id: feedback
|
||||
height: 38
|
||||
anchors.top: navigationAndDevLinks.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: news.left
|
||||
searchVisible: tabs.currentHasSearchBar
|
||||
}
|
||||
|
||||
BorderImage {
|
||||
id: inner_background
|
||||
x: 0
|
||||
y: 0
|
||||
anchors.top: root.top
|
||||
source: "qrc:welcome/images/background_center_frame_v2.png"
|
||||
width: parent.width
|
||||
height: 0
|
||||
anchors.topMargin: 0
|
||||
border.right: 2
|
||||
border.left: 2
|
||||
border.top: 2
|
||||
border.bottom: 10
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import QmlProject 1.1
|
||||
|
||||
Project {
|
||||
mainFile: "welcomescreen.qml"
|
||||
mainFile: "welcomepage.qml"
|
||||
|
||||
/* Include .qml, .js, and image files from current directory and subdirectories */
|
||||
QmlFiles {
|
||||
@@ -15,9 +15,6 @@ Project {
|
||||
ImageFiles {
|
||||
directory: "."
|
||||
}
|
||||
|
||||
importPaths: ["../../../lib/qtcreator/"]
|
||||
|
||||
/* List of plugin directories passed to QML runtime */
|
||||
// importPaths: [ "../exampleplugin" ]
|
||||
}
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import Qt 4.7
|
||||
import qtcomponents.custom 1.0 as Custom
|
||||
|
||||
Custom.Button {
|
||||
id: button
|
||||
|
||||
width: Math.max(50, labelItem.contentsWidth+20)
|
||||
height: 32
|
||||
property url pressedSource: "qrc:welcome/images/btn_26_pressed.png"
|
||||
property url hoverSource: "qrc:welcome/images/btn_26_hover.png"
|
||||
property url backgroundSource: "qrc:welcome/images/btn_26.png"
|
||||
|
||||
|
||||
background: BorderImage {
|
||||
id: borderImage
|
||||
source: button.backgroundSource
|
||||
border { left: 5; right: 5; top: 5; bottom: 5 }
|
||||
|
||||
property bool isPressedOrChecked: (button.pressed || button.checked)
|
||||
|
||||
property bool isHovered: !borderImage.isPressedOrChecked && !button.containsMouse
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "pressed"
|
||||
when: borderImage.isPressedOrChecked
|
||||
PropertyChanges {
|
||||
target: borderImage
|
||||
source:button.pressedSource
|
||||
}
|
||||
},
|
||||
State {
|
||||
when: borderImage.isHovered
|
||||
name: "hovered"
|
||||
PropertyChanges {
|
||||
target: borderImage
|
||||
source:button.hoverSource
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
label: Item {
|
||||
property int contentsWidth : row.width
|
||||
Row {
|
||||
id: row
|
||||
spacing: 4
|
||||
anchors.centerIn: parent
|
||||
property int contentsWidth : row.width
|
||||
Image {
|
||||
id: image
|
||||
source: iconSource
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
fillMode: Image.Stretch //mm Image should shrink if button is too small, depends on QTBUG-14957
|
||||
}
|
||||
Text {
|
||||
id:text
|
||||
color: textColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: button.text
|
||||
horizontalAlignment: Text.Center
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Keys.onSpacePressed:clicked()
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
height: 48
|
||||
property alias text: text.text
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 20
|
||||
Rectangle {
|
||||
id: caption
|
||||
height: 32
|
||||
radius: 3
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#e6e6e6"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#e4e4e4"
|
||||
}
|
||||
}
|
||||
smooth: true
|
||||
border.color: "#a4a4a4"
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: 1
|
||||
anchors.leftMargin: 2
|
||||
anchors.rightMargin: 2
|
||||
height: 1
|
||||
}
|
||||
|
||||
Text {
|
||||
id: text
|
||||
anchors.margins: 8
|
||||
color: "#19196f"
|
||||
text: "model.name"
|
||||
anchors.fill: parent
|
||||
wrapMode: Text.WordWrap
|
||||
styleColor: "#807b7b"
|
||||
style: Text.Normal
|
||||
font.pixelSize: 14
|
||||
font.bold: true
|
||||
textFormat: Text.PlainText
|
||||
maximumLineCount: 1
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
states: [
|
||||
State {
|
||||
name: "hover"
|
||||
|
||||
PropertyChanges {
|
||||
target: caption
|
||||
height: 48
|
||||
}
|
||||
PropertyChanges {
|
||||
target: text
|
||||
maximumLineCount: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
SequentialAnimation {
|
||||
PropertyAnimation {
|
||||
target: caption
|
||||
property: "height"
|
||||
duration: 40
|
||||
}
|
||||
PropertyAction {
|
||||
target: text
|
||||
property: "maximumLineCount"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
x: 20
|
||||
y: 0
|
||||
anchors.fill: parent
|
||||
anchors.bottomMargin: 12
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
delegate.state = "clicked"
|
||||
}
|
||||
onEntered: {
|
||||
if (text.truncated) {
|
||||
caption.state = "hover"
|
||||
}
|
||||
root.parent.state = "hover"
|
||||
}
|
||||
onExited:{
|
||||
caption.state = ""
|
||||
root.parent.state = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents.custom 1.0 as Custom
|
||||
|
||||
Custom.CheckBox{
|
||||
id:checkbox
|
||||
property string text
|
||||
property string hint
|
||||
height:20
|
||||
width: Math.max(110, backgroundItem.rowWidth)
|
||||
property url backgroundSource: "qrc:welcome/images/lineedit.png";
|
||||
property url checkSource: "qrc:welcome/images/checked.png";
|
||||
background: Item {
|
||||
property int rowWidth: row.width
|
||||
Row {
|
||||
id: row
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 6
|
||||
BorderImage {
|
||||
source: checkBox.backgroundSource
|
||||
width: 16;
|
||||
height: 16;
|
||||
border.left: 4;
|
||||
border.right: 4;
|
||||
border.top: 4;
|
||||
border.bottom: 4
|
||||
Image {
|
||||
source: checkBox.checkSource
|
||||
width: 10; height: 10
|
||||
anchors.centerIn: parent
|
||||
visible: checkbox.checked
|
||||
}
|
||||
}
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: checkbox.text
|
||||
}
|
||||
}
|
||||
Keys.onSpacePressed:checked = !checked
|
||||
|
||||
}
|
||||
}
|
||||
40
share/qtcreator/welcomescreen/widgets/CustomColors.qml
Normal file
@@ -0,0 +1,40 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
|
||||
QtObject {
|
||||
property color linkColor: "#445ba8"
|
||||
//property color linkColor: "#70b332"
|
||||
//property color strongForegroundColor: "#58595b"
|
||||
property color strongForegroundColor: "#445ba8"
|
||||
}
|
||||
@@ -32,50 +32,52 @@
|
||||
|
||||
import QtQuick 1.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
height: childrenRect.height
|
||||
property string header
|
||||
property QtObject model
|
||||
property Component delegate
|
||||
QtObject {
|
||||
property alias linkFont: linkText.font
|
||||
property alias standardCaption: standardCaptionText.font
|
||||
property alias standstandardDescription: standardDescriptionText.font
|
||||
property alias italicDescription: italicDescriptionText.font
|
||||
|
||||
Rectangle {
|
||||
id: header
|
||||
color: "#f2f2f2"
|
||||
width: parent.width
|
||||
height: 51
|
||||
property list<Item> texts: [
|
||||
|
||||
Text {
|
||||
id: titleText
|
||||
x: 10
|
||||
y: 10
|
||||
text: root.header
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: parent.width
|
||||
font.bold: true
|
||||
font.pointSize: 14
|
||||
color: "#444"
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
height: 1
|
||||
color: "#a09c90"
|
||||
anchors.top: header.bottom
|
||||
width: parent.width
|
||||
}
|
||||
id: linkText
|
||||
|
||||
Column {
|
||||
id: dataSection
|
||||
anchors.top: header.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 16
|
||||
anchors.topMargin: 16
|
||||
visible: false
|
||||
|
||||
Repeater {
|
||||
model: root.model
|
||||
delegate: root.delegate
|
||||
font.pixelSize: 13
|
||||
//font.bold: true
|
||||
font.family: "Helvetica"
|
||||
},
|
||||
|
||||
Text {
|
||||
id: standardCaptionText
|
||||
|
||||
visible: false
|
||||
|
||||
font.family: "Helvetica"
|
||||
font.pixelSize: 16
|
||||
},
|
||||
|
||||
Text {
|
||||
id: standardDescriptionText
|
||||
|
||||
visible: false
|
||||
|
||||
font.pixelSize: 13
|
||||
font.bold: false
|
||||
font.family: "Helvetica"
|
||||
},
|
||||
|
||||
Text {
|
||||
id: italicDescriptionText
|
||||
|
||||
visible: false
|
||||
|
||||
font.pixelSize: 13
|
||||
font.bold: false
|
||||
font.family: "Helvetica"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
@@ -31,18 +31,10 @@
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents 1.0
|
||||
|
||||
GridView {
|
||||
interactive: false
|
||||
width: scrollArea.width
|
||||
property int columns: Math.max(Math.floor(width / cellWidth), 1)
|
||||
height: 400 * Math.ceil(count / columns)
|
||||
cellHeight: 400
|
||||
cellWidth: 350
|
||||
|
||||
x: Math.max((width - (cellWidth * columns)) / 2, 0);
|
||||
|
||||
delegate: ExampleDelegate {
|
||||
onTagClicked: exampleBrowserRoot.appendTag(tag)
|
||||
}
|
||||
ScrollArea {
|
||||
horizontalScrollBar.visible: false
|
||||
frame: false
|
||||
clip: true
|
||||
}
|
||||
58
share/qtcreator/welcomescreen/widgets/CustomTab.qml
Normal file
@@ -0,0 +1,58 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
|
||||
Row {
|
||||
id: customTab
|
||||
property alias model: repeater.model
|
||||
spacing: 24
|
||||
|
||||
signal itemChanged
|
||||
property int currentIndex: 0
|
||||
|
||||
onCurrentIndexChanged: welcomeMode.activePlugin = currentIndex
|
||||
Component.onCompleted: currentIndex = welcomeMode.activePlugin
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
|
||||
LinkedText {
|
||||
text: title
|
||||
active: customTab.currentIndex === index
|
||||
|
||||
onClicked: {
|
||||
customTab.currentIndex = index
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
62
share/qtcreator/welcomescreen/widgets/CustomizedGridView.qml
Normal file
@@ -0,0 +1,62 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
|
||||
GridView {
|
||||
interactive: false
|
||||
width: scrollArea.width
|
||||
cellHeight: 240
|
||||
cellWidth: 216
|
||||
property int columns: Math.max(Math.floor(width / cellWidth), 1)
|
||||
height: 240 * Math.ceil(count / columns)
|
||||
|
||||
x: Math.max((width - (cellWidth * columns)) / 2, 0);
|
||||
|
||||
delegate: Delegate {
|
||||
id: delegate
|
||||
|
||||
property string mockupSource: model.imageSource
|
||||
property string realSource: model.imageUrl !== "" ? "image://helpimage/" + encodeURI(model.imageUrl) : ""
|
||||
|
||||
imageSource: model.imageSource === undefined ? realSource : 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
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
384
share/qtcreator/welcomescreen/widgets/Delegate.qml
Normal file
@@ -0,0 +1,384 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents 1.0
|
||||
|
||||
Rectangle {
|
||||
id: delegate
|
||||
height: 240
|
||||
width: 216
|
||||
|
||||
property alias caption: captionItem.text
|
||||
property alias imageSource: imageItem.source
|
||||
property alias videoSource: videoIcon.source
|
||||
property alias description: descriptionItem.text
|
||||
property bool isVideo: false
|
||||
property alias videoLength: length.text
|
||||
|
||||
property alias tags: repeater.model
|
||||
|
||||
function appendTag(tag) {
|
||||
var tagStr = "tag:" + '"' + tag + '"'
|
||||
if (searchBar.text === "")
|
||||
searchBar.text = tagStr
|
||||
else
|
||||
searchBar.text += " " + tagStr
|
||||
}
|
||||
|
||||
CustomColors {
|
||||
id: colors
|
||||
}
|
||||
|
||||
CustomFonts {
|
||||
id: fonts
|
||||
}
|
||||
|
||||
QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
|
||||
|
||||
|
||||
BorderImage {
|
||||
id: image1
|
||||
x: 11
|
||||
y: 8
|
||||
width: 196
|
||||
height: 153
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
border.bottom: 4
|
||||
border.right: 4
|
||||
border.top: 5
|
||||
border.left: 4
|
||||
source: "images/dropshadow.png"
|
||||
|
||||
Image {
|
||||
id: imageItem
|
||||
|
||||
visible: !delegate.isVideo
|
||||
anchors.rightMargin: 4
|
||||
anchors.leftMargin: 4
|
||||
anchors.bottomMargin: 4
|
||||
anchors.topMargin: 4
|
||||
anchors.fill: parent
|
||||
asynchronous: true
|
||||
|
||||
}
|
||||
|
||||
Image {
|
||||
id: videoIcon
|
||||
|
||||
visible: delegate.isVideo
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
asynchronous: true
|
||||
}
|
||||
|
||||
Text {
|
||||
id: length
|
||||
|
||||
visible: delegate.isVideo
|
||||
x: 87
|
||||
y: 130
|
||||
color: "#555555"
|
||||
text: delegate.videoLength
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.bold: true
|
||||
font.family: "Helvetica"
|
||||
font.pixelSize: 14
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle2
|
||||
y: 161
|
||||
width: 200
|
||||
height: 69
|
||||
color: "#ffffff"
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
}
|
||||
|
||||
Text {
|
||||
id: captionItem
|
||||
x: 16
|
||||
y: 170
|
||||
color: colors.strongForegroundColor
|
||||
text: qsTr("2D PAINTING EXAMPLE long description")
|
||||
clip: true
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 16
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 16
|
||||
wrapMode: Text.WordWrap
|
||||
maximumLineCount: 1
|
||||
font: fonts.standardCaption
|
||||
}
|
||||
|
||||
Text {
|
||||
id: descriptionItem
|
||||
height: 43
|
||||
color: "#7e7e7e"
|
||||
text: qsTr("The 2D Painting example shows how QPainter and QGLWidget. The 2D Painting example shows how QPainter and QGLWidget work together.")
|
||||
anchors.top: captionItem.bottom
|
||||
anchors.topMargin: 6
|
||||
opacity: 0
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 16
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 16
|
||||
wrapMode: Text.WordWrap
|
||||
font: fonts.standstandardDescription
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
maximumLineCount: 8
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rectangle1
|
||||
x: 16
|
||||
y: 195
|
||||
height: 1
|
||||
color: "#dddcdc"
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 10
|
||||
}
|
||||
|
||||
Text {
|
||||
id: text3
|
||||
x: 16
|
||||
y: 198
|
||||
text: qsTr("Tags:")
|
||||
smooth: true
|
||||
font.italic: false
|
||||
font.pixelSize: 11
|
||||
wrapMode: Text.WordWrap
|
||||
font.family: "Helvetica"
|
||||
font.bold: false
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: rectangle3
|
||||
x: 10
|
||||
height: 1
|
||||
color: "#dddcdc"
|
||||
visible: false
|
||||
anchors.top: captionItem.bottom
|
||||
anchors.topMargin: 2
|
||||
anchors.rightMargin: 10
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 10
|
||||
anchors.left: parent.left
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: border
|
||||
color: "#00000000"
|
||||
radius: 8
|
||||
anchors.rightMargin: 4
|
||||
anchors.leftMargin: 4
|
||||
anchors.bottomMargin: 4
|
||||
anchors.topMargin: 4
|
||||
visible: false
|
||||
anchors.fill: parent
|
||||
border.color: "#dddcdc"
|
||||
}
|
||||
|
||||
|
||||
MouseArea {
|
||||
id: mousearea1
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
delegate.state="hover"
|
||||
}
|
||||
|
||||
onExited: {
|
||||
delegate.state=""
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
var oldPauseAnimation = pauseAnimation.duration
|
||||
pauseAnimation.duration = 10;
|
||||
delegate.state = ""
|
||||
pauseAnimation.duration = oldPauseAnimation;
|
||||
if (model.isVideo)
|
||||
gettingStarted.openUrl(model.videoUrl);
|
||||
else if (model.hasSourceCode)
|
||||
gettingStarted.openProject(model.projectPath, model.filesToOpen, model.docUrl)
|
||||
else
|
||||
gettingStarted.openSplitHelp(model.docUrl);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hover"
|
||||
|
||||
PropertyChanges {
|
||||
target: rectangle2
|
||||
x: 0
|
||||
y: 4
|
||||
width: 216
|
||||
height: 236
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: captionItem
|
||||
y: 14
|
||||
maximumLineCount: 2
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: descriptionItem
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: rectangle3
|
||||
x: 10
|
||||
y: 52
|
||||
visible: true
|
||||
anchors.rightMargin: 10
|
||||
anchors.leftMargin: 10
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: border
|
||||
visible: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
from: ""
|
||||
to: "hover"
|
||||
SequentialAnimation {
|
||||
PauseAnimation { id: pauseAnimation; duration: 200 }
|
||||
ParallelAnimation {
|
||||
|
||||
PropertyAnimation {
|
||||
properties: "y, height"
|
||||
duration: 100
|
||||
}
|
||||
SequentialAnimation {
|
||||
PropertyAction {
|
||||
property: "maximumLineCount"
|
||||
}
|
||||
|
||||
PauseAnimation { duration: 60 }
|
||||
PropertyAnimation {
|
||||
properties: "opacity"
|
||||
duration: 150
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Transition {
|
||||
from: "hover"
|
||||
to: ""
|
||||
SequentialAnimation {
|
||||
PauseAnimation { duration: 100 }
|
||||
|
||||
ParallelAnimation {
|
||||
PropertyAnimation {
|
||||
properties: "opacity"
|
||||
duration: 60
|
||||
}
|
||||
SequentialAnimation {
|
||||
PauseAnimation { duration: 60 }
|
||||
PropertyAction {
|
||||
property: "maximumLineCount"
|
||||
}
|
||||
PropertyAnimation {
|
||||
properties: "y, height"
|
||||
duration: 100
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
Flow {
|
||||
x: 47
|
||||
y: 198
|
||||
width: 159
|
||||
height: 32
|
||||
clip: true
|
||||
|
||||
spacing: 4
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
model: mockupTags
|
||||
LinkedText {
|
||||
id: text4
|
||||
color: "#777777"
|
||||
text: modelData
|
||||
smooth: true
|
||||
font.pixelSize: 11
|
||||
font.family: "Helvetica" //setting the pixelSize will set the family back to the default
|
||||
wrapMode: Text.WordWrap
|
||||
onEntered: {
|
||||
delegate.state="hover"
|
||||
}
|
||||
onExited: {
|
||||
delegate.state=""
|
||||
}
|
||||
onClicked: appendTag(modelData)
|
||||
property bool hugeTag: (text.length > 12) && index > 1
|
||||
property bool isExampleTag: text === "example"
|
||||
visible: !hugeTag && !isExampleTag && index < 8
|
||||
}
|
||||
}
|
||||
}
|
||||
ListModel {
|
||||
id: mockupTags
|
||||
ListElement {
|
||||
modelData: "painting"
|
||||
}
|
||||
ListElement {
|
||||
modelData: "Qt Quick"
|
||||
}
|
||||
ListElement {
|
||||
modelData: "OpenGl"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,316 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
|
||||
Item {
|
||||
id: delegate
|
||||
width: GridView.view.cellWidth
|
||||
height: GridView.view.cellHeight
|
||||
|
||||
property variant tags : model.tags === undefined ? mockupTags : model.tags
|
||||
signal tagClicked(string tag)
|
||||
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: background
|
||||
radius: 3
|
||||
opacity: 0
|
||||
anchors.leftMargin: 4
|
||||
anchors.bottomMargin: 4
|
||||
anchors.topMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
border.width: 0
|
||||
border.color: "#a8a8a8"
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Text {
|
||||
clip: true
|
||||
id: description
|
||||
color: "#292828"
|
||||
text: model.description
|
||||
anchors.top: image.bottom
|
||||
anchors.topMargin: 8
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 8
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 26
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 26
|
||||
|
||||
wrapMode: TextEdit.WordWrap
|
||||
font.pixelSize: 13
|
||||
elide: Text.ElideRight
|
||||
textFormat: Text.PlainText
|
||||
maximumLineCount: 6
|
||||
|
||||
Text {
|
||||
id: more
|
||||
x: 0
|
||||
color: "#70747c"
|
||||
text: "[...]"
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: -16
|
||||
font.pixelSize: 12
|
||||
font.bold: false
|
||||
visible: description.truncated
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
delegate.state = "clicked"
|
||||
}
|
||||
onEntered: parent.state = "hover"
|
||||
onExited: if (parent.state === "hover") parent.state = ""
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: image
|
||||
x: 20
|
||||
y: 52
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 52
|
||||
height: 232
|
||||
radius: 3
|
||||
smooth: true
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 20
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#e6e6e6"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#e4e4e4"
|
||||
}
|
||||
}
|
||||
border.color: "#b5b1b1"
|
||||
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: 1
|
||||
anchors.leftMargin: 2
|
||||
anchors.rightMargin: 2
|
||||
height: 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
Image {
|
||||
property bool hideImage : model.imageUrl === "" || status === Image.Error
|
||||
fillMode: Image.PreserveAspectFit
|
||||
property string mockupSource: model.imageSource
|
||||
property string realSource: model.imageUrl !== "" ? "image://helpimage/" + encodeURI(model.imageUrl) : ""
|
||||
|
||||
source: mockupSource === "" ? realSource : mockupSource
|
||||
asynchronous: true
|
||||
smooth: true
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 46
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 16
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 16
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 16
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: tagLine;
|
||||
radius: 3
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 10
|
||||
smooth: true
|
||||
height: 32
|
||||
color: "#00000000"
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
|
||||
Flow {
|
||||
x: 38
|
||||
y: 0
|
||||
width: 256
|
||||
height: 32
|
||||
anchors.left: text1.right
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.leftMargin: 4
|
||||
spacing: 2
|
||||
Repeater {
|
||||
id: repeater
|
||||
model: tags
|
||||
Text {
|
||||
states: [ State { name: "hover"; PropertyChanges { target: tagText; color: "black" } } ]
|
||||
transitions: [
|
||||
Transition {
|
||||
PropertyAnimation { target: tagText; property: "color"; duration: 80 }
|
||||
}
|
||||
]
|
||||
id: tagText
|
||||
property string delimiter: index === (repeater.count - 1) ? "" : ", "
|
||||
text: model.modelData + delimiter
|
||||
font.italic: true
|
||||
color: "#a6a6a6"
|
||||
font.pixelSize: 12
|
||||
smooth: true
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
hoverEnabled: true;
|
||||
onEntered: {
|
||||
delegate.state = "hover"
|
||||
parent.state = "hover"
|
||||
}
|
||||
onExited:{
|
||||
delegate.state = ""
|
||||
parent.state = ""
|
||||
}
|
||||
onClicked: {
|
||||
delegate.tagClicked(model.modelData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Text { id: text1; x: 0; y: 0; text: qsTr("Tags:") ; font.bold: true; font.italic: true; color: "#8b8b8b"; font.pixelSize: 12}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Caption {
|
||||
text: model.name
|
||||
id: caption
|
||||
y: 16
|
||||
}
|
||||
|
||||
// Rectangle {
|
||||
// anchors.top: parent.top
|
||||
// height: 14
|
||||
// anchors.left: parent.left
|
||||
// anchors.right: parent.right
|
||||
// gradient: Gradient {
|
||||
// GradientStop {
|
||||
// position: 0.00;
|
||||
// color: "#ffffff";
|
||||
// }
|
||||
// GradientStop {
|
||||
// position: 1.00;
|
||||
// color: "#00ffffff";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hover";
|
||||
|
||||
PropertyChanges {
|
||||
target: background
|
||||
color: "#dddddd"
|
||||
opacity: 1
|
||||
border.width: 1
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "clicked"
|
||||
PropertyChanges {
|
||||
target: background
|
||||
color: "#e8e8e8"
|
||||
opacity: 1
|
||||
border.width: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
from: ""
|
||||
to: "hover"
|
||||
reversible: true
|
||||
PropertyAnimation { target: background; properties: "opacity, color"; duration: 60 }
|
||||
},
|
||||
Transition {
|
||||
from: "clicked"
|
||||
to: ""
|
||||
PropertyAnimation { target: background; properties: "opacity, color"; duration: 60 }
|
||||
},
|
||||
Transition {
|
||||
from: "hover"
|
||||
to: "clicked"
|
||||
SequentialAnimation {
|
||||
PropertyAnimation { target: background; properties: "opacity, color"; duration: 60 }
|
||||
ScriptAction {
|
||||
script: {
|
||||
delegate.state = "";
|
||||
if (model.hasSourceCode)
|
||||
gettingStarted.openProject(model.projectPath, model.filesToOpen, model.docUrl)
|
||||
else
|
||||
gettingStarted.openSplitHelp(model.docUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
// Rectangle {
|
||||
// id: line
|
||||
// height: 6
|
||||
// color: "#eaeaea"
|
||||
// anchors.rightMargin: -20
|
||||
// anchors.leftMargin: -20
|
||||
// anchors.bottom: parent.bottom
|
||||
// anchors.bottomMargin: -4
|
||||
// anchors.left: parent.left
|
||||
// anchors.right: parent.right
|
||||
// }
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import QtQuick 1.1
|
||||
|
||||
ListModel {
|
||||
ListElement {
|
||||
title: "Welcome to Qt Creator 2.3";
|
||||
blogName: "The Qt Creator Team"
|
||||
description: "<div>This release adds lots of new features as well as a great amount of bug fixes:</div><ul><li>Example and tutorial browsing with descriptive texts, and filtering for examples matching a keyword</li><li>Enhanced C++ coding style options, with indent settings and alignment settings split up for the different use cases depending on element, including preview and separation between global and project specific settings</li><li>Support for deployment and running to a more general “remote Linux”</li><li>Support for compiling projects with the Clang compiler</li><li>Code completion doesn't block the editor any more</li><li>Profiling now has it’s own “Analyze” mode.</li><li>Symbian got CODA support, allowing for deployment via WiFi</li><li>Support for models and delegates in the Qt Quick Designer</li><li>Support for editing inline components and delegates</li><li>Improved Live Preview (a.k.a. modifying QML while the app is running in the debugger)</li><li>Added ‘Find usages’ functionality for QML types</li></ul>"
|
||||
link: ""
|
||||
}
|
||||
}
|
||||
@@ -1,137 +1,21 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents 1.0 as Components
|
||||
|
||||
Rectangle {
|
||||
property alias searchVisible: lineEdit.visible
|
||||
id: inner_background
|
||||
height: 42
|
||||
color: "#f3f3f3"
|
||||
|
||||
Rectangle { color: "#444"; width: parent.width; height: 1; anchors.top: parent.top; anchors.left: parent.left; anchors.topMargin: -1 }
|
||||
|
||||
property bool _hasDesktopTheme: welcomeMode.platform() === "linux"
|
||||
|
||||
Rectangle {
|
||||
color: "black"
|
||||
height: 1
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
Row {
|
||||
id: feedback
|
||||
spacing: 4
|
||||
Image {
|
||||
y: 10
|
||||
visible: false
|
||||
source: "images/icons/userguideIcon.png"
|
||||
}
|
||||
|
||||
Item {
|
||||
id: item
|
||||
states: [
|
||||
State {
|
||||
name: "invisble"
|
||||
when: item.width < 400
|
||||
PropertyChanges {
|
||||
target: item
|
||||
opacity: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
LinkedText {
|
||||
x: 19
|
||||
y: 5
|
||||
text: qsTr("Feedback")
|
||||
height: 38
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
PropertyAnimation {
|
||||
property: "opacity"
|
||||
duration: 50
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
// whitelist
|
||||
|
||||
Button {
|
||||
id: feedbackButton
|
||||
x: 510
|
||||
y: 2
|
||||
text: qsTr("Feedback")
|
||||
anchors.rightMargin: 8
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenterOffset: 0
|
||||
height: 28
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: 5
|
||||
onClicked: welcomeMode.sendFeedback()
|
||||
tooltip: qsTr("Help us make Qt Creator even better")
|
||||
}
|
||||
|
||||
|
||||
|
||||
LineEdit {
|
||||
id: lineEdit
|
||||
height: 26
|
||||
anchors.rightMargin: 8
|
||||
anchors.right: feedbackButton.left
|
||||
anchors.leftMargin: 8
|
||||
placeholderText: qsTr("Search in Tutorials, Examples and Demos")
|
||||
focus: true
|
||||
anchors.left: createProjectButton.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onTextChanged: examplesModel.parseSearchString(text)
|
||||
}
|
||||
|
||||
Button {
|
||||
id: openProjectButton
|
||||
y: 2
|
||||
height: 28
|
||||
text: qsTr("Open Project...")
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
focus: false
|
||||
iconSource: _hasDesktopTheme ? "image://desktoptheme/document-open" : ""
|
||||
onClicked: welcomeMode.openProject();
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Button {
|
||||
id: createProjectButton
|
||||
y: 2
|
||||
text: qsTr("Create Project...")
|
||||
anchors.left: openProjectButton.right
|
||||
anchors.leftMargin: 8
|
||||
anchors.verticalCenterOffset: 0
|
||||
iconSource: _hasDesktopTheme ? "image://desktoptheme/document-new" : ""
|
||||
onClicked: welcomeMode.newProject();
|
||||
height: 28
|
||||
anchors.margins: 5
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
verticalAlignment: Text.AlignBottom
|
||||
onClicked: welcomeMode.sendFeedback()
|
||||
}
|
||||
}
|
||||
|
||||
131
share/qtcreator/welcomescreen/widgets/GettingStartedItem.qml
Normal file
@@ -0,0 +1,131 @@
|
||||
import QtQuick 1.1
|
||||
import qtcomponents 1.0
|
||||
|
||||
Item {
|
||||
id: gettingStartedItem
|
||||
width: 200
|
||||
height: 300
|
||||
|
||||
property alias title: titleText.text
|
||||
property alias description: descriptionText.text
|
||||
property int number: 1
|
||||
property alias imageUrl: image.source
|
||||
|
||||
signal clicked
|
||||
|
||||
CustomColors {
|
||||
id: colors
|
||||
}
|
||||
|
||||
CustomFonts {
|
||||
id: fonts
|
||||
}
|
||||
|
||||
QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
|
||||
|
||||
Rectangle {
|
||||
y: 170
|
||||
width: 20
|
||||
height: 20
|
||||
color: "#7383a7"
|
||||
radius: 20
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
smooth: true
|
||||
visible: false
|
||||
|
||||
Text {
|
||||
color: "#f7f7f7"
|
||||
font.bold: true
|
||||
text: gettingStartedItem.number
|
||||
font.family: "Helvetica"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.pixelSize: 15
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: titleText
|
||||
y: 188
|
||||
color: colors.strongForegroundColor
|
||||
wrapMode: Text.WordWrap
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
font: fonts.standardCaption
|
||||
}
|
||||
|
||||
Text {
|
||||
id: descriptionText
|
||||
y: 246
|
||||
height: 62
|
||||
color: "#828282"
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 2
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 12
|
||||
font.bold: false
|
||||
font.family: "Helvetica"
|
||||
}
|
||||
|
||||
Item {
|
||||
id: item1
|
||||
y: 22
|
||||
width: 184
|
||||
height: 160
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
|
||||
Image {
|
||||
id: image
|
||||
x: 0
|
||||
y: 0
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: border
|
||||
color: "#00000000"
|
||||
radius: 8
|
||||
visible: false
|
||||
anchors.fill: parent
|
||||
border.color: "#dddcdc"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
gettingStartedItem.state="hover"
|
||||
}
|
||||
|
||||
onExited: {
|
||||
gettingStartedItem.state=""
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
gettingStartedItem.clicked();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hover"
|
||||
|
||||
PropertyChanges {
|
||||
target: border
|
||||
visible: true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -31,40 +31,75 @@
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents 1.0
|
||||
|
||||
Item {
|
||||
id: tabWidget
|
||||
property alias model: contentRepeater.model
|
||||
property bool currentHasSearchBar
|
||||
Text {
|
||||
id: root
|
||||
color: active ? "#f0f0f0" : colors.linkColor
|
||||
|
||||
Item {
|
||||
id: stack
|
||||
font: fonts.linkFont
|
||||
|
||||
anchors.margins: 0
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
signal clicked
|
||||
signal entered
|
||||
signal exited
|
||||
|
||||
Repeater {
|
||||
id: contentRepeater
|
||||
Loader {
|
||||
property bool active: index == tabWidget.current
|
||||
id: pageLoader
|
||||
visible: active
|
||||
anchors.fill: parent
|
||||
anchors.margins: 0
|
||||
onActiveChanged: {
|
||||
if (active && source == "") {
|
||||
source = model.modelData.pageLocation
|
||||
}
|
||||
if (active) {
|
||||
tabWidget.currentHasSearchBar = model.modelData.hasSearchBar
|
||||
}
|
||||
}
|
||||
property bool active: false
|
||||
|
||||
onStatusChanged: {
|
||||
if (pageLoader.status == Loader.Error) console.debug(source + ' failed to load')
|
||||
onActiveChanged: {
|
||||
if (active)
|
||||
mouseArea.state = ""
|
||||
}
|
||||
|
||||
CustomFonts {
|
||||
id: fonts
|
||||
}
|
||||
|
||||
CustomColors {
|
||||
id: colors
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "#909090"
|
||||
radius: 6
|
||||
opacity: root.active
|
||||
z: -1
|
||||
anchors.rightMargin: -6
|
||||
anchors.leftMargin: -6
|
||||
anchors.bottomMargin: -4
|
||||
anchors.topMargin: -4
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
anchors.margins: -8
|
||||
hoverEnabled: true
|
||||
|
||||
QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
|
||||
|
||||
onEntered: {
|
||||
if (!root.active)
|
||||
mouseArea.state = "hovered"
|
||||
root.entered();
|
||||
}
|
||||
onExited: {
|
||||
mouseArea.state = ""
|
||||
root.exited();
|
||||
}
|
||||
onClicked: {
|
||||
root.focus = true;
|
||||
root.clicked();
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hovered"
|
||||
PropertyChanges {
|
||||
target: root
|
||||
font.underline: true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
38
share/qtcreator/welcomescreen/widgets/Logo.qml
Normal file
@@ -0,0 +1,38 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
|
||||
Image {
|
||||
id: logo
|
||||
source: "images/logo.png"
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents 1.0 as Components
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property int currentItem: 0
|
||||
property alias model: view.model
|
||||
property alias itemCount: view.count
|
||||
|
||||
Timer {
|
||||
id: nextItemTimer
|
||||
repeat: true
|
||||
interval: 30*1000
|
||||
onTriggered: view.incrementCurrentIndex()
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: modelUpdateTimer
|
||||
repeat: false
|
||||
interval: 1000
|
||||
onTriggered: view.handleModelUpdate();
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: view
|
||||
|
||||
function handleModelUpdate() {
|
||||
nextItemTimer.stop();
|
||||
currentIndex = 0;
|
||||
nextItemTimer.start();
|
||||
}
|
||||
|
||||
function handleModelChanged() {
|
||||
modelUpdateTimer.restart();
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
highlightMoveDuration: 1 // don't show any scrolling
|
||||
keyNavigationWraps: true // start from 0 again if at end
|
||||
interactive: false
|
||||
|
||||
onModelChanged: handleModelChanged()
|
||||
|
||||
delegate: Item {
|
||||
id: delegateItem
|
||||
property bool active: ListView.isCurrentItem
|
||||
opacity: 0
|
||||
height: root.height
|
||||
width: root.width
|
||||
Column {
|
||||
spacing: 10
|
||||
width: parent.width
|
||||
id: column
|
||||
Text {
|
||||
id: heading1;
|
||||
text: title;
|
||||
font.bold: true;
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
|
||||
textFormat: Text.RichText;
|
||||
width: parent.width-icon.width-16
|
||||
}
|
||||
Row {
|
||||
spacing: 5
|
||||
width: parent.width
|
||||
Image {
|
||||
id: icon;
|
||||
source: blogIcon;
|
||||
asynchronous: true
|
||||
}
|
||||
Text {
|
||||
id: heading2;
|
||||
text: blogName;
|
||||
font.italic: true;
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
|
||||
textFormat: Text.RichText;
|
||||
width: parent.width-icon.width-5
|
||||
}
|
||||
}
|
||||
Text {
|
||||
id: text;
|
||||
text: description;
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
textFormat: Text.RichText
|
||||
width: parent.width-10
|
||||
}
|
||||
Text { visible: link !== "";
|
||||
id: readmore;
|
||||
text: qsTr("Click to read more...");
|
||||
font.italic: true;
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere;
|
||||
textFormat: Text.RichText
|
||||
width: parent.width-10
|
||||
}
|
||||
}
|
||||
Components.QStyleItem {
|
||||
id: styleItem;
|
||||
cursor: "pointinghandcursor";
|
||||
anchors.fill: column
|
||||
visible: link !== ""
|
||||
}
|
||||
Timer {
|
||||
id: toolTipTimer
|
||||
interval: 500
|
||||
onTriggered: styleItem.showToolTip(link)
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: column;
|
||||
onClicked: Qt.openUrlExternally(link);
|
||||
hoverEnabled: true;
|
||||
onEntered: { nextItemTimer.stop(); toolTipTimer.start(); }
|
||||
onExited: { nextItemTimer.restart(); toolTipTimer.stop(); }
|
||||
id: mouseArea
|
||||
}
|
||||
|
||||
StateGroup {
|
||||
id: activeState
|
||||
states: [ State { name: "active"; when: delegateItem.active; PropertyChanges { target: delegateItem; opacity: 1 } } ]
|
||||
transitions: [
|
||||
Transition { from: ""; to: "active"; reversible: true; NumberAnimation { target: delegateItem; property: "opacity"; duration: 1000 } }
|
||||
]
|
||||
}
|
||||
|
||||
states: [
|
||||
State { name: "clicked"; when: mouseArea.pressed; PropertyChanges { target: text; color: "black" } },
|
||||
State { name: "hovered"; when: mouseArea.containsMouse && link !== ""; PropertyChanges { target: text; color: "#074C1C" } }
|
||||
]
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,39 +31,35 @@
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents 1.0 as Components
|
||||
import QtQuick 1.0
|
||||
|
||||
Item {
|
||||
id: item1
|
||||
InsetText {
|
||||
id: text
|
||||
x: 16
|
||||
y: 16
|
||||
id: pageCaption
|
||||
width: 960
|
||||
height: 40
|
||||
property int textOffset: captionText.x + captionText.width
|
||||
|
||||
property alias caption: captionText.text
|
||||
Text {
|
||||
id: captionText
|
||||
y: 9
|
||||
color: "#515153"
|
||||
anchors.left: parent.left
|
||||
anchors.top: header.bottom
|
||||
anchors.margins: 14
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
text: qsTr("Latest News")
|
||||
font.pointSize: 14
|
||||
anchors.leftMargin: 16
|
||||
anchors.topMargin: 19
|
||||
mainColor: "#074C1C"
|
||||
font.bold: true
|
||||
anchors.leftMargin: 8
|
||||
font.pixelSize: 18
|
||||
font.bold: false
|
||||
font.family: "Helvetica"
|
||||
}
|
||||
|
||||
FallbackNewsModel {
|
||||
id: fallbackNewsModel
|
||||
}
|
||||
|
||||
NewsListing {
|
||||
id: newsList
|
||||
model: (aggregatedFeedsModel !== undefined && aggregatedFeedsModel.articleCount > 0) ? aggregatedFeedsModel : fallbackNewsModel
|
||||
|
||||
Rectangle {
|
||||
height: 1
|
||||
color: "#a0a0a0"
|
||||
anchors.bottomMargin: 8
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: text.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 16
|
||||
}
|
||||
|
||||
CustomColors {
|
||||
id: colors
|
||||
}
|
||||
}
|
||||
54
share/qtcreator/welcomescreen/widgets/PageLoader.qml
Normal file
@@ -0,0 +1,54 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
|
||||
Item {
|
||||
id: pageLoader
|
||||
|
||||
property alias model: repeater.model
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
Loader {
|
||||
anchors.fill: parent
|
||||
property bool active: index === tab.currentIndex
|
||||
property bool wasActive
|
||||
onActiveChanged: {
|
||||
if (active)
|
||||
wasActive = true;
|
||||
}
|
||||
visible: active
|
||||
source: wasActive ? pageLocation : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
72
share/qtcreator/welcomescreen/widgets/ProjectItem.qml
Normal file
@@ -0,0 +1,72 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
|
||||
Item {
|
||||
id: projectItem
|
||||
width: 400
|
||||
height: 32
|
||||
|
||||
property alias projectName: projectNameText.text
|
||||
property alias projectPath: pathText.text
|
||||
|
||||
Image {
|
||||
source: "images/bullet.png"
|
||||
anchors.verticalCenter: projectNameText.verticalCenter
|
||||
}
|
||||
|
||||
CustomFonts {
|
||||
id: fonts
|
||||
}
|
||||
|
||||
LinkedText {
|
||||
id: projectNameText
|
||||
y: 2
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
onClicked: projectWelcomePage.requestProject(filePath)
|
||||
}
|
||||
|
||||
Text {
|
||||
id: pathText
|
||||
y: 18
|
||||
color: "#8b8b8b"
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 12
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 8
|
||||
font: fonts.italicDescription
|
||||
}
|
||||
}
|
||||
@@ -30,81 +30,33 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents 1.0 as Components
|
||||
import QtQuick 1.0
|
||||
import qtcomponents 1.0
|
||||
|
||||
HeaderItemView {
|
||||
header: qsTr("Recently Edited Projects")
|
||||
model: projectList
|
||||
delegate: Item {
|
||||
Components.QStyleItem { id: styleItem; cursor: "pointinghandcursor"; anchors.fill: parent }
|
||||
height: 40
|
||||
width: dataSection.width
|
||||
ScrollArea {
|
||||
//id: projectList
|
||||
property alias model: repeater.model
|
||||
|
||||
Behavior on verticalScrollBar.opacity {
|
||||
PropertyAnimation {
|
||||
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: 2
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 12
|
||||
color: mousearea.containsMouse ? "#f9f9f9" : "white"
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: arrowImage;
|
||||
source: "qrc:welcome/images/list_bullet_arrow.png";
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
}
|
||||
frame: false
|
||||
horizontalScrollBar.visible: false
|
||||
clip: true
|
||||
|
||||
Column {
|
||||
spacing: 4
|
||||
anchors.left: arrowImage.right
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Text {
|
||||
id: nameText
|
||||
text: displayName
|
||||
font.bold: true
|
||||
width: parent.width
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
anchors.rightMargin: arrowImage.width + 10
|
||||
anchors.right: parent.right
|
||||
elide: Text.ElideRight
|
||||
Column {
|
||||
id: column
|
||||
spacing: 2
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
ProjectItem {
|
||||
projectName: displayName
|
||||
projectPath: prettyFilePath
|
||||
}
|
||||
|
||||
Text {
|
||||
id: filepath
|
||||
text: prettyFilePath
|
||||
elide: Text.ElideMiddle
|
||||
color: "grey"
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 10
|
||||
anchors.rightMargin: arrowImage.width + 14
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
interval: 1000
|
||||
onTriggered: {
|
||||
if (filepath.truncated)
|
||||
styleItem.showToolTip(filePath)
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mousearea
|
||||
anchors.fill: parent
|
||||
onClicked: projectWelcomePage.requestProject(filePath)
|
||||
hoverEnabled: true
|
||||
onEntered:timer.start()
|
||||
onExited: timer.stop()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,67 +30,42 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.1
|
||||
import qtcomponents 1.0 as Components
|
||||
import QtQuick 1.0
|
||||
import qtcomponents 1.0
|
||||
|
||||
HeaderItemView {
|
||||
header: qsTr("Recently Used Sessions")
|
||||
model: sessionList
|
||||
ScrollArea {
|
||||
|
||||
delegate: Rectangle {
|
||||
height: 28
|
||||
width: dataSection.width
|
||||
property alias model: repeater.model
|
||||
|
||||
color: mousearea.containsMouse ? "#f9f9f9" : "white"
|
||||
property alias listHeight: column.height
|
||||
|
||||
function fullSessionName()
|
||||
{
|
||||
var newSessionName = sessionName
|
||||
if (model.lastSession && sessionList.isDefaultVirgin())
|
||||
newSessionName = qsTr("%1 (last session)").arg(sessionName);
|
||||
else if (model.activeSession && !sessionList.isDefaultVirgin())
|
||||
newSessionName = qsTr("%1 (current session)").arg(sessionName);
|
||||
return newSessionName;
|
||||
}
|
||||
height: Math.min(listHeight, 276)
|
||||
|
||||
Image {
|
||||
id: arrowImage;
|
||||
source: "qrc:welcome/images/list_bullet_arrow.png"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
}
|
||||
frame: false
|
||||
horizontalScrollBar.visible: false
|
||||
clip: true
|
||||
|
||||
Text {
|
||||
font.bold: true
|
||||
id: fileNameText
|
||||
text: parent.fullSessionName()
|
||||
elide: Text.ElideMiddle
|
||||
anchors.left: arrowImage.right
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: 10
|
||||
anchors.rightMargin: 20
|
||||
}
|
||||
Column {
|
||||
id: column
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
interval: 1000
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
if (fileNameText.truncated)
|
||||
styleItem.showToolTip(sessionName)
|
||||
spacing: 8
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
SessionItem {
|
||||
|
||||
function fullSessionName()
|
||||
{
|
||||
var newSessionName = sessionName
|
||||
if (model.lastSession && sessionList.isDefaultVirgin())
|
||||
newSessionName = qsTr("%1 (last session)").arg(sessionName);
|
||||
else if (model.activeSession && !sessionList.isDefaultVirgin())
|
||||
newSessionName = qsTr("%1 (current session)").arg(sessionName);
|
||||
return newSessionName;
|
||||
}
|
||||
|
||||
name: fullSessionName()
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mousearea
|
||||
anchors.fill: parent
|
||||
onClicked: projectWelcomePage.requestSession(sessionName)
|
||||
hoverEnabled: true
|
||||
onEntered: timer.start()
|
||||
onExited: timer.stop()
|
||||
Components.QStyleItem { id: styleItem; cursor: "pointinghandcursor"; anchors.fill: parent }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
64
share/qtcreator/welcomescreen/widgets/SearchBar.qml
Normal file
@@ -0,0 +1,64 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
import qtcomponents 1.0
|
||||
|
||||
Rectangle {
|
||||
id: searchBar
|
||||
width: 930
|
||||
height: 31
|
||||
color: "#ffffff"
|
||||
radius: 6
|
||||
border.color: "#cccccc"
|
||||
property alias placeholderText: lineEdit.placeholderText
|
||||
property alias text: lineEdit.text
|
||||
|
||||
CustomFonts {
|
||||
id: fonts
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: lineEdit
|
||||
placeholderText: qsTr("Search...")
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 12
|
||||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
background: Item {}
|
||||
font.pixelSize: 14
|
||||
font.bold: false
|
||||
font.family: "Helvetica"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -32,16 +32,16 @@
|
||||
|
||||
import QtQuick 1.1
|
||||
|
||||
Text {
|
||||
property color mainColor: "darkgrey"
|
||||
Text {
|
||||
x: 0; y: -1
|
||||
text: parent.text
|
||||
color: parent.mainColor
|
||||
font.bold: parent.font.bold
|
||||
font.pointSize: parent.font.pointSize
|
||||
font.italic: parent.font.italic
|
||||
Row {
|
||||
spacing: 4
|
||||
property alias name: sessionText.text
|
||||
Image {
|
||||
source: "images/bullet.png"
|
||||
anchors.verticalCenter: sessionText.verticalCenter
|
||||
}
|
||||
|
||||
LinkedText {
|
||||
id: sessionText
|
||||
onClicked: projectWelcomePage.requestSession(sessionName)
|
||||
}
|
||||
text: "Featured News"
|
||||
color: "white"
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
import QtQuick 1.0
|
||||
import qtcomponents 1.0 as Components
|
||||
|
||||
Item {
|
||||
id: root
|
||||
Components.QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
|
||||
height: 22
|
||||
property int offset: 0;
|
||||
y: offset
|
||||
|
||||
width: text.width + 48
|
||||
|
||||
Rectangle {
|
||||
color: "#a6a6a6"
|
||||
width: 1
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottomMargin: 2
|
||||
anchors.topMargin: 2
|
||||
}
|
||||
Rectangle {
|
||||
color: "#666666"
|
||||
width: 1
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.bottomMargin: 4
|
||||
anchors.topMargin: 4
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: item
|
||||
height: root.height
|
||||
radius: 16
|
||||
opacity: 0
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
id: gradientstop1
|
||||
position: 0
|
||||
color: "#5e5e5e"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
id: gradientstop2
|
||||
position: 0.890
|
||||
color: "#4d4c4c"
|
||||
}
|
||||
}
|
||||
anchors.rightMargin: -16
|
||||
anchors.leftMargin: -16
|
||||
smooth: true
|
||||
border.width: 1
|
||||
border.color: "#d1d1d1"
|
||||
anchors.verticalCenter: text.verticalCenter
|
||||
anchors.right: text.right
|
||||
anchors.left: text.left
|
||||
Behavior on opacity {
|
||||
PropertyAnimation { duration: 50 }
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: text
|
||||
horizontalAlignment: Qt.AlignHCenter; verticalAlignment: Qt.AlignVCenter
|
||||
anchors.centerIn: parent
|
||||
text: model.modelData.title
|
||||
elide: Text.ElideRight
|
||||
color: "black"
|
||||
}
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
onClicked: tabBar.current = index
|
||||
}
|
||||
states: [
|
||||
State {
|
||||
name: "active"
|
||||
id: activeState; when: tabBar.current === index
|
||||
PropertyChanges { target: text; color: "#f3f3f3" }
|
||||
|
||||
PropertyChanges {
|
||||
target: item
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
share/qtcreator/welcomescreen/widgets/images/arrowBig.png
Normal file
|
After Width: | Height: | Size: 441 B |
BIN
share/qtcreator/welcomescreen/widgets/images/bullet.png
Normal file
|
After Width: | Height: | Size: 215 B |
BIN
share/qtcreator/welcomescreen/widgets/images/dropshadow.png
Normal file
|
After Width: | Height: | Size: 595 B |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 733 B |
|
After Width: | Height: | Size: 684 B |
BIN
share/qtcreator/welcomescreen/widgets/images/icons/ddays11.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 441 B |
|
After Width: | Height: | Size: 733 B |
BIN
share/qtcreator/welcomescreen/widgets/images/icons/labsIcon.png
Normal file
|
After Width: | Height: | Size: 413 B |
BIN
share/qtcreator/welcomescreen/widgets/images/icons/openIcon.png
Normal file
|
After Width: | Height: | Size: 688 B |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 12 KiB |
BIN
share/qtcreator/welcomescreen/widgets/images/icons/qt_sdk.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 616 B |
BIN
share/qtcreator/welcomescreen/widgets/images/icons/videoIcon.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
share/qtcreator/welcomescreen/widgets/images/logo.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 25 KiB |
BIN
share/qtcreator/welcomescreen/widgets/images/mockup/penguin.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 29 KiB |
BIN
share/qtcreator/welcomescreen/widgets/images/more.png
Normal file
|
After Width: | Height: | Size: 441 B |
BIN
share/qtcreator/welcomescreen/widgets/images/tab.png
Normal file
|
After Width: | Height: | Size: 358 B |
@@ -1,13 +0,0 @@
|
||||
Button 1.0 Button.qml
|
||||
ExampleBrowser 1.0 ExampleBrowser.qml
|
||||
ExampleDelegate 1.0 ExampleDelegate.qml
|
||||
FeaturedAndNewsListing 1.0 FeaturedAndNewsListing.qml
|
||||
Feedback 1.0 Feedback.qml
|
||||
HeaderItemView 1.0 HeaderItemView.qml
|
||||
InsetText 1.0 InsetText.qml
|
||||
LineEdit 1.0 LineEdit.qml
|
||||
LinksBar 1.0 LinksBar.qml
|
||||
NewsListing 1.0 NewsListing.qml
|
||||
RecentProjects 1.0 RecentProjects.qml
|
||||
RecentSessions 1.0 RecentSessions.qml
|
||||
TabWidget 1.0 TabWidget.qml
|
||||
@@ -65,6 +65,9 @@ ExamplesListModel::ExamplesListModel(QObject *parent) :
|
||||
roleNames[Difficulty] = "difficulty";
|
||||
roleNames[Type] = "type";
|
||||
roleNames[HasSourceCode] = "hasSourceCode";
|
||||
roleNames[IsVideo] = "isVideo";
|
||||
roleNames[VideoUrl] = "videoUrl";
|
||||
roleNames[VideoLength] = "videoLength";
|
||||
setRoleNames(roleNames);
|
||||
|
||||
connect(QtVersionManager::instance(), SIGNAL(updateExamples(QString,QString,QString)),
|
||||
@@ -178,8 +181,16 @@ QList<ExampleItem> ExamplesListModel::parseTutorials(QXmlStreamReader* reader, c
|
||||
item.hasSourceCode = !item.projectPath.isEmpty();
|
||||
item.projectPath.prepend('/');
|
||||
item.projectPath.prepend(projectsOffset);
|
||||
item.imageUrl = attributes.value(QLatin1String("imageUrl")).toString();
|
||||
item.docUrl = attributes.value(QLatin1String("docUrl")).toString();
|
||||
if (attributes.hasAttribute(QLatin1String("imageUrl")))
|
||||
item.imageUrl = attributes.value(QLatin1String("imageUrl")).toString();
|
||||
if (attributes.hasAttribute(QLatin1String("docUrl")))
|
||||
item.docUrl = attributes.value(QLatin1String("docUrl")).toString();
|
||||
if (attributes.hasAttribute(QLatin1String("isVideo")))
|
||||
item.isVideo = attributes.value(QLatin1String("isVideo")).toString() == QLatin1String("true");
|
||||
if (attributes.hasAttribute(QLatin1String("videoUrl")))
|
||||
item.videoUrl = attributes.value(QLatin1String("videoUrl")).toString();
|
||||
if (attributes.hasAttribute(QLatin1String("videoLength")))
|
||||
item.videoLength = attributes.value(QLatin1String("videoLength")).toString();
|
||||
} else if (reader->name() == QLatin1String("fileToOpen")) {
|
||||
item.filesToOpen.append(projectsOffset + '/' + reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement));
|
||||
} else if (reader->name() == QLatin1String("description")) {
|
||||
@@ -364,6 +375,12 @@ QVariant ExamplesListModel::data(const QModelIndex &index, int role) const
|
||||
return item.hasSourceCode;
|
||||
case Type:
|
||||
return item.type;
|
||||
case IsVideo:
|
||||
return item.isVideo;
|
||||
case VideoUrl:
|
||||
return item.videoUrl;
|
||||
case VideoLength:
|
||||
return item.videoLength;
|
||||
default:
|
||||
qDebug() << Q_FUNC_INFO << "role type not supported";
|
||||
return QVariant();
|
||||
@@ -414,6 +431,12 @@ bool ExamplesListModelFilter::filterAcceptsRow(int sourceRow, const QModelIndex
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_showTutorialsOnly) {
|
||||
int type = sourceModel()->index(sourceRow, 0, sourceParent).data(Type).toInt();
|
||||
if (type != Example)
|
||||
return false;
|
||||
}
|
||||
|
||||
const QStringList tags = sourceModel()->index(sourceRow, 0, sourceParent).data(Tags).toStringList();
|
||||
|
||||
if (!m_filterTags.isEmpty()) {
|
||||
|
||||
@@ -42,12 +42,12 @@ namespace QtSupport {
|
||||
namespace Internal {
|
||||
|
||||
enum ExampleRoles { Name=Qt::UserRole, ProjectPath, Description, ImageUrl,
|
||||
DocUrl, FilesToOpen, Tags, Difficulty, HasSourceCode, Type };
|
||||
DocUrl, FilesToOpen, Tags, Difficulty, HasSourceCode, Type, IsVideo, VideoUrl, VideoLength };
|
||||
|
||||
enum InstructionalType { Example=0, Demo, Tutorial };
|
||||
|
||||
struct ExampleItem {
|
||||
ExampleItem(): difficulty(0) {}
|
||||
ExampleItem(): difficulty(0), isVideo(false) {}
|
||||
InstructionalType type;
|
||||
QString name;
|
||||
QString projectPath;
|
||||
@@ -58,6 +58,9 @@ struct ExampleItem {
|
||||
QStringList tags;
|
||||
int difficulty;
|
||||
bool hasSourceCode;
|
||||
bool isVideo;
|
||||
QString videoUrl;
|
||||
QString videoLength;
|
||||
};
|
||||
|
||||
struct QMakePathCache {
|
||||
|
||||
@@ -66,6 +66,8 @@
|
||||
#include <QtDeclarative/QDeclarativeImageProvider>
|
||||
#include <QtDeclarative/QDeclarativeEngine>
|
||||
#include <QtDeclarative/QDeclarativeContext>
|
||||
#include <QtDeclarative>
|
||||
#include <QtGui/QDesktopServices>
|
||||
|
||||
namespace QtSupport {
|
||||
namespace Internal {
|
||||
@@ -193,33 +195,58 @@ private:
|
||||
QMutex m_mutex;
|
||||
};
|
||||
|
||||
GettingStartedWelcomePage::GettingStartedWelcomePage()
|
||||
: m_engine(0), m_showExamples(false)
|
||||
GettingStartedWelcomePage::GettingStartedWelcomePage() : m_engine(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GettingStartedWelcomePage::setShowExamples(bool showExamples)
|
||||
QUrl GettingStartedWelcomePage::pageLocation() const
|
||||
{
|
||||
m_showExamples = showExamples;
|
||||
return QUrl::fromLocalFile(Core::ICore::instance()->resourcePath() + QLatin1String("/welcomescreen/gettingstarted.qml"));
|
||||
}
|
||||
|
||||
QString GettingStartedWelcomePage::title() const
|
||||
{
|
||||
if (m_showExamples)
|
||||
return tr("Demos and Examples");
|
||||
else
|
||||
return tr("Getting Started");
|
||||
return tr("Getting Started");
|
||||
}
|
||||
|
||||
int GettingStartedWelcomePage::priority() const
|
||||
int GettingStartedWelcomePage::priority() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void GettingStartedWelcomePage::facilitateQml(QDeclarativeEngine *engine)
|
||||
{
|
||||
m_engine = engine;
|
||||
}
|
||||
|
||||
ExamplesWelcomePage::ExamplesWelcomePage()
|
||||
: m_engine(0), m_showExamples(false)
|
||||
{
|
||||
}
|
||||
|
||||
void ExamplesWelcomePage::setShowExamples(bool showExamples)
|
||||
{
|
||||
m_showExamples = showExamples;
|
||||
}
|
||||
|
||||
QString ExamplesWelcomePage::title() const
|
||||
{
|
||||
if (m_showExamples)
|
||||
return tr("Examples");
|
||||
else
|
||||
return tr("Tutorials");
|
||||
}
|
||||
|
||||
int ExamplesWelcomePage::priority() const
|
||||
{
|
||||
if (m_showExamples)
|
||||
return 30;
|
||||
else
|
||||
return 10;
|
||||
return 40;
|
||||
}
|
||||
|
||||
bool GettingStartedWelcomePage::hasSearchBar() const
|
||||
bool ExamplesWelcomePage::hasSearchBar() const
|
||||
{
|
||||
if (m_showExamples)
|
||||
return true;
|
||||
@@ -227,15 +254,15 @@ QString GettingStartedWelcomePage::title() const
|
||||
return false;
|
||||
}
|
||||
|
||||
QUrl GettingStartedWelcomePage::pageLocation() const
|
||||
QUrl ExamplesWelcomePage::pageLocation() const
|
||||
{
|
||||
if (m_showExamples)
|
||||
return QUrl::fromLocalFile(Core::ICore::instance()->resourcePath() + QLatin1String("/welcomescreen/examples.qml"));
|
||||
else
|
||||
return QUrl::fromLocalFile(Core::ICore::instance()->resourcePath() + QLatin1String("/welcomescreen/gettingstarted.qml"));
|
||||
return QUrl::fromLocalFile(Core::ICore::instance()->resourcePath() + QLatin1String("/welcomescreen/tutorials.qml"));
|
||||
}
|
||||
|
||||
void GettingStartedWelcomePage::facilitateQml(QDeclarativeEngine *engine)
|
||||
void ExamplesWelcomePage::facilitateQml(QDeclarativeEngine *engine)
|
||||
{
|
||||
m_engine = engine;
|
||||
m_engine->addImageProvider(QLatin1String("helpimage"), new HelpImageProvider);
|
||||
@@ -257,17 +284,27 @@ void GettingStartedWelcomePage::facilitateQml(QDeclarativeEngine *engine)
|
||||
rootContenxt->setContextProperty(QLatin1String("gettingStarted"), this);
|
||||
}
|
||||
|
||||
void GettingStartedWelcomePage::openSplitHelp(const QUrl &help)
|
||||
void ExamplesWelcomePage::openSplitHelp(const QUrl &help)
|
||||
{
|
||||
Core::ICore::instance()->helpManager()->handleHelpRequest(help.toString()+QLatin1String("?view=split"));
|
||||
}
|
||||
|
||||
QStringList GettingStartedWelcomePage::tagList() const
|
||||
void ExamplesWelcomePage::openHelp(const QUrl &help)
|
||||
{
|
||||
Core::ICore::instance()->helpManager()->handleHelpRequest(help.toString());
|
||||
}
|
||||
|
||||
void ExamplesWelcomePage::openUrl(const QUrl &url)
|
||||
{
|
||||
QDesktopServices::openUrl(url);
|
||||
}
|
||||
|
||||
QStringList ExamplesWelcomePage::tagList() const
|
||||
{
|
||||
return examplesModel()->tags();
|
||||
}
|
||||
|
||||
QString GettingStartedWelcomePage::copyToAlternativeLocation(const QFileInfo& proFileInfo, QStringList &filesToOpen)
|
||||
QString ExamplesWelcomePage::copyToAlternativeLocation(const QFileInfo& proFileInfo, QStringList &filesToOpen)
|
||||
{
|
||||
const QString projectDir = proFileInfo.canonicalPath();
|
||||
QDialog d(Core::ICore::instance()->mainWindow());
|
||||
@@ -333,7 +370,7 @@ QString GettingStartedWelcomePage::copyToAlternativeLocation(const QFileInfo& pr
|
||||
|
||||
}
|
||||
|
||||
void GettingStartedWelcomePage::openProject(const QString &projectFile, const QStringList &additionalFilesToOpen, const QUrl &help)
|
||||
void ExamplesWelcomePage::openProject(const QString &projectFile, const QStringList &additionalFilesToOpen, const QUrl &help)
|
||||
{
|
||||
QString proFile = projectFile;
|
||||
if (proFile.isEmpty())
|
||||
@@ -355,18 +392,18 @@ void GettingStartedWelcomePage::openProject(const QString &projectFile, const QS
|
||||
QMessageBox::critical(Core::ICore::instance()->mainWindow(), tr("Failed to open project"), errorMessage);
|
||||
}
|
||||
|
||||
void GettingStartedWelcomePage::updateTagsModel()
|
||||
void ExamplesWelcomePage::updateTagsModel()
|
||||
{
|
||||
m_engine->rootContext()->setContextProperty(QLatin1String("tagsList"), examplesModel()->tags());
|
||||
emit tagsUpdated();
|
||||
}
|
||||
|
||||
ExamplesListModel *GettingStartedWelcomePage::examplesModel() const
|
||||
ExamplesListModel *ExamplesWelcomePage::examplesModel() const
|
||||
{
|
||||
if (examplesModelStatic())
|
||||
return examplesModelStatic().data();
|
||||
|
||||
examplesModelStatic() = new ExamplesListModel(const_cast<GettingStartedWelcomePage*>(this));
|
||||
examplesModelStatic() = new ExamplesListModel(const_cast<ExamplesWelcomePage*>(this));
|
||||
return examplesModelStatic().data();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,12 +48,27 @@ namespace Internal {
|
||||
class ExamplesListModel;
|
||||
class GettingStartedWelcomePageWidget;
|
||||
|
||||
|
||||
class GettingStartedWelcomePage : public Utils::IWelcomePage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GettingStartedWelcomePage();
|
||||
QUrl pageLocation() const;
|
||||
QString title() const;
|
||||
int priority() const;
|
||||
void facilitateQml(QDeclarativeEngine *);
|
||||
|
||||
private:
|
||||
QDeclarativeEngine *m_engine;
|
||||
};
|
||||
|
||||
|
||||
class ExamplesWelcomePage : public Utils::IWelcomePage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ExamplesWelcomePage();
|
||||
|
||||
void setShowExamples(bool showExamples);
|
||||
QUrl pageLocation() const;
|
||||
@@ -62,12 +77,14 @@ public:
|
||||
bool hasSearchBar() const;
|
||||
void facilitateQml(QDeclarativeEngine *);
|
||||
Q_INVOKABLE QStringList tagList() const;
|
||||
Q_INVOKABLE void openUrl(const QUrl &url);
|
||||
|
||||
signals:
|
||||
void tagsUpdated();
|
||||
|
||||
public slots:
|
||||
void openSplitHelp(const QUrl &help);
|
||||
void openHelp(const QUrl &help);
|
||||
void openProject(const QString& projectFile, const QStringList& additionalFilesToOpen, const QUrl& help);
|
||||
void updateTagsModel();
|
||||
|
||||
|
||||
@@ -59,14 +59,17 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes
|
||||
addAutoReleasedObject(mgr);
|
||||
addAutoReleasedObject(new QtOptionsPage);
|
||||
|
||||
GettingStartedWelcomePage *welcomePage;
|
||||
welcomePage = new GettingStartedWelcomePage;
|
||||
ExamplesWelcomePage *welcomePage;
|
||||
welcomePage = new ExamplesWelcomePage;
|
||||
addAutoReleasedObject(welcomePage);
|
||||
|
||||
welcomePage = new GettingStartedWelcomePage;
|
||||
welcomePage = new ExamplesWelcomePage;
|
||||
welcomePage->setShowExamples(true);
|
||||
addAutoReleasedObject(welcomePage);
|
||||
|
||||
GettingStartedWelcomePage *gettingStartedWelcomePage = new GettingStartedWelcomePage;
|
||||
addAutoReleasedObject(gettingStartedWelcomePage);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
namespace QtSupport {
|
||||
namespace Internal {
|
||||
|
||||
class GettingStartedWelcomePage;
|
||||
class ExamplesWelcomePage;
|
||||
|
||||
class QtSupportPlugin : public ExtensionSystem::IPlugin
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 430 B |
|
Before Width: | Height: | Size: 494 B |
|
Before Width: | Height: | Size: 629 B |
|
Before Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 395 B |
|
Before Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 1009 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 245 B |
|
Before Width: | Height: | Size: 327 B |
|
Before Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 724 B |
|
Before Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 3.7 KiB |