29 #ifndef __ARCSABSTRACTCOMPONENT_H__
30 #define __ARCSABSTRACTCOMPONENT_H__
35 #include <QStringList>
37 #include <QMetaMethod>
41 typedef QList<QObject*> ObjectList;
112 instanciated = genuineInstanciate();
return instanciated;
119 void destroy() {
if( instanciated) genuineDestroy(); instanciated =
false; }
131 virtual QStringList getSlots() = 0;
134 virtual QStringList getSignals() = 0;
174 bool init(QString slt, QVariant* var);
181 virtual QString toString() = 0;
188 virtual bool parseString(QString s) = 0;
197 virtual bool loadFile(QString fn);
205 virtual bool saveFile(QString fn);
213 void setProperty(QString name, QVariant value);
219 QVariant getProperty(QString name);
224 void removeProperty(QString name);
228 void resetProperties();
232 QStringList getProperties();
269 virtual void getProxySlot(QString slot, ObjectList & obj, QStringList & proxySlot)=0;
282 virtual void getProxySignal(QString signal, ObjectList & obj, QStringList & proxySignal)=0;
310 virtual bool genuineInstanciate() = 0;
315 virtual void genuineDestroy() = 0;
320 ObjectList& obj, QStringList & proxySlot)
327 ObjectList& obj, QStringList & proxySignal)
335 static const QString slotPrefix;
336 static const QString signalPrefix;
339 QVariantMap properties;
357 QStringList
getMethodList(
const QMetaObject *
object,QMetaMethod::MethodType type);
360 #endif //__ARCSABSTRACTCOMPONENT_H__
void setFamily(QString s)
bool instanciate()
Instanciates the real component.
void destroy()
Destroys the real component.
virtual void getProxySignal(QString signal, ObjectList &obj, QStringList &proxySignal)=0
Creates a proxy signal to interface a component to native ARCS components.
virtual QVariant getGenuineComponentInstance()
static void getProxySlot(ARCSAbstractComponent *cmp, QString slot, ObjectList &obj, QStringList &proxySlot)
Wrapper for getProxySlot()
virtual bool genuineDisconnect(QString, ARCSAbstractComponent *, QString)
This method disconnects two components by the indicated signals and slots.
virtual void getProxySlot(QString slot, ObjectList &obj, QStringList &proxySlot)=0
Creates a proxy slot to interface a component to native ARCS components.
Class handling the generic description of a component.
QStringList getMethodList(const QMetaObject *object, QMetaMethod::MethodType type)
Helper method for components.
static void getProxySignal(ARCSAbstractComponent *cmp, QString signal, ObjectList &obj, QStringList &proxySignal)
Wrapper for getProxySignal()
This namespace will contain some constant definitions.
virtual bool genuineConnect(QString, ARCSAbstractComponent *, QString, bool=false)
This method connects two components by the indicated signals and slots.
bool isInstanciated()
Determines wether the component is instanciated or not.