Ignore:
Timestamp:
Sep 12, 2013, 4:25:13 PM (11 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r5420 r5422  
    4646  setCentralWidget(_plot);
    4747
     48  // Tool Bar
     49  // --------
     50  QToolBar* toolBar = new QToolBar("t_map_stations_ToolBar");
     51  addToolBar(Qt::BottomToolBarArea, toolBar);
     52  QAction* actStartThrift = new QAction("Start Thrift", 0);
     53  toolBar->addAction(actStartThrift);
     54  connect(actStartThrift, SIGNAL(triggered()), this, SLOT(slotStartThrift()));
     55
    4856  // Thrift Client;
    4957  // --------------
    50   _thriftClient = new t_thriftClient(this);
    51   _thriftClient->start();
     58  _thriftClient = 0;
    5259}
    5360
    5461// Destructor
    5562/////////////////////////////////////////////////////////////////////////////
    56 t_map_stations::~t_map_stations() {
    57   _thriftClient->stop();
     63t_map_stations::~t_map_stations() {
     64  if (_thriftClient) {
     65    _thriftClient->stop();
     66  }
    5867}
    5968
     69//
     70/////////////////////////////////////////////////////////////////////////////
     71void t_map_stations::slotStartThrift() {
     72  if (!_thriftClient) {
     73    _thriftClient = new t_thriftClient(this);
     74    _thriftClient->start();
     75  }
     76}
    6077
    6178//
Note: See TracChangeset for help on using the changeset viewer.