翻译
This commit is contained in:
@@ -1475,50 +1475,27 @@ void OPMapWidget::setCurrentPoint(int value)
|
||||
|
||||
void OPMapWidget::updateMessage(void)
|
||||
{
|
||||
|
||||
double distance;
|
||||
totalDistance = 0;
|
||||
|
||||
|
||||
|
||||
//WayPointItem *Last = nullptr;
|
||||
WayPointItem *Last = nullptr;
|
||||
|
||||
foreach(QGraphicsItem * i, map->childItems()) {
|
||||
WayPointItem *w = qgraphicsitem_cast<WayPointItem *>(i);
|
||||
if (w)
|
||||
{
|
||||
/*
|
||||
if(Last != nullptr)
|
||||
{
|
||||
|
||||
//distance += internals::PureProjection::DistanceBetweenLatLng(Last->Coord(),w->Coord()) * 10e2;
|
||||
totalDistance += internals::PureProjection::DistanceBetweenLatLng(Last->Coord(),w->Coord()) * 10e2;
|
||||
}
|
||||
|
||||
qDebug() << "distance" << distance
|
||||
<< Last->Number()
|
||||
<< w->Number();
|
||||
|
||||
Last = w;
|
||||
*/
|
||||
|
||||
Last = w;
|
||||
}
|
||||
}
|
||||
|
||||
//delete Last;
|
||||
//Last = nullptr;
|
||||
Last = nullptr;
|
||||
delete Last;
|
||||
|
||||
|
||||
|
||||
|
||||
waypointMessage.clear();
|
||||
|
||||
waypointMessage.append("123456987");
|
||||
|
||||
//waypointMessage.append(tr("总航程:%1\t").arg(QString::number(distance)));
|
||||
// waypointMessage.append(tr("最远航点:%1\t").arg(QString::number(distance)));
|
||||
//waypointMessage.append(tr("最远距离:%1\t").arg(QString::number(distance)));
|
||||
//waypointMessage.append(tr("预计飞行时间:%1\t").arg(QString::number(distance)));
|
||||
|
||||
emit showMessage(waypointMessage);
|
||||
emit TotalDistanceUpdate(totalDistance);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user