/*******************************************************************************
*                                                                              *
* Société de Transports de Montréal.                                    	   *
* 2012                                                                         *
*                                                                              *
* Projet Zones Tests                                                           *
*                                                                              *
*                                                                              *
*                                                                              *
*******************************************************************************/
/*
    Description:
    Le main.

*/

/* ************************************************************************** */
/* Revision:
### 20121210 JFM
    Verision d'origine.

### YYYYMMDD Description du besoin ou du bug
    Description du changement.
 */

/* ************************************************************************** */
#include <QApplication>
#include "OutilZT.h"
#include "MainPanel.h"

int main(int argc, char *argv[])
{
//    QApplication::setGraphicsSystem("raster");
    //Qt Mainframe application instance.
    QApplication a(argc, argv);

    QFont serifFont("Times", 10, QFont::Bold);
    QApplication::setFont(serifFont);


    bool EngMode = false;
    bool CanImport = false;
    for ( int i = 1 ; i < argc ; i ++ )
        {
            // qDebug("%d %s",i,argv[i]);
            if ( strcmp(argv[i],"-ing") == 0 )
            {
               EngMode  = true;
               CanImport = true;
            }
            if ( strcmp(argv[i],"-import") == 0 )
            {
               CanImport = true;
            }
        }


    //Create program instance
    COutilZT OutilZT;
    OutilZT.mIsEngMode = EngMode;
    OutilZT.mCanImport = CanImport;

    //setup stdout for screen printing.
    setvbuf(stdout, NULL, _IONBF, 0 );

    //Run Zone Tests
    OutilZT.Start();


    return a.exec();


}
