main.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <qpe/qpeapplication.h>
00012 #include <qfont.h>
00013 #include "Controller.h"
00014 #include "MainWindow.h"
00015 #include "zlib.h"
00016
00017 QAction* action[ ACTION_COUNT ];
00018
00019 int main( int argc, char **argv ) {
00020
00021 static const char* myVersion = ZLIB_VERSION;
00022
00023 if( zlibVersion()[ 0 ] != myVersion[ 0 ] ) {
00024 fprintf( stderr, "incompatible zlib version\n" );
00025 exit( 1 );
00026 } else if( strcmp( zlibVersion(), ZLIB_VERSION ) != 0 ) {
00027 fprintf( stderr, "warning: different zlib version\n" );
00028 }
00029
00030
00031
00032
00033 QPEApplication a( argc, argv );
00034 Controller* controller = new Controller();
00035 if( !controller->init() ) {
00036 cerr << "Cannot initialize controller. Check disk space and file permissions." << endl;
00037 exit( 2 );
00038 }
00039
00040 QFont labelsFont( controller->getPreferences().getLabelsFont() );
00041 qApp->setFont( labelsFont );
00042
00043 MainWindow* mainWindow = new MainWindow( controller );
00044 a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
00045 a.showMainWidget( mainWindow );
00046 return a.exec();
00047 }