Allink  v0.1
Visualizza.cpp
1 /***********************************************************************
2 Visualizza: This program interface every function of the ElementiGrafici class with the Qt3 widget for calling the plotting function of ElementiGrafici.
3  Copyright (C) 2008 by Giovanni Marelli <sabeiro@virgilio.it>
4 
5 
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 ***********************************************************************/
20 #include "ElementiGrafici.h"
21 #include <qapplication.h>
22 
23 
24 int main(int argc,char **argv){
25  QApplication::setColorSpec( QApplication::CustomColor );
26  QApplication a(argc,argv);
27  Finestra f;
28  f.setGeometry(100,200,800,355);
29  a.setMainWidget( &f );
30  f.show();
31  int *FileList = (int *)calloc(argc,sizeof(int));
32  int NFile = 0;
33  for(int i=1;i<argc;i++){
34  if(argv[i][0] != '-'){
35  FileList[NFile++] = i;
36  }
37  if(!strcmp(argv[i],"-c") && i<argc-1){
38  f.ConfFile(argv[i+1]);
39  i++;
40  }
41  }
42  f.DataFile(argv,FileList,NFile);
43  // f.setStyle(QStyle::QPalstiqueStyle);
44 
45  return a.exec();
46 }
Defines a window.