summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FaceTrackNoIR.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'FaceTrackNoIR/FaceTrackNoIR.cpp')
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp
index de73a0b4..3f665e8b 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/FaceTrackNoIR.cpp
@@ -24,6 +24,7 @@
#include "FaceTrackNoIR.h"
#include "tracker.h"
+#include "PPJoyServer.h"
using namespace sm::faceapi;
using namespace sm::faceapi::qt;
@@ -36,6 +37,7 @@ QMainWindow(parent, flags)
{
cameraDetected = false;
_engine_controls = 0;
+ _server_controls = 0;
tracker = 0;
_display = 0;
l = 0;
@@ -62,6 +64,7 @@ void FaceTrackNoIR::setupFaceTrackNoIR() {
connect(ui.actionVideoWidget, SIGNAL(triggered()), this, SLOT(showVideoWidget()));
connect(ui.actionHeadPoseWidget, SIGNAL(triggered()), this, SLOT(showHeadPoseWidget()));
connect(ui.btnShowEngineControls, SIGNAL(clicked()), this, SLOT(showEngineControls()));
+ connect(ui.btnShowServerControls, SIGNAL(clicked()), this, SLOT(showServerControls()));
// button methods connect with methods in this class
connect(ui.btnStartTracker, SIGNAL(clicked()), this, SLOT(startTracker()));
@@ -627,6 +630,22 @@ void FaceTrackNoIR::showEngineControls() {
}
}
+/** toggles Server Controls Dialog **/
+void FaceTrackNoIR::showServerControls() {
+ if (!_server_controls)
+ {
+ qDebug() << "showServerControls says: No server_controls yet!";
+ _server_controls = new PPJoyControls( this, Qt::Dialog );
+ qDebug() << "showServerControls says: After new!";
+ }
+
+ if (_server_controls) {
+ qDebug() << "showServerControls says: Before show!";
+ _server_controls->show();
+ _server_controls->raise();
+ }
+}
+
/** exit application **/
void FaceTrackNoIR::exit() {
QCoreApplication::exit(0);