21 #ifndef VPROPERTYFACTORYMANAGER_H
22 #define VPROPERTYFACTORYMANAGER_H
24 #include <qcompilerdetection.h>
25 #include <QMetaObject>
33 class VAbstractPropertyFactory;
35 class VPropertyFactoryManagerPrivate;
59 bool delete_if_unused =
true);
76 const QString& default_value = QString());
static VPropertyFactoryManager * DefaultManager
The default manager.
VPropertyFactoryManagerPrivate * d_ptr
virtual ~VPropertyFactoryManager() Q_DECL_OVERRIDE
Destructor.
void unregisterFactory(VAbstractPropertyFactory *factory, const QString &type=QString(), bool delete_if_unused=true)
Removes a factory from the manager.
bool isRegistered(VAbstractPropertyFactory *factory)
Returns whether a factory is registered (and thus owned) by this factory manager.
void registerFactory(const QString &type, VAbstractPropertyFactory *factory)
Register a factory to the factory manager Note that the manager takes ownership of the factory,...
VPropertyFactoryManager(QObject *parent=nullptr)
Constructor.
QStringList getSupportedTypes()
Returns the default manager.
VProperty * createProperty(const QString &type, const QString &name, const QString &description=QString(), const QString &default_value=QString())
Creates a new property of a certain type and assigns a name and description (otionally)
VAbstractPropertyFactory * getFactory(const QString &type)
Returns a pointer to a factory registered for a certain type.