Changeset 2753 in ntrip
- Timestamp:
- Dec 1, 2010, 2:02:27 PM (14 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bnc.pro
r2579 r2753 41 41 bncfigurelate.h bncpppclient.h bncversion.h \ 42 42 bancroft.h bncmodel.h bncfigureppp.h bncrawfile.h \ 43 bnctides.h 43 bnctides.h bncmap.h \ 44 44 RTCM/GPSDecoder.h RTCM/RTCM2.h RTCM/RTCM2Decoder.h \ 45 45 RTCM/RTCM2_2021.h RTCM/rtcm_utils.h \ … … 71 71 bncfigurelate.cpp bncpppclient.cpp bnctime.cpp \ 72 72 bancroft.cpp bncmodel.cpp bncfigureppp.cpp bncrawfile.cpp \ 73 bnctides.cpp 73 bnctides.cpp bncmap.cpp \ 74 74 RTCM/RTCM2.cpp RTCM/RTCM2Decoder.cpp \ 75 75 RTCM/RTCM2_2021.cpp RTCM/rtcm_utils.cpp \ -
trunk/BNC/bnctabledlg.cpp
r1848 r2753 45 45 #include "bncnetqueryv1.h" 46 46 #include "bncsettings.h" 47 #include "bncmap.h" 47 48 48 49 using namespace std; … … 140 141 connect(_buttonGet, SIGNAL(clicked()), this, SLOT(slotGetTable())); 141 142 143 _buttonMap = new QPushButton(tr("Map"), this); 144 _buttonMap->setEnabled(false); 145 connect(_buttonMap, SIGNAL(clicked()), this, SLOT(slotShowMap())); 146 142 147 _buttonCancel = new QPushButton(tr("Cancel"), this); 143 148 connect(_buttonCancel, SIGNAL(clicked()), this, SLOT(reject())); … … 149 154 buttonLayout->addWidget(_buttonWhatsThis); 150 155 buttonLayout->addStretch(1); 156 buttonLayout->addWidget(_buttonMap); 151 157 buttonLayout->addWidget(_buttonGet); 152 158 buttonLayout->addWidget(_buttonCancel); … … 219 225 220 226 _buttonGet->setEnabled(false); 227 _buttonMap->setEnabled(true); 221 228 _buttonCasterTable->setEnabled(false); 222 229 … … 228 235 return; 229 236 } 230 237 231 238 static const QStringList labels = QString("mountpoint,identifier,format," 232 239 "format-details,carrier,system,network,country,lat,long," … … 291 298 } 292 299 300 // Show world map 301 //////////////////////////////////////////////////////////////////////////// 302 void bncTableDlg::slotShowMap() { 303 304 bncMap* winMap = new bncMap(this); 305 winMap->setGeometry( x(), y()+height()*1.2, 860, 400 ); 306 307 connect(this, SIGNAL(newPoint(QPointF, QString, QPen)), 308 winMap, SLOT(slotNewPoint(QPointF, QString, QPen))); 309 connect(this, SIGNAL(resetMap()), winMap, SLOT(slotResetMap())); 310 311 _buttonMap->setEnabled(false); 312 showSourceTable(); 313 winMap->exec(); 314 _buttonMap->setEnabled(true); 315 316 disconnect(this, SIGNAL(newPoint(QPointF, QString, QPen)), 317 winMap, SLOT(slotNewPoint(QPointF, QString, QPen))); 318 disconnect(this, SIGNAL(resetMap()), winMap, SLOT(slotResetMap())); 319 320 delete winMap; 321 } 322 323 // Show world map 324 //////////////////////////////////////////////////////////////////////////// 325 void bncTableDlg::showSourceTable() { 326 327 for( int i = 0; i < _allLines.size(); i++ ){ 328 329 if( _allLines.at(i).startsWith("STR") == true ){ 330 331 QStringList tmp = _allLines.at(i).split(';'); 332 if( tmp.size() > 0 ){ 333 334 QPointF point; 335 point.setY( tmp.at(9).toDouble() ); 336 point.setX( tmp.at(10).toDouble() ); 337 QString site = tmp.at(1); 338 site.resize(4); 339 340 emit newPoint(point, site, QPen(QBrush(QColor(0,0,255,180)), 5) ); 341 } 342 } 343 } 344 } 345 346 293 347 // Accept slot 294 348 //////////////////////////////////////////////////////////////////////////// … … 306 360 307 361 QStringList* mountPoints = new QStringList; 308 309 362 if (_table) { 363 // emit resetMap(); 310 364 for (int ir = 0; ir < _table->rowCount(); ir++) { 311 365 QTableWidgetItem* item = _table->item(ir,0); 366 QString site = _table->item(ir,0)->text(); 312 367 QString format = _table->item(ir,2)->text(); 313 368 QString latitude = _table->item(ir,8)->text(); … … 320 375 mountPoints->push_back(url.toString() + " " + format + " " + latitude 321 376 + " " + longitude + " " + nmea + " " + ntripVersion); 377 378 emit newPoint(QPointF(longitude.toDouble(),latitude.toDouble()), site, 379 QPen(QBrush(QColor(255,0,0,180)), 13) ); 380 322 381 } 323 382 } … … 564 623 QDialog::accept(); 565 624 } 566 -
trunk/BNC/bnctabledlg.h
r1492 r2753 64 64 signals: 65 65 void newMountPoints(QStringList* mountPoints); 66 void newPoint(QPointF, QString, QPen); 67 void resetMap(); 66 68 67 69 private slots: 68 70 virtual void accept(); 69 71 void slotGetTable(); 72 void slotShowMap(); 70 73 void slotSelectionChanged(); 71 74 void slotWhatsThis(); … … 76 79 private: 77 80 void addUrl(const QUrl& url); 81 void showSourceTable(); 78 82 QComboBox* _casterHostComboBox; 79 83 QLineEdit* _casterPortLineEdit; … … 83 87 84 88 QPushButton* _buttonGet; 89 QPushButton* _buttonMap; 85 90 QPushButton* _buttonCancel; 86 91 QPushButton* _buttonOK;
Note:
See TracChangeset
for help on using the changeset viewer.