source: ntrip/trunk/BNS/bnsmain.cpp@ 1675

Last change on this file since 1675 was 1675, checked in by weber, 15 years ago

* empty log message *

File size: 1.6 KB
Line 
1/* -------------------------------------------------------------------------
2 * BKG NTRIP Server
3 * -------------------------------------------------------------------------
4 *
5 * Class: main
6 *
7 * Purpose: Application starts here
8 *
9 * Author: L. Mervart
10 *
11 * Created: 29-Mar-2008
12 *
13 * Changes:
14 *
15 * -----------------------------------------------------------------------*/
16
17#include <iostream>
18
19#include "bns.h"
20#include "bnswindow.h"
21#include "bnsutils.h"
22#include "bnsappw.h"
23#include "bnssettings.h"
24
25using namespace std;
26
27// Main Program
28/////////////////////////////////////////////////////////////////////////////
29int main(int argc, char *argv[]) {
30
31 QString confFileName;
32
33 // Command-Line Options
34 // --------------------
35 bool GUIenabled = true;
36 for (int ii = 1; ii < argc; ii++) {
37 if (QString(argv[ii]) == "-nw") {
38 GUIenabled = false;
39 break;
40 }
41 }
42
43 if (argc == 2 && GUIenabled) {
44 confFileName = QString(argv[1]);
45 }
46
47 // Main Qt Class
48 // -------------
49//QApplication app(argc, argv, GUIenabled);
50 bnsApp app(argc, argv, GUIenabled);
51
52 app.setApplicationName("BNS");
53 app.setOrganizationName("BKG");
54 app.setOrganizationDomain("www.bkg.bund.de");
55 app.setConfFileName( confFileName );
56
57 // Interactive Mode - open the main window
58 // ---------------------------------------
59 if (GUIenabled) {
60 bnsWindow* bnsWin = new bnsWindow();
61 bnsWin->show();
62 }
63
64 // Non-Interactive (Batch) Mode
65 // ----------------------------
66 else {
67 t_bns* bns = new t_bns();
68 bns->start();
69 }
70
71 return app.exec();
72}
Note: See TracBrowser for help on using the repository browser.