author | zecke <zecke> | 2004-08-24 17:37:59 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-08-24 17:37:59 (UTC) |
commit | e90847c784c48bd21bf8768cb38edb853b832697 (patch) (unidiff) | |
tree | 7c95b22cc4e9b69aa384c041ae67babb8fafe319 /library/qpeapplication.cpp | |
parent | 0a141c4a9719aa273867ad45c4293208545489b1 (diff) | |
download | opie-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 :}
-rw-r--r-- | library/qpeapplication.cpp | 17 |
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 | |||
@@ -129,14 +129,19 @@ public: | |||
129 | fontFamily = cfg.readEntry( "FontFamily", "Vera" ); | 129 | fontFamily = cfg.readEntry( "FontFamily", "Vera" ); |
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; |
142 | bool notbusysent : 1; | 147 | bool notbusysent : 1; |
@@ -496,10 +501,8 @@ static void qpe_show_dialog( QDialog* d, bool nomax ) | |||
496 | delete lib; | 501 | delete lib; |
497 | } | 502 | } |
498 | } | 503 | } |
499 | } | 504 | } |
500 | |||
501 | Opie::Internal::RoHFeedback * RoH; | ||
502 | }; | 505 | }; |
503 | 506 | ||
504 | class ResourceMimeFactory : public QMimeSourceFactory | 507 | class ResourceMimeFactory : public QMimeSourceFactory |
505 | { | 508 | { |
@@ -1211,9 +1214,11 @@ QPEApplication::~QPEApplication() | |||
1211 | // be gone by the time we get to ~QObject(). | 1214 | // be gone by the time we get to ~QObject(). |
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 | ||
1219 | /*! | 1224 | /*! |
@@ -2034,9 +2039,9 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) | |||
2034 | d->presspos = me->pos(); | 2039 | d->presspos = me->pos(); |
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 | ||
2042 | d->RoH->init( me->globalPos(), d->presswidget ); | 2047 | d->RoH->init( me->globalPos(), d->presswidget ); |
@@ -2049,9 +2054,9 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) | |||
2049 | break; | 2054 | break; |
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 |
2057 | d->presstimer = 0; | 2062 | d->presstimer = 0; |
@@ -2060,9 +2065,9 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e ) | |||
2060 | case QEvent::MouseButtonRelease: | 2065 | case QEvent::MouseButtonRelease: |
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 |
2068 | d->presstimer = 0; | 2073 | d->presstimer = 0; |
@@ -2117,9 +2122,11 @@ void QPEApplication::timerEvent( QTimerEvent *e ) | |||
2117 | RightButton, LeftButton ) ); | 2122 | RightButton, LeftButton ) ); |
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 | ||
2125 | void QPEApplication::removeSenderFromStylusDict() | 2132 | void QPEApplication::removeSenderFromStylusDict() |