diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-12-09 12:35:23 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-12-09 12:55:24 +0100 |
commit | 98823d01631fe8cfdf8210751efdbc1b24990af3 (patch) | |
tree | 6db3934306218efd68a853129dc32186d5ec4e1a /tracker-tobii-eyex/tobii-settings.hpp | |
parent | 5a5cf4bac9af84252b28e56b15b71708f8cd3b7b (diff) |
tracker/tobii: flush further work. it's still broken.
Diffstat (limited to 'tracker-tobii-eyex/tobii-settings.hpp')
-rw-r--r-- | tracker-tobii-eyex/tobii-settings.hpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tracker-tobii-eyex/tobii-settings.hpp b/tracker-tobii-eyex/tobii-settings.hpp new file mode 100644 index 00000000..4346a156 --- /dev/null +++ b/tracker-tobii-eyex/tobii-settings.hpp @@ -0,0 +1,52 @@ +#pragma once + +#include "api/plugin-api.hpp" +#include "options/options.hpp" +using namespace options; +#include "spline-widget/spline.hpp" +#include "spline-widget/spline-widget.hpp" + +#include <functional> + +#include <QObject> + +enum tobii_mode +{ + tobii_relative, + tobii_absolute, +}; + +class rel_settings final : public QObject, public opts +{ + Q_OBJECT + + using functor = std::function<double(double)>; + + struct part + { + int nparts; + double len, norm; + 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_slope, log_len, log_norm; + spline acc_mode_spline; + rel_settings(); + double gain(double value); + +public slots: + void make_spline(); +}; + +struct settings final : public opts +{ + value<tobii_mode> mode; + settings() : + opts("tobii-eyex"), + mode(b, "mode", tobii_relative) + {} +}; |