summaryrefslogtreecommitdiff
Unidiff
Diffstat (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
@@ -127,18 +127,23 @@ public:
127 cfg.setGroup( "Appearance" ); 127 cfg.setGroup( "Appearance" );
128 useBigPixmaps = cfg.readBoolEntry( "useBigPixmaps", false ); 128 useBigPixmaps = cfg.readBoolEntry( "useBigPixmaps", false );
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;
143 bool preloaded : 1; 148 bool preloaded : 1;
144 bool forceshow : 1; 149 bool forceshow : 1;
@@ -494,14 +499,12 @@ static void qpe_show_dialog( QDialog* d, bool nomax )
494 else { 499 else {
495 lib->unload(); 500 lib->unload();
496 delete lib; 501 delete lib;
497 } 502 }
498 } 503 }
499 } 504 }
500
501 Opie::Internal::RoHFeedback * RoH;
502}; 505};
503 506
504class ResourceMimeFactory : public QMimeSourceFactory 507class ResourceMimeFactory : public QMimeSourceFactory
505{ 508{
506public: 509public:
507 ResourceMimeFactory() : resImage( 0 ) 510 ResourceMimeFactory() : resImage( 0 )
@@ -1209,13 +1212,15 @@ QPEApplication::~QPEApplication()
1209#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 1212#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
1210 // Need to delete QCopChannels early, since the display will 1213 // Need to delete QCopChannels early, since the display will
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/*!
1220 Returns <tt>$OPIEDIR/</tt>. 1225 Returns <tt>$OPIEDIR/</tt>.
1221*/ 1226*/
@@ -2032,13 +2037,13 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
2032 if ( me->button() == LeftButton ) { 2037 if ( me->button() == LeftButton ) {
2033 d->presswidget = (QWidget*)o; 2038 d->presswidget = (QWidget*)o;
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 );
2043 pref = d->RoH->delay(); 2048 pref = d->RoH->delay();
2044#endif 2049#endif
@@ -2047,24 +2052,24 @@ bool QPEApplication::eventFilter( QObject *o, QEvent *e )
2047 2052
2048 } 2053 }
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;
2058 } 2063 }
2059 break; 2064 break;
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;
2069 } 2074 }
2070 if ( d->rightpressed && d->presswidget ) { 2075 if ( d->rightpressed && d->presswidget ) {
@@ -2115,13 +2120,15 @@ void QPEApplication::timerEvent( QTimerEvent *e )
2115 postEvent( d->presswidget, 2120 postEvent( d->presswidget,
2116 new QMouseEvent( QEvent::MouseButtonPress, d->presspos, 2121 new QMouseEvent( QEvent::MouseButtonPress, d->presspos,
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
2125void QPEApplication::removeSenderFromStylusDict() 2132void QPEApplication::removeSenderFromStylusDict()
2126{ 2133{
2127 stylusDict->remove 2134 stylusDict->remove