author | mickeyl <mickeyl> | 2005-01-02 15:20:41 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-02 15:20:41 (UTC) |
commit | 71232a4e45f78041c2ab138edf45903bbf2b34ce (patch) (side-by-side diff) | |
tree | 6c51dc86163e656c7ac6a3cd6ea7e7e0f1ab89c0 /library/qpeapplication.h | |
parent | 226a83c4b4334648de408249dba61bd1f7e6dba3 (diff) | |
download | opie-71232a4e45f78041c2ab138edf45903bbf2b34ce.zip opie-71232a4e45f78041c2ab138edf45903bbf2b34ce.tar.gz opie-71232a4e45f78041c2ab138edf45903bbf2b34ce.tar.bz2 |
Add the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers
-rw-r--r-- | library/qpeapplication.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h index 00d3d31..849d5b3 100644 --- a/library/qpeapplication.h +++ b/library/qpeapplication.h @@ -199,33 +199,46 @@ inline Transformation DegToTrans ( int d ) { Transformation t = static_cast<Transformation>( d / 90 ); return t; } /* * Set current rotation of Opie, and rotation for newly started apps. * Differs from setDefaultRotation in that 1) it rotates currently running apps, * and 2) does not set deforient or save orientation to qpe.conf. */ inline void QPEApplication::setCurrentRotation( int r ) { // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots // for compatibility with the SharpROM use fallback to setDefaultTransformation() #if QT_VERSION > 233 Transformation e = DegToTrans( r ); ::setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); qApp->desktop()->qwsDisplay()->setTransformation( e ); #else setDefaultRotation( r ); #endif } +/* + * Qtopia 1.7 SDK compatibility macros + * FIXME: Support Opie Quicklaunch Interface + */ +#define QTOPIA_ADD_APPLICATION(NAME,IMPLEMENTATION) \ + int main( int argc, char** argv ) \ + { \ + QPEApplication app = QPEApplication( argc, argv ); \ + IMPLEMENTATION* mw = new IMPLEMENTATION(); \ + app.showMainWidget( mw ); \ + app.exec(); \ + } +#define QTOPIA_MAIN // Bee-Bop-Alula /* * -remove me */ #ifdef Q_WS_QWS extern Q_EXPORT QRect qt_maxWindowRect; #endif #endif |