diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2011-02-11 16:30:47 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2011-02-11 16:30:47 +0000 |
commit | a8a619f078f543b56e8ae785d92844b806444195 (patch) | |
tree | dad2b77637d2e5aad0e592eefa8ff57a0a5b1557 /FaceTrackNoIR/FaceTrackNoIR.cpp | |
parent | 43420d828647b026a315c58db621202fc5a17403 (diff) |
Some more work on the Client/Server protocol.
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@50 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FaceTrackNoIR.cpp')
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.cpp | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index 3502d3c4..e9a0c8be 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -442,6 +442,7 @@ void FaceTrackNoIR::loadSettings() { iniFile.beginGroup ( "TrackerSource" );
ui.iconcomboTrackerSource->setCurrentIndex(iniFile.value ( "Selection", 0 ).toInt());
+ trackingSourceSelected( ui.iconcomboTrackerSource->currentIndex() );
iniFile.endGroup ();
settingsDirty = false;
@@ -702,6 +703,11 @@ void FaceTrackNoIR::showHeadPoseWidget() { /** toggles Engine Controls Dialog **/
void FaceTrackNoIR::showEngineControls() {
+importGetTrackerDialog getIT;
+QLibrary *trackerLib;
+
+
+ qDebug() << "FaceTrackNoIR::showEngineControls started.";
//
// Delete the existing QDialog
@@ -711,6 +717,8 @@ void FaceTrackNoIR::showEngineControls() { _engine_controls = 0;
}
+ qDebug() << "FaceTrackNoIR::showEngineControls after remove engine_controls.";
+
// Create new
if (!_engine_controls)
{
@@ -719,6 +727,29 @@ void FaceTrackNoIR::showEngineControls() { _engine_controls = new EngineControls( tracker->getEngine(), true, false, this, Qt::Dialog );
break;
case FT_FTNOIR: // FTNoir server
+ qDebug() << "FaceTrackNoIR::showEngineControls case FT_FTNOIR.";
+
+ trackerLib = new QLibrary("FTNoIR_Tracker_UDP.dll");
+
+ qDebug() << "FaceTrackNoIR::showEngineControls Loaded trackerLib." << trackerLib;
+
+ getIT = (importGetTrackerDialog) trackerLib->resolve("GetTrackerDialog");
+
+ qDebug() << "FaceTrackNoIR::showEngineControls resolved?." << getIT;
+
+ if (getIT) {
+ ITrackerDialogPtr ptrXyz(getIT());
+ if (ptrXyz)
+ {
+ pTrackerDialog = ptrXyz;
+ pTrackerDialog->Initialize( this );
+ qDebug() << "FaceTrackNoIR::showEngineControls GetTrackerDialog Function Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+
break;
default:
break;
@@ -951,17 +982,17 @@ void FaceTrackNoIR::iconActivated(QSystemTrayIcon::ActivationReason reason) void FaceTrackNoIR::trackingSourceSelected(int index)
{
settingsDirty = true;
- switch (ui.iconcomboTrackerSource->currentIndex()) {
- case FT_SM_FACEAPI: // Face API
- ui.btnShowEngineControls->setEnabled ( false );
- break;
- case FT_FTNOIR: // FTNoir server
- ui.video_frame->hide();
- ui.headPoseWidget->show();
- ui.btnShowEngineControls->setEnabled ( true );
- break;
- default:
- break;
+ switch ( index ) {
+ case FT_SM_FACEAPI: // Face API
+ ui.btnShowEngineControls->setEnabled ( false );
+ break;
+ case FT_FTNOIR: // FTNoir server
+ ui.video_frame->hide();
+ ui.headPoseWidget->show();
+ ui.btnShowEngineControls->setEnabled ( true );
+ break;
+ default:
+ break;
}
}
|