Changeset 5181 in ntrip for trunk/BNC/src
- Timestamp:
- Jun 8, 2013, 3:57:39 PM (11 years ago)
- Location:
- trunk/BNC/src/map
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/map/bncmapwin.cpp
r5180 r5181 63 63 // Test 64 64 // ---- 65 QPushButton* testButton = new QPushButton(tr("Test")); 66 testButton->setMaximumWidth(10*ww); 67 connect(testButton, SIGNAL(clicked()), this, SLOT(slotTest())); 65 _mode = mode_ppp; 66 _testButton = new QPushButton(tr("Start Test")); 67 _testButton->setMaximumWidth(10*ww); 68 connect(_testButton, SIGNAL(clicked()), this, SLOT(slotTest())); 68 69 69 70 // Layout 70 71 // ------ 71 72 QHBoxLayout* buttonLayout = new QHBoxLayout; 72 buttonLayout->addWidget( testButton);73 buttonLayout->addWidget(_testButton); 73 74 74 75 QVBoxLayout* mainLayout = new QVBoxLayout(this); … … 125 126 //////////////////////////////////////////////////////////////////////////// 126 127 void bncMapWin::slotTest() { 127 _currLat += 0.00001; 128 _currLon += 0.00001; 129 slotGotoLocation(_currLat, _currLon); 130 QTimer::singleShot(100, this, SLOT(slotTest())); 128 129 if (sender() == _testButton) { 130 if (_mode == mode_ppp) { 131 _mode = mode_test; 132 _testButton->setText(tr("Stop Test")); 133 } 134 else { 135 _mode = mode_ppp; 136 _testButton->setText(tr("Start Test")); 137 return; 138 } 139 } 140 141 if (_mode == mode_test) { 142 _currLat += 0.00001; 143 _currLon += 0.00001; 144 slotGotoLocation(_currLat, _currLon); 145 QTimer::singleShot(100, this, SLOT(slotTest())); 146 } 131 147 } -
trunk/BNC/src/map/bncmapwin.h
r5180 r5181 46 46 47 47 private: 48 enum e_mode {mode_test, mode_ppp}; 48 49 void loadHtmlPage(); 49 QWebView* _webView; 50 double _currLat; 51 double _currLon; 50 QWebView* _webView; 51 QPushButton* _testButton; 52 double _currLat; 53 double _currLon; 54 e_mode _mode; 52 55 }; 53 56
Note:
See TracChangeset
for help on using the changeset viewer.