source: subversion/applications/editors/osm-editor/qt3/osmeditor2.cpp @ 16590

Last change on this file since 16590 was 1158, checked in by nick, 13 years ago

moved current version to qt3 directory in preparation for qt4

File size: 1.6 KB
Line 
1/*
2    Copyright (C) 2005 Nick Whitelegg, Hogweed Software, nick@hogweed.org
3
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 2 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software
16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
17
18 */
19#include <qapplication.h>
20#include "MainWindow2.h"
21
22int main(int argc, char* argv[])
23{
24        double lat = 50.9, lon = -1.5, scale = 4000, w = 800, h = 600;
25
26        while(argc>2 && strlen(argv[1])>1 && argv[1][0] == '-')
27        {
28                switch(argv[1][1])
29                {
30                        case 'l': lat = atof(argv[2]);
31                                          break;
32
33                        case 'o': lon = atof(argv[2]);
34                                          break;
35
36                        case 's': scale = atof(argv[2]);
37                                          break;
38
39                        case 'w': w = atof(argv[2]);
40                                          break;
41
42                        case 'h': h = atof(argv[2]);
43                                          break;
44
45                        default : std::cerr << argv[0] << ": invalid option -- " 
46                                                                << argv[1][1] << std::endl;
47                                          exit(1);
48                }
49               
50                argc -= 2;
51                argv += 2;
52        }
53
54        QApplication app (argc, argv);
55        OpenStreetMap::MainWindow2 mainwin ( lat, lon, scale, w, h );
56        app.setMainWidget (&mainwin);
57        mainwin.show();
58        return app.exec();
59}
Note: See TracBrowser for help on using the repository browser.