File indexing completed on 2025-01-05 03:59:31
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // Most of the code is taken from MarbleRenderPluginInterface.h 0004 // by Torsten Rahn and Inge Wallin. 0005 // 0006 // SPDX-FileCopyrightText: 2009 Jens-Michael Hoffmann <jensmh@gmx.de> 0007 // SPDX-FileCopyrightText: 2012 Bernhard Beschow <bbeschow@cs.tu-berlin.de> 0008 // 0009 0010 #ifndef MARBLE_PLUGIN_INTERFACE_H 0011 #define MARBLE_PLUGIN_INTERFACE_H 0012 0013 // Qt includes 0014 0015 #include <QVector> 0016 #include <QString> 0017 #include <QtPlugin> 0018 0019 // KDE includes 0020 0021 #include <klocalizedstring.h> 0022 0023 // Local includes 0024 0025 #include "digikam_export.h" 0026 0027 class QIcon; 0028 0029 namespace Marble 0030 { 0031 0032 struct DIGIKAM_EXPORT PluginAuthor 0033 { 0034 0035 public: 0036 0037 PluginAuthor() 0038 { 0039 } 0040 0041 PluginAuthor( const QString &name_, const QString &email_, const QString &task_ = i18n( "Developer" ) ) 0042 : name( name_ ), 0043 task( task_ ), 0044 email( email_ ) 0045 { 0046 } 0047 0048 QString name; 0049 QString task; 0050 QString email; 0051 }; 0052 0053 /** 0054 * @short This class specifies interface of a Marble plugin. 0055 */ 0056 0057 class DIGIKAM_EXPORT PluginInterface 0058 { 0059 public: 0060 0061 virtual ~PluginInterface(); 0062 0063 /** 0064 * @brief Returns the user-visible name of the plugin. 0065 * 0066 * The user-visible name should be context free, i.e. the name should 0067 * provide enough information as to what the plugin is about in the context 0068 * of Marble. 0069 * 0070 * Example: "Starry Sky Background" 0071 */ 0072 virtual QString name() const = 0; 0073 0074 /** 0075 * @brief Returns the unique name of the plugin. 0076 * 0077 * Examples: "starrysky", "openrouteservice" 0078 */ 0079 virtual QString nameId() const = 0; 0080 0081 virtual QString version() const = 0; 0082 0083 /** 0084 * @brief Returns a user description of the plugin. 0085 */ 0086 virtual QString description() const = 0; 0087 0088 /** 0089 * @brief Returns an icon for the plugin. 0090 */ 0091 virtual QIcon icon() const = 0; 0092 0093 virtual QString copyrightYears() const = 0; 0094 0095 /** 0096 * @since 0.26.0 0097 */ 0098 virtual QVector<PluginAuthor> pluginAuthors() const = 0; 0099 0100 /** 0101 * @brief Returns about text (credits) for external data the plugin uses. 0102 * 0103 * The default implementation returns the empty string. Please override 0104 * this method to give credits for all data from 3rd-partys. 0105 */ 0106 virtual QString aboutDataText() const; 0107 }; 0108 0109 } // namespace Marble 0110 0111 Q_DECLARE_TYPEINFO(Marble::PluginAuthor, Q_MOVABLE_TYPE); 0112 0113 Q_DECLARE_INTERFACE( Marble::PluginInterface, "org.kde.Marble.PluginInterface/1.1" ) 0114 0115 #endif // MARBLE_PLUGIN_INTERFACE_H