- Timestamp:
- Apr 8, 2008, 2:45:41 PM (17 years ago)
- Location:
- trunk/BNS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bns.cpp
r786 r787 27 27 this->setTerminationEnabled(true); 28 28 29 // Thread that handles broadcast ephemeris 30 // --------------------------------------- 29 31 _bnseph = new t_bnseph(parent); 30 32 31 33 connect(_bnseph, SIGNAL(newEph(gpsEph*)), this, SLOT(slotNewEph(gpsEph*))); 32 33 34 connect(_bnseph, SIGNAL(newMessage(QByteArray)), 34 35 this, SLOT(slotMessage(const QByteArray))); 35 36 36 connect(_bnseph, SIGNAL(error(QByteArray)), 37 37 this, SLOT(slotError(const QByteArray))); 38 38 39 // S tartlistening for rtnet results40 // --------------------------------- 39 // Server listening for rtnet results 40 // ---------------------------------- 41 41 QSettings settings; 42 42 _clkSocket = 0; 43 43 _clkServer = new QTcpServer; 44 ///// _clkServer->listen(QHostAddress::Any, settings.value("clkPort").toInt()); 45 _clkServer->listen(QHostAddress::Any, 5555); 44 _clkServer->listen(QHostAddress::Any, settings.value("clkPort").toInt()); 46 45 connect(_clkServer, SIGNAL(newConnection()),this, SLOT(slotNewConnection())); 47 46 47 // Socket for outputting the results 48 // --------------------------------- 48 49 _outSocket = 0; 49 50 } … … 54 55 deleteBnsEph(); 55 56 delete _clkServer; 57 delete _clkSocket; 56 58 delete _outSocket; 57 59 QMapIterator<QString, t_ephPair*> it(_ephList); … … 92 94 void t_bns::slotNewConnection() { 93 95 slotMessage("t_bns::slotNewConnection"); 96 delete _clkSocket; 94 97 _clkSocket = _clkServer->nextPendingConnection(); 95 98 } -
trunk/BNS/bnswindow.cpp
r764 r787 112 112 setCentralWidget(_canvas); 113 113 114 _ephHostLineEdit = new QLineEdit(settings.value("ephHost").toString());115 _ephHostLineEdit->setWhatsThis(tr("Host for broadcast ephemeris (from BNC)"));116 114 _ephPortLineEdit = new QLineEdit(settings.value("ephPort").toString()); 117 115 _ephPortLineEdit->setWhatsThis(tr("Port for broadcast ephemeris (from BNC)")); 118 116 _ephPortLineEdit->setMaximumWidth(9*ww); 119 117 120 _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString()); 121 _proxyHostLineEdit->setWhatsThis(tr("<p>If you are running BNS within a protected Local Area Network (LAN), you might need to use a proxy server to access the Internet. Enter your proxy server IP and port number in case one is operated in front of BNC. If you do not know the IP and port of your proxy server, check the proxy server settings in your Internet browser or ask your network administrator.</p><p>Note that IP streaming is sometimes not allowed in a LAN. In this case you need to ask your network administrator for an appropriate modification of the local security policy or for the installation of a TCP relay to the NTRIP broadcasters. If these are not possible, you might need to run BNC outside your LAN on a network that has unobstructed connection to the Internet.</p>")); 122 _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString()); 123 _proxyPortLineEdit->setWhatsThis(tr("<p>If you are running BNS within a protected Local Area Network (LAN), you might need to use a proxy server to access the Internet. Enter your proxy server IP and port number in case one is operated in front of BNC. If you do not know the IP and port of your proxy server, check the proxy server settings in your Internet browser or ask your network administrator.</p><p>Note that IP streaming is sometimes not allowed in a LAN. In this case you need to ask your network administrator for an appropriate modification of the local security policy or for the installation of a TCP relay to the NTRIP broadcasters. If these are not possible, you might need to run BNC outside your LAN on a network that has unobstructed connection to the Internet.</p>")); 124 _proxyPortLineEdit->setMaximumWidth(9*ww); 118 _clkPortLineEdit = new QLineEdit(settings.value("clkPort").toString()); 119 _clkPortLineEdit->setWhatsThis(tr("Port for clock results (from RTNET)")); 120 _clkPortLineEdit->setMaximumWidth(9*ww); 125 121 126 122 // TabWidget 127 123 // --------- 128 124 QTabWidget* tabs = new QTabWidget(); 129 QWidget* tab_inp = new QWidget(); 130 QWidget* tab_out = new QWidget(); 131 QWidget* tab_proxy = new QWidget(); 132 tabs->addTab(tab_inp, tr("Input")); 133 tabs->addTab(tab_out, tr("Output")); 134 tabs->addTab(tab_proxy,tr("Proxy")); 125 QWidget* tab_inp = new QWidget(); 126 QWidget* tab_out = new QWidget(); 127 tabs->addTab(tab_inp, tr("INPUT")); 128 tabs->addTab(tab_out, tr("OUTPUT")); 135 129 136 130 // Input-Tab 137 131 // --------- 138 132 QGridLayout* iLayout = new QGridLayout; 139 /// iLayout->setColumnMinimumWidth(0,12*ww); 140 iLayout->addWidget(new QLabel("Input Options"),0, 0, 1, 2, Qt::AlignLeft); 141 iLayout->addWidget(new QLabel("Host (Ephemeris)"),1,0, Qt::AlignLeft); 142 iLayout->addWidget(_ephHostLineEdit,1, 1); 143 iLayout->addWidget(new QLabel("Port (Ephemeris)"),2,0, Qt::AlignLeft); 144 iLayout->addWidget(_ephPortLineEdit,2, 1); 133 iLayout->addWidget(new QLabel("Port (Ephemeris)"), 0, 0, Qt::AlignLeft); 134 iLayout->addWidget(_ephPortLineEdit, 0, 1); 135 iLayout->addWidget(new QLabel("Port (Clocks)"), 1, 0, Qt::AlignLeft); 136 iLayout->addWidget(_clkPortLineEdit, 1, 1); 145 137 tab_inp->setLayout(iLayout); 146 147 // Proxy-Tab148 // ---------149 QGridLayout* pLayout = new QGridLayout;150 pLayout->setColumnMinimumWidth(0,12*ww);151 pLayout->addWidget(new QLabel("Settings for the proxy in protected networks, leave the boxes blank if none."),0, 0, 1, 2, Qt::AlignLeft);152 pLayout->addWidget(new QLabel("Proxy host"),1,0, Qt::AlignLeft);153 pLayout->addWidget(_proxyHostLineEdit,1, 1);154 pLayout->addWidget(new QLabel("Proxy port"),2,0, Qt::AlignLeft);155 pLayout->addWidget(_proxyPortLineEdit,2,1);156 tab_proxy->setLayout(pLayout);157 138 158 139 // Log … … 262 243 void bnsWindow::slotSaveOptions() { 263 244 QSettings settings; 264 settings.setValue("ephHost", _ephHostLineEdit->text());265 245 settings.setValue("ephPort", _ephPortLineEdit->text()); 266 settings.setValue("proxyHost", _proxyHostLineEdit->text()); 267 settings.setValue("proxyPort", _proxyPortLineEdit->text()); 246 settings.setValue("clkPort", _clkPortLineEdit->text()); 268 247 } 269 248 -
trunk/BNS/bnswindow.h
r760 r787 56 56 QWidget* _canvas; 57 57 58 QLineEdit* _ephHostLineEdit;59 58 QLineEdit* _ephPortLineEdit; 60 QLineEdit* _proxyHostLineEdit; 61 QLineEdit* _proxyPortLineEdit; 59 QLineEdit* _clkPortLineEdit; 62 60 63 61 QTextEdit* _log;
Note:
See TracChangeset
for help on using the changeset viewer.