C:/sources/c++/buddhabrot/buddhabrot/main.cpp

Go to the documentation of this file.
00001 /*
00002 Copyright 2010 Pierre SCHWARTZ
00003 
00004 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 
00005 documentation files (the "Software"), to deal in the Software without restriction, including without 
00006 limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
00007 of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following 
00008 conditions: The above copyright notice and this permission notice shall be included in all copies or 
00009 substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
00010 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
00011 PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
00012 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 
00013 OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
00014 */
00015 
00099 #include <QtGui/QApplication>
00100 #include <QtCore/QTranslator>
00101 #include <QtCore/QLocale>
00102 #include <QtCore>
00103 
00104 #include "app.h"
00105 #include "commandlinearguments.h"
00106 #include "networkagent.h"
00115 int main(int argc, char *argv[]){
00116         QApplication app(argc, argv);
00117 
00118         /* 
00119                 Analyser les éventuels arguments de la ligne de commande
00120         */
00121         CommandLineArguments parser(argc, argv);
00122         if (parser.isNetworkAgent()){
00123                 return NetworkAgent::process(parser);
00124         }else{
00125 
00126                 /* 
00127                         récupération des traductions, j'ai mis par défaut les traductions anglaises
00128                         pour bien voir que le résultat affiché n'est pas celui du code source
00129                 */
00130                 QTranslator qtTranslator;
00131                 //qtTranslator.load("buddha_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
00132                 qtTranslator.load("buddha_en");
00133                 app.installTranslator(&qtTranslator);
00134 
00135                 App widget;
00136                 widget.show();  
00137                 return app.exec();
00138         }
00139 }

Generated on Fri Feb 26 21:07:52 2010 for BuddhaBrot by  doxygen 1.4.6-NO