From 59d6976ebef702627b2676eecd3ad5c397072074 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 17 Sep 2014 03:11:05 +0200 Subject: hook up axis source options Issue: #52 --- facetracknoir/curve-config.cpp | 22 ++- facetracknoir/ftnoir_curves.ui | 424 ++++++++++++++++++++++++++++------------ facetracknoir/main-settings.hpp | 19 +- 3 files changed, 326 insertions(+), 139 deletions(-) diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp index ef63607d..e1f39d03 100644 --- a/facetracknoir/curve-config.cpp +++ b/facetracknoir/curve-config.cpp @@ -31,12 +31,19 @@ CurveConfigurationDialog::CurveConfigurationDialog(FaceTrackNoIR *ftnoir, QWidge tie_setting(mainApp->s.a_pitch.zero, ui.pos_ry); tie_setting(mainApp->s.a_roll.zero, ui.pos_rz); - tie_setting(mainApp->s.a_yaw.invert, ui.chkInvertYaw); - tie_setting(mainApp->s.a_pitch.invert, ui.chkInvertPitch); - tie_setting(mainApp->s.a_roll.invert, ui.chkInvertRoll); - tie_setting(mainApp->s.a_x.invert, ui.chkInvertX); - tie_setting(mainApp->s.a_y.invert, ui.chkInvertY); - tie_setting(mainApp->s.a_z.invert, ui.chkInvertZ); + tie_setting(mainApp->s.a_yaw.invert, ui.invert_yaw); + tie_setting(mainApp->s.a_pitch.invert, ui.invert_pitch); + tie_setting(mainApp->s.a_roll.invert, ui.invert_roll); + tie_setting(mainApp->s.a_x.invert, ui.invert_x); + tie_setting(mainApp->s.a_y.invert, ui.invert_y); + tie_setting(mainApp->s.a_z.invert, ui.invert_z); + + tie_setting(mainApp->s.a_yaw.src, ui.src_yaw); + tie_setting(mainApp->s.a_pitch.src, ui.src_pitch); + tie_setting(mainApp->s.a_roll.src, ui.src_roll); + tie_setting(mainApp->s.a_x.src, ui.src_x); + tie_setting(mainApp->s.a_y.src, ui.src_y); + tie_setting(mainApp->s.a_z.src, ui.src_z); loadSettings(); } @@ -83,9 +90,6 @@ void CurveConfigurationDialog::loadSettings() { } } -// -// Save the current Settings to the currently 'active' INI-file. -// void CurveConfigurationDialog::save() { qDebug() << "save() says: started"; diff --git a/facetracknoir/ftnoir_curves.ui b/facetracknoir/ftnoir_curves.ui index 33421b40..951d37a7 100644 --- a/facetracknoir/ftnoir_curves.ui +++ b/facetracknoir/ftnoir_curves.ui @@ -580,6 +580,9 @@ Options + + QFormLayout::AllNonFixedFieldsGrow + @@ -737,47 +740,6 @@ - - - - - - Translation compensation - - - true - - - - - - - 0 - 0 - - - - - - - Enable - - - - - - - - - - Disable Z axis compensation - - - - - - - @@ -791,7 +753,7 @@ - Axis inversion + Output source Qt::AlignCenter @@ -802,127 +764,345 @@ false - + QLayout::SetMinAndMaxSize 6 - - - - - 65536 - 65536 - - - - Qt::RightToLeft - - - background:none; + + + + X + + + + Yaw - - - - - 65536 - 65536 - - - - Qt::RightToLeft - - - background:none; - + + - TX + Pitch - - - - - 65536 - 65536 - - - - Qt::RightToLeft + + + + Y - - false + + + + + + Z - - background:none; + + + + + + Roll + + + + - Pitch + - - - - - 65536 - 65536 - + + + + - - Qt::RightToLeft + + + + + + - - background:none; + + + + + + + + + + - TY + - - - - - 65536 - 65536 - + + + + - - Qt::RightToLeft + + + + + + + X + + + + + Y + + + + + Z + + + + + Yaw + + + + + Pitch + + + + + Roll + + + + + + + + + X + + + + + Y + + + + + Z + + + + + Yaw + + + + + Pitch + + + + + Roll + + + + + + + + + X + + + + + Y + + + + + Z + + + + + Yaw + + + + + Pitch + + + + + Roll + + + + + + + + + X + + + + + Y + + + + + Z + + + + + Yaw + + + + + Pitch + + + + + Roll + + + + + + + + + X + + + + + Y + + + + + Z + + + + + Yaw + + + + + Pitch + + + + + Roll + + + + + + + + + X + + + + + Y + + + + + Z + + + + + Yaw + + + + + Pitch + + + + + Roll + + + + + + + + + + + + 0 + 0 + + + + + + + Translation compensation + + + true + + + + + + + 0 + 0 + - background:none; + - Roll + Enable - - - - - 65536 - 65536 - - - - Qt::RightToLeft - + + - background:none; + - TZ + Disable Z axis compensation diff --git a/facetracknoir/main-settings.hpp b/facetracknoir/main-settings.hpp index 8e93bd24..b45c5d9c 100644 --- a/facetracknoir/main-settings.hpp +++ b/facetracknoir/main-settings.hpp @@ -2,6 +2,7 @@ #include #include "facetracknoir/options.h" +#include "ftnoir_tracker_base/ftnoir_tracker_types.h" using namespace options; struct key_opts { @@ -18,10 +19,12 @@ struct key_opts { struct axis_opts { value zero; value invert, altp; - axis_opts(pbundle b, QString pfx) : + value src; + axis_opts(pbundle b, QString pfx, int idx) : zero(b, n(pfx, "zero-pos"), 0), invert(b, n(pfx, "invert-axis"), false), - altp(b, n(pfx, "alt-axis-sign"), false) + altp(b, n(pfx, "alt-axis-sign"), false), + src(b, n(pfx, "source-index"), idx) {} private: static inline QString n(QString pfx, QString name) { @@ -44,12 +47,12 @@ struct main_settings { tracker2_dll(b, "tracker2-dll", ""), filter_dll(b, "filter-dll", ""), protocol_dll(b, "protocol-dll", ""), - a_x(b, "x"), - a_y(b, "y"), - a_z(b, "z"), - a_yaw(b, "yaw"), - a_pitch(b, "pitch"), - a_roll(b, "roll"), + a_x(b, "x", TX), + a_y(b, "y", TY), + a_z(b, "z", TZ), + a_yaw(b, "yaw", Yaw), + a_pitch(b, "pitch", Pitch), + a_roll(b, "roll", Roll), tcomp_p(b, "compensate-translation", true), tcomp_tz(b, "compensate-translation-disable-z-axis", false), dingp(b, "ding", true) -- cgit v1.2.3