File indexing completed on 2024-04-28 03:50:20
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2011 Daniel Marth <danielmarth@gmx.at> 0004 // 0005 0006 #ifndef OPENCACHINGPLUGIN_H 0007 #define OPENCACHINGPLUGIN_H 0008 0009 #include "AbstractDataPlugin.h" 0010 0011 #include <QHash> 0012 0013 namespace Ui 0014 { 0015 class OpenCachingConfigWidget; 0016 } 0017 0018 namespace Marble 0019 { 0020 0021 /** 0022 * Plugin to display geocaches from opencaching.de on the map. 0023 */ 0024 class OpenCachingPlugin : public AbstractDataPlugin 0025 { 0026 Q_OBJECT 0027 Q_PLUGIN_METADATA(IID "org.kde.marble.OpenCachingPlugin") 0028 0029 Q_INTERFACES( Marble::RenderPluginInterface ) 0030 0031 MARBLE_PLUGIN( OpenCachingPlugin ) 0032 0033 public: 0034 OpenCachingPlugin(); 0035 0036 virtual void initialize(); 0037 0038 virtual bool isInitialized() const; 0039 0040 QString name() const; 0041 0042 QString guiString() const; 0043 0044 QString description() const; 0045 0046 QIcon icon() const; 0047 0048 QDialog *configDialog(); 0049 0050 /** 0051 * @return: The settings of the item. 0052 */ 0053 virtual QHash<QString,QVariant> settings() const; 0054 0055 /** 0056 * Set the settings of the item. 0057 */ 0058 virtual void setSettings( const QHash<QString,QVariant> &settings ); 0059 0060 public Q_SLOTS: 0061 void readSettings(); 0062 void writeSettings(); 0063 void updateSettings(); 0064 0065 private: 0066 bool m_isInitialized; 0067 Ui::OpenCachingConfigWidget *m_ui; 0068 QDialog *m_configDialog; 0069 QHash<QString,QVariant> m_settings; 0070 0071 private Q_SLOTS: 0072 void validateDateRange(); 0073 void validateDifficultyRange(); 0074 }; 0075 0076 } 0077 0078 #endif // OPENCACHINGPLUGIN_H