From: Heli Hyvättinen Date: Mon, 27 Jun 2011 11:39:07 +0000 (+0300) Subject: Vibration when hitting rocks and octopuses X-Git-Tag: v.0.2.0~12 X-Git-Url: http://git.maemo.org/git/?p=ghostsoverboard;a=commitdiff_plain;h=330979bbf53bc17e97e42503624a9df6146e0db4 Vibration when hitting rocks and octopuses Vibrates when hits or gets hit by something that drops ghots (or would drop if there were any). Bit too loud vibrating sound. --- diff --git a/ghostsoverboard.pro b/ghostsoverboard.pro index 58faafd..6ba1f78 100644 --- a/ghostsoverboard.pro +++ b/ghostsoverboard.pro @@ -5,6 +5,7 @@ #------------------------------------------------- QT += core gui +QT += dbus TARGET = ghostsoverboard TEMPLATE = app diff --git a/ship.cpp b/ship.cpp index 426cd63..7ab50ff 100644 --- a/ship.cpp +++ b/ship.cpp @@ -23,6 +23,9 @@ #include "ship.h" #include +#include +#include + Ship::Ship(QList pixmapList, QGraphicsItem *parent) : OrientationControlledGraphicsPixmapObject(pixmapList.at(0),parent) @@ -87,5 +90,21 @@ void Ship::dropAllGhosts() emit droppingGhosts(ghostsAboard_); ghostsAboard_ = 0; updateShipImage(); + + //vibrate + + + QDBusMessage message = QDBusMessage::createMethodCall("com.nokia.mce","/com/nokia/mce/request","com.nokia.mce.request","req_vibrator_pattern_activate"); + + QList arguments; + + arguments.append("PatternChatAndEmail"); + + message.setArguments(arguments); + + message = QDBusConnection::systemBus().call(message); + + qDebug() << message; + }