00001 #include "PropertyRefInjector.h" 00002 #include "ReferenceInjector.h" 00003 #include "ReferenceDefinition.h" 00004 #include "ReferenceResolver.h" 00005 00006 #include <QString> 00007 #include <QHash> 00008 #include <QtPlugin> 00009 00010 using namespace qic; 00011 00012 QVariant 00013 PropertyRefInjector::injectReference (QVariant & prop, ReferenceResolver * resolver, QHash <QString, QObject *> &) 00014 { 00015 ReferenceDefinition def = prop.value<ReferenceDefinition>(); 00016 QObject * ref = resolver->resolveReferenceObject(def); 00017 return QVariant::fromValue(ref); 00018 } 00019 00020 Q_EXPORT_PLUGIN2(ref_injector, PropertyRefInjector)