summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FaceTrackNoIR.h
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2010-05-25 16:14:36 +0000
committerWim Vriend <facetracknoir@gmail.com>2010-05-25 16:14:36 +0000
commita8f2a29dcc5fac905ef9a1d2305903cbb74b6b7c (patch)
tree0745bcf5563051ed74137fd7250ee0c41f79f47d /FaceTrackNoIR/FaceTrackNoIR.h
First release Version 1.0.0 of FaceTrackNoIR
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@1 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FaceTrackNoIR.h')
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.h129
1 files changed, 129 insertions, 0 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.h b/FaceTrackNoIR/FaceTrackNoIR.h
new file mode 100644
index 00000000..d09641d2
--- /dev/null
+++ b/FaceTrackNoIR/FaceTrackNoIR.h
@@ -0,0 +1,129 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of the some enthusiastic *
+* gamers from Holland, who don't like to pay for *
+* head-tracking. *
+* *
+* Copyright (C) 2010 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+*********************************************************************************/
+
+#ifndef FaceTrackNoIR_H
+#define FaceTrackNoIR_H
+
+#include <QtGui/QMainWindow>
+#include <QApplication>
+#include <QFileDialog>
+#include <QListView>
+#include <QPainter>
+#include <QWidget>
+#include <QDialog>
+
+#include "ui_FaceTrackNoIR.h"
+#include "tracker.h"
+
+#include <sm_api_qt.h>
+#include <Dshow.h>
+
+using namespace sm::faceapi;
+using namespace sm::faceapi::qt;
+
+class FaceTrackNoIR : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ FaceTrackNoIR(QWidget *parent = 0, Qt::WFlags flags = 0);
+ ~FaceTrackNoIR();
+
+ void getGameProgramName(); // Get the ProgramName from the game and display it.
+
+private:
+ Ui::FaceTrackNoIRClass ui;
+ Tracker *tracker;
+
+ /** face api variables **/
+ VideoDisplayWidget *_display;
+ QVBoxLayout *l;
+ QWidget *_engine_controls;
+
+ /** QT objects **/
+ QDialog aboutDialog;
+ QDesktopWidget desktop;
+
+ QAction *minimizeAction;
+ QAction *maximizeAction;
+ QAction *restoreAction;
+ QAction *quitAction;
+
+ QSystemTrayIcon *trayIcon;
+ QMenu *trayIconMenu;
+
+ void createIconGroupBox();
+// void createMessageGroupBox();
+ void createActions();
+ void createTrayIcon();
+
+ /** helper **/
+ bool cameraDetected;
+ bool settingsDirty;
+
+ void GetCameraNameDX();
+ void loadSettings();
+ void setupFaceTrackNoIR();
+
+ private slots:
+ //file
+ void open();
+ void save();
+ void saveAs();
+ void exit();
+
+ void setIcon(int index);
+ void iconActivated(QSystemTrayIcon::ActivationReason reason);
+ void trackingSourceSelected(int index);
+
+ void showVideoWidget();
+ void showHeadPoseWidget();
+ void showEngineControls();
+
+ //sensibility sliders
+ void setSensYaw( int sens );
+ void setSensPitch( int sens );
+ void setSensRoll( int sens );
+ void setSensX( int sens );
+ void setSensY( int sens );
+ void setSensZ( int sens );
+
+ void setInvertYaw( int invert );
+ void setInvertPitch( int invert );
+ void setInvertRoll( int invert );
+ void setInvertX( int invert );
+ void setInvertY( int invert );
+ void setInvertZ( int invert );
+
+ void setNeutralZone( int angle );
+
+ //smoothing slider
+ void setSmoothing( int smooth );
+
+ void startTracker();
+ void stopTracker();
+ void about();
+};
+
+#endif // FaceTrackNoIR_H