Changeset 753 in ntrip for trunk/BNS/bnswindow.cpp


Ignore:
Timestamp:
Mar 30, 2008, 3:54:36 PM (16 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bnswindow.cpp

    r752 r753  
    1919
    2020#include "bnswindow.h"
     21#include "bnsapp.h"
    2122#include "bnshlpdlg.h"
    2223
     
    5960  connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
    6061
    61   _actwhatsthis= new QAction(tr("Help=Shift+F1"),this);
    62   connect(_actwhatsthis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
     62  _actWhatsThis= new QAction(tr("Help=Shift+F1"),this);
     63  connect(_actWhatsThis, SIGNAL(triggered()), SLOT(slotWhatsThis()));
     64
     65  _actStart = new QAction(tr("Sta&rt"),this);
     66  connect(_actStart, SIGNAL(triggered()), SLOT(slotStart()));
     67
     68  _actStop = new QAction(tr("Sto&p"),this);
     69  connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
     70  _actStop->setEnabled(false);
    6371
    6472  CreateMenu();
     
    210218  addToolBar(Qt::BottomToolBarArea, toolBar);
    211219  toolBar->setMovable(false);
     220  toolBar->addAction(_actStart);
     221  toolBar->addAction(_actStop);
    212222  toolBar->addWidget(new QLabel("                                   "));
    213   toolBar->addAction(_actwhatsthis);
     223  toolBar->addAction(_actWhatsThis);
    214224}
    215225
     
    268278  _log->append(txt.right(maxBufferSize));
    269279
     280
     281// Stop
     282////////////////////////////////////////////////////////////////////////////
     283void bnsWindow::slotStop() {
     284  int iRet = QMessageBox::question(this, "Stop", "Do you want to stop?",
     285                                   QMessageBox::Yes, QMessageBox::No,
     286                                   QMessageBox::NoButton);
     287  if (iRet == QMessageBox::Yes) {
     288    _actStart->setEnabled(true);
     289    _actStop->setEnabled(false);
     290  }
     291}
     292
     293// Start
     294////////////////////////////////////////////////////////////////////////////
     295void bnsWindow::slotStart() {
     296  slotSaveOptions();
     297
     298  _actStart->setEnabled(false);
     299  _actStop->setEnabled(true);
     300
     301
     302  slotMessage("============ Start BNS ============");
     303  ((bnsApp*)qApp)->slotMessage("============ Start BNS ============");
     304
     305}
Note: See TracChangeset for help on using the changeset viewer.