Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

main.cpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002  *                                                                             *
00003  *   Copyright (C) 2003  Erik Sjolund,  (<html>Erik Sj&ouml;lund</html>)       *
00004  *                       Center for Genomics and Bioinformatics,               *
00005  *                       Karolinska Institutet,                                *
00006  *                       Stockholm,                                            *
00007  *                       Sweden                                                *
00008  *                                                                             *
00009  *  Author: Erik Sjolund                                                       *
00010  *  Email: erik.sjolund@adivo.se                                               *
00011  *                                                                             *
00012  *******************************************************************************
00013  */
00014 
00015 
00016 #include <qapplication.h>
00017 #include <qfont.h>
00018 #include <qstring.h>
00019 #include <qtextcodec.h>
00020 #include <qtranslator.h>
00021 
00022 #include "cmdline.h"
00023 #include "trapper.h"
00024 
00025 
00026 #include <map>
00027 
00028 //std::map<int, FeatureMaker * > FeatureMaker::registry;
00029 
00030 
00031 #include <iostream>
00032 using namespace std;
00033 
00034 
00035 
00036 int main(int argc, char *argv[])
00037 { 
00038   gengetopt_args_info args_info;
00039   if (cmdline_parser (argc, argv, &args_info) != 0)
00040   {
00041     exit(1) ;
00042   }
00043 
00044   qDebug( "in main()" );
00045   QApplication a(argc, argv);
00046   a.setFont(QFont("helvetica", 12));
00047   QTranslator tor( 0 );
00048   // set the location where your .qm files are in load() below as the last parameter instead of "."
00049   // for development, use "/" to use the english original as
00050   // .qm files are stored in the base project directory.
00051   tor.load( QString("trapper.") + QTextCodec::locale(), "." );
00052   a.installTranslator( &tor );
00053   TrapperApp *trapper=new TrapperApp();
00054 
00055   a.setMainWidget(trapper);
00056   
00057   a.connect( &a, SIGNAL(lastWindowClosed()), trapper, SLOT(slotFileQuit()) );
00058 
00059   trapper->show();
00060   trapper->setDbHomeDir(args_info.dbhome_dir_arg);
00061   trapper->setViewModeConfFile( args_info.configuration_file_arg );
00062 
00063 
00064 
00065 
00066 
00067   // should be parse many binary files into one big xml file?
00068 //   if(args_info.inputs_num < 1){
00069 //     cerr<<"************"<<endl;
00070 //     trapper->openDocumentFile();
00071 //     cerr<<"************"<<endl;
00072 //   }
00073 //   else
00074 //     for ( unsigned i = 0 ; i < args_info.inputs_num ; ++i )
00075 //       {
00076 //         trapper->openDocumentFile(args_info.inputs[i]);
00077 //         cerr<<"################"<<endl;
00078 //       }
00079   return a.exec();
00080 }

Generated on Fri Mar 17 17:44:24 2006 for trapper by  doxygen 1.4.4