summaryrefslogtreecommitdiffhomepage
path: root/spline/axis-opts.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'spline/axis-opts.hpp')
-rw-r--r--spline/axis-opts.hpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/spline/axis-opts.hpp b/spline/axis-opts.hpp
index 2f0d8432..437a5faa 100644
--- a/spline/axis-opts.hpp
+++ b/spline/axis-opts.hpp
@@ -9,8 +9,14 @@ namespace axis_opts_impl {
using namespace options;
-struct OTR_SPLINE_EXPORT axis_opts final
+class OTR_SPLINE_EXPORT axis_opts final
{
+ QString prefix_;
+ Axis axis_;
+
+ static inline QString n(QString const& pfx, QString const& name);
+
+public:
enum max_clamp
{
r180 = 180,
@@ -23,7 +29,11 @@ struct OTR_SPLINE_EXPORT axis_opts final
r15 = 15,
r10 = 10,
+ t600 = 600,
+ t300 = 300,
+ t150 = 150,
t100 = 100,
+ t75 = 75,
t30 = 30,
t20 = 20,
t15 = 15,
@@ -32,16 +42,20 @@ struct OTR_SPLINE_EXPORT axis_opts final
o_r180 = -180,
o_r90 = -90,
o_t75 = -75,
+ o_t100 = -100,
+ o_t150 = -150,
+ o_t300 = -300,
+ o_t600 = -600,
x1000 = 1000,
};
// note, these two bundles can be the same value with no issues
- bundle b_settings_window = make_bundle("opentrack-ui");
- bundle b_mapping_window = make_bundle("opentrack-mappings");
+ bundle b_settings_window{ make_bundle(axis_ == Axis(-1) ? QString() : "opentrack-ui") };
+ bundle b_mapping_window{ make_bundle(axis_ == Axis(-1) ? QString() : "opentrack-mappings") };
value<double> zero;
value<int> src;
- value<bool> invert, altp;
+ value<bool> invert_pre, invert_post, altp;
value<max_clamp> clamp_x_, clamp_y_;
double max_clamp_x() const { return std::fabs(clamp_x_.to<double>()); }
double max_clamp_y() const { return std::fabs(clamp_y_.to<double>()); }
@@ -49,13 +63,8 @@ struct OTR_SPLINE_EXPORT axis_opts final
QString const& prefix() const;
Axis axis() const;
-private:
- static inline QString n(QString pfx, QString name);
-
- QString prefix_;
- Axis axis_;
};
} // ns axis_opts_impl
-using axis_opts_impl::axis_opts;
+using axis_opts = axis_opts_impl::axis_opts;