Changeset 750 in ntrip
- Timestamp:
- Mar 30, 2008, 2:57:49 PM (17 years ago)
- Location:
- trunk/BNS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bnswindow.cpp
r749 r750 61 61 setCentralWidget(_canvas); 62 62 63 QSettings settings; 64 _proxyHostLineEdit = new QLineEdit(settings.value("proxyHost").toString()); 65 _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>")); 66 _proxyPortLineEdit = new QLineEdit(settings.value("proxyPort").toString()); 67 _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>")); 68 _proxyPortLineEdit->setMaximumWidth(9*ww); 69 70 // TabWidget 71 // --------- 72 QTabWidget* tabs = new QTabWidget(); 73 QWidget* tab_proxy = new QWidget(); 74 QWidget* tab_opt = new QWidget(); 75 QWidget* tab_res = new QWidget(); 76 tabs->addTab(tab_proxy,tr("Proxy")); 77 tabs->addTab(tab_opt, tr("Options")); 78 tabs->addTab(tab_res, tr("Results")); 79 80 // Proxy-Tab 81 // --------- 82 QGridLayout* pLayout = new QGridLayout; 83 pLayout->setColumnMinimumWidth(0,12*ww); 84 pLayout->addWidget(new QLabel("Proxy host"),0,0, Qt::AlignLeft); 85 pLayout->addWidget(_proxyHostLineEdit,0, 1); 86 pLayout->addWidget(new QLabel("Proxy port"),1,0, Qt::AlignLeft); 87 pLayout->addWidget(_proxyPortLineEdit,1,1); 88 pLayout->addWidget(new QLabel("Settings for the proxy in protected networks, leave the boxes blank if none."),2, 0, 1, 2, Qt::AlignLeft); 89 pLayout->addWidget(new QLabel(" "),3,0); 90 pLayout->addWidget(new QLabel(" "),4,0); 91 pLayout->addWidget(new QLabel(" "),5,0); 92 tab_proxy->setLayout(pLayout); 93 94 // Log 95 // --- 96 _log = new QTextBrowser(); 97 _log->setReadOnly(true); 98 _log->setWhatsThis(tr("Records of BNS's activities are shown in the Log section.")); 99 100 // Main Layout 101 // ----------- 102 QVBoxLayout* mainLayout = new QVBoxLayout; 103 mainLayout->addWidget(tabs); 104 mainLayout->addWidget(_log); 105 106 _canvas->setLayout(mainLayout); 63 107 } 64 108 … … 66 110 //////////////////////////////////////////////////////////////////////////// 67 111 bnsWindow::~bnsWindow() { 68 cout << "destructor" << endl;69 112 } 70 113 … … 153 196 //////////////////////////////////////////////////////////////////////////// 154 197 void bnsWindow::slotSaveOptions() { 198 QSettings settings; 199 settings.setValue("proxyHost", _proxyHostLineEdit->text()); 200 settings.setValue("proxyPort", _proxyPortLineEdit->text()); 155 201 } 156 202 … … 188 234 }; 189 235 236 // Display Program Messages 237 //////////////////////////////////////////////////////////////////////////// 238 void bnsWindow::slotMessage(const QByteArray msg) { 239 240 const int maxBufferSize = 10000; 241 242 QString txt = _log->toPlainText() + "\n" + 243 QDateTime::currentDateTime().toUTC().toString("yy-MM-dd hh:mm:ss ") + msg; 244 _log->clear(); 245 _log->append(txt.right(maxBufferSize)); 246 } -
trunk/BNS/bnswindow.h
r749 r750 20 20 21 21 public slots: 22 void slotMessage(const QByteArray msg); 22 23 23 24 private slots: … … 46 47 47 48 QWidget* _canvas; 49 50 QLineEdit* _proxyHostLineEdit; 51 QLineEdit* _proxyPortLineEdit; 52 53 QTextEdit* _log; 48 54 }; 49 55 #endif
Note:
See TracChangeset
for help on using the changeset viewer.