|
@@ -38,16 +38,22 @@ public:
|
|
|
virtual ~ctkAbstractQObjectFactory();
|
|
|
|
|
|
///
|
|
|
- /// Create an instance of the object
|
|
|
+ /// Create an instance of the object identified by \a itemKey
|
|
|
virtual BaseClassType * instantiate(const QString& itemKey);
|
|
|
|
|
|
///
|
|
|
- /// Uninstanciate the object
|
|
|
+ /// Uninstanciate the object identified by \a itemKey
|
|
|
virtual void uninstantiate(const QString& itemKey);
|
|
|
|
|
|
+ ///
|
|
|
+ /// Return a name allowing to uniquely identify the QObject
|
|
|
+ /// By default, it return \a objectName obtained using staticMetaObject.className()
|
|
|
+ virtual QString objectNameToKey(const QString& objectName);
|
|
|
+
|
|
|
///
|
|
|
/// Register an object in the factory
|
|
|
- /// Note: The parameter 'key' passed by reference will be updated with the associated object name
|
|
|
+ /// The parameter \a key passed by reference will be updated with the
|
|
|
+ /// associated object name obtained using ::objectNameToKey()
|
|
|
template<typename ClassType>
|
|
|
bool registerQObject(QString& key);
|
|
|
|