Marble
6#ifndef MARBLE_WAYPOINTPARSER_H
7#define MARBLE_WAYPOINTPARSER_H
9#include "RoutingWaypoint.h"
10#include "marble_export.h"
21class MARBLE_EXPORT WaypointParser
30 TotalSecondsRemaining,
38 RoutingWaypoints
parse(QTextStream &stream)
const;
41 void setFieldIndex(Field field,
int index);
44 void setLineSeparator(
const QString &separator);
47 void setFieldSeparator(
const QChar &separator);
50 void addJunctionTypeMapping(
const QString &key, RoutingWaypoint::JunctionType value);
54 T readField(Field field,
const QStringList &fields,
const T &defaultValue = T())
const
56 int index = m_fieldIndices[field];
57 if (index >= 0 && index < fields.
size()) {
58 return QVariant(fields[index]).value<T>();
64 QString m_lineSeparator;
66 QChar m_fieldSeparator;
68 QMap<Field, int> m_fieldIndices;
70 QMap<QString, RoutingWaypoint::JunctionType> m_junctionTypeMapping;
72 Q_DISABLE_COPY(WaypointParser)
Binds a QML item to a specific geodetic location in screen coordinates.
FeedPtr parse(const DocumentSource &src, const QString &formatHint=QString())
qsizetype size() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 11:56:30 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.