// DO NOT EDIT! Generated from ecm_add_qtdesignerplugin()

#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerCustomWidgetInterface>
#include <QObject>
#include <QIcon>
#include <QString>
#include <kimagefilepreview.h>
#include <kurlrequester.h>

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

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

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

    bool isContainer() const override { return false; }
    QIcon icon() const override { return QIcon(); }
    QString group() const override { return QStringLiteral("Display (KF5)"); }
    QString includeFile() const override { return QStringLiteral("kimagefilepreview.h"); }
    QString name() const override { return QStringLiteral("KImageFilePreview"); }
    QString toolTip() const override { return QStringLiteral("A widget that provides a image preview of a URL"); }
    QString whatsThis() const override { return QStringLiteral("A widget that provides a image preview of a URL"); }

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

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

        if (m_initialized) return;

        m_initialized = true;
    }

private:
    bool m_initialized;
};

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

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

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

    bool isContainer() const override { return false; }
    QIcon icon() const override { return QIcon(QStringLiteral(":/KIOWidgets/designer/kurlcomborequester.png")); }
    QString group() const override { return QStringLiteral("Input (KF5)"); }
    QString includeFile() const override { return QStringLiteral("kurlrequester.h"); }
    QString name() const override { return QStringLiteral("KUrlComboRequester"); }
    QString toolTip() const override { return QStringLiteral("URL Requester (KF5)"); }
    QString whatsThis() const override { return QStringLiteral("A widget holding a combobox and a pushbutton. A \"file open\" dialog opened when clicking on the pushbutton."); }

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

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

        if (m_initialized) return;

        m_initialized = true;
    }

private:
    bool m_initialized;
};

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

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

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

    bool isContainer() const override { return false; }
    QIcon icon() const override { return QIcon(QStringLiteral(":/KIOWidgets/designer/kurlrequester.png")); }
    QString group() const override { return QStringLiteral("Input (KF5)"); }
    QString includeFile() const override { return QStringLiteral("kurlrequester.h"); }
    QString name() const override { return QStringLiteral("KUrlRequester"); }
    QString toolTip() const override { return QStringLiteral("URL Requester (KF5)"); }
    QString whatsThis() const override { return QStringLiteral("A widget holding a lineedit and a pushbutton. A \"file open\" dialog opened when clicking on the pushbutton."); }

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

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

        if (m_initialized) return;

        m_initialized = true;
    }

private:
    bool m_initialized;
};

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

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

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

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

private:
    QList<QDesignerCustomWidgetInterface*> m_widgetFactories;
};

KIOWidgetsQtDesignerWidgetCollection::KIOWidgetsQtDesignerWidgetCollection(QObject* parent)
    : QObject(parent)
{
    m_widgetFactories = QList<QDesignerCustomWidgetInterface*>{
        new KImageFilePreviewQtDesignerWidgetFactory(this),
        new KUrlComboRequesterQtDesignerWidgetFactory(this),
        new KUrlRequesterQtDesignerWidgetFactory(this),
    };
}

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

#include "designerplugin.moc"
