Changeset 108 in ntrip for trunk/BNC/bncwindow.cpp


Ignore:
Timestamp:
Sep 7, 2006, 9:39:59 AM (18 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncwindow.cpp

    r107 r108  
    3232  // Create Actions
    3333  // --------------
    34   _actAbout = new QAction(tr("&About"),this);
    35   _actAbout->setEnabled(false);
     34  _actHelp = new QAction(tr("&Help Contents"),this);
     35  connect(_actHelp, SIGNAL(triggered()), SLOT(slotHelp()));
     36
     37  _actAbout = new QAction(tr("&About BNC"),this);
     38  connect(_actAbout, SIGNAL(triggered()), SLOT(slotAbout()));
    3639
    3740  _actSaveOpt = new QAction(tr("&Save Options"),this);
     
    5962
    6063  _menuHlp = menuBar()->addMenu(tr("&Help"));
     64  _menuHlp->addAction(_actHelp);
    6165  _menuHlp->addAction(_actAbout);
    6266
     
    348352
    349353
     354// About Message
     355////////////////////////////////////////////////////////////////////////////
     356void bncWindow::slotAbout() {
     357
     358  QString str("BKG NTRIP Client\n"
     359              "Author: L. Mervart\n"
     360              "Version 1.0");
     361
     362  QMessageBox::information(this, "About", str, QMessageBox::Ok);
     363}
     364
     365// Help Window
     366////////////////////////////////////////////////////////////////////////////
     367void bncWindow::slotHelp() {
     368
     369  QString str("<h3>BNC Help</h3>"
     370              "<p>"
     371              "Program bnc can be used in interactive mode or "
     372              "in a non-interactive mode."
     373              "</p>"
     374              "<p>"
     375              "Non-interactive mode is invoked by -nw switch."
     376              "On Unix (Linux) the standard X-window switches "
     377              "like -fn 10x20 work. Program appearance can "
     378              "be changed by e.g. -style motif switch."
     379              "</p>");
     380
     381  QTextBrowser* tb = new QTextBrowser;
     382  tb->setHtml(str);
     383  tb->setReadOnly(true);
     384  tb->show();
     385
     386  QDialog* dlg = new QDialog(this);
     387
     388  QVBoxLayout* dlgLayout = new QVBoxLayout();
     389  dlgLayout->addWidget(tb);
     390
     391  dlg->setLayout(dlgLayout);
     392  dlg->show();
     393}
Note: See TracChangeset for help on using the changeset viewer.