File indexing completed on 2024-04-28 03:50:25

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