-rw-r--r-- | library/qpeapplication.cpp | 32 |
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 | |||
@@ -99,4 +99,8 @@ | |||
99 | 99 | ||
100 | #include <qpe/rohfeedback.h> | ||
101 | |||
102 | |||
100 | static bool useBigPixmaps = 0; | 103 | static bool useBigPixmaps = 0; |
101 | 104 | ||
105 | |||
102 | class HackWidget : public QWidget | 106 | class HackWidget : public QWidget |
@@ -128,2 +132,3 @@ public: | |||
128 | bigIconSize = cfg.readNumEntry( "BigIconSize", 32 ); | 132 | bigIconSize = cfg.readNumEntry( "BigIconSize", 32 ); |
133 | RoH = 0; | ||
129 | } | 134 | } |
@@ -494,2 +499,4 @@ static void qpe_show_dialog( QDialog* d, bool nomax ) | |||
494 | } | 499 | } |
500 | |||
501 | Opie::Internal::RoHFeedback * RoH; | ||
495 | }; | 502 | }; |
@@ -1207,3 +1214,3 @@ QPEApplication::~QPEApplication() | |||
1207 | #endif | 1214 | #endif |
1208 | 1215 | delete d->RoH; | |
1209 | delete d; | 1216 | delete d; |
@@ -2025,4 +2032,2 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) | |||
2025 | if ( me->button() == LeftButton ) { | 2032 | if ( me->button() == LeftButton ) { |
2026 | if (!d->presstimer ) | ||
2027 | d->presstimer = startTimer(500); // #### pref. | ||
2028 | d->presswidget = (QWidget*)o; | 2033 | d->presswidget = (QWidget*)o; |
@@ -2030,2 +2035,14 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) | |||
2030 | d->rightpressed = FALSE; | 2035 | d->rightpressed = FALSE; |
2036 | // just for the time being | ||
2037 | static int pref = 500; | ||
2038 | #ifdef WITHROHFEEDBACK | ||
2039 | if( ! d->RoH ) | ||
2040 | d->RoH = new Opie::Internal::RoHFeedback; | ||
2041 | |||
2042 | d->RoH->init( me->globalPos(), d->presswidget ); | ||
2043 | pref = d->RoH->delay(); | ||
2044 | #endif | ||
2045 | if (!d->presstimer ) | ||
2046 | d->presstimer = startTimer( pref ); // #### pref. | ||
2047 | |||
2031 | } | 2048 | } |
@@ -2035,2 +2052,6 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) | |||
2035 | killTimer(d->presstimer); | 2052 | killTimer(d->presstimer); |
2053 | #ifdef WITHROHFEEDBACK | ||
2054 | if( d->RoH ) | ||
2055 | d->RoH->stop( ); | ||
2056 | #endif | ||
2036 | d->presstimer = 0; | 2057 | d->presstimer = 0; |
@@ -2042,2 +2063,6 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) | |||
2042 | killTimer(d->presstimer); | 2063 | killTimer(d->presstimer); |
2064 | #ifdef WITHROHFEEDBACK | ||
2065 | if( d->RoH ) | ||
2066 | d->RoH->stop( ); | ||
2067 | #endif | ||
2043 | d->presstimer = 0; | 2068 | d->presstimer = 0; |
@@ -2095,2 +2120,3 @@ void QPEApplication::timerEvent( QTimerEvent *e ) | |||
2095 | d->rightpressed = TRUE; | 2120 | d->rightpressed = TRUE; |
2121 | d->RoH->stop(); | ||
2096 | } | 2122 | } |