// DO NOT EDIT! Generated from ecm_add_qtdesignerplugin()

#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerCustomWidgetInterface>
#include <QObject>
#include <QIcon>
#include <QString>
#include <ksysguardprocesslist.h>
#include <KTextEditVT.h>

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

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

    ~KSysGuardProcessListQtDesignerWidgetFactory() 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("KSysGuard"); }
    QString includeFile() const override { return QStringLiteral("ksysguardprocesslist.h"); }
    QString name() const override { return QStringLiteral("KSysGuardProcessList"); }
    QString toolTip() const override { return QStringLiteral("A list of processes (programs) running."); }
    QString whatsThis() const override { return QStringLiteral("A widget for showing all the processes running along with their memory usage and other details."); }

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

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

        if (m_initialized) return;

        m_initialized = true;
    }

private:
    bool m_initialized;
};

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

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

    ~KTextEditVTQtDesignerWidgetFactory() 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("KSysGuard"); }
    QString includeFile() const override { return QStringLiteral("KTextEditVT.h"); }
    QString name() const override { return QStringLiteral("KTextEditVT"); }
    QString toolTip() const override { return QStringLiteral("A text box suitable for displaying output from VT console-based programs."); }
    QString whatsThis() const override { return QStringLiteral("A widget for displaying out from console based programs.  Some VT100 style commands are interpreted (For example to change the color) as well as some non-printable characters (backspace/delete etc will delete the last character.).  For example the output from 'ls --color' can be displayed."); }

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

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

        if (m_initialized) return;

        m_initialized = true;
    }

private:
    bool m_initialized;
};

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

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

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

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

private:
    QList<QDesignerCustomWidgetInterface*> m_widgetFactories;
};

KSysGuardWidgetsQtDesignerWidgetCollection::KSysGuardWidgetsQtDesignerWidgetCollection(QObject* parent)
    : QObject(parent)
{
    m_widgetFactories = QList<QDesignerCustomWidgetInterface*>{
        new KSysGuardProcessListQtDesignerWidgetFactory(this),
        new KTextEditVTQtDesignerWidgetFactory(this),
    };
}

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

#include "designerplugin.moc"
