// DO NOT EDIT! Generated from ecm_add_qtdesignerplugin()

#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerCustomWidgetInterface>
#include <QObject>
#include <QIcon>
#include <QString>
#include <kiconbutton.h>

class KIconButtonQtDesignerWidgetFactory
    : public QObject
    , public QDesignerCustomWidgetInterface
{
    Q_OBJECT
    Q_INTERFACES(QDesignerCustomWidgetInterface)

public:
    explicit KIconButtonQtDesignerWidgetFactory(QObject *parent = nullptr)
        : QObject(parent)
        , m_initialized(false)
    {}

    ~KIconButtonQtDesignerWidgetFactory() override {}
    
public: // QDesignerCustomWidgetInterface API
    bool isInitialized() const override { return m_initialized; }

    bool isContainer() const override { return false; }
    QIcon icon() const override { return QIcon(QStringLiteral(":/KIconThemesWidgets/designer/kiconbutton.png")); }
    QString group() const override { return QStringLiteral("Buttons (KF6)"); }
    QString includeFile() const override { return QStringLiteral("kiconbutton.h"); }
    QString name() const override { return QStringLiteral("KIconButton"); }
    QString toolTip() const override { return QStringLiteral("Button for selecting an icon (KF6)"); }
    QString whatsThis() const override { return QStringLiteral("Button for selecting an icon (KF6)"); }

    QWidget* createWidget(QWidget* parent) override
    {
        return new KIconButton(parent);
    }

    void initialize(QDesignerFormEditorInterface* core) override 
    {
        Q_UNUSED(core);

        if (m_initialized) return;

        m_initialized = true;
    }

private:
    bool m_initialized;
};

class KIconThemesWidgetsQtDesignerWidgetCollection
    : public QObject
    , public QDesignerCustomWidgetCollectionInterface
{
    Q_OBJECT
    Q_INTERFACES(
        QDesignerCustomWidgetCollectionInterface
    )

    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface")

public:
    explicit KIconThemesWidgetsQtDesignerWidgetCollection(QObject* parent = nullptr);

public: // QDesignerCustomWidgetCollectionInterface API
    QList<QDesignerCustomWidgetInterface*> customWidgets() const override;

private:
    QList<QDesignerCustomWidgetInterface*> m_widgetFactories;
};

KIconThemesWidgetsQtDesignerWidgetCollection::KIconThemesWidgetsQtDesignerWidgetCollection(QObject* parent)
    : QObject(parent)
{
    m_widgetFactories = QList<QDesignerCustomWidgetInterface*>{
        new KIconButtonQtDesignerWidgetFactory(this),
    };
}

QList<QDesignerCustomWidgetInterface*> KIconThemesWidgetsQtDesignerWidgetCollection::customWidgets() const
{
    return m_widgetFactories;
}

#include "designerplugin.moc"
