diff --git a/share/qtcreator/welcomescreen/develop.qml b/share/qtcreator/welcomescreen/develop.qml index 9ab3f7ee206..0640a2ebe7b 100644 --- a/share/qtcreator/welcomescreen/develop.qml +++ b/share/qtcreator/welcomescreen/develop.qml @@ -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" + } } } } diff --git a/share/qtcreator/welcomescreen/dummydata/examplesModel.qml b/share/qtcreator/welcomescreen/dummydata/examplesModel.qml new file mode 100644 index 00000000000..c66e013a165 --- /dev/null +++ b/share/qtcreator/welcomescreen/dummydata/examplesModel.qml @@ -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" + } +} diff --git a/share/qtcreator/welcomescreen/widgets/LineEdit.qml b/share/qtcreator/welcomescreen/dummydata/pagesModel.qml similarity index 75% rename from share/qtcreator/welcomescreen/widgets/LineEdit.qml rename to share/qtcreator/welcomescreen/dummydata/pagesModel.qml index 9604653a96b..34442cf0a9d 100644 --- a/share/qtcreator/welcomescreen/widgets/LineEdit.qml +++ b/share/qtcreator/welcomescreen/dummydata/pagesModel.qml @@ -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" } } diff --git a/share/qtcreator/welcomescreen/dummydata/projectList.qml b/share/qtcreator/welcomescreen/dummydata/projectList.qml new file mode 100644 index 00000000000..db021ac9e73 --- /dev/null +++ b/share/qtcreator/welcomescreen/dummydata/projectList.qml @@ -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" + } +} diff --git a/share/qtcreator/welcomescreen/dummydata/sessionList.qml b/share/qtcreator/welcomescreen/dummydata/sessionList.qml new file mode 100644 index 00000000000..4fad28ec667 --- /dev/null +++ b/share/qtcreator/welcomescreen/dummydata/sessionList.qml @@ -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" + } +} diff --git a/share/qtcreator/welcomescreen/dummydata/tutorialsModel.qml b/share/qtcreator/welcomescreen/dummydata/tutorialsModel.qml new file mode 100644 index 00000000000..f0516c6c6e7 --- /dev/null +++ b/share/qtcreator/welcomescreen/dummydata/tutorialsModel.qml @@ -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 + } +} diff --git a/share/qtcreator/welcomescreen/examples.qml b/share/qtcreator/welcomescreen/examples.qml index f3a704b6776..3d48acb8676 100644 --- a/share/qtcreator/welcomescreen/examples.qml +++ b/share/qtcreator/welcomescreen/examples.qml @@ -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 } } diff --git a/share/qtcreator/welcomescreen/examples_fallback.xml b/share/qtcreator/welcomescreen/examples_fallback.xml index 3188b17df8f..fa26da162ff 100644 --- a/share/qtcreator/welcomescreen/examples_fallback.xml +++ b/share/qtcreator/welcomescreen/examples_fallback.xml @@ -843,7 +843,7 @@ - + diff --git a/share/qtcreator/welcomescreen/gettingstarted.qml b/share/qtcreator/welcomescreen/gettingstarted.qml index 2b126fdec10..ad2fae96f21 100644 --- a/share/qtcreator/welcomescreen/gettingstarted.qml +++ b/share/qtcreator/welcomescreen/gettingstarted.qml @@ -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 } } diff --git a/share/qtcreator/welcomescreen/qtcreator_tutorials.xml b/share/qtcreator/welcomescreen/qtcreator_tutorials.xml index 4b7a9e8bd9a..307cabe9599 100644 --- a/share/qtcreator/welcomescreen/qtcreator_tutorials.xml +++ b/share/qtcreator/welcomescreen/qtcreator_tutorials.xml @@ -1,29 +1,57 @@ - - - - qt creator,quick tour,ui - - - - qt creator,build,compile - - - - qt,c++,text,qt designer,qt creator - - - - qt,c++,mobile,qt mobility,qt creator - - - - qt quick,qml,states,transitions,visual designer,qt creator - - - - qt quick,qml,components,symbian,visual designer,qt creator - - + + + + qt creator,build,compile + + + + qt,c++,text,qt designer,qt creator + + + + qt quick,qml,states,transitions,visual designer,qt creator + + + + qt quick,qml,components,symbian,visual designer,qt creator + + + + qt sdk,qt creator + + + + qt sdk,qt creator,qt quick + + + + qt quick,qml,qt sdk,qt creator + + + + qt quick,qml,qt sdk,qt creator + + + + qt quick,qml,qt sdk,qt creator + + + + qt sdk,qt creator + + + + qt quick,qml,qt sdk,qt creator + + + + qt sdk,qt creator + + + + qt quick, qml + + diff --git a/share/qtcreator/welcomescreen/widgets/ExampleBrowser.qml b/share/qtcreator/welcomescreen/tutorials.qml similarity index 51% rename from share/qtcreator/welcomescreen/widgets/ExampleBrowser.qml rename to share/qtcreator/welcomescreen/tutorials.qml index 287aab5b398..698b60195c3 100644 --- a/share/qtcreator/welcomescreen/widgets/ExampleBrowser.qml +++ b/share/qtcreator/welcomescreen/tutorials.qml @@ -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 } } diff --git a/share/qtcreator/welcomescreen/welcomescreen.qml b/share/qtcreator/welcomescreen/welcomescreen.qml index 386468cdf5e..c997675a019 100644 --- a/share/qtcreator/welcomescreen/welcomescreen.qml +++ b/share/qtcreator/welcomescreen/welcomescreen.qml @@ -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 } } diff --git a/share/qtcreator/welcomescreen/welcomescreen.qmlproject b/share/qtcreator/welcomescreen/welcomescreen.qmlproject index 1238421e2f7..5f8a07bb704 100644 --- a/share/qtcreator/welcomescreen/welcomescreen.qmlproject +++ b/share/qtcreator/welcomescreen/welcomescreen.qmlproject @@ -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" ] } diff --git a/share/qtcreator/welcomescreen/widgets/Button.qml b/share/qtcreator/welcomescreen/widgets/Button.qml deleted file mode 100644 index 83cae502f3f..00000000000 --- a/share/qtcreator/welcomescreen/widgets/Button.qml +++ /dev/null @@ -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() -} diff --git a/share/qtcreator/welcomescreen/widgets/Caption.qml b/share/qtcreator/welcomescreen/widgets/Caption.qml deleted file mode 100644 index 7dc2affba17..00000000000 --- a/share/qtcreator/welcomescreen/widgets/Caption.qml +++ /dev/null @@ -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 = "" - } - } -} diff --git a/share/qtcreator/welcomescreen/widgets/CheckBox.qml b/share/qtcreator/welcomescreen/widgets/CheckBox.qml deleted file mode 100644 index ef86e95e699..00000000000 --- a/share/qtcreator/welcomescreen/widgets/CheckBox.qml +++ /dev/null @@ -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 - - } -} diff --git a/share/qtcreator/welcomescreen/widgets/CustomColors.qml b/share/qtcreator/welcomescreen/widgets/CustomColors.qml new file mode 100644 index 00000000000..ebcea98a129 --- /dev/null +++ b/share/qtcreator/welcomescreen/widgets/CustomColors.qml @@ -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" +} diff --git a/share/qtcreator/welcomescreen/widgets/HeaderItemView.qml b/share/qtcreator/welcomescreen/widgets/CustomFonts.qml similarity index 57% rename from share/qtcreator/welcomescreen/widgets/HeaderItemView.qml rename to share/qtcreator/welcomescreen/widgets/CustomFonts.qml index d905024a25d..523a0bebf83 100644 --- a/share/qtcreator/welcomescreen/widgets/HeaderItemView.qml +++ b/share/qtcreator/welcomescreen/widgets/CustomFonts.qml @@ -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 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" } - } + ] + } diff --git a/share/qtcreator/welcomescreen/widgets/ExampleGridView.qml b/share/qtcreator/welcomescreen/widgets/CustomScrollArea.qml similarity index 77% rename from share/qtcreator/welcomescreen/widgets/ExampleGridView.qml rename to share/qtcreator/welcomescreen/widgets/CustomScrollArea.qml index 22607e35225..230414c29c1 100644 --- a/share/qtcreator/welcomescreen/widgets/ExampleGridView.qml +++ b/share/qtcreator/welcomescreen/widgets/CustomScrollArea.qml @@ -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 } diff --git a/share/qtcreator/welcomescreen/widgets/CustomTab.qml b/share/qtcreator/welcomescreen/widgets/CustomTab.qml new file mode 100644 index 00000000000..c207d0040bc --- /dev/null +++ b/share/qtcreator/welcomescreen/widgets/CustomTab.qml @@ -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 + } + } + } +} diff --git a/share/qtcreator/welcomescreen/widgets/CustomizedGridView.qml b/share/qtcreator/welcomescreen/widgets/CustomizedGridView.qml new file mode 100644 index 00000000000..b71dd2e1935 --- /dev/null +++ b/share/qtcreator/welcomescreen/widgets/CustomizedGridView.qml @@ -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 + } + + +} diff --git a/share/qtcreator/welcomescreen/widgets/Delegate.qml b/share/qtcreator/welcomescreen/widgets/Delegate.qml new file mode 100644 index 00000000000..04223e6850b --- /dev/null +++ b/share/qtcreator/welcomescreen/widgets/Delegate.qml @@ -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" + } + + } +} diff --git a/share/qtcreator/welcomescreen/widgets/ExampleDelegate.qml b/share/qtcreator/welcomescreen/widgets/ExampleDelegate.qml deleted file mode 100644 index 72a30ae622f..00000000000 --- a/share/qtcreator/welcomescreen/widgets/ExampleDelegate.qml +++ /dev/null @@ -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 - // } -} diff --git a/share/qtcreator/welcomescreen/widgets/FallbackNewsModel.qml b/share/qtcreator/welcomescreen/widgets/FallbackNewsModel.qml deleted file mode 100644 index 548e8eeb6aa..00000000000 --- a/share/qtcreator/welcomescreen/widgets/FallbackNewsModel.qml +++ /dev/null @@ -1,10 +0,0 @@ -import QtQuick 1.1 - -ListModel { - ListElement { - title: "Welcome to Qt Creator 2.3"; - blogName: "The Qt Creator Team" - description: "
This release adds lots of new features as well as a great amount of bug fixes:
  • Example and tutorial browsing with descriptive texts, and filtering for examples matching a keyword
  • 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
  • Support for deployment and running to a more general “remote Linux”
  • Support for compiling projects with the Clang compiler
  • Code completion doesn't block the editor any more
  • Profiling now has it’s own “Analyze” mode.
  • Symbian got CODA support, allowing for deployment via WiFi
  • Support for models and delegates in the Qt Quick Designer
  • Support for editing inline components and delegates
  • Improved Live Preview (a.k.a. modifying QML while the app is running in the debugger)
  • Added ‘Find usages’ functionality for QML types
" - link: "" - } -} diff --git a/share/qtcreator/welcomescreen/widgets/Feedback.qml b/share/qtcreator/welcomescreen/widgets/Feedback.qml index 41056ec6c17..63a88f872b6 100644 --- a/share/qtcreator/welcomescreen/widgets/Feedback.qml +++ b/share/qtcreator/welcomescreen/widgets/Feedback.qml @@ -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() } } diff --git a/share/qtcreator/welcomescreen/widgets/GettingStartedItem.qml b/share/qtcreator/welcomescreen/widgets/GettingStartedItem.qml new file mode 100644 index 00000000000..7303960f136 --- /dev/null +++ b/share/qtcreator/welcomescreen/widgets/GettingStartedItem.qml @@ -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 + } + } + ] +} diff --git a/share/qtcreator/welcomescreen/widgets/TabWidget.qml b/share/qtcreator/welcomescreen/widgets/LinkedText.qml similarity index 50% rename from share/qtcreator/welcomescreen/widgets/TabWidget.qml rename to share/qtcreator/welcomescreen/widgets/LinkedText.qml index c1a0735ed6f..8fb8d264cee 100644 --- a/share/qtcreator/welcomescreen/widgets/TabWidget.qml +++ b/share/qtcreator/welcomescreen/widgets/LinkedText.qml @@ -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 } } - } + ] } } diff --git a/share/qtcreator/welcomescreen/widgets/Logo.qml b/share/qtcreator/welcomescreen/widgets/Logo.qml new file mode 100644 index 00000000000..c999c9f94db --- /dev/null +++ b/share/qtcreator/welcomescreen/widgets/Logo.qml @@ -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" +} diff --git a/share/qtcreator/welcomescreen/widgets/NewsListing.qml b/share/qtcreator/welcomescreen/widgets/NewsListing.qml deleted file mode 100644 index 6589f78e7bb..00000000000 --- a/share/qtcreator/welcomescreen/widgets/NewsListing.qml +++ /dev/null @@ -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" } } - ] - - - } - } -} diff --git a/share/qtcreator/welcomescreen/widgets/FeaturedAndNewsListing.qml b/share/qtcreator/welcomescreen/widgets/PageCaption.qml similarity index 68% rename from share/qtcreator/welcomescreen/widgets/FeaturedAndNewsListing.qml rename to share/qtcreator/welcomescreen/widgets/PageCaption.qml index 1a615413262..6a1d79751bc 100644 --- a/share/qtcreator/welcomescreen/widgets/FeaturedAndNewsListing.qml +++ b/share/qtcreator/welcomescreen/widgets/PageCaption.qml @@ -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 + } } diff --git a/share/qtcreator/welcomescreen/widgets/PageLoader.qml b/share/qtcreator/welcomescreen/widgets/PageLoader.qml new file mode 100644 index 00000000000..062318fe336 --- /dev/null +++ b/share/qtcreator/welcomescreen/widgets/PageLoader.qml @@ -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 : "" + } + } +} diff --git a/share/qtcreator/welcomescreen/widgets/ProjectItem.qml b/share/qtcreator/welcomescreen/widgets/ProjectItem.qml new file mode 100644 index 00000000000..c7b1a6e04c9 --- /dev/null +++ b/share/qtcreator/welcomescreen/widgets/ProjectItem.qml @@ -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 + } +} diff --git a/share/qtcreator/welcomescreen/widgets/RecentProjects.qml b/share/qtcreator/welcomescreen/widgets/RecentProjects.qml index 4642ef2287d..93034fb2018 100644 --- a/share/qtcreator/welcomescreen/widgets/RecentProjects.qml +++ b/share/qtcreator/welcomescreen/widgets/RecentProjects.qml @@ -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() } } } diff --git a/share/qtcreator/welcomescreen/widgets/RecentSessions.qml b/share/qtcreator/welcomescreen/widgets/RecentSessions.qml index 9bb2c44a235..99d8cd6e43b 100644 --- a/share/qtcreator/welcomescreen/widgets/RecentSessions.qml +++ b/share/qtcreator/welcomescreen/widgets/RecentSessions.qml @@ -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 } - } } } diff --git a/share/qtcreator/welcomescreen/widgets/SearchBar.qml b/share/qtcreator/welcomescreen/widgets/SearchBar.qml new file mode 100644 index 00000000000..5ce8632dbf9 --- /dev/null +++ b/share/qtcreator/welcomescreen/widgets/SearchBar.qml @@ -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" + } + +} diff --git a/share/qtcreator/welcomescreen/widgets/InsetText.qml b/share/qtcreator/welcomescreen/widgets/SessionItem.qml similarity index 81% rename from share/qtcreator/welcomescreen/widgets/InsetText.qml rename to share/qtcreator/welcomescreen/widgets/SessionItem.qml index 770b064261a..47a9ff34254 100644 --- a/share/qtcreator/welcomescreen/widgets/InsetText.qml +++ b/share/qtcreator/welcomescreen/widgets/SessionItem.qml @@ -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" } diff --git a/share/qtcreator/welcomescreen/widgets/SingleTab.qml b/share/qtcreator/welcomescreen/widgets/SingleTab.qml deleted file mode 100644 index faf2185b64c..00000000000 --- a/share/qtcreator/welcomescreen/widgets/SingleTab.qml +++ /dev/null @@ -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 - } - - } - ] -} diff --git a/share/qtcreator/welcomescreen/widgets/images/arrowBig.png b/share/qtcreator/welcomescreen/widgets/images/arrowBig.png new file mode 100644 index 00000000000..55d80848808 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/arrowBig.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/bullet.png b/share/qtcreator/welcomescreen/widgets/images/bullet.png new file mode 100644 index 00000000000..580dfc6c4b4 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/bullet.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/dropshadow.png b/share/qtcreator/welcomescreen/widgets/images/dropshadow.png new file mode 100644 index 00000000000..3d8b0b47ada Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/dropshadow.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/gettingStarted01.png b/share/qtcreator/welcomescreen/widgets/images/gettingStarted01.png new file mode 100644 index 00000000000..f17416e20bf Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/gettingStarted01.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/gettingStarted02.png b/share/qtcreator/welcomescreen/widgets/images/gettingStarted02.png new file mode 100644 index 00000000000..6aaca235843 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/gettingStarted02.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/gettingStarted03.png b/share/qtcreator/welcomescreen/widgets/images/gettingStarted03.png new file mode 100644 index 00000000000..4538d858f41 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/gettingStarted03.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/gettingStarted04.png b/share/qtcreator/welcomescreen/widgets/images/gettingStarted04.png new file mode 100644 index 00000000000..498c7cd4876 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/gettingStarted04.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/communityIcon.png b/share/qtcreator/welcomescreen/widgets/images/icons/communityIcon.png new file mode 100644 index 00000000000..96537e28514 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/communityIcon.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/createIcon.png b/share/qtcreator/welcomescreen/widgets/images/icons/createIcon.png new file mode 100644 index 00000000000..0e0a23c7adc Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/createIcon.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/ddays11.png b/share/qtcreator/welcomescreen/widgets/images/icons/ddays11.png new file mode 100644 index 00000000000..80b878e8b47 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/ddays11.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/developing_with_qt_creator.png b/share/qtcreator/welcomescreen/widgets/images/icons/developing_with_qt_creator.png new file mode 100644 index 00000000000..ebb55dad4b9 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/developing_with_qt_creator.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/feedbackIcon.png b/share/qtcreator/welcomescreen/widgets/images/icons/feedbackIcon.png new file mode 100644 index 00000000000..d4da180a0cb Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/feedbackIcon.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/ico_community.png b/share/qtcreator/welcomescreen/widgets/images/icons/ico_community.png new file mode 100644 index 00000000000..96537e28514 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/ico_community.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/labsIcon.png b/share/qtcreator/welcomescreen/widgets/images/icons/labsIcon.png new file mode 100644 index 00000000000..c1d8c857c92 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/labsIcon.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/openIcon.png b/share/qtcreator/welcomescreen/widgets/images/icons/openIcon.png new file mode 100644 index 00000000000..0871175628e Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/openIcon.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_1.png b/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_1.png new file mode 100644 index 00000000000..4a66ec851fe Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_1.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_2.png b/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_2.png new file mode 100644 index 00000000000..7b4785b7066 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_2.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_3.png b/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_3.png new file mode 100644 index 00000000000..e4f55dfd804 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/qt_quick_3.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/qt_sdk.png b/share/qtcreator/welcomescreen/widgets/images/icons/qt_sdk.png new file mode 100644 index 00000000000..fbd06661e6d Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/qt_sdk.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/userguideIcon.png b/share/qtcreator/welcomescreen/widgets/images/icons/userguideIcon.png new file mode 100644 index 00000000000..a598aaf848e Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/userguideIcon.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/icons/videoIcon.png b/share/qtcreator/welcomescreen/widgets/images/icons/videoIcon.png new file mode 100644 index 00000000000..a6525f8fd2b Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/icons/videoIcon.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/logo.png b/share/qtcreator/welcomescreen/widgets/images/logo.png new file mode 100644 index 00000000000..bf7c8fd8027 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/logo.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/designer-examples.png b/share/qtcreator/welcomescreen/widgets/images/mockup/designer-examples.png new file mode 100644 index 00000000000..36e54f9e1a6 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/designer-examples.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/desktop-examples.png b/share/qtcreator/welcomescreen/widgets/images/mockup/desktop-examples.png new file mode 100644 index 00000000000..86b16b478bb Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/desktop-examples.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/draganddrop-examples.png b/share/qtcreator/welcomescreen/widgets/images/mockup/draganddrop-examples.png new file mode 100644 index 00000000000..89d9e501a72 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/draganddrop-examples.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/itemview-examples.png b/share/qtcreator/welcomescreen/widgets/images/mockup/itemview-examples.png new file mode 100644 index 00000000000..71d29fed011 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/itemview-examples.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/layout-examples.png b/share/qtcreator/welcomescreen/widgets/images/mockup/layout-examples.png new file mode 100644 index 00000000000..eb281277a7b Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/layout-examples.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/mainwindow-examples.png b/share/qtcreator/welcomescreen/widgets/images/mockup/mainwindow-examples.png new file mode 100644 index 00000000000..3e946a68bf1 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/mainwindow-examples.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/network-examples.png b/share/qtcreator/welcomescreen/widgets/images/mockup/network-examples.png new file mode 100644 index 00000000000..15dfba850a0 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/network-examples.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/opengl-examples.png b/share/qtcreator/welcomescreen/widgets/images/mockup/opengl-examples.png new file mode 100644 index 00000000000..8acdf8cabdf Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/opengl-examples.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/penguin.png b/share/qtcreator/welcomescreen/widgets/images/mockup/penguin.png new file mode 100644 index 00000000000..304e4980472 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/penguin.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/qtscript-examples.png b/share/qtcreator/welcomescreen/widgets/images/mockup/qtscript-examples.png new file mode 100644 index 00000000000..d2e9179e6a9 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/qtscript-examples.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/mockup/thread-examples.png b/share/qtcreator/welcomescreen/widgets/images/mockup/thread-examples.png new file mode 100644 index 00000000000..4f4dbacf678 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/mockup/thread-examples.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/more.png b/share/qtcreator/welcomescreen/widgets/images/more.png new file mode 100644 index 00000000000..76354781619 Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/more.png differ diff --git a/share/qtcreator/welcomescreen/widgets/images/tab.png b/share/qtcreator/welcomescreen/widgets/images/tab.png new file mode 100644 index 00000000000..ed72e275e2f Binary files /dev/null and b/share/qtcreator/welcomescreen/widgets/images/tab.png differ diff --git a/share/qtcreator/welcomescreen/widgets/qmldir b/share/qtcreator/welcomescreen/widgets/qmldir deleted file mode 100644 index 39651cb9084..00000000000 --- a/share/qtcreator/welcomescreen/widgets/qmldir +++ /dev/null @@ -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 diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index e6832fb89a6..7e45dbfdaf1 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -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 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()) { diff --git a/src/plugins/qtsupport/exampleslistmodel.h b/src/plugins/qtsupport/exampleslistmodel.h index 2c9fad97b70..8c8db4aa91c 100644 --- a/src/plugins/qtsupport/exampleslistmodel.h +++ b/src/plugins/qtsupport/exampleslistmodel.h @@ -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 { diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp index 3fc49af93d2..00ee3c1d398 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp @@ -66,6 +66,8 @@ #include #include #include +#include +#include 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(this)); + examplesModelStatic() = new ExamplesListModel(const_cast(this)); return examplesModelStatic().data(); } diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.h b/src/plugins/qtsupport/gettingstartedwelcomepage.h index 0c84f6420a9..6b031fb575f 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.h +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.h @@ -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(); diff --git a/src/plugins/qtsupport/qtsupportplugin.cpp b/src/plugins/qtsupport/qtsupportplugin.cpp index 34daa6bf06b..fe634b47d09 100644 --- a/src/plugins/qtsupport/qtsupportplugin.cpp +++ b/src/plugins/qtsupport/qtsupportplugin.cpp @@ -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; } diff --git a/src/plugins/qtsupport/qtsupportplugin.h b/src/plugins/qtsupport/qtsupportplugin.h index e0d769d9072..cc6beb81dc1 100644 --- a/src/plugins/qtsupport/qtsupportplugin.h +++ b/src/plugins/qtsupport/qtsupportplugin.h @@ -40,7 +40,7 @@ namespace QtSupport { namespace Internal { -class GettingStartedWelcomePage; +class ExamplesWelcomePage; class QtSupportPlugin : public ExtensionSystem::IPlugin { diff --git a/src/plugins/welcome/images/arrow-left.png b/src/plugins/welcome/images/arrow-left.png deleted file mode 100644 index 6a29679aec1..00000000000 Binary files a/src/plugins/welcome/images/arrow-left.png and /dev/null differ diff --git a/src/plugins/welcome/images/arrow-right.png b/src/plugins/welcome/images/arrow-right.png deleted file mode 100644 index 207f7fcf216..00000000000 Binary files a/src/plugins/welcome/images/arrow-right.png and /dev/null differ diff --git a/src/plugins/welcome/images/background_center_frame.png b/src/plugins/welcome/images/background_center_frame.png deleted file mode 100644 index d8f03519961..00000000000 Binary files a/src/plugins/welcome/images/background_center_frame.png and /dev/null differ diff --git a/src/plugins/welcome/images/background_center_frame_v1.png b/src/plugins/welcome/images/background_center_frame_v1.png deleted file mode 100644 index e77780155e3..00000000000 Binary files a/src/plugins/welcome/images/background_center_frame_v1.png and /dev/null differ diff --git a/src/plugins/welcome/images/background_center_frame_v2.png b/src/plugins/welcome/images/background_center_frame_v2.png deleted file mode 100644 index c2de67694dd..00000000000 Binary files a/src/plugins/welcome/images/background_center_frame_v2.png and /dev/null differ diff --git a/src/plugins/welcome/images/btn_26.png b/src/plugins/welcome/images/btn_26.png deleted file mode 100644 index 51de8bc89d3..00000000000 Binary files a/src/plugins/welcome/images/btn_26.png and /dev/null differ diff --git a/src/plugins/welcome/images/btn_26_hover.png b/src/plugins/welcome/images/btn_26_hover.png deleted file mode 100644 index 3916904310f..00000000000 Binary files a/src/plugins/welcome/images/btn_26_hover.png and /dev/null differ diff --git a/src/plugins/welcome/images/btn_26_pressed.png b/src/plugins/welcome/images/btn_26_pressed.png deleted file mode 100644 index 0aa53120dba..00000000000 Binary files a/src/plugins/welcome/images/btn_26_pressed.png and /dev/null differ diff --git a/src/plugins/welcome/images/btn_27.png b/src/plugins/welcome/images/btn_27.png deleted file mode 100644 index bcdf90ded2b..00000000000 Binary files a/src/plugins/welcome/images/btn_27.png and /dev/null differ diff --git a/src/plugins/welcome/images/btn_27_hover.png b/src/plugins/welcome/images/btn_27_hover.png deleted file mode 100644 index 2bc8680d7fa..00000000000 Binary files a/src/plugins/welcome/images/btn_27_hover.png and /dev/null differ diff --git a/src/plugins/welcome/images/center_frame_header.png b/src/plugins/welcome/images/center_frame_header.png deleted file mode 100644 index ce88366718d..00000000000 Binary files a/src/plugins/welcome/images/center_frame_header.png and /dev/null differ diff --git a/src/plugins/welcome/images/checked.png b/src/plugins/welcome/images/checked.png deleted file mode 100644 index 68617b2f50a..00000000000 Binary files a/src/plugins/welcome/images/checked.png and /dev/null differ diff --git a/src/plugins/welcome/images/combobox_arrow.png b/src/plugins/welcome/images/combobox_arrow.png deleted file mode 100644 index fa180a27e47..00000000000 Binary files a/src/plugins/welcome/images/combobox_arrow.png and /dev/null differ diff --git a/src/plugins/welcome/images/draw-star.png b/src/plugins/welcome/images/draw-star.png deleted file mode 100644 index bde01565d87..00000000000 Binary files a/src/plugins/welcome/images/draw-star.png and /dev/null differ diff --git a/src/plugins/welcome/images/face-star.png b/src/plugins/welcome/images/face-star.png deleted file mode 100644 index 7455f9dcc21..00000000000 Binary files a/src/plugins/welcome/images/face-star.png and /dev/null differ diff --git a/src/plugins/welcome/images/feedback-bar-background.png b/src/plugins/welcome/images/feedback-bar-background.png deleted file mode 100644 index 18b3a561ffd..00000000000 Binary files a/src/plugins/welcome/images/feedback-bar-background.png and /dev/null differ diff --git a/src/plugins/welcome/images/feedback_arrow.png b/src/plugins/welcome/images/feedback_arrow.png deleted file mode 100644 index 8766098a5a6..00000000000 Binary files a/src/plugins/welcome/images/feedback_arrow.png and /dev/null differ diff --git a/src/plugins/welcome/images/feedback_arrow_hover.png b/src/plugins/welcome/images/feedback_arrow_hover.png deleted file mode 100644 index 43d9907144a..00000000000 Binary files a/src/plugins/welcome/images/feedback_arrow_hover.png and /dev/null differ diff --git a/src/plugins/welcome/images/lineedit.png b/src/plugins/welcome/images/lineedit.png deleted file mode 100644 index 1f15c4fcaa6..00000000000 Binary files a/src/plugins/welcome/images/lineedit.png and /dev/null differ diff --git a/src/plugins/welcome/images/list_bullet_arrow.png b/src/plugins/welcome/images/list_bullet_arrow.png deleted file mode 100644 index acf9f5da5ec..00000000000 Binary files a/src/plugins/welcome/images/list_bullet_arrow.png and /dev/null differ diff --git a/src/plugins/welcome/images/mode_project.png b/src/plugins/welcome/images/mode_project.png deleted file mode 100644 index 05d7759cf1c..00000000000 Binary files a/src/plugins/welcome/images/mode_project.png and /dev/null differ diff --git a/src/plugins/welcome/images/nokia_logo.png b/src/plugins/welcome/images/nokia_logo.png deleted file mode 100644 index 5f46512b7cc..00000000000 Binary files a/src/plugins/welcome/images/nokia_logo.png and /dev/null differ diff --git a/src/plugins/welcome/images/product_logo.png b/src/plugins/welcome/images/product_logo.png deleted file mode 100644 index d48e4815170..00000000000 Binary files a/src/plugins/welcome/images/product_logo.png and /dev/null differ diff --git a/src/plugins/welcome/images/qt_logo.png b/src/plugins/welcome/images/qt_logo.png deleted file mode 100644 index 3cbfca726ba..00000000000 Binary files a/src/plugins/welcome/images/qt_logo.png and /dev/null differ diff --git a/src/plugins/welcome/images/rc_combined.png b/src/plugins/welcome/images/rc_combined.png deleted file mode 100644 index c395794ca3f..00000000000 Binary files a/src/plugins/welcome/images/rc_combined.png and /dev/null differ diff --git a/src/plugins/welcome/images/rc_combined_transparent.png b/src/plugins/welcome/images/rc_combined_transparent.png deleted file mode 100644 index 90393c7241e..00000000000 Binary files a/src/plugins/welcome/images/rc_combined_transparent.png and /dev/null differ diff --git a/src/plugins/welcome/images/tab_active.png b/src/plugins/welcome/images/tab_active.png deleted file mode 100644 index 40685fec188..00000000000 Binary files a/src/plugins/welcome/images/tab_active.png and /dev/null differ diff --git a/src/plugins/welcome/images/tab_hover.png b/src/plugins/welcome/images/tab_hover.png deleted file mode 100644 index 7f225556b5b..00000000000 Binary files a/src/plugins/welcome/images/tab_hover.png and /dev/null differ diff --git a/src/plugins/welcome/images/tab_inactive.png b/src/plugins/welcome/images/tab_inactive.png deleted file mode 100644 index 3cf07a00401..00000000000 Binary files a/src/plugins/welcome/images/tab_inactive.png and /dev/null differ diff --git a/src/plugins/welcome/images/welcomebg.png b/src/plugins/welcome/images/welcomebg.png deleted file mode 100644 index a82abe93f77..00000000000 Binary files a/src/plugins/welcome/images/welcomebg.png and /dev/null differ diff --git a/src/plugins/welcome/welcome.pro b/src/plugins/welcome/welcome.pro index 008ed28acfd..3886aca9738 100644 --- a/src/plugins/welcome/welcome.pro +++ b/src/plugins/welcome/welcome.pro @@ -12,8 +12,6 @@ HEADERS += welcomeplugin.h \ SOURCES += welcomeplugin.cpp \ multifeedrssmodel.cpp -RESOURCES += welcome.qrc - DEFINES += WELCOME_LIBRARY QML_IMPORT_PATH = $$IDE_SOURCE_TREE/lib/qtcreator/ diff --git a/src/plugins/welcome/welcome.qrc b/src/plugins/welcome/welcome.qrc deleted file mode 100644 index 10e450960d9..00000000000 --- a/src/plugins/welcome/welcome.qrc +++ /dev/null @@ -1,34 +0,0 @@ - - - images/btn_26.png - images/btn_26_hover.png - images/btn_27.png - images/btn_27_hover.png - images/feedback_arrow.png - images/feedback_arrow_hover.png - images/feedback-bar-background.png - images/list_bullet_arrow.png - images/mode_project.png - images/nokia_logo.png - images/product_logo.png - images/qt_logo.png - images/rc_combined.png - images/background_center_frame.png - images/center_frame_header.png - images/btn_26_pressed.png - images/combobox_arrow.png - images/arrow-left.png - images/arrow-right.png - images/welcomebg.png - images/tab_active.png - images/tab_inactive.png - images/background_center_frame_v1.png - images/background_center_frame_v2.png - images/tab_hover.png - images/rc_combined_transparent.png - images/checked.png - images/lineedit.png - images/draw-star.png - images/face-star.png - -