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

Last change on this file since 757 was 757, checked in by mervart, 16 years ago

* empty log message *

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