From b3d3a1f1d4f9739a506990edefcd2d81502368d4 Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Fri, 16 Nov 2012 12:00:53 +0000 Subject: Added registerProtocol and unRegisterProtocol to the Protocol classes. Now the Protocol Dialog can get data from the protocol, when the Tracker is running. git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@192 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FaceTrackNoIR/FaceTrackNoIR.cpp | 9 ++++++++- FaceTrackNoIR/tracker.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'FaceTrackNoIR') diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index e4907284b..4d59b85bf 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -715,7 +715,7 @@ void FaceTrackNoIR::startTracker( ) { ui.iconcomboTrackerSource->setEnabled ( false ); ui.cbxSecondTrackerSource->setEnabled ( false ); ui.iconcomboProtocol->setEnabled ( false ); - ui.btnShowServerControls->setEnabled ( false ); +// ui.btnShowServerControls->setEnabled ( false ); ui.iconcomboFilter->setEnabled ( false ); // @@ -796,6 +796,9 @@ void FaceTrackNoIR::stopTracker( ) { if (pTrackerDialog) { pTrackerDialog->unRegisterTracker(); } + if (pProtocolDialog) { + pProtocolDialog->unRegisterProtocol(); + } // // Delete the tracker (after stopping things and all). @@ -1101,6 +1104,10 @@ QString libName; { pProtocolDialog = ptrXyz; pProtocolDialog->Initialize( this ); + if (tracker) { + pProtocolDialog->registerProtocol( tracker->getProtocolPtr() ); + qDebug() << "FaceTrackNoIR::showServerControls RegisterProtocol Function Executed"; + } qDebug() << "FaceTrackNoIR::showServerControls GetProtocolDialog Function Resolved!"; } else { diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h index 6a51758b3..e6d6a14db 100644 --- a/FaceTrackNoIR/tracker.h +++ b/FaceTrackNoIR/tracker.h @@ -256,6 +256,7 @@ public: static IFilterPtr getFilterPtr() { return pFilter; } // Return the pointer for the active Filter ITracker *getTrackerPtr() { return pTracker; } // Return the pointer for the active Tracker ITracker *getSecondTrackerPtr() { return pSecondTracker; } // Return the pointer for the secondary Tracker + IProtocol *getProtocolPtr() { return pProtocol; } // Return the pointer for the active Protocol void doRefreshVideo() { // Call the face-tracker-function RefreshVideo if (pTracker) { -- cgit v1.2.3