summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
authorwimpie <wimpie>2004-08-25 01:47:35 (UTC)
committer wimpie <wimpie>2004-08-25 01:47:35 (UTC)
commitf6a6fe57c9e0047379f4b8b40da4776f1c4d7b25 (patch) (side-by-side diff)
tree2db64e885b1a67058fa45533819993c8dcb4fb96 /library/qpeapplication.cpp
parent49c47e98bed6e35d0bdc8e1e4cc40bdbb07eab06 (diff)
downloadopie-f6a6fe57c9e0047379f4b8b40da4776f1c4d7b25.zip
opie-f6a6fe57c9e0047379f4b8b40da4776f1c4d7b25.tar.gz
opie-f6a6fe57c9e0047379f4b8b40da4776f1c4d7b25.tar.bz2
Final changes for RoH Feedback
- changed *.pro file to compile in backend - some more fixes to rohfeedback and qpeapplication
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp58
1 files changed, 30 insertions, 28 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 35f433c..c6d9cfd 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -99,3 +99,3 @@
-#include <qpe/rohfeedback.h>
+#include <backend/rohfeedback.h>
@@ -104,3 +104,2 @@ static bool useBigPixmaps = 0;
-
class HackWidget : public QWidget
@@ -118,4 +117,4 @@ class QPEApplicationData
public:
- QPEApplicationData ( )
- : presstimer( 0 ), presswidget( 0 ), rightpressed( false ), kbgrabbed( false ),
+ QPEApplicationData ( ) :
+ presstimer( 0 ), presswidget( 0 ), rightpressed( false ), kbgrabbed( false ),
notbusysent( false ), preloaded( false ), forceshow( false ), nomaximize( false ),
@@ -132,3 +131,3 @@ public:
bigIconSize = cfg.readNumEntry( "BigIconSize", 32 );
-#ifdef OPIE_ROHFEEDBACK
+#ifdef OPIE_WITHROHFEEDBACK
RoH = 0;
@@ -140,3 +139,3 @@ public:
QPoint presspos;
-#ifdef OPIE_ROHFEEDBACK
+#ifdef OPIE_WITHROHFEEDBACK
Opie::Internal::RoHFeedback *RoH;
@@ -504,2 +503,3 @@ static void qpe_show_dialog( QDialog* d, bool nomax )
}
+
};
@@ -1217,4 +1217,6 @@ QPEApplication::~QPEApplication()
#endif
-#ifdef OPIE_ROHFEEDBACK
- delete d->RoH;
+
+#ifdef OPIE_WITHROHFEEDBACK
+ if( d->RoH )
+ delete d->RoH;
#endif
@@ -2037,2 +2039,3 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
if ( me->button() == LeftButton ) {
+ static long Pref = 500; // #### pref.
d->presswidget = (QWidget*)o;
@@ -2040,5 +2043,3 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
d->rightpressed = FALSE;
- // just for the time being
- static int pref = 500;
-#ifdef OPIE_ROHFEEDBACK
+#ifdef OPIE_WITHROHFEEDBACK
if( ! d->RoH )
@@ -2047,6 +2048,7 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
d->RoH->init( me->globalPos(), d->presswidget );
- pref = d->RoH->delay();
+ Pref = d->RoH->delay();
+
#endif
if (!d->presstimer )
- d->presstimer = startTimer( pref ); // #### pref.
+ d->presstimer = startTimer( Pref ); // #### pref.
@@ -2057,5 +2059,4 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
killTimer(d->presstimer);
-#ifdef OPIE_ROHFEEDBACK
- if( d->RoH )
- d->RoH->stop( );
+#ifdef OPIE_WITHROHFEEDBACK
+ d->RoH->stop();
#endif
@@ -2068,5 +2069,4 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
killTimer(d->presstimer);
-#ifdef OPIE_ROHFEEDBACK
- if( d->RoH )
- d->RoH->stop( );
+#ifdef OPIE_WITHROHFEEDBACK
+ d->RoH->stop( );
#endif
@@ -2075,2 +2075,3 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
if ( d->rightpressed && d->presswidget ) {
+ printf( "Send ButtonRelease\n" );
// Right released
@@ -2118,11 +2119,12 @@ void QPEApplication::timerEvent( QTimerEvent *e )
if ( e->timerId() == d->presstimer && d->presswidget ) {
- // Right pressed
- postEvent( d->presswidget,
- new QMouseEvent( QEvent::MouseButtonPress, d->presspos,
- RightButton, LeftButton ) );
- killTimer( d->presstimer );
- d->presstimer = 0;
- d->rightpressed = TRUE;
-#ifdef OPIE_ROHFEEDBACK
- d->RoH->stop();
+
+ // Right pressed
+ postEvent( d->presswidget,
+ new QMouseEvent( QEvent::MouseButtonPress, d->presspos,
+ RightButton, LeftButton ) );
+ killTimer( d->presstimer );
+ d->presstimer = 0;
+ d->rightpressed = TRUE;
+#ifdef OPIE_WITHROHFEEDBACK
+ d->RoH->stop();
#endif