blob: 5c09b20119d4fdae6294189747a8521ae630432e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#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
{
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);
public slots:
void make_spline();
};
struct settings final : public opts
{
value<tobii_mode> mode;
settings() :
opts("tobii-eyex"),
mode(b, "mode", tobii_relative)
{}
};
|