Subversion Repositories Projects

Rev

Rev 396 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 396 Rev 397
Line 397... Line 397...
397
// KML-Datei nach Wegpunkt parsen
397
// KML-Datei nach Wegpunkt parsen
398
// TODO: Richtigen KML-Parser bauen
398
// TODO: Richtigen KML-Parser bauen
399
void MKTool::parse_TargetKML()
399
void MKTool::parse_TargetKML()
400
{
400
{
401
    QString Tmp = te_KML->toPlainText().simplified();
401
    QString Tmp = te_KML->toPlainText().simplified();
402
    QStringList List;
402
    QStringList list;
403
 
403
 
404
    if ((Tmp.contains("<kml xmlns=\"http://earth.google.com/kml/2.2\">"))  && (Tmp.contains("<coordinates>")))
404
    if ((Tmp.contains("<kml xmlns=\"http://earth.google.com/kml/2.2\">"))  && (Tmp.contains("<coordinates>")))
405
    {
405
    {
406
        List = Tmp.split("<coordinates>");
406
        list = Tmp.split("<coordinates>");
407
        List = List[1].split(",");
407
        list = list[1].split(",");
408
 
408
 
-
 
409
        le_TarLong->setText( QString::number( list[0].toDouble() ) );
-
 
410
        le_TarLat->setText( QString::number( list[1].toDouble() ) );
409
        le_TarLong->setText(ToolBox::get_Float((List[0].toDouble() * 10000000), 7));
411
        //le_TarLong->setText(ToolBox::get_Float((List[0].toDouble() * 10000000), 7));
410
        le_TarLat->setText(ToolBox::get_Float((List[1].toDouble() * 10000000), 7));
412
        //le_TarLat->setText(ToolBox::get_Float((List[1].toDouble() * 10000000), 7));
411
    }
413
    }
412
}
414
}
413
 
415
 
414
// Waypoint zur NC Senden.
416
// Waypoint zur NC Senden.
415
//FIXME: put this in cpp/NaviCtrl.cpp
417
//FIXME: put this in cpp/NaviCtrl.cpp
Line 468... Line 470...
468
        QMessageBox msgB;
470
        QMessageBox msgB;
469
        QString msg;
471
        QString msg;
470
        msg += tr("Bitte die Eingabe ueberpruefen!\n");
472
        msg += tr("Bitte die Eingabe ueberpruefen!\n");
471
        msg += tr("Die Werte muessen sich in der Naehe der aktuellen Koordinaten befinden\n");
473
        msg += tr("Die Werte muessen sich in der Naehe der aktuellen Koordinaten befinden\n");
472
        msg += "(Lon: ";
474
        msg += "(Lon: ";
473
        msg += ToolBox::get_Float(Navi.Current.Longitude,7);
475
        msg += QString::number(Navi.Current.Longitude);
474
        msg += ", ";
476
        msg += ", ";
475
        msg += "Lat: ";
477
        msg += "Lat: ";
476
        msg += ToolBox::get_Float(Navi.Current.Latitude,7);
478
        msg += QString::number(Navi.Current.Latitude);
477
        msg += ")";
479
        msg += ")";
478
        msgB.setText(msg);
480
        msgB.setText(msg);
479
        msgB.exec();
481
        msgB.exec();
480
    }
482
    }
481
}
483
}