#include "AutoCompleteTagEditWidgetFactory.h"
#include "AutoCompleteTagEditWidget.h"

AutoCompleteTagEditWidgetFactory::AutoCompleteTagEditWidgetFactory()
{
}

void AutoCompleteTagEditWidgetFactory::create(qx::IxDataMember *dataMember, QWidget *parent)
{
    widget = new AutoCompleteTagEditWidget(parent);
    QString param = dataMember->getPropertyBag("param").toString();
    qx::any any = invokeStatic(dataMember, dataMember->getName() + "Options", param);
    widget->setOptions(qx::any_cast<QVariantMap>(any));
}

QString AutoCompleteTagEditWidgetFactory::type() const
{
    return AutoCompleteTagEditWidget::type;
}

QWidget *AutoCompleteTagEditWidgetFactory::getWidget() const
{
    return widget;
}

IxWidget *AutoCompleteTagEditWidgetFactory::getIxWidget() const
{
    return widget;
}
