summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Side-by-side diff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp32
1 files changed, 29 insertions, 3 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 59ca61b..acad81d 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -98,6 +98,10 @@
#include "qt_override_p.h"
+#include <qpe/rohfeedback.h>
+
+
static bool useBigPixmaps = 0;
+
class HackWidget : public QWidget
{
@@ -127,4 +131,5 @@ public:
smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 );
bigIconSize = cfg.readNumEntry( "BigIconSize", 32 );
+ RoH = 0;
}
@@ -493,4 +498,6 @@ static void qpe_show_dialog( QDialog* d, bool nomax )
}
}
+
+ Opie::Internal::RoHFeedback * RoH;
};
@@ -1206,5 +1213,5 @@ QPEApplication::~QPEApplication()
delete pidChannel;
#endif
-
+ delete d->RoH;
delete d;
}
@@ -2024,9 +2031,19 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
case QEvent::MouseButtonPress:
if ( me->button() == LeftButton ) {
- if (!d->presstimer )
- d->presstimer = startTimer(500); // #### pref.
d->presswidget = (QWidget*)o;
d->presspos = me->pos();
d->rightpressed = FALSE;
+ // just for the time being
+ static int pref = 500;
+#ifdef WITHROHFEEDBACK
+ if( ! d->RoH )
+ d->RoH = new Opie::Internal::RoHFeedback;
+
+ d->RoH->init( me->globalPos(), d->presswidget );
+ pref = d->RoH->delay();
+#endif
+ if (!d->presstimer )
+ d->presstimer = startTimer( pref ); // #### pref.
+
}
break;
@@ -2034,4 +2051,8 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
if (d->presstimer && (me->pos() - d->presspos).manhattanLength() > 8) {
killTimer(d->presstimer);
+#ifdef WITHROHFEEDBACK
+ if( d->RoH )
+ d->RoH->stop( );
+#endif
d->presstimer = 0;
}
@@ -2041,4 +2062,8 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
if ( d->presstimer ) {
killTimer(d->presstimer);
+#ifdef WITHROHFEEDBACK
+ if( d->RoH )
+ d->RoH->stop( );
+#endif
d->presstimer = 0;
}
@@ -2094,4 +2119,5 @@ void QPEApplication::timerEvent( QTimerEvent *e )
d->presstimer = 0;
d->rightpressed = TRUE;
+ d->RoH->stop();
}
}