1 /****************************************************************************
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 ** This file is part of the QtDeclarative module of the Qt Toolkit.
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** No Commercial Usage
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
16 ** GNU Lesser General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU Lesser
18 ** General Public License version 2.1 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.LGPL included in the
20 ** packaging of this file. Please review the following information to
21 ** ensure the GNU Lesser General Public License version 2.1 requirements
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 ** In addition, as a special exception, Nokia gives you certain additional
25 ** rights. These rights are described in the Nokia Qt LGPL Exception
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
40 ****************************************************************************/
47 property alias editUrl: urlInput.url
48 property bool urlChanged: false
50 source: "pics/titlebar-bg.png"; fillMode: Image.TileHorizontally
52 x: webView.contentX < 0 ? -webView.contentX : webView.contentX > webView.contentWidth-webView.width
53 ? -webView.contentX+webView.contentWidth-webView.width : 0
55 if (webView.progress < 1.0)
58 webView.contentY < 0 ? -webView.contentY : webView.contentY > height ? -height : -webView.contentY
65 width: parent.width; height: 20
67 anchors.centerIn: parent
68 text: webView.title; font.pixelSize: 14; font.bold: true
69 color: "white"; styleColor: "black"; style: Text.Sunken
74 width: parent.width; height: 40
78 action: webView.back; image: "pics/go-previous-view.png"
79 anchors { left: parent.left; bottom: parent.bottom }
84 anchors.left: backButton.right
85 action: webView.forward; image: "pics/go-next-view.png"
90 anchors { left: nextButton.right; right: reloadButton.left }
91 image: "pics/display.png"
93 webBrowser.urlString = url
94 webBrowser.focus = true
95 header.urlChanged = false
97 onUrlChanged: header.urlChanged = true
102 anchors { right: quitButton.left; rightMargin: 10 }
103 action: webView.reload; image: "pics/view-refresh.png"
104 visible: webView.progress == 1.0 && !header.urlChanged
110 anchors.right: parent.right
111 anchors.top: parent.top
112 anchors.bottom: parent.bottom
113 verticalAlignment: Text.AlignVCenter
114 horizontalAlignment: Text.AlignHCenter
125 height: parent.height-10
126 anchors.right: parent.left
133 anchors { right: quitButton.left; rightMargin: 10 }
134 action: webView.stop; image: "pics/edit-delete.png"
135 visible: webView.progress < 1.0 && !header.urlChanged
140 anchors { right: parent.right; rightMargin: 4 }
142 webBrowser.urlString = urlInput.url
143 webBrowser.focus = true
144 header.urlChanged = false
146 image: "pics/go-jump-locationbar.png"; visible: header.urlChanged