| 1 | /* ------------------------------------------------------------------------- | 
|---|
| 2 | * BKG NTRIP Client | 
|---|
| 3 | * ------------------------------------------------------------------------- | 
|---|
| 4 | * | 
|---|
| 5 | * Class:      bncSettings | 
|---|
| 6 | * | 
|---|
| 7 | * Purpose:    Subclasses the QSettings | 
|---|
| 8 | * | 
|---|
| 9 | * Author:     L. Mervart | 
|---|
| 10 | * | 
|---|
| 11 | * Created:    25-Jan-2009 | 
|---|
| 12 | * | 
|---|
| 13 | * Changes: | 
|---|
| 14 | * | 
|---|
| 15 | * -----------------------------------------------------------------------*/ | 
|---|
| 16 |  | 
|---|
| 17 | #include <QCoreApplication> | 
|---|
| 18 | #include <QStringList> | 
|---|
| 19 |  | 
|---|
| 20 | #include "bncsettings.h" | 
|---|
| 21 | #include "bncapp.h" | 
|---|
| 22 |  | 
|---|
| 23 | // Constructor | 
|---|
| 24 | //////////////////////////////////////////////////////////////////////////// | 
|---|
| 25 | bncSettings::bncSettings(bool noInit) : | 
|---|
| 26 | QSettings(((bncApp*) qApp)->confFileName(), QSettings::IniFormat) { | 
|---|
| 27 |  | 
|---|
| 28 | if (! noInit && allKeys().size() == 0) { | 
|---|
| 29 | setValue("adviseFail",       "15"); | 
|---|
| 30 | setValue("adviseReco",       "5"); | 
|---|
| 31 | setValue("adviseScript",     ""); | 
|---|
| 32 | setValue("autoStart",        "0"); | 
|---|
| 33 | setValue("binSampl",         "0"); | 
|---|
| 34 | setValue("casterUrlList", (QStringList() | 
|---|
| 35 | << "http://user:pass@www.euref-ip.net:2101" | 
|---|
| 36 | << "http://user:pass@www.igs-ip.net:2101" | 
|---|
| 37 | << "http://user:pass@products.igs-ip.net:2101")); | 
|---|
| 38 | setValue("corrIntr",         "1 day"); | 
|---|
| 39 | setValue("corrPath",         ""); | 
|---|
| 40 | setValue("corrPort",         ""); | 
|---|
| 41 | setValue("corrTime",         "5"); | 
|---|
| 42 | setValue("ephIntr",          "1 day"); | 
|---|
| 43 | setValue("ephPath",          ""); | 
|---|
| 44 | setValue("ephV3",            "0"); | 
|---|
| 45 | setValue("logFile",          ""); | 
|---|
| 46 | setValue("rawOutFile",       ""); | 
|---|
| 47 | setValue("miscMount",        ""); | 
|---|
| 48 | setValue("mountPoints",      ""); | 
|---|
| 49 | setValue("ntripVersion",     "1"); | 
|---|
| 50 | setValue("obsRate",          ""); | 
|---|
| 51 | setValue("onTheFlyInterval", "1 day"); | 
|---|
| 52 | setValue("outEphPort",       ""); | 
|---|
| 53 | setValue("outFile",          ""); | 
|---|
| 54 | setValue("outPort",          ""); | 
|---|
| 55 | setValue("outUPort",         ""); | 
|---|
| 56 | setValue("perfIntr",         ""); | 
|---|
| 57 | setValue("proxyHost",        ""); | 
|---|
| 58 | setValue("proxyPort",        ""); | 
|---|
| 59 | setValue("rnxAppend",        "0"); | 
|---|
| 60 | setValue("rnxIntr",          "1 day"); | 
|---|
| 61 | setValue("rnxPath",          ""); | 
|---|
| 62 | setValue("rnxSampl",         "0"); | 
|---|
| 63 | setValue("rnxScript",        ""); | 
|---|
| 64 | setValue("rnxSkel",          "SKL"); | 
|---|
| 65 | setValue("rnxV3",            "0"); | 
|---|
| 66 | setValue("scanRTCM",         "0"); | 
|---|
| 67 | setValue("serialAutoNMEA",   "Auto"); | 
|---|
| 68 | setValue("serialBaudRate",   "9600"); | 
|---|
| 69 | setValue("serialDataBits",   "8"); | 
|---|
| 70 | setValue("serialFileNMEA",   ""); | 
|---|
| 71 | setValue("serialHeightNMEA", ""); | 
|---|
| 72 | setValue("serialMountPoint", ""); | 
|---|
| 73 | setValue("serialParity",     "NONE"); | 
|---|
| 74 | setValue("serialPortName",   ""); | 
|---|
| 75 | setValue("serialStopBits",   "1"); | 
|---|
| 76 | setValue("serialFlowControl","OFF"); | 
|---|
| 77 | setValue("startTab",         "0"); | 
|---|
| 78 | setValue("statusTab",        "0"); | 
|---|
| 79 | setValue("waitTime",         "5"); | 
|---|
| 80 | setValue("pppMount",         ""); | 
|---|
| 81 | setValue("pppCorrMount",     ""); | 
|---|
| 82 | setValue("pppSPP",           "PPP"); | 
|---|
| 83 | setValue("pppSigmaCode",     "5.0"); | 
|---|
| 84 | setValue("pppSigmaPhase",    "0.02"); | 
|---|
| 85 | setValue("pppQuickStart",    ""); | 
|---|
| 86 | setValue("pppMaxSolGap",     ""); | 
|---|
| 87 | setValue("pppSigCrd0",       "100.0"); | 
|---|
| 88 | setValue("pppSigCrdP",       "100.0"); | 
|---|
| 89 | setValue("pppSigTrp0",       "0.1"); | 
|---|
| 90 | setValue("pppSigTrpP",       "1e-6"); | 
|---|
| 91 | setValue("pppAverage",       ""); | 
|---|
| 92 | setValue("pppUsePhase",      ""); | 
|---|
| 93 | setValue("pppEstTropo",      ""); | 
|---|
| 94 | setValue("pppGLONASS",       ""); | 
|---|
| 95 | setValue("pppGalileo",       ""); | 
|---|
| 96 | setValue("pppPlotCoordinates", ""); | 
|---|
| 97 | setValue("pppRefCrdX",       ""); | 
|---|
| 98 | setValue("pppRefCrdY",       ""); | 
|---|
| 99 | setValue("pppRefCrdZ",       ""); | 
|---|
| 100 | setValue("pppAntenna",       ""); | 
|---|
| 101 | setValue("pppAntex",         ""); | 
|---|
| 102 | setValue("pppApplySatAnt",   "0"); | 
|---|
| 103 | setValue("pppSync",          ""); | 
|---|
| 104 | setValue("nmeaFile",         ""); | 
|---|
| 105 | setValue("nmeaPort",         ""); | 
|---|
| 106 | setValue("combineStreams",   ""); | 
|---|
| 107 | setValue("uploadMountpointsOut",   ""); | 
|---|
| 108 | setValue("uploadEphHost",       ""); | 
|---|
| 109 | setValue("uploadEphPort",       ""); | 
|---|
| 110 | setValue("uploadEphPassword",   ""); | 
|---|
| 111 | setValue("uploadEphMountpoint", ""); | 
|---|
| 112 | setValue("uploadEphSample",     ""); | 
|---|
| 113 | sync(); | 
|---|
| 114 | } | 
|---|
| 115 | } | 
|---|
| 116 |  | 
|---|
| 117 |  | 
|---|