From 9a85b814d908a28fb7444b7e1b5afae9fe629784 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 19 Sep 2016 15:05:17 +0200 Subject: tracker/tobii: fix bitrot --- tracker-tobii-eyex/tobii-eyex-dialog.ui | 49 +++++++++++++++++++-------------- tracker-tobii-eyex/tobii-eyex.cpp | 16 +++++------ tracker-tobii-eyex/tobii-eyex.hpp | 12 ++++---- 3 files changed, 42 insertions(+), 35 deletions(-) (limited to 'tracker-tobii-eyex') diff --git a/tracker-tobii-eyex/tobii-eyex-dialog.ui b/tracker-tobii-eyex/tobii-eyex-dialog.ui index 81fc13d6..1a85f417 100644 --- a/tracker-tobii-eyex/tobii-eyex-dialog.ui +++ b/tracker-tobii-eyex/tobii-eyex-dialog.ui @@ -6,7 +6,7 @@ 0 0 - 715 + 710 440 @@ -208,25 +208,6 @@ - - - - - 0 - 0 - - - - Qt::Horizontal - - - QSlider::TicksAbove - - - 25 - - - @@ -563,11 +544,30 @@ + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksAbove + + + 25 + + + - + 0 @@ -616,6 +616,13 @@ + + + spline_widget + QWidget +
spline-widget/spline-widget.hpp
+
+
diff --git a/tracker-tobii-eyex/tobii-eyex.cpp b/tracker-tobii-eyex/tobii-eyex.cpp index 709f1b8f..74c31240 100644 --- a/tracker-tobii-eyex/tobii-eyex.cpp +++ b/tracker-tobii-eyex/tobii-eyex.cpp @@ -44,14 +44,14 @@ static constexpr t clamp(t datum, t min, t max) void rel_settings::draw_spline() { - Map& spline = acc_mode_spline; + spline& spline = acc_mode_spline; spline.removeAllPoints(); static constexpr float std_norm_expt = 1.f/3; - const float norm_expt = std_norm_expt * float(expt_norm.get()); + const float norm_expt = std_norm_expt * float(expt_norm->cur()); static constexpr float std_norm_lin = 2.f/3; - const float norm_lin = clamp((1-norm_expt) * lin_norm.get() * std_norm_lin, 0, 1); + const float norm_lin = clamp((1-norm_expt) * lin_norm->cur() * std_norm_lin, 0., 1.); } @@ -62,22 +62,22 @@ rel_settings::rel_settings() : expt_slope(b, "exponent-slope", s(1.5, 1.25, 3)), expt_norm(b, "exponent-norm", s(1, .25, 4)), lin_norm(b, "linear-norm", s(1, .25, 4)), - acc_mode_spline(100, 100) + acc_mode_spline(100, 100, "") { QObject::connect(&dz_end_pt, - static_cast(&base_value::valueChanged), + static_cast(&base_value::valueChanged), this, &rel_settings::draw_spline); QObject::connect(&expt_slope, - static_cast(&base_value::valueChanged), + static_cast(&base_value::valueChanged), this, &rel_settings::draw_spline); QObject::connect(&expt_norm, - static_cast(&base_value::valueChanged), + static_cast(&base_value::valueChanged), this, &rel_settings::draw_spline); QObject::connect(&lin_norm, - static_cast(&base_value::valueChanged), + static_cast(&base_value::valueChanged), this, &rel_settings::draw_spline); draw_spline(); diff --git a/tracker-tobii-eyex/tobii-eyex.hpp b/tracker-tobii-eyex/tobii-eyex.hpp index f64f2495..aeac4d89 100644 --- a/tracker-tobii-eyex/tobii-eyex.hpp +++ b/tracker-tobii-eyex/tobii-eyex.hpp @@ -11,12 +11,12 @@ #include #include "ui_tobii-eyex-dialog.h" -#include "opentrack/plugin-api.hpp" -#include "opentrack-compat/options.hpp" +#include "api/plugin-api.hpp" +#include "options/options.hpp" using namespace options; -#include "opentrack-compat/timer.hpp" -#include "spline-widget/functionconfig.h" -#include "qfunctionconfigurator.h" +#include "compat/timer.hpp" +#include "spline-widget/spline.hpp" +#include "spline-widget/spline-widget.hpp" #include #include @@ -34,7 +34,7 @@ class rel_settings final : public QObject, public opts public: using s = slider_value; value speed, dz_end_pt, expt_slope, expt_norm, lin_norm; - Map acc_mode_spline; + spline acc_mode_spline; rel_settings(); private slots: void draw_spline(); -- cgit v1.2.3