From b367b4c39090735ddf40df757ae381f4b4fe13cb Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 16 May 2016 13:08:20 +0200 Subject: tracker/tobii-eyex: initial revision --- tracker-tobii-eyex/tobii-eyex-dialog.ui | 623 ++++++++++++++++++++++++++++++++ 1 file changed, 623 insertions(+) create mode 100644 tracker-tobii-eyex/tobii-eyex-dialog.ui (limited to 'tracker-tobii-eyex/tobii-eyex-dialog.ui') diff --git a/tracker-tobii-eyex/tobii-eyex-dialog.ui b/tracker-tobii-eyex/tobii-eyex-dialog.ui new file mode 100644 index 00000000..81fc13d6 --- /dev/null +++ b/tracker-tobii-eyex/tobii-eyex-dialog.ui @@ -0,0 +1,623 @@ + + + tobii_eyex_dialog_widgets + + + + 0 + 0 + 715 + 440 + + + + Tracker options + + + + :/images/tobii-eyex-logo.png:/images/tobii-eyex-logo.png + + + + 4 + + + + + Tracking settings + + + + + + Relative mode shifts the view toward a target that may be offscreen then fixes upon it.The absolute mode is not gradual. + + + true + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 4 + + + 4 + + + 4 + + + 4 + + + 9 + + + 4 + + + + + Tracking mode + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 510 + 17 + + + + + + + + + + + + + + Relative tracking mode gain + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Adjust the gain mapping and speed to suit your preference, game type, display size, and distance from the screen. + + + true + + + + + + + + 0 + 0 + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 4 + + + 4 + + + 4 + + + 3 + + + + + + 0 + 0 + + + + Speed + + + + + + + + 24 + 0 + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksAbove + + + 25 + + + + + + + + 0 + 0 + + + + Deadzone + + + + + + + + 24 + 0 + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksAbove + + + 25 + + + + + + + + 0 + 0 + + + + Exponent + + + + + + + + 24 + 0 + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksAbove + + + 25 + + + + + + + + 0 + 0 + + + + Exponential length + + + + + + + + 24 + 0 + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksAbove + + + 25 + + + + + + + + 0 + 0 + + + + Linear coefficient + + + + + + + + 24 + 0 + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksAbove + + + 25 + + + + + + + + 0 + 0 + + + + Linear length + + + + + + + + 24 + 0 + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksAbove + + + 25 + + + + + + + + 0 + 0 + + + + Logarithm base + + + + + + + + 24 + 0 + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksAbove + + + 25 + + + + + + + + 0 + 0 + + + + Logarithm coefficient + + + + + + + + 24 + 0 + + + + 0 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + QSlider::TicksAbove + + + 25 + + + + + + + + + + + 0 + 0 + + + + + 300 + 150 + + + + + 192 + 32 + 8 + + + + + 240 + 240 + 240 + + + + true + + + + + relative_mode_gain + frame_3 + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + -- cgit v1.2.3 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/tobii-eyex-dialog.ui') 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