Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8889E9903 for ; Mon, 2 Apr 2012 14:37:07 +0000 (UTC) Received: (qmail 31750 invoked by uid 500); 2 Apr 2012 14:37:07 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 31700 invoked by uid 500); 2 Apr 2012 14:37:07 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 31666 invoked by uid 99); 2 Apr 2012 14:37:06 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2012 14:37:06 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 50811A71A; Mon, 2 Apr 2012 14:37:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: longwei@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [1/2] qt commit: added camera symbian support in pro Message-Id: <20120402143706.50811A71A@tyr.zones.apache.org> Date: Mon, 2 Apr 2012 14:37:06 +0000 (UTC) Updated Branches: refs/remotes/origin/master [created] e8670eac8 added camera symbian support in pro Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/commit/e8670eac Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/tree/e8670eac Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/diff/e8670eac Branch: refs/remotes/origin/master Commit: e8670eac8d3dd897a393923f5fef34d77769880c Parents: fee4e82 Author: Longwei Su Authored: Fri Mar 30 16:16:59 2012 -0400 Committer: Longwei Su Committed: Fri Mar 30 16:16:59 2012 -0400 ---------------------------------------------------------------------- cordovaqt.desktop | 11 ----------- cordovaqt.pro | 13 +++++++++---- cordovaqt_harmattan.desktop | 11 ----------- src/plugins/notification.cpp | 10 +++++----- www/basic.js | 17 +++++++++++++++++ www/index.html | 4 ++++ xml/plugins.xml | 1 + 7 files changed, 36 insertions(+), 31 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/e8670eac/cordovaqt.desktop ---------------------------------------------------------------------- diff --git a/cordovaqt.desktop b/cordovaqt.desktop deleted file mode 100644 index 13b4574..0000000 --- a/cordovaqt.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=1.0 -Type=Application -Terminal=false -Name=cordova-qt -Exec=/opt/cordova-qt/bin/cordova-qt -Icon=cordova-qt64 -X-Window-Icon= -X-HildonDesk-ShowInToolbar=true -X-Osso-Type=application/x-executable http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/e8670eac/cordovaqt.pro ---------------------------------------------------------------------- diff --git a/cordovaqt.pro b/cordovaqt.pro index 17e0295..7f03860 100644 --- a/cordovaqt.pro +++ b/cordovaqt.pro @@ -22,7 +22,9 @@ SOURCES += main.cpp \ src/plugins/events.cpp \ src/cordova.cpp \ src/cplugin.cpp \ - src/plugins/contacts.cpp + src/plugins/contacts.cpp \ + src/plugins/camera.cpp + HEADERS += \ src/plugins/notification.h \ src/plugins/geolocation.h \ @@ -36,7 +38,9 @@ HEADERS += \ src/plugins/events.h \ src/cordova.h \ src/cplugin.h \ - src/plugins/contacts.h + src/plugins/contacts.h \ + src/plugins/camera.h \ + src/plugins/cameraresolution.h greaterThan(QT_MAJOR_VERSION, 4) { message("Qt5 build") @@ -60,7 +64,7 @@ greaterThan(QT_MAJOR_VERSION, 4) { OTHER_FILES += qml/main_harmattan.qml \ qml/cordova_wrapper.js - QT += declarative + QT += declarative dbus QT += webkit CONFIG += mobility qdeclarative-boostable MOBILITY += feedback location systeminfo sensors multimedia contacts @@ -73,7 +77,8 @@ greaterThan(QT_MAJOR_VERSION, 4) { symbian:TARGET.UID3 = 0xE3522943 #symbian:DEPLOYMENT.installer_header = 0x2002CCCF - symbian:TARGET.CAPABILITY += NetworkServices + symbian:TARGET.CAPABILITY += NetworkServices UserEnvironment + symbian:{LIBS += -lecam -lServiceHandler -lnewservice -lbafl} QT += declarative QT += webkit http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/e8670eac/cordovaqt_harmattan.desktop ---------------------------------------------------------------------- diff --git a/cordovaqt_harmattan.desktop b/cordovaqt_harmattan.desktop deleted file mode 100644 index 3c89310..0000000 --- a/cordovaqt_harmattan.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=1.0 -Type=Application -Terminal=false -Name=cordova-qt -Exec=/usr/bin/invoker --type=d -s /opt/cordovaqt/bin/cordovaqt -Icon=/usr/share/icons/hicolor/80x80/apps/cordovaqt80.png -X-Window-Icon= -X-HildonDesk-ShowInToolbar=true -X-Osso-Type=application/x-executable http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/e8670eac/src/plugins/notification.cpp ---------------------------------------------------------------------- diff --git a/src/plugins/notification.cpp b/src/plugins/notification.cpp index e9bd385..e8d0f84 100644 --- a/src/plugins/notification.cpp +++ b/src/plugins/notification.cpp @@ -21,11 +21,11 @@ #include #include -#if QT_VERSION < 0x050000 -# include -#else -# include -#endif +//#if QT_VERSION < 0x050000 +# include +//#else +//# include +//#endif #include #ifdef QTM_NAMESPACE http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/e8670eac/www/basic.js ---------------------------------------------------------------------- diff --git a/www/basic.js b/www/basic.js index 9ade80b..14605ac 100644 --- a/www/basic.js +++ b/www/basic.js @@ -110,6 +110,23 @@ function getCurrentAcceleration() { } +function getPicture(){ + navigator.camera.getPicture(function(picture_file){ + console.log("getPicture succeed callback: "+picture_file) + get("picture_val").innerHTML = ''; + }, + function(){ + console.log("getPicture error callback") + get("picture_val").innerHTML = 'Capture cancelled or error occured' + }, + { quality : 75, + destinationType : Camera.DestinationType.DATA_URL, + sourceType : Camera.PictureSourceType.CAMERA, + allowEdit : true, + encodingType: Camera.EncodingType.JPEG, + targetWidth: 100, + targetHeight: 100}); +} function test_requestFileSystem() { http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/e8670eac/www/index.html ---------------------------------------------------------------------- diff --git a/www/index.html b/www/index.html index e911300..34f3dd6 100644 --- a/www/index.html +++ b/www/index.html @@ -14,6 +14,7 @@ + @@ -46,6 +47,9 @@
Heading
+ +
+
Picture

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/e8670eac/xml/plugins.xml ---------------------------------------------------------------------- diff --git a/xml/plugins.xml b/xml/plugins.xml index c6da722..5bd65da 100644 --- a/xml/plugins.xml +++ b/xml/plugins.xml @@ -9,6 +9,7 @@ +