// DO NOT EDIT! Generated from ecm_add_qtdesignerplugin()

#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerCustomWidgetInterface>
#include <QObject>
#include <QIcon>
#include <QString>
#include <kcombobox.h>
#include <khistorycombobox.h>
#include <klineedit.h>

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

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

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

    bool isContainer() const override { return false; }
    QIcon icon() const override { return QIcon(QStringLiteral(":/KCompletionWidgets/designer/kcombobox.png")); }
    QString group() const override { return QStringLiteral("Input (KF5)"); }
    QString includeFile() const override { return QStringLiteral("kcombobox.h"); }
    QString name() const override { return QStringLiteral("KComboBox"); }
    QString toolTip() const override { return QStringLiteral("Combo Box (KF5)"); }
    QString whatsThis() const override { return QStringLiteral("Combo Box (KF5)"); }

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

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

        if (m_initialized) return;

        m_initialized = true;
    }

private:
    bool m_initialized;
};

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

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

    ~KHistoryComboBoxQtDesignerWidgetFactory() 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("Input (KF5)"); }
    QString includeFile() const override { return QStringLiteral("khistorycombobox.h"); }
    QString name() const override { return QStringLiteral("KHistoryComboBox"); }
    QString toolTip() const override { return QStringLiteral("A combobox for offering a history and completion (KF5)"); }
    QString whatsThis() const override { return QStringLiteral("A combobox which implements a history like a unix shell"); }

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

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

        if (m_initialized) return;

        m_initialized = true;
    }

private:
    bool m_initialized;
};

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

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

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

    bool isContainer() const override { return false; }
    QIcon icon() const override { return QIcon(QStringLiteral(":/KCompletionWidgets/designer/klineedit.png")); }
    QString group() const override { return QStringLiteral("Input (KF5)"); }
    QString includeFile() const override { return QStringLiteral("klineedit.h"); }
    QString name() const override { return QStringLiteral("KLineEdit"); }
    QString toolTip() const override { return QStringLiteral("Line Edit (KF5)"); }
    QString whatsThis() const override { return QStringLiteral("Line Edit (KF5)"); }

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

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

        if (m_initialized) return;

        m_initialized = true;
    }

private:
    bool m_initialized;
};

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

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

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

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

private:
    QList<QDesignerCustomWidgetInterface*> m_widgetFactories;
};

KCompletionWidgetsQtDesignerWidgetCollection::KCompletionWidgetsQtDesignerWidgetCollection(QObject* parent)
    : QObject(parent)
{
    m_widgetFactories = QList<QDesignerCustomWidgetInterface*>{
        new KComboBoxQtDesignerWidgetFactory(this),
        new KHistoryComboBoxQtDesignerWidgetFactory(this),
        new KLineEditQtDesignerWidgetFactory(this),
    };
}

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

#include "designerplugin.moc"
