Changeset 4627 in ntrip


Ignore:
Timestamp:
Sep 1, 2012, 2:19:52 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncmap.h

    r4626 r4627  
    1515   
    1616 public slots:
    17   void slotNewPoint(QPointF, QString, QPen, double);
     17  void slotNewPoint(const QString& name, double latDeg, double lonDeg);
    1818   
    1919 private:
  • trunk/BNC/src/bncmap_svg.cpp

    r4626 r4627  
    4343//
    4444/////////////////////////////////////////////////////////////////////////////
    45 void t_bncMap::slotNewPoint(QPointF point, QString name, QPen, double) {
     45void t_bncMap::slotNewPoint(const QString& name, double latDeg, double lonDeg) {
    4646  QwtPlotMarker* marker = new QwtPlotMarker();
    47   marker->setValue(point.x(), point.y());
     47  marker->setValue(lonDeg, latDeg);
    4848  marker->setLabel(QwtText(name));
    4949  marker->attach(_mapPlot);
  • trunk/BNC/src/bnctabledlg.cpp

    r4626 r4627  
    327327  bncMap->setGeometry( x(), int(y()+height()*1.3), 880, 440 );
    328328
    329   connect(this, SIGNAL(newPoint(QPointF, QString, QPen, double)),
    330           bncMap, SLOT(slotNewPoint(QPointF, QString, QPen, double)));
     329  connect(this, SIGNAL(newPoint(const QString&, double, double)),
     330          bncMap, SLOT(slotNewPoint(const QString&, double, double)));
    331331     
    332332  _buttonMap->setEnabled(false);
     
    334334  bncMap->exec();
    335335  _buttonMap->setEnabled(true);
    336 
    337   disconnect(this, SIGNAL(newPoint(QPointF, QString, QPen, double)),
    338              bncMap, SLOT(slotNewPoint(QPointF, QString, QPen, double)));
    339    
    340336  delete bncMap;
    341337}
     
    344340////////////////////////////////////////////////////////////////////////////
    345341void bncTableDlg::showSourceTable() {
    346 
    347   for( int i = 0; i < _allLines.size(); i++ ){
    348        
    349     if( _allLines.at(i).startsWith("STR") == true ){
    350              
    351        QStringList tmp = _allLines.at(i).split(';');
    352        if( tmp.size() > 0 ){
    353                  
    354          QPointF point;
    355                  point.setY( tmp.at(9).toDouble() );
    356                  point.setX( tmp.at(10).toDouble() );
    357 
    358          QString site = tmp.at(1);
    359                  site.resize(4);
    360 
    361          emit newPoint(point, site, QPen(QBrush(QColor(0,0,255,200)), 1.5), 1.5 );
    362        }
    363      }
    364    }
    365    emit fitMap();
    366 }
    367 
     342  for(int i = 0; i < _allLines.size(); i++) {
     343    if (_allLines.at(i).startsWith("STR") == true){
     344      QStringList tmp = _allLines.at(i).split(';');
     345      if (tmp.size() > 0) {
     346        double  latDeg = tmp.at(9).toDouble();
     347        double  lonDeg = tmp.at(10).toDouble();
     348        QString name   = tmp.at(1);
     349        emit newPoint(name, latDeg, lonDeg);
     350      }
     351    }
     352  }
     353}
    368354
    369355// Select slot
     
    400386        mountPoints->push_back(url.toString() + " " + format + " " + latitude
    401387                        + " " + longitude + " " + nmea + " " + ntripVersion);
    402        
     388       
    403389        site.resize(4);
    404         emit newPoint(QPointF(longitude.toDouble(),latitude.toDouble()), site,
    405                       QPen(QBrush(QColor(255,0,0,200)), 3.0), 3.0 );
    406390      }
    407391    }
    408392  }
    409393  emit newMountPoints(mountPoints);
    410   emit fitFont();
    411394}
    412395
  • trunk/BNC/src/bnctabledlg.h

    r4278 r4627  
    6565  signals:
    6666    void newMountPoints(QStringList* mountPoints);
    67     void newPoint(QPointF, QString, QPen, double);
    68     void fitMap();
    69     void fitFont();
     67    void newPoint(const QString& name, double latDeg, double lonDeg);
    7068
    7169  private slots:
Note: See TracChangeset for help on using the changeset viewer.