File indexing completed on 2024-09-08 03:35:10
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org> 0004 // 0005 0006 #ifndef MARBLE_MONAVPLUGIN_H 0007 #define MARBLE_MONAVPLUGIN_H 0008 0009 #include "RoutingRunnerPlugin.h" 0010 0011 namespace Marble 0012 { 0013 0014 class MonavMapsModel; 0015 class MonavPluginPrivate; 0016 class RouteRequest; 0017 0018 class MonavPlugin : public RoutingRunnerPlugin 0019 { 0020 Q_OBJECT 0021 Q_PLUGIN_METADATA(IID "org.kde.marble.MonavPlugin") 0022 Q_INTERFACES( Marble::RoutingRunnerPlugin ) 0023 0024 public: 0025 enum MonavRoutingDaemonVersion 0026 { 0027 Monav_0_2, 0028 Monav_0_3 0029 }; 0030 0031 explicit MonavPlugin( QObject *parent = nullptr ); 0032 0033 QString name() const override; 0034 0035 QString guiString() const override; 0036 0037 QString nameId() const override; 0038 0039 QString version() const override; 0040 0041 QString description() const override; 0042 0043 QString copyrightYears() const override; 0044 0045 QVector<PluginAuthor> pluginAuthors() const override; 0046 0047 ~MonavPlugin() override; 0048 0049 RoutingRunner *newRunner() const override; 0050 0051 bool supportsTemplate(RoutingProfilesModel::ProfileTemplate profileTemplate) const override; 0052 0053 QHash< QString, QVariant > templateSettings( RoutingProfilesModel::ProfileTemplate profileTemplate ) const override; 0054 0055 ConfigWidget *configWidget() override; 0056 0057 bool canWork() const override; 0058 0059 QString mapDirectoryForRequest( const RouteRequest* request ) const; 0060 0061 QStringList mapDirectoriesForRequest( const RouteRequest* request ) const; 0062 0063 MonavMapsModel* installedMapsModel(); 0064 0065 void reloadMaps(); 0066 0067 MonavRoutingDaemonVersion monavVersion() const; 0068 0069 private: 0070 MonavPluginPrivate* const d; 0071 0072 Q_PRIVATE_SLOT( d, void stopDaemon() ) 0073 }; 0074 0075 } 0076 0077 #endif