summaryrefslogtreecommitdiffhomepage
path: root/tracker-tobii-eyex/tobii-settings.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-tobii-eyex/tobii-settings.hpp')
-rw-r--r--tracker-tobii-eyex/tobii-settings.hpp55
1 files changed, 20 insertions, 35 deletions
diff --git a/tracker-tobii-eyex/tobii-settings.hpp b/tracker-tobii-eyex/tobii-settings.hpp
index 08e05ecf..cfdfa65c 100644
--- a/tracker-tobii-eyex/tobii-settings.hpp
+++ b/tracker-tobii-eyex/tobii-settings.hpp
@@ -1,51 +1,36 @@
#pragma once
-#include "api/plugin-api.hpp"
#include "options/options.hpp"
using namespace options;
-#include "spline/spline.hpp"
-#include "spline/spline-widget.hpp"
-
-#include <functional>
-
-#include <QObject>
enum tobii_mode
{
- tobii_relative,
- tobii_absolute,
+ tobii_snap = 0xf00d,
+ tobii_acc = 0xacc,
};
-class rel_settings final : public QObject, public opts
+enum max_yaw
{
- Q_OBJECT
-
- using functor = std::function<double(double)>;
-
- struct part
- {
- double len;
- functor f;
- };
-
- void make_spline_(part* functors, unsigned len);
-
-public:
- using s = slider_value;
- value<slider_value> speed, dz_len, expt_slope, expt_len, expt_norm, log_len;
- spline acc_mode_spline;
- rel_settings();
- double gain(double value);
+ y10, y15, y20, y30, y45,
+};
-public slots:
- void make_spline();
+enum max_pitch
+{
+ p10, p15, p25, p35,
};
struct settings final : public opts
{
- value<tobii_mode> mode;
- settings() :
- opts("tobii-eyex"),
- mode(b, "mode", tobii_relative)
- {}
+ value<tobii_mode> mode { b, "mode", tobii_snap };
+
+ value<slider_value> snap_speed { b, "snap-speed", slider_value(.1, .05, 1) },
+ snap_inv_dz { b, "snap-screen-edge-length", slider_value(.35, .1, .5) };
+ value<slider_value> acc_speed { b, "acc-speed", slider_value(.1, .05, 1) },
+ acc_dz_len { b, "acc-screen-edge-length", slider_value(.1, .1, 1) };
+ value<max_yaw> snap_yaw { b, "snap-max-yaw", y20 },
+ acc_yaw { b, "acc-max-yaw", y20 };
+ value<max_pitch> snap_pitch { b, "snap-max-pitch", p15 },
+ acc_pitch { b, "acc-max-pitch", p15 };
+
+ settings() : opts("tobii-eyex") {}
};