mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
GCS - added uavo per instance "new instance" signal.
This commit is contained in:
parent
e71ab57ffa
commit
88a089804b
@ -469,6 +469,14 @@ void UAVObject::emitTransactionCompleted(bool success)
|
||||
emit transactionCompleted(this, success);
|
||||
}
|
||||
|
||||
/**
|
||||
* Emit the newInstance event
|
||||
*/
|
||||
void UAVObject::emitNewInstance(UAVObject * obj)
|
||||
{
|
||||
emit newInstance(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize a UAVObjMetadata object.
|
||||
* \param[in] metadata The metadata object
|
||||
|
@ -125,6 +125,7 @@ public:
|
||||
QString toStringBrief();
|
||||
QString toStringData();
|
||||
void emitTransactionCompleted(bool success);
|
||||
void emitNewInstance(UAVObject *);
|
||||
|
||||
// Metadata accessors
|
||||
static void MetadataInitialize(Metadata& meta);
|
||||
@ -153,6 +154,7 @@ signals:
|
||||
void objectUnpacked(UAVObject* obj);
|
||||
void updateRequested(UAVObject* obj);
|
||||
void transactionCompleted(UAVObject* obj, bool success);
|
||||
void newInstance(UAVObject* obj);
|
||||
|
||||
private slots:
|
||||
void fieldUpdated(UAVObjectField* field);
|
||||
|
@ -89,6 +89,7 @@ bool UAVObjectManager::registerObject(UAVDataObject* obj)
|
||||
UAVDataObject* cobj = obj->clone(instidx);
|
||||
cobj->initialize(mobj);
|
||||
objects[objidx].append(cobj);
|
||||
getObject(cobj->getObjID())->emitNewInstance(cobj);
|
||||
emit newInstance(cobj);
|
||||
}
|
||||
// Finally, initialize the actual object instance
|
||||
@ -105,6 +106,7 @@ bool UAVObjectManager::registerObject(UAVDataObject* obj)
|
||||
}
|
||||
// Add the actual object instance in the list
|
||||
objects[objidx].append(obj);
|
||||
getObject(obj->getObjID())->emitNewInstance(obj);
|
||||
emit newInstance(obj);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user