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

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

* empty log message *

File size: 1.7 KB
RevLine 
[747]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
[748]17#include <iostream>
[747]18
[756]19#include "bns.h"
[748]20#include "bnswindow.h"
[775]21#include "bnsutils.h"
[1680]22#include "bnsapp.h"
[1668]23#include "bnssettings.h"
[748]24
[747]25using namespace std;
26
27// Main Program
28/////////////////////////////////////////////////////////////////////////////
29int main(int argc, char *argv[]) {
30
[1668]31 QString confFileName;
32
[757]33 // Command-Line Options
34 // --------------------
[747]35 bool GUIenabled = true;
[1676]36
[747]37 for (int ii = 1; ii < argc; ii++) {
[1676]38 if (QByteArray(argv[ii]) == "-nw") {
[747]39 GUIenabled = false;
40 }
[1676]41 if (ii + 1 < argc) {
42 if (QByteArray(argv[ii]).indexOf("-conf") != -1) {
43 confFileName = QString(argv[ii+1]);
44 }
45 }
[747]46 }
[1675]47 if (argc == 2 && GUIenabled) {
48 confFileName = QString(argv[1]);
49 }
50
[757]51 // Main Qt Class
52 // -------------
[1668]53//QApplication app(argc, argv, GUIenabled);
54 bnsApp app(argc, argv, GUIenabled);
[747]55
[1668]56 app.setApplicationName("BNS");
[756]57 app.setOrganizationName("BKG");
58 app.setOrganizationDomain("www.bkg.bund.de");
[1668]59 app.setConfFileName( confFileName );
[747]60
61 // Interactive Mode - open the main window
62 // ---------------------------------------
63 if (GUIenabled) {
[758]64 bnsWindow* bnsWin = new bnsWindow();
[748]65 bnsWin->show();
[747]66 }
67
68 // Non-Interactive (Batch) Mode
69 // ----------------------------
70 else {
[758]71 t_bns* bns = new t_bns();
[757]72 bns->start();
[747]73 }
74
75 return app.exec();
76}
Note: See TracBrowser for help on using the repository browser.