Changeset 5228 in ntrip for trunk/BNC/src/map/bncmapwin.cpp


Ignore:
Timestamp:
Jun 16, 2013, 4:15:05 PM (11 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/map/bncmapwin.cpp

    r5216 r5228  
    6262  _webView->show(); 
    6363
    64   // Test
    65   // ----
    66   _mode = mode_ppp;
    67   _testButton = new QPushButton(tr("Start Test"));
    68   _testButton->setMaximumWidth(10*ww);
    69   connect(_testButton,  SIGNAL(clicked()), this, SLOT(slotTest()));
     64  _statusLabel = new QLabel;
    7065
    7166  // Layout
    7267  // ------
    73   QHBoxLayout* buttonLayout = new QHBoxLayout;
    74   buttonLayout->addWidget(_testButton);
     68
     69  QHBoxLayout* statusLayout = new QHBoxLayout;
     70  statusLayout->addWidget(_statusLabel);
    7571
    7672  QVBoxLayout* mainLayout = new QVBoxLayout(this);
    7773  mainLayout->addWidget(_webView);
    78   mainLayout->addLayout(buttonLayout);
     74  mainLayout->addLayout(statusLayout);
    7975
    8076  setLayout(mainLayout);
     
    121117  _currLon = lon;
    122118  QString location = QString("%1, %2").arg(_currLat,0,'f',8).arg(_currLon,0,'f',8);
     119  _statusLabel->setText(location);
    123120  _webView->page()->mainFrame()->evaluateJavaScript(QString("gotoLocation( %1 )").arg(location));
    124 }
    125 
    126 //
    127 ////////////////////////////////////////////////////////////////////////////
    128 void bncMapWin::slotTest() {
    129 
    130   if (sender() == _testButton) {
    131     if (_mode == mode_ppp) {
    132       _mode = mode_test;
    133       _testButton->setText(tr("Stop Test"));
    134     }
    135     else {
    136       _mode = mode_ppp;
    137       _testButton->setText(tr("Start Test"));
    138       return;
    139     }
    140   }
    141    
    142   if (_mode == mode_test) {
    143     _currLat += 0.00001;
    144     _currLon += 0.00001;
    145     gotoLocation(_currLat, _currLon);
    146     QTimer::singleShot(100, this, SLOT(slotTest()));
    147   }
    148121}
    149122
Note: See TracChangeset for help on using the changeset viewer.