summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index cff3e43..6486cad 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -180,63 +180,63 @@ private:
180 180
181}; 181};
182 182
183 183
184 184
185enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ 185enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */
186 186
187inline int TransToDeg ( Transformation t ) 187inline int TransToDeg ( Transformation t )
188{ 188{
189 int d = static_cast<int>( t ); 189 int d = static_cast<int>( t );
190 return d * 90; 190 return d * 90;
191} 191}
192 192
193inline Transformation DegToTrans ( int d ) 193inline Transformation DegToTrans ( int d )
194{ 194{
195 Transformation t = static_cast<Transformation>( d / 90 ); 195 Transformation t = static_cast<Transformation>( d / 90 );
196 return t; 196 return t;
197} 197}
198 198
199/* 199/*
200 * Set current rotation of Opie, and rotation for newly started apps. 200 * Set current rotation of Opie, and rotation for newly started apps.
201 * Differs from setDefaultRotation in that 1) it rotates currently running apps, 201 * Differs from setDefaultRotation in that 1) it rotates currently running apps,
202 * and 2) does not set deforient or save orientation to qpe.conf. 202 * and 2) does not set deforient or save orientation to qpe.conf.
203 */ 203 */
204 204
205inline void QPEApplication::setCurrentRotation( int r ) 205inline void QPEApplication::setCurrentRotation( int r )
206{ 206{
207 // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots 207 // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots
208 // for compatibility with the SharpROM use fallback to setDefaultTransformation() 208 // for compatibility with the SharpROM use fallback to setDefaultTransformation()
209#if QT_VERSION > 233 209#if QT_VERSION > 233
210 Transformation e = DegToTrans( r ); 210 Transformation e = DegToTrans( r );
211 QCString old = getenv("QWS_DISPLAY") ? getenv( "QWS_DISPLAY" ) : "Transformed"; 211 QCString old = getenv("QWS_DISPLAY") ? getenv( "QWS_DISPLAY" ) : "Transformed";
212 int j = 0; 212 int j = 0;
213 QString driver( old.left( ( ( j = old.find( ':' ) ) >= 0 ) ? j : old.size() ).data() ); 213 QString driver( old.left( ( ( j = old.find( ':' ) ) >= 0 ) ? j : old.size() ).data() );
214 ::setenv( "QWS_DISPLAY", QString( "%1:Rot%2:0" ).arg( driver ).arg( r ).latin1(), 1 ); 214 ::setenv( "QWS_DISPLAY", QString( "%1:Rot%2:0" ).arg( driver ).arg( r ).latin1(), 1 );
215 qApp->desktop()->qwsDisplay()->setTransformation( e ); 215 qApp->desktop()->qwsDisplay()->setTransformation( e );
216#else 216#else
217 setDefaultRotation( r ); 217 setDefaultRotation( r );
218#endif 218#endif
219} 219}
220 220
221/* 221/*
222 * Qtopia 1.7 SDK compatibility macros 222 * Qtopia 1.7 SDK compatibility macros
223 * FIXME: Support Opie Quicklaunch Interface 223 * FIXME: Support Opie Quicklaunch Interface
224 */ 224 */
225 #define QTOPIA_ADD_APPLICATION(NAME,IMPLEMENTATION) \ 225 #define QTOPIA_ADD_APPLICATION(NAME,IMPLEMENTATION) \
226 int main( int argc, char** argv ) \ 226 int main( int argc, char** argv ) \
227 { \ 227 { \
228 QPEApplication app = QPEApplication( argc, argv );\ 228 QPEApplication app( argc, argv );\
229 IMPLEMENTATION* mw = new IMPLEMENTATION(); \ 229 IMPLEMENTATION* mw = new IMPLEMENTATION(); \
230 app.showMainWidget( mw ); \ 230 app.showMainWidget( mw ); \
231 app.exec(); \ 231 app.exec(); \
232 } 232 }
233#define QTOPIA_MAIN // Bee-Bop-Alula 233#define QTOPIA_MAIN // Bee-Bop-Alula
234 234
235/* 235/*
236 * -remove me 236 * -remove me
237 */ 237 */
238#ifdef Q_WS_QWS 238#ifdef Q_WS_QWS
239extern Q_EXPORT QRect qt_maxWindowRect; 239extern Q_EXPORT QRect qt_maxWindowRect;
240#endif 240#endif
241 241
242#endif 242#endif