summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FaceTrackNoIR.cpp
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2010-06-13 15:44:02 +0000
committerWim Vriend <facetracknoir@gmail.com>2010-06-13 15:44:02 +0000
commitc6bf844769902c2eda1cb0789dd5872fe9d962ac (patch)
tree12292eb39811efc74f10c16c8db98127fe467370 /FaceTrackNoIR/FaceTrackNoIR.cpp
parent513d1c8521aad3cd5ba7db3b87349553a793c151 (diff)
PPJoy settings dialog added. First try.
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@12 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
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);