Allink  v0.1
Visualizza.cpp
00001 /***********************************************************************
00002 Visualizza: This program interface every function of the ElementiGrafici class with the Qt3 widget for calling the plotting function of ElementiGrafici.
00003  Copyright (C) 2008 by Giovanni Marelli <sabeiro@virgilio.it>
00004 
00005 
00006 This program is free software; you can redistribute it and/or modify
00007 it under the terms of the GNU General Public License as published by
00008 the Free Software Foundation; either version 2 of the License, or
00009 (at your option) any later version.
00010 
00011 This program is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with this program; if not, write to the Free Software
00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 ***********************************************************************/
00020 #include "ElementiGrafici.h"
00021 #include <qapplication.h>
00022 
00023 
00024 int main(int argc,char **argv){
00025   QApplication::setColorSpec( QApplication::CustomColor );
00026   QApplication a(argc,argv);
00027   Finestra f;
00028   f.setGeometry(100,200,800,355);
00029   a.setMainWidget( &f );
00030   f.show();
00031   int *FileList = (int *)calloc(argc,sizeof(int));
00032   int NFile = 0;
00033   for(int i=1;i<argc;i++){
00034     if(argv[i][0] != '-'){
00035       FileList[NFile++] = i;
00036     }
00037     if(!strcmp(argv[i],"-c") && i<argc-1){
00038       f.ConfFile(argv[i+1]);
00039       i++;
00040     }
00041   }
00042   f.DataFile(argv,FileList,NFile);
00043   //  f.setStyle(QStyle::QPalstiqueStyle);
00044   
00045   return a.exec();
00046 }