From d498588f59c5b33a30bd63cd5d7f55ef8d209ecd Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 31 Dec 2013 08:43:02 +0100 Subject: add forgotten settings file for main ui --- facetracknoir/main-settings.hpp | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 facetracknoir/main-settings.hpp diff --git a/facetracknoir/main-settings.hpp b/facetracknoir/main-settings.hpp new file mode 100644 index 00000000..05c75398 --- /dev/null +++ b/facetracknoir/main-settings.hpp @@ -0,0 +1,56 @@ +#pragma once + +#include +#include "facetracknoir/options.hpp" +using namespace options; + +struct key_opts { + value key_index; + value ctrl, alt, shift; + key_opts(pbundle b, const QString& name) : + key_index(b, QString("key-index-%1").arg(name), 0), + ctrl(b, QString("key-ctrl-%1").arg(name), 0), + alt(b, QString("key-alt-%1").arg(name), 0), + shift(b, QString("key-shift-%1").arg(name), 0) + {} +}; + +struct axis_opts { + value zero; + value invert, altp; + axis_opts(pbundle b, QString pfx) : + zero(b, n(pfx, "zero-pos"), 0), + invert(b, n(pfx, "invert-axis"), false), + altp(b, n(pfx, "alt-axis-sign"), false) + {} +private: + static inline QString n(QString pfx, QString name) { + return QString("%1-%2").arg(pfx, name); + } +}; + +struct main_settings { + pbundle b; + key_opts center_key; + key_opts toggle_key; + value tracker_dll, tracker2_dll, filter_dll, protocol_dll; + axis_opts a_x, a_y, a_z, a_yaw, a_pitch, a_roll; + value tcomp_p, tcomp_tz; + main_settings(pbundle b) : + b(b), + center_key(b, "center"), + toggle_key(b, "toggle"), + tracker_dll(b, "tracker-dll", ""), + 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"), + tcomp_p(b, "compensate-translation", true), + tcomp_tz(b, "compensate-translation-disable-z-axis", false) + {} +}; -- cgit v1.2.3