summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FaceTrackNoIR.cpp
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2011-04-04 19:58:09 +0000
committerWim Vriend <facetracknoir@gmail.com>2011-04-04 19:58:09 +0000
commitd3456cb84b428b2f5070517d6e571f6b2724dd24 (patch)
treeb4885f52965952f8a4a529bce3edadc6dc425867 /FaceTrackNoIR/FaceTrackNoIR.cpp
parent28c091a886e6c98f41d3f5f8b153768b4a589fcd (diff)
Move protocols to DLL: TrackIR
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@61 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FaceTrackNoIR.cpp')
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp47
1 files changed, 43 insertions, 4 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp
index d2373824..03f819de 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/FaceTrackNoIR.cpp
@@ -23,6 +23,7 @@
*********************************************************************************/
/*
Modifications (last one on top):
+ 20110404 - WVR: Migrated the FlightGear protocol to a separate DLL. The rest must follow...
20110401 - WVR: The about-dialog was shown 'misplaced'. It was corrected.
20110328 - WVR: Added the display for output-pose.
20110207 - WVR: RadioButtons for 'Stop engine' added. It is now possible to choose Stop or Keep tracking.
@@ -32,8 +33,8 @@
#include "tracker.h"
#include "PPJoyServer.h"
#include "FSUIPCServer.h"
-#include "FTIRServer.h"
-#include "FGServer.h"
+//#include "FTIRServer.h"
+//#include "FGServer.h"
#include "FTNServer.h"
@@ -813,6 +814,8 @@ QLibrary *trackerLib;
/** toggles Server Controls Dialog **/
void FaceTrackNoIR::showServerControls() {
+importGetProtocolDialog getIT;
+QLibrary *protocolLib;
//
@@ -839,11 +842,47 @@ void FaceTrackNoIR::showServerControls() {
_server_controls = new FSUIPCControls( this, Qt::Dialog );
break;
case TRACKIR:
- _server_controls = new FTIRControls( this, Qt::Dialog );
+ protocolLib = new QLibrary("FTNoIR_Protocol_FTIR.dll");
+
+ getIT = (importGetProtocolDialog) protocolLib->resolve("GetProtocolDialog");
+ if (getIT) {
+ IProtocolDialogPtr ptrXyz(getIT());
+ if (ptrXyz)
+ {
+ pProtocolDialog = ptrXyz;
+ pProtocolDialog->Initialize( this );
+ qDebug() << "FaceTrackNoIR::showServerControls GetProtocolDialog Function Resolved!";
+ }
+ else {
+ qDebug() << "FaceTrackNoIR::showServerControls Function NOT Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
break;
+
case FLIGHTGEAR:
- _server_controls = new FGControls( this, Qt::Dialog );
+ protocolLib = new QLibrary("FTNoIR_Protocol_FG.dll");
+
+ getIT = (importGetProtocolDialog) protocolLib->resolve("GetProtocolDialog");
+ if (getIT) {
+ IProtocolDialogPtr ptrXyz(getIT());
+ if (ptrXyz)
+ {
+ pProtocolDialog = ptrXyz;
+ pProtocolDialog->Initialize( this );
+ qDebug() << "FaceTrackNoIR::showServerControls GetProtocolDialog Function Resolved!";
+ }
+ else {
+ qDebug() << "FaceTrackNoIR::showServerControls Function NOT Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
break;
+
case FTNOIR:
_server_controls = new FTNServerControls( this, Qt::Dialog );
break;