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

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2005-2007 Torsten Rahn <tackat@kde.org>
0004 // SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org>
0005 //
0006 
0007 //
0008 // This class is responsible for offering plugin capabilities.
0009 //
0010 
0011 #ifndef MARBLEWIDGETPLUGIN_H
0012 #define MARBLEWIDGETPLUGIN_H
0013 
0014 #include <marble_export.h>
0015 
0016 // Workaround: moc on osx is unable to find this file, when prefix with QtDesigner/
0017 // moc also doesn't respect Q_OS_* macros, otherwise I could ifdef this.
0018 #include <QDesignerCustomWidgetInterface>
0019 
0020 class MarbleWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
0021 {
0022     Q_OBJECT
0023     Q_PLUGIN_METADATA(IID "org.kde.marble.MarbleWidgetPlugin")
0024     Q_INTERFACES(QDesignerCustomWidgetInterface)
0025 
0026 public:
0027     explicit MarbleWidgetPlugin(QObject *parent = nullptr);
0028 
0029     bool isContainer() const override;
0030     bool isInitialized() const override;
0031     QIcon icon() const override;
0032     QString domXml() const override;
0033     QString name() const override;
0034     QString group() const override;
0035     QString includeFile() const override;
0036     QString toolTip() const override;
0037     QString whatsThis() const override;
0038     QWidget *createWidget(QWidget *parent) override;
0039 
0040     void initialize(QDesignerFormEditorInterface *core) override;
0041 
0042 private:
0043     bool m_initialized;
0044 };
0045 
0046 #endif