Commit 251eb51c authored by Aard's avatar Aard

[haptics] Add haptic feedback on key presses

parent 8b6faf6f
QT = core gui qml quick dbus
QT = core gui qml quick dbus feedback
contains(MEEGO_EDITION,harmattan): {
CONFIG += meegotouch
......
......@@ -11,6 +11,7 @@ BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt0Feedback)
Requires: qt5-qtdeclarative-import-xmllistmodel
Requires: qt5-qtdeclarative-import-window2
Requires: qt-components-qt5
......
......@@ -32,12 +32,7 @@
#include "textrender.h"
#include "version.h"
#ifdef MEEGO_EDITION_HARMATTAN
#include <MFeedback>
#include <MComponentData>
#include <MNotification>
#include <MRemoteAction>
#endif //MEEGO_EDITION_HARMATTAN
#include <QFeedbackEffect>
Util::Util(QSettings *settings, QObject *parent) :
QObject(parent),
......@@ -212,9 +207,7 @@ void Util::keyPressFeedback()
if( !settingsValue("ui/keyPressFeedback").toBool() )
return;
#ifdef MEEGO_EDITION_HARMATTAN
MFeedback::play("priority2_static_press");
#endif
QFeedbackEffect::playThemeEffect(QFeedbackEffect::PressWeak);
}
void Util::keyReleaseFeedback()
......@@ -222,9 +215,8 @@ void Util::keyReleaseFeedback()
if( !settingsValue("ui/keyPressFeedback").toBool() )
return;
#ifdef MEEGO_EDITION_HARMATTAN
MFeedback::play("priority2_static_release");
#endif
// TODO: check what's more comfortable, only press, or press and release
QFeedbackEffect::playThemeEffect(QFeedbackEffect::ReleaseWeak);
}
void Util::bellAlert()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment