-rw-r--r-- | library/qpeapplication.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 35f433c..c6d9cfd 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -98,10 +98,9 @@ #include "qt_override_p.h" -#include <qpe/rohfeedback.h> +#include <backend/rohfeedback.h> static bool useBigPixmaps = 0; - class HackWidget : public QWidget { @@ -117,6 +116,6 @@ 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 ), keep_running( true ), qcopQok( false ), @@ -131,5 +130,5 @@ public: smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 ); bigIconSize = cfg.readNumEntry( "BigIconSize", 32 ); -#ifdef OPIE_ROHFEEDBACK +#ifdef OPIE_WITHROHFEEDBACK RoH = 0; #endif @@ -139,5 +138,5 @@ public: QWidget* presswidget; QPoint presspos; -#ifdef OPIE_ROHFEEDBACK +#ifdef OPIE_WITHROHFEEDBACK Opie::Internal::RoHFeedback *RoH; #endif @@ -503,4 +502,5 @@ static void qpe_show_dialog( QDialog* d, bool nomax ) } } + }; @@ -1216,5 +1216,7 @@ QPEApplication::~QPEApplication() delete pidChannel; #endif -#ifdef OPIE_ROHFEEDBACK + +#ifdef OPIE_WITHROHFEEDBACK + if( d->RoH ) delete d->RoH; #endif @@ -2036,18 +2038,18 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) case QEvent::MouseButtonPress: if ( me->button() == LeftButton ) { + static long Pref = 500; // #### pref. d->presswidget = (QWidget*)o; d->presspos = me->pos(); d->rightpressed = FALSE; - // just for the time being - static int pref = 500; -#ifdef OPIE_ROHFEEDBACK +#ifdef OPIE_WITHROHFEEDBACK if( ! d->RoH ) d->RoH = new Opie::Internal::RoHFeedback; 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. } @@ -2056,6 +2058,5 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) if (d->presstimer && (me->pos() - d->presspos).manhattanLength() > 8) { killTimer(d->presstimer); -#ifdef OPIE_ROHFEEDBACK - if( d->RoH ) +#ifdef OPIE_WITHROHFEEDBACK d->RoH->stop( ); #endif @@ -2067,6 +2068,5 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) if ( d->presstimer ) { killTimer(d->presstimer); -#ifdef OPIE_ROHFEEDBACK - if( d->RoH ) +#ifdef OPIE_WITHROHFEEDBACK d->RoH->stop( ); #endif @@ -2074,4 +2074,5 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) } if ( d->rightpressed && d->presswidget ) { + printf( "Send ButtonRelease\n" ); // Right released postEvent( d->presswidget, @@ -2117,4 +2118,5 @@ void QPEApplication::timerEvent( QTimerEvent *e ) { if ( e->timerId() == d->presstimer && d->presswidget ) { + // Right pressed postEvent( d->presswidget, @@ -2124,5 +2126,5 @@ void QPEApplication::timerEvent( QTimerEvent *e ) d->presstimer = 0; d->rightpressed = TRUE; -#ifdef OPIE_ROHFEEDBACK +#ifdef OPIE_WITHROHFEEDBACK d->RoH->stop(); #endif |