const QString FIELDS[TextElement::FIELD_COUNT] = {"TRIP", "TOTAL", "SPEED",
"MAXSPEED", "AVGSPEED",
"UNIT", "SPEEDUNIT", "TIME", "DATE",
- "POIDISTANCE", "ANGLE", "LATITUDE",
- "LONGITUDE"};
+ "POIDISTANCE", "POI", "ANGLE", "LATITUDE",
+ "LONGITUDE", "ALTITUDE", "DISTANCEUNIT"};
}
TextElement::TextElement(Reader* reader): GraphicsElement(reader),
-data_(""), format_(""), align_("left"), timeFormat_("hh:mm"), dateFormat_("dd.MM.yyyy"), fontSize_(16), bold_(false), italic_(false),
+data_(""), format_(""), align_("left"), timeFormat_("hh:mm"),
+dateFormat_("dd.MM.yyyy"), fontSize_(16), bold_(false), italic_(false),
uppercase_(false), letterSpacing_(0)
{
element_ = new QGraphicsTextItem();
case POIDISTANCE:
replaceValue(value, f, handleEmpty(PoiAlerts::instance().getCurrentDistance()));
break;
+ case POI:
+ replaceValue(value, f, PoiAlerts::instance().getCurrentPoi());
+ break;
case ANGLE:
replaceValue(value, f, formatString(o->getLatestFix().track));
break;
case LONGITUDE:
replaceValue(value, f, handleEmpty(o->getLatestFix().longitude));
break;
+ case ALTITUDE:
+ replaceValue(value, f, handleEmpty(o->getLatestFix().altitude));
+ break;
+ case DISTANCEUNIT:
+ replaceValue(value, f, o->getMeterUnit());
+ break;
default:
qDebug() << "Unknown field: " << f;
}
if(format.isEmpty())
{
- format = "%.1lf";
+ format = "%.0lf";
}
QString result;