File indexing completed on 2024-07-14 14:25:04

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2011 Dennis Nienhüser <nienhueser@kde.org>
0004 // SPDX-FileCopyrightText: 2013 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
0005 //
0006 
0007 #ifndef MARBLE_LOCALOSMSEARCHRUNNER_H
0008 #define MARBLE_LOCALOSMSEARCHRUNNER_H
0009 
0010 #include "SearchRunner.h"
0011 
0012 #include "OsmDatabase.h"
0013 #include "OsmPlacemark.h"
0014 #include "GeoDataPlacemark.h"
0015 
0016 #include <QMap>
0017 
0018 namespace Marble
0019 {
0020 
0021 class LocalOsmSearchRunner : public SearchRunner
0022 {
0023     Q_OBJECT
0024 public:
0025     explicit LocalOsmSearchRunner( const QStringList &databaseFiles, QObject *parent = nullptr );
0026 
0027     ~LocalOsmSearchRunner() override;
0028 
0029     void search( const QString &searchTerm, const GeoDataLatLonBox &preferred ) override;
0030 
0031 private:
0032     OsmDatabase m_database;
0033 
0034     static QMap<OsmPlacemark::OsmCategory, GeoDataPlacemark::GeoDataVisualCategory> m_categoryMap;
0035 };
0036 
0037 }
0038 
0039 #endif