forked from qt-creator/qt-creator
Port welcome screen to Qt Quick 2
This ports the welcome screen to use QtQuick 2.0. I have disabled the plugin on Qt4 builds. Change-Id: Ia921d0747c8f7d4441c88fc9fb77b822496091f4 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
committed by
Thomas Hartmann
parent
328a24edee
commit
cf56178df1
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: myApp
|
id: myApp
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
import widgets 1.0
|
import widgets 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
import widgets 1.0
|
import widgets 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -82,6 +82,8 @@ Rectangle {
|
|||||||
anchors.rightMargin: 80
|
anchors.rightMargin: 80
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
model: qtVersionModel
|
model: qtVersionModel
|
||||||
|
textRole: "text"
|
||||||
|
|
||||||
|
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
if (comboBox.model === undefined)
|
if (comboBox.model === undefined)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
import widgets 1.0
|
import widgets 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
import widgets 1.0
|
import widgets 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
import widgets 1.0
|
import widgets 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -36,13 +36,13 @@ Rectangle {
|
|||||||
color: "#edf0f2"
|
color: "#edf0f2"
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property var fonts: CustomFonts {}
|
||||||
|
property var colors: CustomColors { }
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: canvas
|
id: canvas
|
||||||
|
|
||||||
width: Math.min(1024, parent.width)
|
width: Math.min(1024, parent.width)
|
||||||
//this is a workaround for QTCREATORBUG-6803
|
|
||||||
anchors.topMargin: (root.height > 700) ? 0 : 0
|
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
import qtcomponents 1.0
|
import QtQuick.Controls 1.0
|
||||||
|
|
||||||
ChoiceList {
|
ComboBox {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
property color linkColor: "#445ba8"
|
property color linkColor: "#445ba8"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
property alias linkFont: linkText.font
|
property alias linkFont: linkText.font
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: customTab
|
id: customTab
|
||||||
|
|||||||
@@ -27,19 +27,18 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
import qtcomponents 1.0
|
import QtQuick.Controls 1.0
|
||||||
|
|
||||||
GridView {
|
ScrollView {
|
||||||
|
x: Math.max((width - (cellWidth * columns)) / 2, 0);
|
||||||
|
property alias model: gridView.model
|
||||||
|
GridView {
|
||||||
id: gridView
|
id: gridView
|
||||||
interactive: false
|
interactive: false
|
||||||
clip: true
|
|
||||||
cellHeight: 240
|
cellHeight: 240
|
||||||
cellWidth: 216
|
cellWidth: 216
|
||||||
property int columns: Math.max(Math.floor(width / cellWidth), 1)
|
property int columns: Math.max(Math.floor(width / cellWidth), 1)
|
||||||
cacheBuffer: 1000
|
|
||||||
|
|
||||||
x: Math.max((width - (cellWidth * columns)) / 2, 0);
|
|
||||||
|
|
||||||
delegate: Delegate {
|
delegate: Delegate {
|
||||||
id: delegate
|
id: delegate
|
||||||
@@ -59,32 +58,5 @@ GridView {
|
|||||||
videoLength: model.videoLength !== undefined ? model.videoLength : ""
|
videoLength: model.videoLength !== undefined ? model.videoLength : ""
|
||||||
tags: model.tags
|
tags: model.tags
|
||||||
}
|
}
|
||||||
|
|
||||||
WheelArea {
|
|
||||||
id: wheelarea
|
|
||||||
anchors.fill: parent
|
|
||||||
verticalMinimumValue: vscrollbar.minimumValue
|
|
||||||
verticalMaximumValue: vscrollbar.maximumValue
|
|
||||||
|
|
||||||
onVerticalValueChanged: gridView.contentY = verticalValue
|
|
||||||
verticalValue: gridView.contentY
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ScrollBar {
|
|
||||||
id: vscrollbar
|
|
||||||
orientation: Qt.Vertical
|
|
||||||
property int availableHeight : gridView.height
|
|
||||||
visible: contentHeight > availableHeight
|
|
||||||
maximumValue: contentHeight > availableHeight ? gridView.contentHeight - availableHeight : 0
|
|
||||||
minimumValue: 0
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.topMargin: styleitem.style == "mac" ? 1 : 0
|
|
||||||
onValueChanged: gridView.contentY = value
|
|
||||||
anchors.rightMargin: styleitem.frameoffset
|
|
||||||
anchors.bottomMargin: hscrollbar.visible ? hscrollbar.height : styleitem.frameoffset
|
|
||||||
value: gridView.contentY
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
import qtcomponents 1.0
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: delegate
|
id: delegate
|
||||||
@@ -64,17 +63,6 @@ Rectangle {
|
|||||||
searchBar.text += " " + tagStr
|
searchBar.text += " " + tagStr
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomColors {
|
|
||||||
id: colors
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomFonts {
|
|
||||||
id: fonts
|
|
||||||
}
|
|
||||||
|
|
||||||
QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
|
|
||||||
|
|
||||||
|
|
||||||
BorderImage {
|
BorderImage {
|
||||||
id: image1
|
id: image1
|
||||||
x: 11
|
x: 11
|
||||||
@@ -228,6 +216,7 @@ Rectangle {
|
|||||||
id: mousearea1
|
id: mousearea1
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
onEntered: {
|
onEntered: {
|
||||||
delegate.state="hover"
|
delegate.state="hover"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
import qtcomponents 1.0
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: gettingStartedItem
|
id: gettingStartedItem
|
||||||
@@ -13,16 +12,6 @@ Item {
|
|||||||
|
|
||||||
signal clicked
|
signal clicked
|
||||||
|
|
||||||
CustomColors {
|
|
||||||
id: colors
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomFonts {
|
|
||||||
id: fonts
|
|
||||||
}
|
|
||||||
|
|
||||||
QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
y: 170
|
y: 170
|
||||||
width: 20
|
width: 20
|
||||||
@@ -106,6 +95,7 @@ Item {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
onEntered: {
|
onEntered: {
|
||||||
gettingStartedItem.state="hover"
|
gettingStartedItem.state="hover"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
import widgets 1.0
|
import widgets 1.0
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
|||||||
@@ -27,8 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
import qtcomponents 1.0
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: root
|
id: root
|
||||||
@@ -52,14 +51,6 @@ Text {
|
|||||||
|
|
||||||
property bool enlargeMouseArea: true
|
property bool enlargeMouseArea: true
|
||||||
|
|
||||||
CustomFonts {
|
|
||||||
id: fonts
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomColors {
|
|
||||||
id: colors
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "#909090"
|
color: "#909090"
|
||||||
radius: 6
|
radius: 6
|
||||||
@@ -89,8 +80,7 @@ Text {
|
|||||||
anchors.margins: enlargeMouseArea ? -8 : 0
|
anchors.margins: enlargeMouseArea ? -8 : 0
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
QStyleItem { cursor: "pointinghandcursor"; anchors.fill: parent }
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
||||||
onEntered: {
|
onEntered: {
|
||||||
if (!root.active)
|
if (!root.active)
|
||||||
mouseArea.state = "hovered"
|
mouseArea.state = "hovered"
|
||||||
|
|||||||
@@ -27,8 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
import qtcomponents 1.0 as Components
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: tabBar
|
id: tabBar
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: logo
|
id: logo
|
||||||
|
|||||||
@@ -27,16 +27,16 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
import QtQuick 1.0
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: pageCaption
|
id: pageCaption
|
||||||
width: 960
|
width: 960
|
||||||
height: 40
|
height: 40
|
||||||
property int textOffset: captionText.x + captionText.width
|
|
||||||
|
|
||||||
|
property int textOffset: captionText.x + captionText.width
|
||||||
property alias caption: captionText.text
|
property alias caption: captionText.text
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: captionText
|
id: captionText
|
||||||
y: 9
|
y: 9
|
||||||
@@ -55,8 +55,4 @@ Item {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomColors {
|
|
||||||
id: colors
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: pageLoader
|
id: pageLoader
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: projectItem
|
id: projectItem
|
||||||
@@ -48,10 +48,6 @@ Item {
|
|||||||
anchors.verticalCenter: projectNameText.verticalCenter
|
anchors.verticalCenter: projectNameText.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomFonts {
|
|
||||||
id: fonts
|
|
||||||
}
|
|
||||||
|
|
||||||
LinkedText {
|
LinkedText {
|
||||||
id: projectNameText
|
id: projectNameText
|
||||||
y: 2
|
y: 2
|
||||||
|
|||||||
@@ -27,23 +27,21 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
import qtcomponents 1.0
|
import QtQuick.Controls 1.0
|
||||||
|
|
||||||
ScrollArea {
|
ScrollView {
|
||||||
property bool scrollBarVisible: projectList.verticalScrollBar.visible
|
|
||||||
id: projectList
|
id: projectList
|
||||||
|
|
||||||
|
property bool scrollBarVisible: false//projectList.verticalScrollBar.visible
|
||||||
property alias model: repeater.model
|
property alias model: repeater.model
|
||||||
|
// Behavior on verticalScrollBar.opacity {
|
||||||
|
// PropertyAnimation {
|
||||||
|
|
||||||
Behavior on verticalScrollBar.opacity {
|
// }
|
||||||
PropertyAnimation {
|
// }
|
||||||
|
|
||||||
}
|
// frameVisible: false
|
||||||
}
|
|
||||||
|
|
||||||
frame: false
|
|
||||||
horizontalScrollBar.visible: false
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: column
|
id: column
|
||||||
|
|||||||
@@ -27,35 +27,42 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
import qtcomponents 1.0
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: searchBar
|
id: searchBar
|
||||||
|
|
||||||
width: 930
|
width: 930
|
||||||
height: 31
|
height: 27
|
||||||
color: "#ffffff"
|
color: "#ffffff"
|
||||||
radius: 6
|
radius: 6
|
||||||
border.color: "#cccccc"
|
border.color: "#cccccc"
|
||||||
property alias placeholderText: lineEdit.placeholderText
|
|
||||||
|
property alias placeholderText: placeHolderText.text
|
||||||
property alias text: lineEdit.text
|
property alias text: lineEdit.text
|
||||||
|
|
||||||
CustomFonts {
|
TextInput {
|
||||||
id: fonts
|
|
||||||
}
|
|
||||||
|
|
||||||
TextField {
|
|
||||||
id: lineEdit
|
id: lineEdit
|
||||||
placeholderText: qsTr("Search...")
|
anchors.topMargin: 1
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 12
|
anchors.rightMargin: 12
|
||||||
anchors.leftMargin: 12
|
anchors.leftMargin: 12
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.fill: parent
|
||||||
background: Item {}
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
renderType: Text.NativeRendering
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
font.bold: false
|
|
||||||
font.family: "Helvetica"
|
font.family: "Helvetica"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: placeHolderText
|
||||||
|
visible: !lineEdit.text.length
|
||||||
|
text: qsTr("Search...")
|
||||||
|
anchors.fill: lineEdit
|
||||||
|
font: lineEdit.font
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
color: "gray"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
x: 5
|
x: 5
|
||||||
@@ -36,10 +36,6 @@ Item {
|
|||||||
height: column.height
|
height: column.height
|
||||||
property alias name: text.text
|
property alias name: text.text
|
||||||
|
|
||||||
CustomFonts {
|
|
||||||
id: fonts
|
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: column
|
id: column
|
||||||
spacing: 4
|
spacing: 4
|
||||||
@@ -100,14 +96,13 @@ Item {
|
|||||||
Item {
|
Item {
|
||||||
z: -1
|
z: -1
|
||||||
property int margin: 6
|
property int margin: 6
|
||||||
height: innerColumn.height + margin * 2
|
height: expanded ? innerColumn.height + margin * 2 : 0
|
||||||
width: delegate.ListView.view.width - 8 - margin * 2
|
width: delegate.ListView.view.width - 8 - margin * 2
|
||||||
opacity: delegate.expanded ? 1 : 0
|
opacity: delegate.expanded ? 1 : 0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on height {
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
PauseAnimation { duration: delegate.expanded ? 100 : 0; }
|
PropertyAnimation { duration: 160 ; easing.type: Easing.OutCubic }
|
||||||
PropertyAnimation { duration: 100; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,33 +27,25 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
import qtcomponents 1.0
|
import widgets 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
property alias model: root.model
|
id: root
|
||||||
|
property var model
|
||||||
property int topMargin: 6
|
property int topMargin: 6
|
||||||
height: Math.min(root.contentHeight + topMargin, parent.height - 260)
|
height: Math.min(content.contentHeight + topMargin, parent.height - 260)
|
||||||
|
|
||||||
property alias scrollBarVisible: vscrollbar.visible
|
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: root
|
id: content
|
||||||
|
model: root.model
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin: topMargin
|
anchors.topMargin: topMargin
|
||||||
|
|
||||||
snapMode: ListView.SnapToItem
|
snapMode: ListView.SnapToItem
|
||||||
property int delegateHeight: currentItem.height + spacing
|
|
||||||
//property int delegateHeight: 22
|
|
||||||
|
|
||||||
interactive: false
|
|
||||||
|
|
||||||
spacing: 4
|
spacing: 4
|
||||||
cacheBuffer: 800 //We need a big cache to avoid artefacts caused by delegate recreation
|
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|
||||||
delegate: SessionItem {
|
delegate: SessionItem {
|
||||||
function fullSessionName()
|
function fullSessionName()
|
||||||
{
|
{
|
||||||
@@ -64,35 +56,7 @@ Item {
|
|||||||
newSessionName = qsTr("%1 (current session)").arg(sessionName);
|
newSessionName = qsTr("%1 (current session)").arg(sessionName);
|
||||||
return newSessionName;
|
return newSessionName;
|
||||||
}
|
}
|
||||||
|
|
||||||
name: fullSessionName()
|
name: fullSessionName()
|
||||||
}
|
}
|
||||||
|
|
||||||
WheelArea {
|
|
||||||
id: wheelarea
|
|
||||||
anchors.fill: parent
|
|
||||||
verticalMinimumValue: vscrollbar.minimumValue
|
|
||||||
verticalMaximumValue: vscrollbar.maximumValue
|
|
||||||
onVerticalValueChanged: root.contentY = verticalValue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollBar {
|
|
||||||
id: vscrollbar
|
|
||||||
orientation: Qt.Vertical
|
|
||||||
property int availableHeight : root.height
|
|
||||||
visible: root.contentHeight > availableHeight
|
|
||||||
maximumValue: root.contentHeight > availableHeight ? root.contentHeight - availableHeight : 0
|
|
||||||
minimumValue: 0
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
singleStep: root.delegateHeight
|
|
||||||
anchors.topMargin: styleitem.style === "mac" ? 1 : 0
|
|
||||||
onValueChanged: root.contentY = value
|
|
||||||
anchors.rightMargin: styleitem.frameoffset
|
|
||||||
anchors.bottomMargin: styleitem.frameoffset
|
|
||||||
value: root.contentY
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,14 +27,12 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: toolTip
|
id: toolTip
|
||||||
|
|
||||||
property alias text: text.text
|
property alias text: text.text
|
||||||
|
|
||||||
|
|
||||||
property int margin: 4
|
property int margin: 4
|
||||||
|
|
||||||
width: text.width + margin * 2
|
width: text.width + margin * 2
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
import QmlDesigner 1.0
|
import QmlDesigner 1.0
|
||||||
|
|
||||||
DummyContextObject {
|
DummyContextObject {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.0
|
import QtQuick 2.1
|
||||||
import QmlDesigner 1.0
|
import QmlDesigner 1.0
|
||||||
|
|
||||||
DummyContextObject {
|
DummyContextObject {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 1.1
|
import QtQuick 2.1
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
ListElement {
|
ListElement {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QUrl)
|
QT_FORWARD_DECLARE_CLASS(QUrl)
|
||||||
QT_FORWARD_DECLARE_CLASS(QDeclarativeEngine)
|
QT_FORWARD_DECLARE_CLASS(QQmlEngine)
|
||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ public:
|
|||||||
virtual QUrl pageLocation() const = 0;
|
virtual QUrl pageLocation() const = 0;
|
||||||
virtual QString title() const = 0;
|
virtual QString title() const = 0;
|
||||||
virtual int priority() const { return 0; }
|
virtual int priority() const { return 0; }
|
||||||
virtual void facilitateQml(QDeclarativeEngine *) {}
|
virtual void facilitateQml(QQmlEngine *) {}
|
||||||
virtual bool hasSearchBar() const { return false; }
|
virtual bool hasSearchBar() const { return false; }
|
||||||
virtual Id id() const = 0;
|
virtual Id id() const = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ TEMPLATE = subdirs
|
|||||||
|
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
coreplugin \
|
coreplugin \
|
||||||
welcome \
|
|
||||||
find \
|
find \
|
||||||
texteditor \
|
texteditor \
|
||||||
cppeditor \
|
cppeditor \
|
||||||
@@ -70,7 +69,8 @@ contains(QT_CONFIG, declarative)|!isEmpty(QT.declarative.name) {
|
|||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
SUBDIRS += \
|
SUBDIRS += \
|
||||||
qmldesigner
|
qmldesigner \
|
||||||
|
welcome
|
||||||
} else {
|
} else {
|
||||||
include(../private_headers.pri)
|
include(../private_headers.pri)
|
||||||
exists($${QT_PRIVATE_HEADERS}/QtDeclarative/private/qdeclarativecontext_p.h) {
|
exists($${QT_PRIVATE_HEADERS}/QtDeclarative/private/qdeclarativecontext_p.h) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import qbs
|
|||||||
|
|
||||||
Project {
|
Project {
|
||||||
name: "Plugins"
|
name: "Plugins"
|
||||||
|
|
||||||
references: [
|
references: [
|
||||||
"analyzerbase/analyzerbase.qbs",
|
"analyzerbase/analyzerbase.qbs",
|
||||||
"android/android.qbs",
|
"android/android.qbs",
|
||||||
@@ -56,6 +57,11 @@ Project {
|
|||||||
"updateinfo/updateinfo.qbs",
|
"updateinfo/updateinfo.qbs",
|
||||||
"valgrind/valgrind.qbs",
|
"valgrind/valgrind.qbs",
|
||||||
"vcsbase/vcsbase.qbs",
|
"vcsbase/vcsbase.qbs",
|
||||||
"welcome/welcome.qbs"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Group {
|
||||||
|
condition: qtcore.versionMajor >= 5
|
||||||
|
references: [ "welcome/welcome.qbs" ]
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,6 @@
|
|||||||
#include "projectnodes.h"
|
#include "projectnodes.h"
|
||||||
#include "sessiondialog.h"
|
#include "sessiondialog.h"
|
||||||
#include "projectexplorersettingspage.h"
|
#include "projectexplorersettingspage.h"
|
||||||
#include "projectwelcomepage.h"
|
|
||||||
#include "corelistenercheckingforrunningbuild.h"
|
#include "corelistenercheckingforrunningbuild.h"
|
||||||
#include "buildconfiguration.h"
|
#include "buildconfiguration.h"
|
||||||
#include "miniprojecttargetselector.h"
|
#include "miniprojecttargetselector.h"
|
||||||
@@ -90,6 +89,10 @@
|
|||||||
# include "wincetoolchain.h"
|
# include "wincetoolchain.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
|
#include "projectwelcomepage.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <extensionsystem/pluginspec.h>
|
#include <extensionsystem/pluginspec.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/editormanager/ieditor.h>
|
#include <coreplugin/editormanager/ieditor.h>
|
||||||
@@ -228,8 +231,11 @@ struct ProjectExplorerPluginPrivate {
|
|||||||
QString m_projectFilterString;
|
QString m_projectFilterString;
|
||||||
Internal::MiniProjectTargetSelector * m_targetSelector;
|
Internal::MiniProjectTargetSelector * m_targetSelector;
|
||||||
Internal::ProjectExplorerSettings m_projectExplorerSettings;
|
Internal::ProjectExplorerSettings m_projectExplorerSettings;
|
||||||
Internal::ProjectWelcomePage *m_welcomePage;
|
|
||||||
|
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
|
Internal::ProjectWelcomePage *m_welcomePage;
|
||||||
|
#endif
|
||||||
IMode *m_projectsMode;
|
IMode *m_projectsMode;
|
||||||
|
|
||||||
TaskHub *m_taskHub;
|
TaskHub *m_taskHub;
|
||||||
@@ -284,8 +290,10 @@ ProjectExplorerPlugin::ProjectExplorerPlugin()
|
|||||||
|
|
||||||
ProjectExplorerPlugin::~ProjectExplorerPlugin()
|
ProjectExplorerPlugin::~ProjectExplorerPlugin()
|
||||||
{
|
{
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
removeObject(d->m_welcomePage);
|
removeObject(d->m_welcomePage);
|
||||||
delete d->m_welcomePage;
|
delete d->m_welcomePage;
|
||||||
|
#endif
|
||||||
removeObject(this);
|
removeObject(this);
|
||||||
// Force sequence of deletion:
|
// Force sequence of deletion:
|
||||||
delete d->m_kitManager; // remove all the profile informations
|
delete d->m_kitManager; // remove all the profile informations
|
||||||
@@ -348,9 +356,11 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
|
|
||||||
connect(ICore::instance(), SIGNAL(newItemsDialogRequested()), this, SLOT(loadCustomWizards()));
|
connect(ICore::instance(), SIGNAL(newItemsDialogRequested()), this, SLOT(loadCustomWizards()));
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
d->m_welcomePage = new ProjectWelcomePage;
|
d->m_welcomePage = new ProjectWelcomePage;
|
||||||
connect(d->m_welcomePage, SIGNAL(manageSessions()), this, SLOT(showSessionManager()));
|
connect(d->m_welcomePage, SIGNAL(manageSessions()), this, SLOT(showSessionManager()));
|
||||||
addObject(d->m_welcomePage);
|
addObject(d->m_welcomePage);
|
||||||
|
#endif
|
||||||
|
|
||||||
connect(DocumentManager::instance(), SIGNAL(currentFileChanged(QString)),
|
connect(DocumentManager::instance(), SIGNAL(currentFileChanged(QString)),
|
||||||
this, SLOT(setCurrentFile(QString)));
|
this, SLOT(setCurrentFile(QString)));
|
||||||
@@ -1085,7 +1095,9 @@ void ProjectExplorerPlugin::closeAllProjects()
|
|||||||
SessionManager::closeAllProjects();
|
SessionManager::closeAllProjects();
|
||||||
updateActions();
|
updateActions();
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
ModeManager::activateMode(Core::Constants::MODE_WELCOME);
|
ModeManager::activateMode(Core::Constants::MODE_WELCOME);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectExplorerPlugin::extensionsInitialized()
|
void ProjectExplorerPlugin::extensionsInitialized()
|
||||||
@@ -1212,9 +1224,11 @@ void ProjectExplorerPlugin::showSessionManager()
|
|||||||
|
|
||||||
updateActions();
|
updateActions();
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
IMode *welcomeMode = ModeManager::mode(Core::Constants::MODE_WELCOME);
|
IMode *welcomeMode = ModeManager::mode(Core::Constants::MODE_WELCOME);
|
||||||
if (ModeManager::currentMode() == welcomeMode)
|
if (ModeManager::currentMode() == welcomeMode)
|
||||||
updateWelcomePage();
|
updateWelcomePage();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectExplorerPlugin::setStartupProject(Project *project)
|
void ProjectExplorerPlugin::setStartupProject(Project *project)
|
||||||
@@ -1443,7 +1457,9 @@ void ProjectExplorerPlugin::setCurrentNode(Node *node)
|
|||||||
|
|
||||||
void ProjectExplorerPlugin::updateWelcomePage()
|
void ProjectExplorerPlugin::updateWelcomePage()
|
||||||
{
|
{
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
d->m_welcomePage->reloadWelcomeScreenData();
|
d->m_welcomePage->reloadWelcomeScreenData();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectExplorerPlugin::currentModeChanged(IMode *mode, IMode *oldMode)
|
void ProjectExplorerPlugin::currentModeChanged(IMode *mode, IMode *oldMode)
|
||||||
@@ -1564,9 +1580,10 @@ void ProjectExplorerPlugin::restoreSession()
|
|||||||
connect(ModeManager::instance(),
|
connect(ModeManager::instance(),
|
||||||
SIGNAL(currentModeChanged(Core::IMode*,Core::IMode*)),
|
SIGNAL(currentModeChanged(Core::IMode*,Core::IMode*)),
|
||||||
SLOT(currentModeChanged(Core::IMode*,Core::IMode*)));
|
SLOT(currentModeChanged(Core::IMode*,Core::IMode*)));
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
connect(d->m_welcomePage, SIGNAL(requestSession(QString)), this, SLOT(loadSession(QString)));
|
connect(d->m_welcomePage, SIGNAL(requestSession(QString)), this, SLOT(loadSession(QString)));
|
||||||
connect(d->m_welcomePage, SIGNAL(requestProject(QString)), this, SLOT(openProjectWelcomePage(QString)));
|
connect(d->m_welcomePage, SIGNAL(requestProject(QString)), this, SLOT(openProjectWelcomePage(QString)));
|
||||||
|
#endif
|
||||||
d->m_arguments = arguments;
|
d->m_arguments = arguments;
|
||||||
QTimer::singleShot(0, this, SLOT(restoreSession2()));
|
QTimer::singleShot(0, this, SLOT(restoreSession2()));
|
||||||
updateActions();
|
updateActions();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
QT += xml script declarative
|
QT += xml script
|
||||||
|
|
||||||
include(../../qtcreatorplugin.pri)
|
include(../../qtcreatorplugin.pri)
|
||||||
include(customwizard/customwizard.pri)
|
include(customwizard/customwizard.pri)
|
||||||
@@ -84,7 +84,6 @@ HEADERS += projectexplorer.h \
|
|||||||
cesdkhandler.h \
|
cesdkhandler.h \
|
||||||
gccparser.h \
|
gccparser.h \
|
||||||
projectexplorersettingspage.h \
|
projectexplorersettingspage.h \
|
||||||
projectwelcomepage.h \
|
|
||||||
baseprojectwizarddialog.h \
|
baseprojectwizarddialog.h \
|
||||||
miniprojecttargetselector.h \
|
miniprojecttargetselector.h \
|
||||||
targetselector.h \
|
targetselector.h \
|
||||||
@@ -214,7 +213,6 @@ SOURCES += projectexplorer.cpp \
|
|||||||
cesdkhandler.cpp \
|
cesdkhandler.cpp \
|
||||||
gccparser.cpp \
|
gccparser.cpp \
|
||||||
projectexplorersettingspage.cpp \
|
projectexplorersettingspage.cpp \
|
||||||
projectwelcomepage.cpp \
|
|
||||||
corelistenercheckingforrunningbuild.cpp \
|
corelistenercheckingforrunningbuild.cpp \
|
||||||
baseprojectwizarddialog.cpp \
|
baseprojectwizarddialog.cpp \
|
||||||
miniprojecttargetselector.cpp \
|
miniprojecttargetselector.cpp \
|
||||||
@@ -302,6 +300,11 @@ equals(TEST, 1) {
|
|||||||
outputparser_test.h
|
outputparser_test.h
|
||||||
}
|
}
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
|
QT += quick
|
||||||
|
HEADERS += projectwelcomepage.h
|
||||||
|
SOURCES += projectwelcomepage.cpp
|
||||||
|
}
|
||||||
macx:LIBS += -framework Carbon
|
macx:LIBS += -framework Carbon
|
||||||
|
|
||||||
RESOURCES += projectexplorer.qrc
|
RESOURCES += projectexplorer.qrc
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
|
|||||||
QtcPlugin {
|
QtcPlugin {
|
||||||
name: "ProjectExplorer"
|
name: "ProjectExplorer"
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets", "xml", "network", "script", "declarative"] }
|
Depends { name: "Qt"; submodules: ["widgets", "xml", "network", "script", "quick"] }
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
Depends { name: "Locator" }
|
Depends { name: "Locator" }
|
||||||
Depends { name: "Find" }
|
Depends { name: "Find" }
|
||||||
@@ -109,7 +109,6 @@ QtcPlugin {
|
|||||||
"projectmodels.cpp", "projectmodels.h",
|
"projectmodels.cpp", "projectmodels.h",
|
||||||
"projectnodes.cpp", "projectnodes.h",
|
"projectnodes.cpp", "projectnodes.h",
|
||||||
"projecttreewidget.cpp", "projecttreewidget.h",
|
"projecttreewidget.cpp", "projecttreewidget.h",
|
||||||
"projectwelcomepage.cpp", "projectwelcomepage.h",
|
|
||||||
"projectwindow.cpp", "projectwindow.h",
|
"projectwindow.cpp", "projectwindow.h",
|
||||||
"projectwizardpage.cpp", "projectwizardpage.h", "projectwizardpage.ui",
|
"projectwizardpage.cpp", "projectwizardpage.h", "projectwizardpage.ui",
|
||||||
"removetaskhandler.cpp", "removetaskhandler.h",
|
"removetaskhandler.cpp", "removetaskhandler.h",
|
||||||
@@ -136,6 +135,15 @@ QtcPlugin {
|
|||||||
"toolchainoptionspage.cpp", "toolchainoptionspage.h",
|
"toolchainoptionspage.cpp", "toolchainoptionspage.h",
|
||||||
"vcsannotatetaskhandler.cpp", "vcsannotatetaskhandler.h",
|
"vcsannotatetaskhandler.cpp", "vcsannotatetaskhandler.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Group {
|
||||||
|
condition: qtcore.versionMajor >= 5
|
||||||
|
references: [
|
||||||
|
"projectwelcomepage.cpp",
|
||||||
|
"projectwelcomepage.h"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
|
|||||||
@@ -31,8 +31,8 @@
|
|||||||
|
|
||||||
#include <utils/stringutils.h>
|
#include <utils/stringutils.h>
|
||||||
|
|
||||||
#include <QDeclarativeEngine>
|
#include <QQmlContext>
|
||||||
#include <QDeclarativeContext>
|
#include <QQmlEngine>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
@@ -212,12 +212,12 @@ ProjectWelcomePage::ProjectWelcomePage() :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectWelcomePage::facilitateQml(QDeclarativeEngine *engine)
|
void ProjectWelcomePage::facilitateQml(QQmlEngine *engine)
|
||||||
{
|
{
|
||||||
m_sessionModel = new SessionModel(this);
|
m_sessionModel = new SessionModel(this);
|
||||||
m_projectModel = new ProjectModel(ProjectExplorerPlugin::instance(), this);
|
m_projectModel = new ProjectModel(ProjectExplorerPlugin::instance(), this);
|
||||||
|
|
||||||
QDeclarativeContext *ctx = engine->rootContext();
|
QQmlContext *ctx = engine->rootContext();
|
||||||
ctx->setContextProperty(QLatin1String("sessionList"), m_sessionModel);
|
ctx->setContextProperty(QLatin1String("sessionList"), m_sessionModel);
|
||||||
ctx->setContextProperty(QLatin1String("projectList"), m_projectModel);
|
ctx->setContextProperty(QLatin1String("projectList"), m_projectModel);
|
||||||
ctx->setContextProperty(QLatin1String("projectWelcomePage"), this);
|
ctx->setContextProperty(QLatin1String("projectWelcomePage"), this);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include <utils/iwelcomepage.h>
|
#include <utils/iwelcomepage.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QDeclarativeEngine;
|
class QQmlEngine;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
@@ -87,7 +87,7 @@ class ProjectWelcomePage : public Utils::IWelcomePage
|
|||||||
public:
|
public:
|
||||||
ProjectWelcomePage();
|
ProjectWelcomePage();
|
||||||
|
|
||||||
void facilitateQml(QDeclarativeEngine *engine);
|
void facilitateQml(QQmlEngine *engine);
|
||||||
QUrl pageLocation() const;
|
QUrl pageLocation() const;
|
||||||
QWidget *page() { return 0; }
|
QWidget *page() { return 0; }
|
||||||
QString title() const { return tr("Develop"); }
|
QString title() const { return tr("Develop"); }
|
||||||
|
|||||||
@@ -61,9 +61,9 @@
|
|||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDeclarativeImageProvider>
|
#include <QQuickImageProvider>
|
||||||
#include <QDeclarativeEngine>
|
#include <QQmlEngine>
|
||||||
#include <QDeclarativeContext>
|
#include <QQmlContext>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
@@ -170,11 +170,11 @@ public:
|
|||||||
bool m_shutdown;
|
bool m_shutdown;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HelpImageProvider : public QDeclarativeImageProvider
|
class HelpImageProvider : public QQuickImageProvider
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HelpImageProvider()
|
HelpImageProvider()
|
||||||
: QDeclarativeImageProvider(QDeclarativeImageProvider::Image)
|
: QQuickImageProvider(QQuickImageProvider::Image)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ int GettingStartedWelcomePage::priority() const
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GettingStartedWelcomePage::facilitateQml(QDeclarativeEngine *engine)
|
void GettingStartedWelcomePage::facilitateQml(QQmlEngine *engine)
|
||||||
{
|
{
|
||||||
m_engine = engine;
|
m_engine = engine;
|
||||||
}
|
}
|
||||||
@@ -288,7 +288,7 @@ QUrl ExamplesWelcomePage::pageLocation() const
|
|||||||
return QUrl::fromLocalFile(resourcePath + QLatin1String("/welcomescreen/tutorials.qml"));
|
return QUrl::fromLocalFile(resourcePath + QLatin1String("/welcomescreen/tutorials.qml"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExamplesWelcomePage::facilitateQml(QDeclarativeEngine *engine)
|
void ExamplesWelcomePage::facilitateQml(QQmlEngine *engine)
|
||||||
{
|
{
|
||||||
m_engine = engine;
|
m_engine = engine;
|
||||||
m_engine->addImageProvider(QLatin1String("helpimage"), new HelpImageProvider);
|
m_engine->addImageProvider(QLatin1String("helpimage"), new HelpImageProvider);
|
||||||
@@ -299,7 +299,7 @@ void ExamplesWelcomePage::facilitateQml(QDeclarativeEngine *engine)
|
|||||||
proxy->sort(0);
|
proxy->sort(0);
|
||||||
proxy->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
proxy->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||||
|
|
||||||
QDeclarativeContext *rootContenxt = m_engine->rootContext();
|
QQmlContext *rootContenxt = m_engine->rootContext();
|
||||||
if (m_showExamples) {
|
if (m_showExamples) {
|
||||||
proxy->setShowTutorialsOnly(false);
|
proxy->setShowTutorialsOnly(false);
|
||||||
rootContenxt->setContextProperty(QLatin1String("examplesModel"), proxy);
|
rootContenxt->setContextProperty(QLatin1String("examplesModel"), proxy);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QDeclarativeEngine;
|
class QQmlEngine;
|
||||||
class QFileInfo;
|
class QFileInfo;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
@@ -54,11 +54,11 @@ public:
|
|||||||
QUrl pageLocation() const;
|
QUrl pageLocation() const;
|
||||||
QString title() const;
|
QString title() const;
|
||||||
int priority() const;
|
int priority() const;
|
||||||
void facilitateQml(QDeclarativeEngine *);
|
void facilitateQml(QQmlEngine *);
|
||||||
Id id() const;
|
Id id() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QDeclarativeEngine *m_engine;
|
QQmlEngine *m_engine;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ public:
|
|||||||
QString title() const;
|
QString title() const;
|
||||||
int priority() const;
|
int priority() const;
|
||||||
bool hasSearchBar() const;
|
bool hasSearchBar() const;
|
||||||
void facilitateQml(QDeclarativeEngine *);
|
void facilitateQml(QQmlEngine *);
|
||||||
Id id() const;
|
Id id() const;
|
||||||
Q_INVOKABLE QStringList tagList() const;
|
Q_INVOKABLE QStringList tagList() const;
|
||||||
Q_INVOKABLE void openUrl(const QUrl &url);
|
Q_INVOKABLE void openUrl(const QUrl &url);
|
||||||
@@ -92,7 +92,7 @@ public slots:
|
|||||||
private:
|
private:
|
||||||
ExamplesListModel *examplesModel() const;
|
ExamplesListModel *examplesModel() const;
|
||||||
QString copyToAlternativeLocation(const QFileInfo &fileInfo, QStringList &filesToOpen, const QStringList &dependencies);
|
QString copyToAlternativeLocation(const QFileInfo &fileInfo, QStringList &filesToOpen, const QStringList &dependencies);
|
||||||
QDeclarativeEngine *m_engine;
|
QQmlEngine *m_engine;
|
||||||
bool m_showExamples;
|
bool m_showExamples;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
DEFINES += QTSUPPORT_LIBRARY
|
DEFINES += QTSUPPORT_LIBRARY
|
||||||
QT += network declarative
|
QT += network
|
||||||
|
|
||||||
include(../../qtcreatorplugin.pri)
|
include(../../qtcreatorplugin.pri)
|
||||||
|
|
||||||
@@ -27,7 +27,6 @@ HEADERS += \
|
|||||||
qtsupportconstants.h \
|
qtsupportconstants.h \
|
||||||
profilereader.h \
|
profilereader.h \
|
||||||
qtparser.h \
|
qtparser.h \
|
||||||
gettingstartedwelcomepage.h \
|
|
||||||
exampleslistmodel.h \
|
exampleslistmodel.h \
|
||||||
screenshotcropper.h \
|
screenshotcropper.h \
|
||||||
qtconfigwidget.h \
|
qtconfigwidget.h \
|
||||||
@@ -52,11 +51,16 @@ SOURCES += \
|
|||||||
debugginghelperbuildtask.cpp \
|
debugginghelperbuildtask.cpp \
|
||||||
profilereader.cpp \
|
profilereader.cpp \
|
||||||
qtparser.cpp \
|
qtparser.cpp \
|
||||||
gettingstartedwelcomepage.cpp \
|
|
||||||
exampleslistmodel.cpp \
|
exampleslistmodel.cpp \
|
||||||
screenshotcropper.cpp \
|
screenshotcropper.cpp \
|
||||||
qtconfigwidget.cpp
|
qtconfigwidget.cpp
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
|
QT += quick
|
||||||
|
HEADERS += gettingstartedwelcomepage.h
|
||||||
|
SOURCES += gettingstartedwelcomepage.cpp
|
||||||
|
}
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
showbuildlog.ui \
|
showbuildlog.ui \
|
||||||
qtversioninfo.ui \
|
qtversioninfo.ui \
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
|
|||||||
QtcPlugin {
|
QtcPlugin {
|
||||||
name: "QtSupport"
|
name: "QtSupport"
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets", "declarative"] }
|
Depends { name: "Qt"; submodules: ["widgets", "quick"] }
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
Depends { name: "ProjectExplorer" }
|
Depends { name: "ProjectExplorer" }
|
||||||
Depends { name: "TextEditor" }
|
Depends { name: "TextEditor" }
|
||||||
@@ -70,8 +70,6 @@ QtcPlugin {
|
|||||||
"debugginghelperbuildtask.h",
|
"debugginghelperbuildtask.h",
|
||||||
"exampleslistmodel.cpp",
|
"exampleslistmodel.cpp",
|
||||||
"exampleslistmodel.h",
|
"exampleslistmodel.h",
|
||||||
"gettingstartedwelcomepage.cpp",
|
|
||||||
"gettingstartedwelcomepage.h",
|
|
||||||
"profilereader.cpp",
|
"profilereader.cpp",
|
||||||
"profilereader.h",
|
"profilereader.h",
|
||||||
"qmldebugginglibrary.cpp",
|
"qmldebugginglibrary.cpp",
|
||||||
@@ -112,6 +110,15 @@ QtcPlugin {
|
|||||||
"images/qt_qrc.png",
|
"images/qt_qrc.png",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Group {
|
||||||
|
condition: qtcore.versionMajor >= 5
|
||||||
|
files: [
|
||||||
|
"gettingstartedwelcomepage.cpp",
|
||||||
|
"gettingstartedwelcomepage.h"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Export {
|
Export {
|
||||||
Depends { name: "cpp" }
|
Depends { name: "cpp" }
|
||||||
cpp.includePaths: "../../shared"
|
cpp.includePaths: "../../shared"
|
||||||
|
|||||||
@@ -38,8 +38,6 @@
|
|||||||
|
|
||||||
#include "profilereader.h"
|
#include "profilereader.h"
|
||||||
|
|
||||||
#include "gettingstartedwelcomepage.h"
|
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/mimedatabase.h>
|
#include <coreplugin/mimedatabase.h>
|
||||||
#include <coreplugin/variablemanager.h>
|
#include <coreplugin/variablemanager.h>
|
||||||
@@ -47,6 +45,10 @@
|
|||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
|
#include "gettingstartedwelcomepage.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
|
||||||
static const char kHostBins[] = "CurrentProject:QT_HOST_BINS";
|
static const char kHostBins[] = "CurrentProject:QT_HOST_BINS";
|
||||||
@@ -75,18 +77,16 @@ bool QtSupportPlugin::initialize(const QStringList &arguments, QString *errorMes
|
|||||||
|
|
||||||
addAutoReleasedObject(new QtOptionsPage);
|
addAutoReleasedObject(new QtOptionsPage);
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||||
ExamplesWelcomePage *welcomePage;
|
ExamplesWelcomePage *welcomePage;
|
||||||
welcomePage = new ExamplesWelcomePage;
|
welcomePage = new ExamplesWelcomePage;
|
||||||
addAutoReleasedObject(welcomePage);
|
addAutoReleasedObject(welcomePage);
|
||||||
|
|
||||||
welcomePage = new ExamplesWelcomePage;
|
|
||||||
welcomePage->setShowExamples(true);
|
welcomePage->setShowExamples(true);
|
||||||
addAutoReleasedObject(welcomePage);
|
|
||||||
|
|
||||||
GettingStartedWelcomePage *gettingStartedWelcomePage = new GettingStartedWelcomePage;
|
GettingStartedWelcomePage *gettingStartedWelcomePage = new GettingStartedWelcomePage;
|
||||||
addAutoReleasedObject(gettingStartedWelcomePage);
|
addAutoReleasedObject(gettingStartedWelcomePage);
|
||||||
|
|
||||||
addAutoReleasedObject(new CustomExecutableRunConfigurationFactory);
|
addAutoReleasedObject(new CustomExecutableRunConfigurationFactory);
|
||||||
|
#endif
|
||||||
|
|
||||||
ProjectExplorer::KitManager::registerKitInformation(new QtKitInformation);
|
ProjectExplorer::KitManager::registerKitInformation(new QtKitInformation);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
QT += network declarative
|
QT += network quick
|
||||||
|
|
||||||
include(../../qtcreatorplugin.pri)
|
include(../../qtcreatorplugin.pri)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import "../QtcPlugin.qbs" as QtcPlugin
|
|||||||
QtcPlugin {
|
QtcPlugin {
|
||||||
name: "Welcome"
|
name: "Welcome"
|
||||||
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets", "network", "declarative"] }
|
Depends { name: "Qt"; submodules: ["widgets", "network", "quick"] }
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
Depends { name: "ProjectExplorer" }
|
Depends { name: "ProjectExplorer" }
|
||||||
|
|
||||||
|
|||||||
@@ -61,10 +61,10 @@
|
|||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
|
|
||||||
#include <QDeclarativeView>
|
#include <QtQuick/QQuickView>
|
||||||
#include <QDeclarativeContext>
|
#include <QtQml/QQmlContext>
|
||||||
#include <QDeclarativeEngine>
|
#include <QtQml/QQmlEngine>
|
||||||
#include <QDeclarativeNetworkAccessManagerFactory>
|
#include <QtQml/QQmlNetworkAccessManagerFactory>
|
||||||
|
|
||||||
enum { debug = 0 };
|
enum { debug = 0 };
|
||||||
|
|
||||||
@@ -76,10 +76,10 @@ static const char currentPageSettingsKeyC[] = "WelcomeTab";
|
|||||||
namespace Welcome {
|
namespace Welcome {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory
|
class NetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NetworkAccessManagerFactory(): QDeclarativeNetworkAccessManagerFactory() {}
|
NetworkAccessManagerFactory(): QQmlNetworkAccessManagerFactory() {}
|
||||||
QNetworkAccessManager* create(QObject *parent) { return new Utils::NetworkAccessManager(parent); }
|
QNetworkAccessManager* create(QObject *parent) { return new Utils::NetworkAccessManager(parent); }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ public:
|
|||||||
|
|
||||||
Q_SCRIPTABLE QString platform() const;
|
Q_SCRIPTABLE QString platform() const;
|
||||||
|
|
||||||
bool eventFilter(QObject *, QEvent *);
|
// bool eventFilter(QObject *, QEvent *);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setActivePlugin(int pos)
|
void setActivePlugin(int pos)
|
||||||
@@ -121,10 +121,10 @@ private slots:
|
|||||||
void welcomePluginAdded(QObject*);
|
void welcomePluginAdded(QObject*);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void facilitateQml(QDeclarativeEngine *engine);
|
void facilitateQml(QQmlEngine *engine);
|
||||||
|
|
||||||
QWidget *m_modeWidget;
|
QWidget *m_modeWidget;
|
||||||
QDeclarativeView *m_welcomePage;
|
QQuickView *m_welcomePage;
|
||||||
QList<QObject*> m_pluginList;
|
QList<QObject*> m_pluginList;
|
||||||
int m_activePlugin;
|
int m_activePlugin;
|
||||||
NetworkAccessManagerFactory *m_networkAccessManagerFactory;
|
NetworkAccessManagerFactory *m_networkAccessManagerFactory;
|
||||||
@@ -146,40 +146,46 @@ WelcomeMode::WelcomeMode() :
|
|||||||
setContextHelpId(QLatin1String("Qt Creator Manual"));
|
setContextHelpId(QLatin1String("Qt Creator Manual"));
|
||||||
setContext(Core::Context(Core::Constants::C_WELCOME_MODE));
|
setContext(Core::Context(Core::Constants::C_WELCOME_MODE));
|
||||||
|
|
||||||
m_welcomePage = new QDeclarativeView;
|
m_welcomePage = new QQuickView;
|
||||||
m_welcomePage->setResizeMode(QDeclarativeView::SizeRootObjectToView);
|
m_welcomePage->setResizeMode(QQuickView::SizeRootObjectToView);
|
||||||
// filter to forward dragEnter events
|
|
||||||
m_welcomePage->installEventFilter(this);
|
// filter to forward dragEnter events
|
||||||
m_welcomePage->viewport()->installEventFilter(this);
|
// m_welcomePage->installEventFilter(this);
|
||||||
|
// m_welcomePage->viewport()->installEventFilter(this);
|
||||||
|
|
||||||
m_modeWidget = new QWidget;
|
m_modeWidget = new QWidget;
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
layout->setMargin(0);
|
layout->setMargin(0);
|
||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
m_modeWidget->setLayout(layout);
|
|
||||||
|
|
||||||
Utils::StyledBar* styledBar = new Utils::StyledBar(m_modeWidget);
|
Utils::StyledBar* styledBar = new Utils::StyledBar(m_modeWidget);
|
||||||
layout->addWidget(styledBar);
|
layout->addWidget(styledBar);
|
||||||
QScrollArea *scrollArea = new QScrollArea(m_modeWidget);
|
|
||||||
scrollArea->setFrameShape(QFrame::NoFrame);
|
// QScrollArea *scrollArea = new QScrollArea(m_modeWidget);
|
||||||
layout->addWidget(scrollArea);
|
// scrollArea->setFrameShape(QFrame::NoFrame);
|
||||||
scrollArea->setWidget(m_welcomePage);
|
// layout->addWidget(scrollArea);
|
||||||
scrollArea->setWidgetResizable(true);
|
// scrollArea->setWidget(m_welcomePage);
|
||||||
|
// scrollArea->setWidgetResizable(true);
|
||||||
|
|
||||||
m_welcomePage->setMinimumWidth(880);
|
m_welcomePage->setMinimumWidth(880);
|
||||||
m_welcomePage->setMinimumHeight(548);
|
m_welcomePage->setMinimumHeight(548);
|
||||||
|
QWidget *container = QWidget::createWindowContainer(m_welcomePage, m_modeWidget);
|
||||||
|
layout->addWidget(container);
|
||||||
|
m_modeWidget->setLayout(layout);
|
||||||
|
|
||||||
connect(PluginManager::instance(), SIGNAL(objectAdded(QObject*)), SLOT(welcomePluginAdded(QObject*)));
|
connect(PluginManager::instance(), SIGNAL(objectAdded(QObject*)), SLOT(welcomePluginAdded(QObject*)));
|
||||||
|
|
||||||
setWidget(m_modeWidget);
|
setWidget(m_modeWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WelcomeMode::eventFilter(QObject *, QEvent *e)
|
//bool WelcomeMode::eventFilter(QObject *, QEvent *e)
|
||||||
{
|
//{
|
||||||
if (e->type() == QEvent::DragEnter) {
|
// if (e->type() == QEvent::DragEnter) {
|
||||||
e->ignore();
|
// e->ignore();
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
return false;
|
// return false;
|
||||||
}
|
//}
|
||||||
|
|
||||||
WelcomeMode::~WelcomeMode()
|
WelcomeMode::~WelcomeMode()
|
||||||
{
|
{
|
||||||
@@ -194,7 +200,7 @@ bool sortFunction(Utils::IWelcomePage * a, Utils::IWelcomePage *b)
|
|||||||
return a->priority() < b->priority();
|
return a->priority() < b->priority();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WelcomeMode::facilitateQml(QDeclarativeEngine * /*engine*/)
|
void WelcomeMode::facilitateQml(QQmlEngine * /*engine*/)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,7 +233,7 @@ void WelcomeMode::initPlugins()
|
|||||||
if (activePlugin() > 1)
|
if (activePlugin() > 1)
|
||||||
setActivePlugin(1);
|
setActivePlugin(1);
|
||||||
|
|
||||||
QDeclarativeContext *ctx = m_welcomePage->rootContext();
|
QQmlContext *ctx = m_welcomePage->rootContext();
|
||||||
ctx->setContextProperty(QLatin1String("welcomeMode"), this);
|
ctx->setContextProperty(QLatin1String("welcomeMode"), this);
|
||||||
|
|
||||||
QList<Utils::IWelcomePage*> duplicatePlugins = PluginManager::getObjects<Utils::IWelcomePage>();
|
QList<Utils::IWelcomePage*> duplicatePlugins = PluginManager::getObjects<Utils::IWelcomePage>();
|
||||||
@@ -255,7 +261,7 @@ void WelcomeMode::initPlugins()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QDeclarativeEngine *engine = m_welcomePage->engine();
|
QQmlEngine *engine = m_welcomePage->engine();
|
||||||
QStringList importPathList = engine->importPathList();
|
QStringList importPathList = engine->importPathList();
|
||||||
importPathList << resourcePath() + QLatin1String("/welcomescreen");
|
importPathList << resourcePath() + QLatin1String("/welcomescreen");
|
||||||
engine->setImportPathList(importPathList);
|
engine->setImportPathList(importPathList);
|
||||||
@@ -322,7 +328,7 @@ void WelcomeMode::welcomePluginAdded(QObject *obj)
|
|||||||
}
|
}
|
||||||
m_pluginList.insert(insertPos, plugin);
|
m_pluginList.insert(insertPos, plugin);
|
||||||
// update model through reset
|
// update model through reset
|
||||||
QDeclarativeContext *ctx = m_welcomePage->rootContext();
|
QQmlContext *ctx = m_welcomePage->rootContext();
|
||||||
ctx->setContextProperty(QLatin1String("pagesModel"), QVariant::fromValue(m_pluginList));
|
ctx->setContextProperty(QLatin1String("pagesModel"), QVariant::fromValue(m_pluginList));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QDeclarativeEngine;
|
class QQmlEngine;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Welcome {
|
namespace Welcome {
|
||||||
|
|||||||
Reference in New Issue
Block a user