diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-20 06:37:04 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-20 15:30:17 +0200 |
commit | 5d8cdde055947ef9c8e157047f090b19e368140c (patch) | |
tree | be69d679a83675bea713945f3a0fc37d102cf748 /ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp | |
parent | 181aac6db63f0fd3aac31c599569acad06a60530 (diff) |
Support FreePIE IMU UDP protocol
Issue: #48
Note, pushed to stable since won't cause regressions, as it's purely
freestanding code.
Diffstat (limited to 'ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp')
-rw-r--r-- | ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp new file mode 100644 index 00000000..702cc8a0 --- /dev/null +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp_dialog.cpp @@ -0,0 +1,30 @@ +#include "ftnoir_tracker_freepie-udp.h" +#include "facetracknoir/plugin-support.h" + +TrackerDialog::TrackerDialog() +{ + ui.setupUi(this); + + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); + + tie_setting(s.port, ui.port); + tie_setting(s.enable_yaw, ui.chkEnableYaw); + tie_setting(s.enable_pitch, ui.chkEnablePitch); + tie_setting(s.enable_roll, ui.chkEnableRoll); +} + +void TrackerDialog::doOK() { + s.b->save(); + this->close(); +} + +void TrackerDialog::doCancel() { + s.b->revert(); + this->close(); +} + +extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog() +{ + return new TrackerDialog; +} |