You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by lo...@apache.org on 2012/04/09 16:09:02 UTC

[1/2] qt commit: remove temp file

Updated Branches:
  refs/heads/master d572a5bbf -> d4facfb6f


remove temp file


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/d4facfb6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/tree/d4facfb6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/diff/d4facfb6

Branch: refs/heads/master
Commit: d4facfb6f049e1a470780ed56968d6cfa838052c
Parents: ebcf6a8
Author: Longwei Su <ls...@ics.com>
Authored: Mon Apr 9 10:07:32 2012 -0400
Committer: Longwei Su <ls...@ics.com>
Committed: Mon Apr 9 10:07:32 2012 -0400

----------------------------------------------------------------------
 src/plugins/notification.cpp~ |   80 ------------------------------------
 1 files changed, 0 insertions(+), 80 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/d4facfb6/src/plugins/notification.cpp~
----------------------------------------------------------------------
diff --git a/src/plugins/notification.cpp~ b/src/plugins/notification.cpp~
deleted file mode 100644
index 3835f89..0000000
--- a/src/plugins/notification.cpp~
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  Copyright 2011 Wolfgang Koller - http://www.gofg.at/
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-#include "notification.h"
-
-#include "../pluginregistry.h"
-
-//#include <QApplication>
-#include <QFeedbackHapticsEffect>
-
-//#if QT_VERSION < 0x050000
-# include <QMediaPlayer>
-//#else
-//# include <QtMultimedia/QMediaPlayer>
-//#endif
-#include <QDebug>
-
-#ifdef QTM_NAMESPACE
-QTM_USE_NAMESPACE
-#endif
-
-// Create static instance of ourself
-Notification* Notification::m_notification = new Notification();
-
-/**
- * Constructor - NOTE: Never do anything except registering the plugin
- */
-Notification::Notification() : CPlugin(){
-    PluginRegistry::getRegistry()->registerPlugin( "com.cordova.Notification", this );
-}
-
-/**
- * Nofication.beep - http://docs.phonegap.com/phonegap_notification_notification.md.html#notification.beep
- */
-void Notification::beep( int scId, int ecId, int p_times ) {
-    Q_UNUSED(scId)
-    Q_UNUSED(ecId)
-    Q_UNUSED(p_times)
-    QMediaPlayer* player = new QMediaPlayer;
-    player->setVolume(100);
-    player->setMedia(QUrl::fromLocalFile("/usr/share/sounds/ui-tones/snd_default_beep.wav"));
-    player->play();
-}
-
-/**
- * Notification.vibrate - http://docs.phonegap.com/phonegap_notification_notification.md.html#notification.vibrate
- */
-void Notification::vibrate( int scId, int ecId, int p_milliseconds ) {
-    Q_UNUSED(scId)
-    Q_UNUSED(ecId)
-
-    QFeedbackHapticsEffect *vibrate = new QFeedbackHapticsEffect;
-    vibrate->setIntensity(1.0);
-    vibrate->setDuration(p_milliseconds);
-    connect(vibrate, SIGNAL(stateChanged()), this, SLOT(deleteEffectAtStateStopped()));
-    vibrate->start();
-}
-
-void Notification::deleteEffectAtStateStopped()
-{
-    qDebug() << Q_FUNC_INFO;
-    QFeedbackEffect *effect = qobject_cast<QFeedbackEffect *>(sender());
-    if (!effect)
-        return;
-    if (effect->state() == QFeedbackEffect::Stopped)
-        effect->deleteLater();
-}