#include <qapplication.h>
#include <qfont.h>
#include <qstring.h>
#include <qtextcodec.h>
#include <qtranslator.h>
#include "cmdline.h"
#include "trapper.h"
#include <map>
#include <iostream>
Include dependency graph for main.cpp:
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
|
Definition at line 36 of file main.cpp. References cmdline_parser(), gengetopt_args_info::configuration_file_arg, gengetopt_args_info::dbhome_dir_arg, TrapperApp::setDbHomeDir(), and TrapperApp::setViewModeConfFile(). 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 }
|