Main Page | Namespace List | Data Structures | File List | Data Fields | Globals

main.cpp

Go to the documentation of this file.
00001 # include <qapplication.h>
00002 # include <inn.h>
00003 # include <network.h>
00004 # include <qsplashscreen.h>
00005 # include <time.h>
00006 # include <randomc.h>
00007 
00008 Network * network ;
00009 Inn * inn ;
00010 int32 seed ;
00011 TRandomMersenne *rg ;
00012 
00013 int main( int argc, char ** argv ) {
00014     QApplication a( argc, argv ) ;
00015     QSplashScreen *splash = new QSplashScreen( QPixmap::fromMimeSource( "splash.png" ) ) ;
00016     splash->show() ;
00017     splash->message( "Loading ...", Qt::AlignBottom, Qt::darkGray ) ;
00018     splash->message( "Setting up random generator's seed ...", Qt::AlignBottom, Qt::darkGray ) ;
00019     seed = time(0) ;
00020     splash->message( "Setting up global datas ...", Qt::AlignBottom, Qt::darkGray ) ;
00021     rg = new TRandomMersenne(seed) ;
00022     inn = new Inn() ;
00023     network = new Network() ;
00024     splash->message( "Ready ...", Qt::AlignBottom, Qt::darkGray ) ;
00025     inn->show();
00026     a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
00027     splash->finish( inn ) ;
00028     delete splash ;
00029  
00030     return a.exec();
00031 }

Generated on Fri Dec 3 14:57:50 2004 for INN by doxygen 1.3.6