diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-17 03:11:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-17 04:19:43 +0200 |
commit | 59d6976ebef702627b2676eecd3ad5c397072074 (patch) | |
tree | e9162769effde8e8665178c7a723d095a7eeb34e /facetracknoir | |
parent | 46401fcd2e4e5437e74ca9fca04c7521432566aa (diff) |
hook up axis source options
Issue: #52
Diffstat (limited to 'facetracknoir')
-rw-r--r-- | facetracknoir/curve-config.cpp | 22 | ||||
-rw-r--r-- | facetracknoir/ftnoir_curves.ui | 424 | ||||
-rw-r--r-- | 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 @@ <string>Options</string>
</attribute>
<layout class="QFormLayout" name="formLayout">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
@@ -737,47 +740,6 @@ </widget>
</item>
<item row="1" column="0">
- <widget class="QGroupBox" name="groupBox_2">
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="title">
- <string>Translation compensation</string>
- </property>
- <property name="flat">
- <bool>true</bool>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QCheckBox" name="tcomp_enable">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>Enable</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="tcomp_rz">
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>Disable Z axis compensation</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="2" column="0">
<widget class="QGroupBox" name="groupBox_4">
<property name="maximumSize">
<size>
@@ -791,7 +753,7 @@ </font>
</property>
<property name="title">
- <string>Axis inversion</string>
+ <string>Output source</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -802,127 +764,345 @@ <property name="checkable">
<bool>false</bool>
</property>
- <layout class="QGridLayout" name="gridLayout_4" rowstretch="6,6,6" columnstretch="6,6" rowminimumheight="6,6,6" columnminimumwidth="6,6">
+ <layout class="QGridLayout" name="gridLayout_4" rowstretch="0,0,0,0,0,0,0" columnstretch="0,0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetMinAndMaxSize</enum>
</property>
<property name="spacing">
<number>6</number>
</property>
- <item row="0" column="0">
- <widget class="QCheckBox" name="chkInvertYaw">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="styleSheet">
- <string notr="true">background:none;</string>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_10">
+ <property name="text">
+ <string>X</string>
</property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_7">
<property name="text">
<string>Yaw</string>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="chkInvertX">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_8">
<property name="text">
- <string>TX</string>
+ <string>Pitch</string>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="chkInvertPitch">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_11">
+ <property name="text">
+ <string>Y</string>
</property>
- <property name="autoFillBackground">
- <bool>false</bool>
+ </widget>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="label_12">
+ <property name="text">
+ <string>Z</string>
</property>
- <property name="styleSheet">
- <string notr="true">background:none;</string>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>Roll</string>
</property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QCheckBox" name="invert_yaw">
<property name="text">
- <string>Pitch</string>
+ <string/>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkInvertY">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
+ <item row="2" column="2">
+ <widget class="QCheckBox" name="invert_pitch">
+ <property name="text">
+ <string/>
</property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QCheckBox" name="invert_x">
+ <property name="text">
+ <string/>
</property>
- <property name="styleSheet">
- <string notr="true">background:none;</string>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QCheckBox" name="invert_roll">
+ <property name="text">
+ <string/>
</property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <widget class="QCheckBox" name="invert_y">
<property name="text">
- <string>TY</string>
+ <string/>
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="chkInvertRoll">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
+ <item row="6" column="2">
+ <widget class="QCheckBox" name="invert_z">
+ <property name="text">
+ <string/>
</property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="src_yaw">
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QComboBox" name="src_pitch">
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QComboBox" name="src_roll">
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QComboBox" name="src_x">
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QComboBox" name="src_y">
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <widget class="QComboBox" name="src_z">
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="title">
+ <string>Translation compensation</string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="tcomp_enable">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
<property name="styleSheet">
- <string notr="true">background:none;</string>
+ <string notr="true"/>
</property>
<property name="text">
- <string>Roll</string>
+ <string>Enable</string>
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkInvertZ">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="tcomp_rz">
<property name="styleSheet">
- <string notr="true">background:none;</string>
+ <string notr="true"/>
</property>
<property name="text">
- <string>TZ</string>
+ <string>Disable Z axis compensation</string>
</property>
</widget>
</item>
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 <QString> #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<double> zero; value<bool> invert, altp; - axis_opts(pbundle b, QString pfx) : + value<int> 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) |