File indexing completed on 2024-05-05 03:50:48
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2009 Bastian Holst <bastianholst@gmx.de> 0004 // 0005 0006 #ifndef PHOTOPLUGIN_H 0007 #define PHOTOPLUGIN_H 0008 0009 #include "AbstractDataPlugin.h" 0010 #include "DialogConfigurationInterface.h" 0011 0012 #include <QHash> 0013 0014 namespace Ui 0015 { 0016 class PhotoConfigWidget; 0017 } 0018 0019 namespace Marble 0020 { 0021 0022 class PhotoPlugin : public AbstractDataPlugin, public DialogConfigurationInterface 0023 { 0024 Q_OBJECT 0025 Q_PLUGIN_METADATA(IID "org.kde.marble.PhotoPlugin") 0026 Q_INTERFACES( Marble::RenderPluginInterface ) 0027 Q_INTERFACES( Marble::DialogConfigurationInterface ) 0028 MARBLE_PLUGIN( PhotoPlugin ) 0029 0030 public: 0031 PhotoPlugin(); 0032 0033 explicit PhotoPlugin( const MarbleModel *marbleModel ); 0034 0035 ~PhotoPlugin() override; 0036 0037 void initialize() override; 0038 0039 QString name() const override; 0040 0041 QString guiString() const override; 0042 0043 QString nameId() const override; 0044 0045 QString version() const override; 0046 0047 QString description() const override; 0048 0049 QString copyrightYears() const override; 0050 0051 QVector<PluginAuthor> pluginAuthors() const override; 0052 0053 QIcon icon() const override; 0054 0055 QDialog *configDialog() override; 0056 0057 /** 0058 * @return: The settings of the item. 0059 */ 0060 QHash<QString,QVariant> settings() const override; 0061 0062 /** 0063 * Set the settings of the item. 0064 */ 0065 void setSettings( const QHash<QString,QVariant> &settings ) override; 0066 0067 protected: 0068 bool eventFilter( QObject *object, QEvent *event ) override; 0069 0070 private Q_SLOTS: 0071 void readSettings(); 0072 void writeSettings(); 0073 0074 void updateSettings(); 0075 void checkNumberOfItems( quint32 number ); 0076 0077 private: 0078 Ui::PhotoConfigWidget *ui_configWidget; 0079 QDialog *m_configDialog; 0080 0081 QStringList m_checkStateList; 0082 }; 0083 0084 } 0085 0086 #endif //PHOTOPLUGIN_H