File indexing completed on 2024-12-08 07:19:14
0001 /* 0002 SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "linemetadatawrapper.h" 0008 0009 #include "assetrepository_p.h" 0010 #include "datatypes/lineutil_p.h" 0011 #include "knowledgedb/linemetadata.h" 0012 0013 #include <QDebug> 0014 0015 using namespace KPublicTransport; 0016 0017 Line LineMetaDataWrapper::lookup(const QString &name, double latitude, double longitude, int mode, bool download) 0018 { 0019 Line line; 0020 line.setName(name); 0021 line.setMode(static_cast<Line::Mode>(mode)); 0022 Location loc; 0023 loc.setCoordinate(latitude, longitude); 0024 line.applyMetaData(loc, download); 0025 return line; 0026 }