File indexing completed on 2024-04-21 03:50:14
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2011 Thibaut Gridel <tgridel@free.fr> 0004 // 0005 0006 // 0007 // This class is a render plugin to display various Position Tracking info. 0008 // 0009 0010 #ifndef MARBLEGPSINFO_H 0011 #define MARBLEGPSINFO_H 0012 0013 #include <QHash> 0014 0015 #include "AbstractFloatItem.h" 0016 0017 #include "ui_GpsInfoPlugin.h" 0018 0019 namespace Marble 0020 { 0021 0022 class GeoDataCoordinates; 0023 class WidgetGraphicsItem; 0024 class MarbleLocale; 0025 0026 /** 0027 * @short The class that displays Position Tracking info 0028 * 0029 */ 0030 0031 class GpsInfo : public AbstractFloatItem 0032 { 0033 Q_OBJECT 0034 Q_PLUGIN_METADATA(IID "org.kde.marble.GpsInfo") 0035 Q_INTERFACES( Marble::RenderPluginInterface ) 0036 MARBLE_PLUGIN( GpsInfo ) 0037 0038 public: 0039 GpsInfo(); 0040 explicit GpsInfo( const MarbleModel *marbleModel ); 0041 ~GpsInfo() override; 0042 0043 QStringList backendTypes() const override; 0044 0045 QString name() const override; 0046 0047 QString guiString() const override; 0048 0049 QString nameId() const override; 0050 0051 QString version() const override; 0052 0053 QString description() const override; 0054 0055 QString copyrightYears() const override; 0056 0057 QVector<PluginAuthor> pluginAuthors() const override; 0058 0059 QIcon icon () const override; 0060 0061 void initialize () override; 0062 0063 bool isInitialized () const override; 0064 0065 void forceRepaint(); 0066 0067 private Q_SLOTS: 0068 void updateLocation( const GeoDataCoordinates& coordinates, qreal speed); 0069 0070 private: 0071 MarbleLocale* m_locale; 0072 Ui::GpsInfoPlugin m_widget; 0073 WidgetGraphicsItem* m_widgetItem; 0074 }; 0075 0076 } 0077 0078 #endif