1 // SPDX-License-Identifier: LGPL-2.1-or-later 2 // 3 // SPDX-FileCopyrightText: 2009 Eckhart Wörner <ewoerner@kde.org> 4 // 5 6 #ifndef MARBLE_POSITIONPROVIDERPLUGIN_H 7 #define MARBLE_POSITIONPROVIDERPLUGIN_H 8 9 #include "PositionProviderPluginInterface.h" 10 #include "marble_export.h" 11 12 13 namespace Marble 14 { 15 class PositionProviderPluginPrivate; 16 17 /** 18 * @short The abstract class that provides position information. 19 */ 20 class MARBLE_EXPORT PositionProviderPlugin : public QObject, public PositionProviderPluginInterface 21 { 22 Q_OBJECT 23 24 public: 25 ~PositionProviderPlugin() override; 26 27 /** 28 * @brief Returns the string that should appear in the user interface. 29 * 30 * Example: "GPS" 31 */ 32 virtual QString guiString() const = 0; 33 34 /** 35 * Create a new PositionProvider Plugin and return it. 36 * Has to be defined in concrete position provider plugin classes. 37 */ 38 virtual PositionProviderPlugin * newInstance() const = 0; 39 40 Q_SIGNALS: 41 void statusChanged( PositionProviderStatus status ) const; 42 void positionChanged( const GeoDataCoordinates& position, 43 const GeoDataAccuracy& accuracy ) const; 44 45 protected: 46 PositionProviderPlugin(QObject* parent=nullptr); 47 48 private: 49 Q_DISABLE_COPY( PositionProviderPlugin ) 50 PositionProviderPluginPrivate *d; 51 52 }; 53 54 } 55 56 #endif 57