summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-18 13:46:33 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-18 14:09:23 +0200
commitcee42a364e1450d0fb867104cff660871e1d02a4 (patch)
tree07fc00fa453be804b1c47fccb7e3582ffcabc385 /ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.h
parent3236f0b2259c9553615da9810877fee46b10a33e (diff)
add libevdev tracker to build
Issue: #75
Diffstat (limited to 'ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.h')
-rw-r--r--ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.h b/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.h
new file mode 100644
index 00000000..2474fb35
--- /dev/null
+++ b/ftnoir_tracker_libevdev/ftnoir_tracker_libevdev.h
@@ -0,0 +1,55 @@
+#pragma once
+#include <cmath>
+#include "libevdev/libevdev.h"
+#include "facetracknoir/plugin-api.hpp"
+#include "facetracknoir/options.h"
+#include "./ui_ftnoir_libevdev.h"
+using namespace options;
+
+struct settings {
+ pbundle b;
+ value<QString> device_name;
+ settings() :
+ b(bundle("libevdev-tracker")),
+ device_name(b, "device-name", "")
+ {}
+};
+
+class FTNoIR_Tracker : public ITracker
+{
+public:
+ FTNoIR_Tracker();
+ ~FTNoIR_Tracker() override;
+ void StartTracker(QFrame *);
+ void GetHeadPoseData(double *data);
+private:
+ struct libevdev* node;
+ int fd;
+ settings s;
+ bool success;
+ int a_min[6], a_max[6];
+};
+
+class TrackerControls: public QWidget, public ITrackerDialog
+{
+ Q_OBJECT
+public:
+ TrackerControls();
+ void registerTracker(ITracker *) {}
+ void unRegisterTracker() {}
+private:
+ Ui::ui_libevdev_tracker_dialog ui;
+ settings s;
+private slots:
+ void doOK();
+ void doCancel();
+};
+
+class FTNoIR_TrackerDll : public Metadata
+{
+public:
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
+ void getIcon(QIcon *icon);
+};