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

Last change on this file since 1315 was 775, checked in by mervart, 17 years ago

* empty log message *

File size: 1.3 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
23using namespace std;
24
25// Main Program
26/////////////////////////////////////////////////////////////////////////////
27int main(int argc, char *argv[]) {
28
29 // Command-Line Options
30 // --------------------
31 bool GUIenabled = true;
32 for (int ii = 1; ii < argc; ii++) {
33 if (QString(argv[ii]) == "-nw") {
34 GUIenabled = false;
35 break;
36 }
37 }
38
39 // Main Qt Class
40 // -------------
41 QApplication app(argc, argv, GUIenabled);
42
43 app.setOrganizationName("BKG");
44 app.setOrganizationDomain("www.bkg.bund.de");
45 app.setApplicationName("BKG_NTRIP_Server");
46
47 // Interactive Mode - open the main window
48 // ---------------------------------------
49 if (GUIenabled) {
50 bnsWindow* bnsWin = new bnsWindow();
51 bnsWin->show();
52 }
53
54 // Non-Interactive (Batch) Mode
55 // ----------------------------
56 else {
57 t_bns* bns = new t_bns();
58 bns->start();
59 }
60
61 return app.exec();
62}
Note: See TracBrowser for help on using the repository browser.