welcomescreen.qml 3.65 KB
Newer Older
Eike Ziller's avatar
Eike Ziller committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.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 info@qt.nokia.com.
**
**************************************************************************/

33
import QtQuick 1.0
34
import "widgets"
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
35
import components 1.0 as Components
36

37
Rectangle {
38
    id: root
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
39
40
    smooth: true
    color: "white"
41
42
43
44
45
46
    // 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

Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
47
48
49
50
51
52
53
54
    BorderImage {
        id: inner_background
        Image {
            id: header;
            source: "qrc:welcome/images/center_frame_header.png";
            anchors.verticalCenter: parent.verticalCenter;
            anchors.horizontalCenter: parent.horizontalCenter;
            anchors.topMargin: 2
55
        }
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
56
57
58
59
60
61
62
63
64
        anchors.top: root.top
        source: "qrc:welcome/images/background_center_frame_v2.png"
        width: parent.width
        height: 60
        border.right: 2
        border.left: 2
        border.top: 2
        border.bottom: 10
    }
65

Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
66
67
68
69
70
71
72
73
74
75
76
    LinksBar {
        id: navigationAndDevLinks
        property alias current: root.current
        anchors.top: inner_background.bottom
        anchors.left: parent.left
        anchors.bottomMargin: 4
        anchors.topMargin: -2
        width: parent.width
        model: tabs.model
        tabBarWidth: width
    }
77

Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
78
79
80
81
82
83
84
85
86
87
88
89
90
    Rectangle {
        color:"#eee"
        id: news
        opacity: 0.7
        anchors.top: navigationAndDevLinks.bottom
        anchors.bottom: feedback.top
        anchors.left: parent.left
        width: 270
        FeaturedAndNewsListing {
            anchors.fill: parent
        }
        Rectangle{
            anchors.right: parent.right
con's avatar
con committed
91
92
            anchors.top: parent.top
            anchors.bottom: parent.bottom
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
93
94
95
96
            width:1
            color: "#aaa"
        }
        Rectangle{
con's avatar
con committed
97
            anchors.right: parent.right
Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
98
99
100
101
102
            anchors.top: parent.top
            anchors.bottom: parent.bottom
            anchors.rightMargin: 1
            width:1
            color: "white"
con's avatar
con committed
103
        }
104
105
    }

Jens Bache-Wiig's avatar
Jens Bache-Wiig committed
106
107
108
109
110
111
112
113
114
115
116
117
118
    TabWidget {
        id: tabs
        property int current: root.current
        model: pagesModel
        anchors.top: navigationAndDevLinks.bottom
        anchors.bottom: feedback.top
        anchors.left: news.right
        anchors.right: parent.right
        anchors.leftMargin: 0
        anchors.rightMargin: 0
        anchors.margins: 4
    }

119
120
121
122
123
124
125
    Feedback {
        id: feedback
        anchors.bottom: parent.bottom
        width: parent.width
    }

}