File indexing completed on 2024-04-21 03:49:52

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2009 Eckhart Wörner <ewoerner@kde.org>
0004 //
0005 
0006 #ifndef MARBLE_POSITIONPROVIDERPLUGIN_H
0007 #define MARBLE_POSITIONPROVIDERPLUGIN_H
0008 
0009 #include "PositionProviderPluginInterface.h"
0010 #include "marble_export.h"
0011 
0012 
0013 namespace Marble
0014 {
0015 class PositionProviderPluginPrivate;
0016 
0017 /**
0018  * @short The abstract class that provides position information.
0019  */
0020 class MARBLE_EXPORT PositionProviderPlugin : public QObject, public PositionProviderPluginInterface
0021 {
0022     Q_OBJECT
0023 
0024  public:
0025     ~PositionProviderPlugin() override;
0026 
0027     /**
0028      * @brief Returns the string that should appear in the user interface.
0029      *
0030      * Example: "GPS"
0031      */
0032     virtual QString guiString() const = 0;
0033 
0034     /**
0035      * Create a new PositionProvider Plugin and return it.
0036      * Has to be defined in concrete position provider plugin classes.
0037      */
0038     virtual PositionProviderPlugin * newInstance() const = 0;
0039 
0040  Q_SIGNALS:
0041     void statusChanged( PositionProviderStatus status ) const;
0042     void positionChanged( const GeoDataCoordinates& position,
0043                           const GeoDataAccuracy& accuracy ) const;
0044 
0045  protected:
0046     PositionProviderPlugin(QObject* parent=nullptr);
0047 
0048  private:
0049     Q_DISABLE_COPY( PositionProviderPlugin )
0050     PositionProviderPluginPrivate *d;
0051 
0052 };
0053 
0054 }
0055 
0056 #endif