author | mickeyl <mickeyl> | 2003-05-16 19:07:01 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-16 19:07:01 (UTC) |
commit | 1ac65aca5d1219e537238330501bc441dd2a3324 (patch) (unidiff) | |
tree | f60f613028dbef184e4b2fd31c5499d1e07c6e6b /library/qpeapplication.h | |
parent | e7dc14955879dfabf5093b06784402c4525eed2a (diff) | |
download | opie-1ac65aca5d1219e537238330501bc441dd2a3324.zip opie-1ac65aca5d1219e537238330501bc441dd2a3324.tar.gz opie-1ac65aca5d1219e537238330501bc441dd2a3324.tar.bz2 |
enable opie to compile against a non-patched qt 2.3.2
to prepare the possibility of building an opie 1.0 feed for the sharp rom
-rw-r--r-- | library/qpeapplication.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h index e35c008..65a6d33 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h | |||
@@ -109,27 +109,27 @@ private slots: | |||
109 | void hideOrQuit(); | 109 | void hideOrQuit(); |
110 | 110 | ||
111 | protected: | 111 | protected: |
112 | bool qwsEventFilter( QWSEvent * ); | 112 | bool qwsEventFilter( QWSEvent * ); |
113 | void internalSetStyle( const QString &style ); | 113 | void internalSetStyle( const QString &style ); |
114 | void prepareForTermination(bool willrestart); | 114 | void prepareForTermination(bool willrestart); |
115 | virtual void restart(); | 115 | virtual void restart(); |
116 | virtual void shutdown(); | 116 | virtual void shutdown(); |
117 | bool eventFilter( QObject *, QEvent * ); | 117 | bool eventFilter( QObject *, QEvent * ); |
118 | void timerEvent( QTimerEvent * ); | 118 | void timerEvent( QTimerEvent * ); |
119 | bool raiseAppropriateWindow(); | 119 | bool raiseAppropriateWindow(); |
120 | virtual void tryQuit(); | 120 | virtual void tryQuit(); |
121 | 121 | #if QT_VERSION > 233 | |
122 | virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!) | 122 | virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!) |
123 | 123 | #endif | |
124 | private: | 124 | private: |
125 | #ifndef QT_NO_TRANSLATION | 125 | #ifndef QT_NO_TRANSLATION |
126 | void installTranslation( const QString& baseName ); | 126 | void installTranslation( const QString& baseName ); |
127 | #endif | 127 | #endif |
128 | void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); | 128 | void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); |
129 | 129 | ||
130 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 130 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
131 | QCopChannel *sysChannel; | 131 | QCopChannel *sysChannel; |
132 | QCopChannel *pidChannel; | 132 | QCopChannel *pidChannel; |
133 | #endif | 133 | #endif |
134 | QPEApplicationData *d; | 134 | QPEApplicationData *d; |
135 | 135 | ||
@@ -174,20 +174,25 @@ inline Transformation DegToTrans ( int d ) | |||
174 | Transformation t = static_cast<Transformation>( d / 90 ); | 174 | Transformation t = static_cast<Transformation>( d / 90 ); |
175 | return t; | 175 | return t; |
176 | } | 176 | } |
177 | 177 | ||
178 | /* | 178 | /* |
179 | * Set current rotation of Opie, and rotation for newly started apps. | 179 | * Set current rotation of Opie, and rotation for newly started apps. |
180 | * Differs from setDefaultRotation in that 1) it rotates currently running apps, | 180 | * Differs from setDefaultRotation in that 1) it rotates currently running apps, |
181 | * and 2) does not set deforient or save orientation to qpe.conf. | 181 | * and 2) does not set deforient or save orientation to qpe.conf. |
182 | */ | 182 | */ |
183 | 183 | ||
184 | inline void QPEApplication::setCurrentRotation( int r ) | 184 | inline void QPEApplication::setCurrentRotation( int r ) |
185 | { | 185 | { |
186 | // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots | ||
187 | // for compatibility with the SharpROM use fallback to setDefaultTransformation() | ||
188 | #if QT_VERSION > 233 | ||
186 | Transformation e = DegToTrans( r ); | 189 | Transformation e = DegToTrans( r ); |
187 | |||
188 | setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); | 190 | setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); |
189 | qApp->desktop()->qwsDisplay()->setTransformation( e ); | 191 | qApp->desktop()->qwsDisplay()->setTransformation( e ); |
192 | #else | ||
193 | setDefaultRotation( r ); | ||
194 | #endif | ||
190 | } | 195 | } |
191 | 196 | ||
192 | 197 | ||
193 | #endif | 198 | #endif |