[3740] | 1 | // Part of BNC, a utility for retrieving decoding and
|
---|
| 2 | // converting GNSS data streams from NTRIP broadcasters.
|
---|
| 3 | //
|
---|
| 4 | // Copyright (C) 2007
|
---|
| 5 | // German Federal Agency for Cartography and Geodesy (BKG)
|
---|
| 6 | // http://www.bkg.bund.de
|
---|
| 7 | // Czech Technical University Prague, Department of Geodesy
|
---|
| 8 | // http://www.fsv.cvut.cz
|
---|
| 9 | //
|
---|
| 10 | // Email: euref-ip@bkg.bund.de
|
---|
| 11 | //
|
---|
| 12 | // This program is free software; you can redistribute it and/or
|
---|
| 13 | // modify it under the terms of the GNU General Public License
|
---|
| 14 | // as published by the Free Software Foundation, version 2.
|
---|
| 15 | //
|
---|
| 16 | // This program is distributed in the hope that it will be useful,
|
---|
| 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 19 | // GNU General Public License for more details.
|
---|
| 20 | //
|
---|
| 21 | // You should have received a copy of the GNU General Public License
|
---|
| 22 | // along with this program; if not, write to the Free Software
|
---|
| 23 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
---|
| 24 |
|
---|
| 25 | /* -------------------------------------------------------------------------
|
---|
| 26 | * BKG NTRIP Client
|
---|
| 27 | * -------------------------------------------------------------------------
|
---|
| 28 | *
|
---|
| 29 | * Class: teqcDlg
|
---|
| 30 | *
|
---|
| 31 | * Purpose: Displays the teqc-like editing options
|
---|
| 32 | *
|
---|
| 33 | * Author: L. Mervart
|
---|
| 34 | *
|
---|
| 35 | * Created: 28-Mar-2012
|
---|
| 36 | *
|
---|
| 37 | * Changes:
|
---|
| 38 | *
|
---|
| 39 | * -----------------------------------------------------------------------*/
|
---|
| 40 |
|
---|
| 41 | #include <iostream>
|
---|
| 42 |
|
---|
| 43 | #include "teqcdlg.h"
|
---|
| 44 |
|
---|
| 45 | using namespace std;
|
---|
| 46 |
|
---|
| 47 | // Constructor
|
---|
| 48 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 49 | teqcDlg::teqcDlg(QWidget* parent) : QDialog(parent) {
|
---|
| 50 |
|
---|
[3742] | 51 | setWindowTitle(tr("Teqc Editing Options"));
|
---|
[3740] | 52 |
|
---|
| 53 | int ww = QFontMetrics(font()).width('w');
|
---|
| 54 |
|
---|
[3743] | 55 | _teqcRnxVersion = new QComboBox(this);
|
---|
| 56 | _teqcSampling = new QSpinBox(this);
|
---|
| 57 | _teqcStartDateTime = new QDateTimeEdit(this);
|
---|
| 58 | _teqcEndDateTime = new QDateTimeEdit(this);
|
---|
[3742] | 59 | _teqcOldMarkerName = new QLineEdit(this);
|
---|
| 60 | _teqcNewMarkerName = new QLineEdit(this);
|
---|
| 61 | _teqcOldAntennaName = new QLineEdit(this);
|
---|
| 62 | _teqcNewAntennaName = new QLineEdit(this);
|
---|
| 63 | _teqcOldReceiverName = new QLineEdit(this);
|
---|
| 64 | _teqcNewReceiverName = new QLineEdit(this);
|
---|
| 65 |
|
---|
[3745] | 66 | _teqcRnxVersion->setEditable(false);
|
---|
| 67 | _teqcRnxVersion->addItems(QString("2,3").split(","));
|
---|
| 68 | _teqcRnxVersion->setMaximumWidth(7*ww);
|
---|
| 69 |
|
---|
| 70 | _teqcSampling->setMinimum(0);
|
---|
| 71 | _teqcSampling->setMaximum(60);
|
---|
| 72 | _teqcSampling->setSingleStep(5);
|
---|
| 73 | _teqcSampling->setSuffix(" sec");
|
---|
| 74 | _teqcSampling->setMaximumWidth(7*ww);
|
---|
| 75 |
|
---|
| 76 | QGridLayout* grid = new QGridLayout;
|
---|
| 77 |
|
---|
[3742] | 78 | int ir = 0;
|
---|
[3743] | 79 | grid->addWidget(new QLabel("RNX Version"), ir, 1);
|
---|
| 80 | grid->addWidget(_teqcRnxVersion, ir, 2);
|
---|
[3745] | 81 | grid->addWidget(new QLabel(" Sampling"), ir, 3);
|
---|
[3743] | 82 | grid->addWidget(_teqcSampling, ir, 4);
|
---|
[3742] | 83 | ++ir;
|
---|
[3743] | 84 | grid->addWidget(new QLabel("Start"), ir, 1);
|
---|
| 85 | grid->addWidget(_teqcStartDateTime, ir, 2);
|
---|
[3745] | 86 | grid->addWidget(new QLabel(" End"), ir, 3);
|
---|
[3743] | 87 | grid->addWidget(_teqcEndDateTime, ir, 4);
|
---|
[3742] | 88 | ++ir;
|
---|
[3743] | 89 | grid->addWidget(new QLabel("Old"), ir, 1, 1, 2, Qt::AlignCenter);
|
---|
| 90 | grid->addWidget(new QLabel("New"), ir, 3, 1, 2, Qt::AlignCenter);
|
---|
| 91 | ++ir;
|
---|
| 92 | grid->addWidget(new QLabel("Marker Name"), ir, 0);
|
---|
| 93 | grid->addWidget(_teqcOldMarkerName, ir, 1, 1, 2);
|
---|
| 94 | grid->addWidget(_teqcNewMarkerName, ir, 3, 1, 2);
|
---|
| 95 | ++ir;
|
---|
| 96 | grid->addWidget(new QLabel("Antenna Name"), ir, 0);
|
---|
| 97 | grid->addWidget(_teqcOldAntennaName, ir, 1, 1, 2);
|
---|
| 98 | grid->addWidget(_teqcNewAntennaName, ir, 3, 1, 2);
|
---|
| 99 | ++ir;
|
---|
[3742] | 100 | grid->addWidget(new QLabel("Receiver Name"), ir, 0);
|
---|
[3743] | 101 | grid->addWidget(_teqcOldReceiverName, ir, 1, 1, 2);
|
---|
| 102 | grid->addWidget(_teqcNewReceiverName, ir, 3, 1, 2);
|
---|
[3742] | 103 |
|
---|
[3740] | 104 | _buttonWhatsThis = new QPushButton(tr("Help=Shift+F1"), this);
|
---|
| 105 | connect(_buttonWhatsThis, SIGNAL(clicked()), this, SLOT(slotWhatsThis()));
|
---|
| 106 |
|
---|
| 107 | _buttonOK = new QPushButton(tr("OK"), this);
|
---|
| 108 | connect(_buttonOK, SIGNAL(clicked()), this, SLOT(slotOK()));
|
---|
| 109 |
|
---|
| 110 | _buttonCancel = new QPushButton(tr("Cancel"), this);
|
---|
[3741] | 111 | connect(_buttonCancel, SIGNAL(clicked()), this, SLOT(close()));
|
---|
[3740] | 112 |
|
---|
| 113 | QHBoxLayout* buttonLayout = new QHBoxLayout;
|
---|
| 114 | buttonLayout->addWidget(_buttonWhatsThis);
|
---|
| 115 | buttonLayout->addStretch(1);
|
---|
| 116 | buttonLayout->addWidget(_buttonOK);
|
---|
| 117 | buttonLayout->addWidget(_buttonCancel);
|
---|
| 118 |
|
---|
[3745] | 119 | QVBoxLayout* mainLayout = new QVBoxLayout(this);
|
---|
[3742] | 120 | mainLayout->addLayout(grid);
|
---|
[3740] | 121 | mainLayout->addLayout(buttonLayout);
|
---|
| 122 | }
|
---|
| 123 |
|
---|
| 124 | // Destructor
|
---|
| 125 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 126 | teqcDlg::~teqcDlg() {
|
---|
| 127 | delete _buttonOK;
|
---|
| 128 | delete _buttonCancel;
|
---|
| 129 | delete _buttonWhatsThis;
|
---|
| 130 | }
|
---|
| 131 |
|
---|
[3741] | 132 | // Accept the Options
|
---|
| 133 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 134 | void teqcDlg::slotOK() {
|
---|
| 135 |
|
---|
| 136 | }
|
---|
| 137 |
|
---|
| 138 | // Whats This Help
|
---|
| 139 | ////////////////////////////////////////////////////////////////////////////
|
---|
| 140 | void teqcDlg::slotWhatsThis() {
|
---|
| 141 | QWhatsThis::enterWhatsThisMode();
|
---|
| 142 | }
|
---|