Changeset 754 in ntrip for trunk/BNS


Ignore:
Timestamp:
Mar 30, 2008, 3:58:56 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bnswindow.cpp

    r753 r754  
    2323
    2424using namespace std;
     25
     26// About Dialog - Constructor
     27////////////////////////////////////////////////////////////////////////////
     28bnsAboutDlg::bnsAboutDlg(QWidget* parent) :
     29   QDialog(parent) {
     30
     31  QTextBrowser* tb = new QTextBrowser;
     32  QUrl url; url.setPath(":bnsabout.html");
     33  tb->setSource(url);
     34  tb->setReadOnly(true);
     35
     36  int ww = QFontMetrics(font()).width('w');
     37  QPushButton* _closeButton = new QPushButton("Close");
     38  _closeButton->setMaximumWidth(10*ww);
     39  connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
     40
     41  QGridLayout* dlgLayout = new QGridLayout();
     42  QLabel* img = new QLabel();
     43  img->setPixmap(QPixmap(":ntrip-logo.png"));
     44  dlgLayout->addWidget(img, 0,0);
     45  dlgLayout->addWidget(new QLabel("BKG NTRIP Server (BNS) Version 1.0"), 0,1);
     46  dlgLayout->addWidget(tb,1,0,1,2);
     47  dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight); 
     48
     49  setLayout(dlgLayout);
     50  resize(60*ww, 60*ww);
     51  show();
     52}
     53
     54// About Dialog - Destructor
     55////////////////////////////////////////////////////////////////////////////
     56bnsAboutDlg::~bnsAboutDlg() {
     57};
    2558
    2659// Constructor
     
    234267}
    235268
    236 // About Dialog - Constructor
    237 ////////////////////////////////////////////////////////////////////////////
    238 bnsAboutDlg::bnsAboutDlg(QWidget* parent) :
    239    QDialog(parent) {
    240 
    241   QTextBrowser* tb = new QTextBrowser;
    242   QUrl url; url.setPath(":bnsabout.html");
    243   tb->setSource(url);
    244   tb->setReadOnly(true);
    245 
    246   int ww = QFontMetrics(font()).width('w');
    247   QPushButton* _closeButton = new QPushButton("Close");
    248   _closeButton->setMaximumWidth(10*ww);
    249   connect(_closeButton, SIGNAL(clicked()), this, SLOT(close()));
    250 
    251   QGridLayout* dlgLayout = new QGridLayout();
    252   QLabel* img = new QLabel();
    253   img->setPixmap(QPixmap(":ntrip-logo.png"));
    254   dlgLayout->addWidget(img, 0,0);
    255   dlgLayout->addWidget(new QLabel("BKG NTRIP Server (BNS) Version 1.0"), 0,1);
    256   dlgLayout->addWidget(tb,1,0,1,2);
    257   dlgLayout->addWidget(_closeButton,2,1,Qt::AlignRight); 
    258 
    259   setLayout(dlgLayout);
    260   resize(60*ww, 60*ww);
    261   show();
    262 }
    263 
    264 // About Dialog - Constructor
    265 ////////////////////////////////////////////////////////////////////////////
    266 bnsAboutDlg::~bnsAboutDlg() {
    267 };
    268 
    269269// Display Program Messages
    270270////////////////////////////////////////////////////////////////////////////
    271271void bnsWindow::slotMessage(const QByteArray msg) {
     272
     273  ((bnsApp*)qApp)->slotMessage(msg);
    272274
    273275  const int maxBufferSize = 10000;
     
    299301  _actStop->setEnabled(true);
    300302
    301 
    302303  slotMessage("============ Start BNS ============");
    303   ((bnsApp*)qApp)->slotMessage("============ Start BNS ============");
    304 
    305 }
     304}
  • trunk/BNS/bnswindow.h

    r752 r754  
    2828  void slotSaveOptions();
    2929  void slotWhatsThis();
     30  void slotStart();
     31  void slotStop();
    3032
    3133 protected:
     
    4446  QAction*   _actSaveOpt;
    4547  QAction*   _actQuit;
    46   QAction*   _actwhatsthis;
     48  QAction*   _actWhatsThis;
     49  QAction*   _actStart;
     50  QAction*   _actStop;
    4751
    4852  QWidget*   _canvas;
Note: See TracChangeset for help on using the changeset viewer.