Changeset 750 in ntrip


Ignore:
Timestamp:
Mar 30, 2008, 2:57:49 PM (16 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bnswindow.cpp

    r749 r750  
    6161  setCentralWidget(_canvas);
    6262
     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);
    63107}
    64108
     
    66110////////////////////////////////////////////////////////////////////////////
    67111bnsWindow::~bnsWindow() {
    68   cout << "destructor" << endl;
    69112}
    70113
     
    153196////////////////////////////////////////////////////////////////////////////
    154197void bnsWindow::slotSaveOptions() {
     198  QSettings settings;
     199  settings.setValue("proxyHost",   _proxyHostLineEdit->text());
     200  settings.setValue("proxyPort",   _proxyPortLineEdit->text());
    155201}
    156202
     
    188234};
    189235
     236// Display Program Messages
     237////////////////////////////////////////////////////////////////////////////
     238void 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  
    2020
    2121 public slots: 
     22  void slotMessage(const QByteArray msg);
    2223
    2324 private slots:
     
    4647
    4748  QWidget*   _canvas;
     49
     50  QLineEdit* _proxyHostLineEdit;
     51  QLineEdit* _proxyPortLineEdit;
     52
     53  QTextEdit*  _log;
    4854};
    4955#endif
Note: See TracChangeset for help on using the changeset viewer.