From 56d34a653a7ec4265835a7cb9b6352696f802e31 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 31 May 2011 16:15:30 +1000 Subject: Remove webbrowser demo from qtdeclarative module. qtdeclarative should not depend on webkit. Change-Id: I82e3f49dbe710e408c1a74911787541a9ea9efa1 --- examples/declarative/demos/webbrowser/main.cpp | 14 -- .../demos/webbrowser/qml/content/Button.qml | 65 ------- .../webbrowser/qml/content/FlickableWebView.qml | 195 --------------------- .../demos/webbrowser/qml/content/Header.qml | 150 ---------------- .../demos/webbrowser/qml/content/ScrollBar.qml | 107 ----------- .../demos/webbrowser/qml/content/UrlInput.qml | 96 ---------- .../demos/webbrowser/qml/content/pics/display.png | Bin 998 -> 0 bytes .../webbrowser/qml/content/pics/edit-delete.png | Bin 831 -> 0 bytes .../qml/content/pics/go-jump-locationbar.png | Bin 408 -> 0 bytes .../webbrowser/qml/content/pics/go-next-view.png | Bin 1310 -> 0 bytes .../qml/content/pics/go-previous-view.png | Bin 1080 -> 0 bytes .../webbrowser/qml/content/pics/scrollbar.png | Bin 161 -> 0 bytes .../webbrowser/qml/content/pics/titlebar-bg.png | Bin 213 -> 0 bytes .../webbrowser/qml/content/pics/view-refresh.png | Bin 2182 -> 0 bytes .../demos/webbrowser/qml/webbrowser.qml | 79 --------- .../demos/webbrowser/qml/webbrowser.qmlproject | 16 -- .../qmlapplicationviewer/qmlapplicationviewer.cpp | 157 ----------------- .../qmlapplicationviewer/qmlapplicationviewer.h | 39 ----- .../qmlapplicationviewer/qmlapplicationviewer.pri | 154 ---------------- .../demos/webbrowser/webbrowser.desktop | 11 -- .../declarative/demos/webbrowser/webbrowser.png | Bin 3400 -> 0 bytes .../declarative/demos/webbrowser/webbrowser.pro | 39 ----- .../declarative/demos/webbrowser/webbrowser.svg | 93 ---------- 23 files changed, 1215 deletions(-) delete mode 100644 examples/declarative/demos/webbrowser/main.cpp delete mode 100644 examples/declarative/demos/webbrowser/qml/content/Button.qml delete mode 100644 examples/declarative/demos/webbrowser/qml/content/FlickableWebView.qml delete mode 100644 examples/declarative/demos/webbrowser/qml/content/Header.qml delete mode 100644 examples/declarative/demos/webbrowser/qml/content/ScrollBar.qml delete mode 100644 examples/declarative/demos/webbrowser/qml/content/UrlInput.qml delete mode 100644 examples/declarative/demos/webbrowser/qml/content/pics/display.png delete mode 100644 examples/declarative/demos/webbrowser/qml/content/pics/edit-delete.png delete mode 100644 examples/declarative/demos/webbrowser/qml/content/pics/go-jump-locationbar.png delete mode 100644 examples/declarative/demos/webbrowser/qml/content/pics/go-next-view.png delete mode 100644 examples/declarative/demos/webbrowser/qml/content/pics/go-previous-view.png delete mode 100644 examples/declarative/demos/webbrowser/qml/content/pics/scrollbar.png delete mode 100644 examples/declarative/demos/webbrowser/qml/content/pics/titlebar-bg.png delete mode 100644 examples/declarative/demos/webbrowser/qml/content/pics/view-refresh.png delete mode 100644 examples/declarative/demos/webbrowser/qml/webbrowser.qml delete mode 100644 examples/declarative/demos/webbrowser/qml/webbrowser.qmlproject delete mode 100644 examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.cpp delete mode 100644 examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.h delete mode 100644 examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.pri delete mode 100644 examples/declarative/demos/webbrowser/webbrowser.desktop delete mode 100644 examples/declarative/demos/webbrowser/webbrowser.png delete mode 100644 examples/declarative/demos/webbrowser/webbrowser.pro delete mode 100644 examples/declarative/demos/webbrowser/webbrowser.svg (limited to 'examples') diff --git a/examples/declarative/demos/webbrowser/main.cpp b/examples/declarative/demos/webbrowser/main.cpp deleted file mode 100644 index cd086114a5..0000000000 --- a/examples/declarative/demos/webbrowser/main.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include "qmlapplicationviewer.h" - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - QmlApplicationViewer viewer; - viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait); - viewer.setMainQmlFile(QLatin1String("qml/qml/webbrowser.qml")); - viewer.showExpanded(); - - return app.exec(); -} diff --git a/examples/declarative/demos/webbrowser/qml/content/Button.qml b/examples/declarative/demos/webbrowser/qml/content/Button.qml deleted file mode 100644 index 0d7475e5fb..0000000000 --- a/examples/declarative/demos/webbrowser/qml/content/Button.qml +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** 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. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 - -Item { - property alias image: icon.source - property variant action - - signal clicked - - width: 40; height: parent.height - - Image { - id: icon; anchors.centerIn: parent - opacity: if (action != undefined) { action.enabled ? 1.0 : 0.4 } else 1 - } - - MouseArea { - anchors { fill: parent; topMargin: -10; bottomMargin: -10 } - onClicked: { - if (action != undefined) - action.trigger() - parent.clicked() - } - } -} diff --git a/examples/declarative/demos/webbrowser/qml/content/FlickableWebView.qml b/examples/declarative/demos/webbrowser/qml/content/FlickableWebView.qml deleted file mode 100644 index 1bdb1bffe0..0000000000 --- a/examples/declarative/demos/webbrowser/qml/content/FlickableWebView.qml +++ /dev/null @@ -1,195 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** 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. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 -import QtWebKit 1.0 - -Flickable { - property alias title: webView.title - property alias icon: webView.icon - property alias progress: webView.progress - property alias url: webView.url - property alias back: webView.back - property alias stop: webView.stop - property alias reload: webView.reload - property alias forward: webView.forward - - id: flickable - width: parent.width - contentWidth: Math.max(parent.width,webView.width) - contentHeight: Math.max(parent.height,webView.height) - anchors.top: headerSpace.bottom - anchors.bottom: parent.top - anchors.left: parent.left - anchors.right: parent.right - pressDelay: 200 - - onWidthChanged : { - // Expand (but not above 1:1) if otherwise would be smaller that available width. - if (width > webView.width*webView.contentsScale && webView.contentsScale < 1.0) - webView.contentsScale = width / webView.width * webView.contentsScale; - } - - WebView { - id: webView - transformOrigin: Item.TopLeft - - function fixUrl(url) - { - if (url == "") return url - if (url[0] == "/") return "file://"+url - if (url.indexOf(":")<0) { - if (url.indexOf(".")<0 || url.indexOf(" ")>=0) { - // Fall back to a search engine; hard-code Wikipedia - return "http://en.wikipedia.org/w/index.php?search="+url - } else { - return "http://"+url - } - } - return url - } - - url: fixUrl(webBrowser.urlString) - smooth: false // We don't want smooth scaling, since we only scale during (fast) transitions - focus: true - - onAlert: console.log(message) - - function doZoom(zoom,centerX,centerY) - { - if (centerX) { - var sc = zoom*contentsScale; - scaleAnim.to = sc; - flickVX.from = flickable.contentX - flickVX.to = Math.max(0,Math.min(centerX-flickable.width/2,webView.width*sc-flickable.width)) - finalX.value = flickVX.to - flickVY.from = flickable.contentY - flickVY.to = Math.max(0,Math.min(centerY-flickable.height/2,webView.height*sc-flickable.height)) - finalY.value = flickVY.to - quickZoom.start() - } - } - - Keys.onLeftPressed: webView.contentsScale -= 0.1 - Keys.onRightPressed: webView.contentsScale += 0.1 - - preferredWidth: flickable.width - preferredHeight: flickable.height - contentsScale: 1 - onContentsSizeChanged: { - // zoom out - contentsScale = Math.min(1,flickable.width / contentsSize.width) - } - onUrlChanged: { - // got to topleft - flickable.contentX = 0 - flickable.contentY = 0 - if (url != null) { header.editUrl = url.toString(); } - } - onDoubleClick: { - if (!heuristicZoom(clickX,clickY,2.5)) { - var zf = flickable.width / contentsSize.width - if (zf >= contentsScale) - zf = 2.0/zoomFactor // zoom in (else zooming out) - doZoom(zf,clickX*zf,clickY*zf) - } - } - - SequentialAnimation { - id: quickZoom - - PropertyAction { - target: webView - property: "renderingEnabled" - value: false - } - ParallelAnimation { - NumberAnimation { - id: scaleAnim - target: webView - property: "contentsScale" - // the to property is set before calling - easing.type: Easing.Linear - duration: 200 - } - NumberAnimation { - id: flickVX - target: flickable - property: "contentX" - easing.type: Easing.Linear - duration: 200 - from: 0 // set before calling - to: 0 // set before calling - } - NumberAnimation { - id: flickVY - target: flickable - property: "contentY" - easing.type: Easing.Linear - duration: 200 - from: 0 // set before calling - to: 0 // set before calling - } - } - // Have to set the contentXY, since the above 2 - // size changes may have started a correction if - // contentsScale < 1.0. - PropertyAction { - id: finalX - target: flickable - property: "contentX" - value: 0 // set before calling - } - PropertyAction { - id: finalY - target: flickable - property: "contentY" - value: 0 // set before calling - } - PropertyAction { - target: webView - property: "renderingEnabled" - value: true - } - } - onZoomTo: doZoom(zoom,centerX,centerY) - } -} diff --git a/examples/declarative/demos/webbrowser/qml/content/Header.qml b/examples/declarative/demos/webbrowser/qml/content/Header.qml deleted file mode 100644 index 7fd85b6f62..0000000000 --- a/examples/declarative/demos/webbrowser/qml/content/Header.qml +++ /dev/null @@ -1,150 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** 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. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 - -Image { - id: header - - property alias editUrl: urlInput.url - property bool urlChanged: false - - source: "pics/titlebar-bg.png"; fillMode: Image.TileHorizontally - - x: webView.contentX < 0 ? -webView.contentX : webView.contentX > webView.contentWidth-webView.width - ? -webView.contentX+webView.contentWidth-webView.width : 0 - y: { - if (webView.progress < 1.0) - return 0; - else { - webView.contentY < 0 ? -webView.contentY : webView.contentY > height ? -height : -webView.contentY - } - } - Column { - width: parent.width - - Item { - width: parent.width; height: 20 - Text { - anchors.centerIn: parent - text: webView.title; font.pixelSize: 14; font.bold: true - color: "white"; styleColor: "black"; style: Text.Sunken - } - } - - Item { - width: parent.width; height: 40 - - Button { - id: backButton - action: webView.back; image: "pics/go-previous-view.png" - anchors { left: parent.left; bottom: parent.bottom } - } - - Button { - id: nextButton - anchors.left: backButton.right - action: webView.forward; image: "pics/go-next-view.png" - } - - UrlInput { - id: urlInput - anchors { left: nextButton.right; right: reloadButton.left } - image: "pics/display.png" - onUrlEntered: { - webBrowser.urlString = url - webBrowser.focus = true - header.urlChanged = false - } - onUrlChanged: header.urlChanged = true - } - - Button { - id: reloadButton - anchors { right: quitButton.left; rightMargin: 10 } - action: webView.reload; image: "pics/view-refresh.png" - visible: webView.progress == 1.0 && !header.urlChanged - } - Text { - id: quitButton - color: "white" - style: Text.Sunken - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - font.pixelSize: 18 - width: 60 - text: "Quit" - MouseArea { - anchors.fill: parent - onClicked: Qt.quit() - } - Rectangle { - width: 1 - y: 5 - height: parent.height-10 - anchors.right: parent.left - color: "darkgray" - } - } - - Button { - id: stopButton - anchors { right: quitButton.left; rightMargin: 10 } - action: webView.stop; image: "pics/edit-delete.png" - visible: webView.progress < 1.0 && !header.urlChanged - } - - Button { - id: goButton - anchors { right: parent.right; rightMargin: 4 } - onClicked: { - webBrowser.urlString = urlInput.url - webBrowser.focus = true - header.urlChanged = false - } - image: "pics/go-jump-locationbar.png"; visible: header.urlChanged - } - } - } -} diff --git a/examples/declarative/demos/webbrowser/qml/content/ScrollBar.qml b/examples/declarative/demos/webbrowser/qml/content/ScrollBar.qml deleted file mode 100644 index 7db0d94afc..0000000000 --- a/examples/declarative/demos/webbrowser/qml/content/ScrollBar.qml +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** 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. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 - -Item { - id: container - - property variant scrollArea - property variant orientation: Qt.Vertical - - opacity: 0 - - function position() - { - var ny = 0; - if (container.orientation == Qt.Vertical) - ny = scrollArea.visibleArea.yPosition * container.height; - else - ny = scrollArea.visibleArea.xPosition * container.width; - if (ny > 2) return ny; else return 2; - } - - function size() - { - var nh, ny; - - if (container.orientation == Qt.Vertical) - nh = scrollArea.visibleArea.heightRatio * container.height; - else - nh = scrollArea.visibleArea.widthRatio * container.width; - - if (container.orientation == Qt.Vertical) - ny = scrollArea.visibleArea.yPosition * container.height; - else - ny = scrollArea.visibleArea.xPosition * container.width; - - if (ny > 3) { - var t; - if (container.orientation == Qt.Vertical) - t = Math.ceil(container.height - 3 - ny); - else - t = Math.ceil(container.width - 3 - ny); - if (nh > t) return t; else return nh; - } else return nh + ny; - } - - Rectangle { anchors.fill: parent; color: "Black"; opacity: 0.5 } - - BorderImage { - source: "pics/scrollbar.png" - border { left: 1; right: 1; top: 1; bottom: 1 } - x: container.orientation == Qt.Vertical ? 2 : position() - width: container.orientation == Qt.Vertical ? container.width - 4 : size() - y: container.orientation == Qt.Vertical ? position() : 2 - height: container.orientation == Qt.Vertical ? size() : container.height - 4 - } - - states: State { - name: "visible" - when: container.orientation == Qt.Vertical ? scrollArea.movingVertically : scrollArea.movingHorizontally - PropertyChanges { target: container; opacity: 1.0 } - } - - transitions: Transition { - from: "visible"; to: "" - NumberAnimation { properties: "opacity"; duration: 600 } - } -} diff --git a/examples/declarative/demos/webbrowser/qml/content/UrlInput.qml b/examples/declarative/demos/webbrowser/qml/content/UrlInput.qml deleted file mode 100644 index 7c2448fba3..0000000000 --- a/examples/declarative/demos/webbrowser/qml/content/UrlInput.qml +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** 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. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 - -Item { - id: container - - property alias image: bg.source - property alias url: urlText.text - - signal urlEntered(string url) - signal urlChanged - - width: parent.height; height: parent.height - - BorderImage { - id: bg; rotation: 180 - x: 8; width: parent.width - 16; height: 30; - anchors.verticalCenter: parent.verticalCenter - border { left: 10; top: 10; right: 10; bottom: 10 } - } - - Rectangle { - anchors.bottom: bg.bottom - x: 18; height: 4; color: "#63b1ed" - width: (bg.width - 20) * webView.progress - opacity: webView.progress == 1.0 ? 0.0 : 1.0 - } - - TextInput { - id: urlText - horizontalAlignment: TextEdit.AlignLeft - font.pixelSize: 14; - - onTextChanged: container.urlChanged() - - Keys.onEscapePressed: { - urlText.text = webView.url - webView.focus = true - } - - Keys.onEnterPressed: { - container.urlEntered(urlText.text) - webView.focus = true - } - - Keys.onReturnPressed: { - container.urlEntered(urlText.text) - webView.focus = true - } - - anchors { - left: parent.left; right: parent.right; leftMargin: 18; rightMargin: 18 - verticalCenter: parent.verticalCenter - } - } -} diff --git a/examples/declarative/demos/webbrowser/qml/content/pics/display.png b/examples/declarative/demos/webbrowser/qml/content/pics/display.png deleted file mode 100644 index 9507f4382e..0000000000 Binary files a/examples/declarative/demos/webbrowser/qml/content/pics/display.png and /dev/null differ diff --git a/examples/declarative/demos/webbrowser/qml/content/pics/edit-delete.png b/examples/declarative/demos/webbrowser/qml/content/pics/edit-delete.png deleted file mode 100644 index df2a147d24..0000000000 Binary files a/examples/declarative/demos/webbrowser/qml/content/pics/edit-delete.png and /dev/null differ diff --git a/examples/declarative/demos/webbrowser/qml/content/pics/go-jump-locationbar.png b/examples/declarative/demos/webbrowser/qml/content/pics/go-jump-locationbar.png deleted file mode 100644 index 61f779ce2b..0000000000 Binary files a/examples/declarative/demos/webbrowser/qml/content/pics/go-jump-locationbar.png and /dev/null differ diff --git a/examples/declarative/demos/webbrowser/qml/content/pics/go-next-view.png b/examples/declarative/demos/webbrowser/qml/content/pics/go-next-view.png deleted file mode 100644 index a585cab80c..0000000000 Binary files a/examples/declarative/demos/webbrowser/qml/content/pics/go-next-view.png and /dev/null differ diff --git a/examples/declarative/demos/webbrowser/qml/content/pics/go-previous-view.png b/examples/declarative/demos/webbrowser/qml/content/pics/go-previous-view.png deleted file mode 100644 index 612fb34dce..0000000000 Binary files a/examples/declarative/demos/webbrowser/qml/content/pics/go-previous-view.png and /dev/null differ diff --git a/examples/declarative/demos/webbrowser/qml/content/pics/scrollbar.png b/examples/declarative/demos/webbrowser/qml/content/pics/scrollbar.png deleted file mode 100644 index 0228dcf9eb..0000000000 Binary files a/examples/declarative/demos/webbrowser/qml/content/pics/scrollbar.png and /dev/null differ diff --git a/examples/declarative/demos/webbrowser/qml/content/pics/titlebar-bg.png b/examples/declarative/demos/webbrowser/qml/content/pics/titlebar-bg.png deleted file mode 100644 index 06961e8d84..0000000000 Binary files a/examples/declarative/demos/webbrowser/qml/content/pics/titlebar-bg.png and /dev/null differ diff --git a/examples/declarative/demos/webbrowser/qml/content/pics/view-refresh.png b/examples/declarative/demos/webbrowser/qml/content/pics/view-refresh.png deleted file mode 100644 index afa2a9d774..0000000000 Binary files a/examples/declarative/demos/webbrowser/qml/content/pics/view-refresh.png and /dev/null differ diff --git a/examples/declarative/demos/webbrowser/qml/webbrowser.qml b/examples/declarative/demos/webbrowser/qml/webbrowser.qml deleted file mode 100644 index b10b13c623..0000000000 --- a/examples/declarative/demos/webbrowser/qml/webbrowser.qml +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** 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. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 -import QtWebKit 1.0 - -import "content" - -Rectangle { - id: webBrowser - - property string urlString : "http://www.nokia.com/" - - width: 800; height: 600 - color: "#343434" - - FlickableWebView { - id: webView - url: webBrowser.urlString - onProgressChanged: header.urlChanged = false - anchors { top: headerSpace.bottom; left: parent.left; right: parent.right; bottom: parent.bottom } - } - - Item { id: headerSpace; width: parent.width; height: 62 } - - Header { - id: header - editUrl: webBrowser.urlString - width: headerSpace.width; height: headerSpace.height - } - - ScrollBar { - scrollArea: webView; width: 8 - anchors { right: parent.right; top: header.bottom; bottom: parent.bottom } - } - - ScrollBar { - scrollArea: webView; height: 8; orientation: Qt.Horizontal - anchors { right: parent.right; rightMargin: 8; left: parent.left; bottom: parent.bottom } - } -} diff --git a/examples/declarative/demos/webbrowser/qml/webbrowser.qmlproject b/examples/declarative/demos/webbrowser/qml/webbrowser.qmlproject deleted file mode 100644 index d4909f8685..0000000000 --- a/examples/declarative/demos/webbrowser/qml/webbrowser.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -import QmlProject 1.0 - -Project { - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ " ../exampleplugin " ] -} diff --git a/examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 11bedd1914..0000000000 --- a/examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,157 +0,0 @@ -// checksum 0x28c7 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#include "qmlapplicationviewer.h" - -#include -#include -#include -#include -#include -#include - -#if defined(QMLJSDEBUGGER) -#include -#endif - -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) -#include -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) -#include -#endif - -#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK) -#include -#include -#include -#include -#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK - -#if defined(QMLJSDEBUGGER) - -// Enable debugging before any QDeclarativeEngine is created -struct QmlJsDebuggingEnabler -{ - QmlJsDebuggingEnabler() - { - QDeclarativeDebugHelper::enableDebugging(); - } -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -static QmlJsDebuggingEnabler enableDebuggingHelper; - -#endif // QMLJSDEBUGGER - -class QmlApplicationViewerPrivate -{ - QString mainQmlFile; - friend class QmlApplicationViewer; - static QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - const QString pathInShareDir = QCoreApplication::applicationDirPath() - + QLatin1String("/../share/") - + QFileInfo(QCoreApplication::applicationFilePath()).fileName() - + QLatin1Char('/') + path; - if (QFileInfo(pathInShareDir).exists()) - return pathInShareDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) : - QDeclarativeView(parent), - m_d(new QmlApplicationViewerPrivate) -{ - connect(engine(), SIGNAL(quit()), SLOT(close())); - setResizeMode(QDeclarativeView::SizeRootObjectToView); -#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER) - new QmlJSDebugger::JSDebuggerAgent(engine()); -#endif -#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER) - new QmlJSDebugger::QDeclarativeViewObserver(this, parent); -#endif -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete m_d; -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); - setSource(QUrl::fromLocalFile(m_d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); -} - -void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) -{ -#ifdef Q_OS_SYMBIAN - if (orientation != ScreenOrientationAuto) { -#if defined(ORIENTATIONLOCK) - const CAknAppUiBase::TAppUiOrientation uiOrientation = - (orientation == ScreenOrientationLockPortrait) ? CAknAppUi::EAppUiOrientationPortrait - : CAknAppUi::EAppUiOrientationLandscape; - CAknAppUi* appUi = dynamic_cast (CEikonEnv::Static()->AppUi()); - TRAPD(error, - if (appUi) - appUi->SetOrientationL(uiOrientation); - ); - Q_UNUSED(error) -#else // ORIENTATIONLOCK - qWarning("'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."); -#endif // ORIENTATIONLOCK - } -#elif defined(Q_WS_MAEMO_5) - Qt::WidgetAttribute attribute; - switch (orientation) { - case ScreenOrientationLockPortrait: - attribute = Qt::WA_Maemo5PortraitOrientation; - break; - case ScreenOrientationLockLandscape: - attribute = Qt::WA_Maemo5LandscapeOrientation; - break; - case ScreenOrientationAuto: - default: - attribute = Qt::WA_Maemo5AutoOrientation; - break; - } - setAttribute(attribute, true); -#else // Q_OS_SYMBIAN - Q_UNUSED(orientation); -#endif // Q_OS_SYMBIAN -} - -void QmlApplicationViewer::showExpanded() -{ -#ifdef Q_OS_SYMBIAN - showFullScreen(); -#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) - showMaximized(); -#else - show(); -#endif -} diff --git a/examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.h b/examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index 143c17b802..0000000000 --- a/examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.h +++ /dev/null @@ -1,39 +0,0 @@ -// checksum 0x5a59 version 0x2000a -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include - -class QmlApplicationViewer : public QDeclarativeView -{ - Q_OBJECT - -public: - enum ScreenOrientation { - ScreenOrientationLockPortrait, - ScreenOrientationLockLandscape, - ScreenOrientationAuto - }; - - explicit QmlApplicationViewer(QWidget *parent = 0); - virtual ~QmlApplicationViewer(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - void setOrientation(ScreenOrientation orientation); - void showExpanded(); - -private: - class QmlApplicationViewerPrivate *m_d; -}; - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index 1c0c7edb39..0000000000 --- a/examples/declarative/demos/webbrowser/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,154 +0,0 @@ -# checksum 0x3dc8 version 0x2000a -# This file was generated by the Qt Quick Application wizard of Qt Creator. -# The code below adds the QmlApplicationViewer to the project and handles the -# activation of QML debugging. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -QT += declarative - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - -defineTest(minQtVersion) { - maj = $$1 - min = $$2 - patch = $$3 - isEqual(QT_MAJOR_VERSION, $$maj) { - isEqual(QT_MINOR_VERSION, $$min) { - isEqual(QT_PATCH_VERSION, $$patch) { - return(true) - } - greaterThan(QT_PATCH_VERSION, $$patch) { - return(true) - } - } - greaterThan(QT_MINOR_VERSION, $$min) { - return(true) - } - } - return(false) -} - -contains(DEFINES, QMLJSDEBUGGER) { - CONFIG(debug, debug|release) { - !minQtVersion(4, 7, 1) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("This library requires Qt 4.7.1 or newer.") - warning() - DEFINES -= QMLJSDEBUGGER - } else:isEmpty(QMLJSDEBUGGER_PATH) { - warning() - warning("Disabling QML debugging:") - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("Please specify its location on the qmake command line, eg") - warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") - warning() - DEFINES -= QMLJSDEBUGGER - } else { - include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) - } - } else { - DEFINES -= QMLJSDEBUGGER - } -} -# This file was generated by an application wizard of Qt Creator. -# The code below handles deployment to Symbian and Maemo, aswell as copying -# of the application data to shadow build directories on desktop. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -defineTest(qtcAddDeployment) { -for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemsources = $${item}.sources - $$itemsources = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath= $$eval($${deploymentfolder}.target) - export($$itemsources) - export($$itempath) - DEPLOYMENT += $$item -} - -MAINPROFILEPWD = $$PWD - -symbian { - ICON = $${TARGET}.svg - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone - contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices -} else:win32 { - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$eval($${deploymentfolder}.source) - pathSegments = $$split(source, /) - sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments) - copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } -} else:unix { - maemo5 { - installPrefix = /opt/usr - desktopfile.path = /usr/share/applications/hildon - } else { - installPrefix = /usr/local - desktopfile.path = /usr/share/applications - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - macx { - target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) - } else { - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - } - copyCommand += && $(MKDIR) $$target - copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target - } - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } - } - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - icon.files = $${TARGET}.png - icon.path = /usr/share/icons/hicolor/64x64/apps - desktopfile.files = $${TARGET}.desktop - target.path = $${installPrefix}/bin - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) - export(target.path) - INSTALLS += desktopfile icon target -} - -export (ICON) -export (INSTALLS) -export (DEPLOYMENT) -export (TARGET.EPOCHEAPSIZE) -export (TARGET.CAPABILITY) -export (LIBS) -export (QMAKE_EXTRA_TARGETS) -} diff --git a/examples/declarative/demos/webbrowser/webbrowser.desktop b/examples/declarative/demos/webbrowser/webbrowser.desktop deleted file mode 100644 index 26da1fe000..0000000000 --- a/examples/declarative/demos/webbrowser/webbrowser.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=1.0 -Type=Application -Terminal=false -Name=webbrowser -Exec=/opt/usr/bin/webbrowser -Icon=webbrowser -X-Window-Icon= -X-HildonDesk-ShowInToolbar=true -X-Osso-Type=application/x-executable diff --git a/examples/declarative/demos/webbrowser/webbrowser.png b/examples/declarative/demos/webbrowser/webbrowser.png deleted file mode 100644 index 707d5c4e85..0000000000 Binary files a/examples/declarative/demos/webbrowser/webbrowser.png and /dev/null differ diff --git a/examples/declarative/demos/webbrowser/webbrowser.pro b/examples/declarative/demos/webbrowser/webbrowser.pro deleted file mode 100644 index 580cc55451..0000000000 --- a/examples/declarative/demos/webbrowser/webbrowser.pro +++ /dev/null @@ -1,39 +0,0 @@ -# Add more folders to ship with the application, here -folder_01.source = qml -folder_01.target = qml -DEPLOYMENTFOLDERS = folder_01 - -# Additional import path used to resolve QML modules in Creator's code model -QML_IMPORT_PATH = - -# Avoid auto screen rotation -DEFINES += ORIENTATIONLOCK - -# Needs to be defined for Symbian -DEFINES += NETWORKACCESS - -symbian:TARGET.UID3 = 0xE1704EEA - -# Smart Installer package's UID -# This UID is from the protected range -# and therefore the package will fail to install if self-signed -# By default qmake uses the unprotected range value if unprotected UID is defined for the application -# and 0x2002CCCF value if protected UID is given to the application -#symbian:DEPLOYMENT.installer_header = 0x2002CCCF - -# Define QMLJSDEBUGGER to allow debugging of QML in debug builds -# (This might significantly increase build time) -# DEFINES += QMLJSDEBUGGER - -# If your application uses the Qt Mobility libraries, uncomment -# the following lines and add the respective components to the -# MOBILITY variable. -# CONFIG += mobility -# MOBILITY += - -# The .cpp file which was generated for your project. Feel free to hack it. -SOURCES += main.cpp - -# Please do not modify the following two lines. Required for deployment. -include(qmlapplicationviewer/qmlapplicationviewer.pri) -qtcAddDeployment() diff --git a/examples/declarative/demos/webbrowser/webbrowser.svg b/examples/declarative/demos/webbrowser/webbrowser.svg deleted file mode 100644 index 566acfada0..0000000000 --- a/examples/declarative/demos/webbrowser/webbrowser.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - -- cgit v1.2.3