summaryrefslogtreecommitdiff
path: root/library
authorzecke <zecke>2004-08-24 17:37:59 (UTC)
committer zecke <zecke>2004-08-24 17:37:59 (UTC)
commite90847c784c48bd21bf8768cb38edb853b832697 (patch) (unidiff)
tree7c95b22cc4e9b69aa384c041ae67babb8fafe319 /library
parent0a141c4a9719aa273867ad45c4293208545489b1 (diff)
downloadopie-e90847c784c48bd21bf8768cb38edb853b832697.zip
opie-e90847c784c48bd21bf8768cb38edb853b832697.tar.gz
opie-e90847c784c48bd21bf8768cb38edb853b832697.tar.bz2
Allow to completely turn off/on Right on Hold Visual Feedback
mickey thanks for spotting the linking failures :}
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index acad81d..35f433c 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -130,12 +130,17 @@ public:
130 fontSize = cfg.readNumEntry( "FontSize", 10 ); 130 fontSize = cfg.readNumEntry( "FontSize", 10 );
131 smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 ); 131 smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 );
132 bigIconSize = cfg.readNumEntry( "BigIconSize", 32 ); 132 bigIconSize = cfg.readNumEntry( "BigIconSize", 32 );
133#ifdef OPIE_ROHFEEDBACK
133 RoH = 0; 134 RoH = 0;
135#endif
134 } 136 }
135 137
136 int presstimer; 138 int presstimer;
137 QWidget* presswidget; 139 QWidget* presswidget;
138 QPoint presspos; 140 QPoint presspos;
141#ifdef OPIE_ROHFEEDBACK
142 Opie::Internal::RoHFeedback *RoH;
143#endif
139 144
140 bool rightpressed : 1; 145 bool rightpressed : 1;
141 bool kbgrabbed : 1; 146 bool kbgrabbed : 1;
@@ -497,8 +502,6 @@ static void qpe_show_dialog( QDialog* d, bool nomax )
497 } 502 }
498 } 503 }
499 } 504 }
500
501 Opie::Internal::RoHFeedback * RoH;
502}; 505};
503 506
504class ResourceMimeFactory : public QMimeSourceFactory 507class ResourceMimeFactory : public QMimeSourceFactory
@@ -1212,7 +1215,9 @@ QPEApplication::~QPEApplication()
1212 delete sysChannel; 1215 delete sysChannel;
1213 delete pidChannel; 1216 delete pidChannel;
1214#endif 1217#endif
1218#ifdef OPIE_ROHFEEDBACK
1215 delete d->RoH; 1219 delete d->RoH;
1220#endif
1216 delete d; 1221 delete d;
1217} 1222}
1218 1223
@@ -2035,7 +2040,7 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
2035 d->rightpressed = FALSE; 2040 d->rightpressed = FALSE;
2036 // just for the time being 2041 // just for the time being
2037 static int pref = 500; 2042 static int pref = 500;
2038#ifdef WITHROHFEEDBACK 2043#ifdef OPIE_ROHFEEDBACK
2039 if( ! d->RoH ) 2044 if( ! d->RoH )
2040 d->RoH = new Opie::Internal::RoHFeedback; 2045 d->RoH = new Opie::Internal::RoHFeedback;
2041 2046
@@ -2050,7 +2055,7 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
2050 case QEvent::MouseMove: 2055 case QEvent::MouseMove:
2051 if (d->presstimer && (me->pos() - d->presspos).manhattanLength() > 8) { 2056 if (d->presstimer && (me->pos() - d->presspos).manhattanLength() > 8) {
2052 killTimer(d->presstimer); 2057 killTimer(d->presstimer);
2053#ifdef WITHROHFEEDBACK 2058#ifdef OPIE_ROHFEEDBACK
2054 if( d->RoH ) 2059 if( d->RoH )
2055 d->RoH->stop( ); 2060 d->RoH->stop( );
2056#endif 2061#endif
@@ -2061,7 +2066,7 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
2061 if ( me->button() == LeftButton ) { 2066 if ( me->button() == LeftButton ) {
2062 if ( d->presstimer ) { 2067 if ( d->presstimer ) {
2063 killTimer(d->presstimer); 2068 killTimer(d->presstimer);
2064#ifdef WITHROHFEEDBACK 2069#ifdef OPIE_ROHFEEDBACK
2065 if( d->RoH ) 2070 if( d->RoH )
2066 d->RoH->stop( ); 2071 d->RoH->stop( );
2067#endif 2072#endif
@@ -2118,7 +2123,9 @@ void QPEApplication::timerEvent( QTimerEvent *e )
2118 killTimer( d->presstimer ); 2123 killTimer( d->presstimer );
2119 d->presstimer = 0; 2124 d->presstimer = 0;
2120 d->rightpressed = TRUE; 2125 d->rightpressed = TRUE;
2126#ifdef OPIE_ROHFEEDBACK
2121 d->RoH->stop(); 2127 d->RoH->stop();
2128#endif
2122 } 2129 }
2123} 2130}
2124 2131