Changeset 182 in ntrip


Ignore:
Timestamp:
Sep 24, 2006, 3:22:52 PM (18 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncwindow.cpp

    r177 r182  
    5050  connect(_actQuit, SIGNAL(triggered()), SLOT(close()));
    5151
    52   _actAddMountPoints = new QAction(tr("&Add Mountpoints"),this);
     52  _actAddMountPoints = new QAction(tr("Add &Mountpoints"),this);
    5353  connect(_actAddMountPoints, SIGNAL(triggered()), SLOT(slotAddMountPoints()));
    5454
     
    5757  _actDeleteMountPoints->setEnabled(false);
    5858
    59   _actGetData = new QAction(tr("&Get Data"),this);
     59  _actGetData = new QAction(tr("Sta&rt"),this);
    6060  connect(_actGetData, SIGNAL(triggered()), SLOT(slotGetData()));
     61
     62  _actStop = new QAction(tr("Sto&p"),this);
     63  connect(_actStop, SIGNAL(triggered()), SLOT(slotStop()));
     64  _actStop->setEnabled(false);
    6165
    6266  // Create Menus
     
    8185  toolBar->addAction(_actDeleteMountPoints);
    8286  toolBar->addAction(_actGetData);
     87  toolBar->addAction(_actStop);
    8388
    8489  // Canvas with Editable Fields
     
    342347  _actDeleteMountPoints->setEnabled(false);
    343348  _actGetData->setEnabled(false);
     349  _actStop->setEnabled(true);
    344350
    345351  _bncCaster = new bncCaster(_outFileLineEdit->text(),
     
    372378
    373379    getThread->start();
     380  }
     381}
     382
     383// Retrieve Data
     384////////////////////////////////////////////////////////////////////////////
     385void bncWindow::slotStop() {
     386  int iRet = QMessageBox::question(this, "Stop", "Stop retrieving data?",
     387                                   QMessageBox::Yes, QMessageBox::No,
     388                                   QMessageBox::NoButton);
     389  if (iRet == QMessageBox::Yes) {
     390    _bncCaster->terminate();
     391    _bncCaster->wait(1000);
     392    delete _bncCaster;
     393    _bncCaster = 0;
     394    _actGetData->setEnabled(true);
     395    _actStop->setEnabled(false);
    374396  }
    375397}
  • trunk/BNC/bncwindow.h

    r143 r182  
    2525    void slotAddMountPoints();
    2626    void slotGetData();
     27    void slotStop();
    2728    void slotNewMountPoints(QStringList* mountPoints);
    2829    void slotDeleteMountPoints();
     
    4344    QAction*   _actQuit;
    4445    QAction*   _actGetData;
     46    QAction*   _actStop;
    4547    QAction*   _actAddMountPoints;
    4648    QAction*   _actDeleteMountPoints;
Note: See TracChangeset for help on using the changeset viewer.