Changeset 5430 in ntrip


Ignore:
Timestamp:
Sep 12, 2013, 5:42:42 PM (8 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter/map_stations
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/map_stations/map_stations.cpp

    r5429 r5430  
    5050  QToolBar* toolBar = new QToolBar("t_map_stations_ToolBar");
    5151  addToolBar(Qt::BottomToolBarArea, toolBar);
     52
    5253  QAction* actStartThrift = new QAction("Start Thrift", 0);
    5354  toolBar->addAction(actStartThrift);
    5455  connect(actStartThrift, SIGNAL(triggered()), this, SLOT(slotStartThrift()));
     56
     57  QAction* actStopThrift = new QAction("Stop Thrift", 0);
     58  toolBar->addAction(actStopThrift);
     59  connect(actStopThrift, SIGNAL(triggered()), this, SLOT(slotStopThrift()));
    5560
    5661  // Thrift Client;
     
    9297//
    9398/////////////////////////////////////////////////////////////////////////////
     99void t_map_stations::slotStopThrift() {
     100  if (_thriftClient && _thriftClient->isRunning()) {
     101    _thriftClient->stopAndDestroy();
     102    _thriftClient = 0;
     103  }
     104}
     105
     106//
     107/////////////////////////////////////////////////////////////////////////////
    94108void t_map_stations::putThriftResults(std::vector<t_thriftResult*>* results) {
    95109  QMutexLocker locker(&_mutex);
     
    118132  }
    119133  // end test
    120   QTimer::singleShot(1000, this, SLOT(slotPlotResults()));
     134  if (_thriftClient) {
     135    QTimer::singleShot(1000, this, SLOT(slotPlotResults()));
     136  }
    121137}
  • trunk/GnssCenter/map_stations/map_stations.h

    r5429 r5430  
    2525 private slots:
    2626  void slotStartThrift();
     27  void slotStopThrift();
    2728  void slotPlotResults();
    2829
Note: See TracChangeset for help on using the changeset viewer.