| Home · All Classes · Grouped Classes · Annotated · Functions |
/**************************************************************************** ** ** Copyright (C) 2000-2007 TROLLTECH ASA. All rights reserved. ** ** This file is part of the Opensource Edition of the Qtopia Toolkit. ** ** $TROLLTECH_DUAL_LICENSE$ ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ****************************************************************************/ #include "example.h" #include <qtopiaapplication.h> // Comment out this line to use a manual main() function. // Ensure you also remove CONFIG+=qtopia_main from application.pro if you do this. #define USE_THE_MAIN_MACROS #ifdef USE_THE_MAIN_MACROS QTOPIA_ADD_APPLICATION(QTOPIA_TARGET, Example) QTOPIA_MAIN #else #ifdef SINGLE_EXEC QTOPIA_ADD_APPLICATION(QTOPIA_TARGET, exampleapp) #define MAIN_FUNC main_exampleapp #else #define MAIN_FUNC main #endif // This is the storage for the SXE key that uniquely identified this applicaiton. // make will fail without this! QSXE_APP_KEY int MAIN_FUNC( int argc, char **argv ) { // This is required to load the SXE key into memory QSXE_SET_APP_KEY(argv[0]); QtopiaApplication a( argc, argv ); // Set the preferred document system connection type QTOPIA_SET_DOCUMENT_SYSTEM_CONNECTION(); Example *mw = new Example(); a.setMainWidget(mw); if ( mw->metaObject()->indexOfSlot("setDocument(QString)") != -1 ) { a.showMainDocumentWidget(); } else { a.showMainWidget(); } int rv = a.exec(); delete mw; return rv; } #endif
| Copyright © 2007 Trolltech | Trademarks | Qtopia 4.3.0 |