/* Copyright (c) 2015, Stanislaw Halik * Permission to use, copy, modify, and/or distribute this * software for any purpose with or without fee is hereby granted, * provided that the above copyright notice and this permission * notice appear in all copies. */ #pragma once #include #include "options/options.hpp" #include "api/plugin-api.hpp" #include "spline/axis-opts.hpp" #include "export.hpp" enum reltrans_state { reltrans_disabled = 0, reltrans_enabled = 1, reltrans_non_center = 2, }; namespace main_settings_impl { using namespace options; struct OTR_LOGIC_EXPORT key_opts { value keycode, guid; value button; key_opts(bundle b, const QString& name); key_opts& operator=(const key_opts& x); }; struct OTR_LOGIC_EXPORT module_settings { bundle b { make_bundle("modules") }; value tracker_dll { b, "tracker-dll", "pt" }; value filter_dll { b, "filter-dll", "accela" }; value protocol_dll { b, "protocol-dll", "freetrack" }; module_settings(); }; struct OTR_LOGIC_EXPORT main_settings final { bundle b { make_bundle("opentrack-ui") }; bundle b_map { make_bundle("opentrack-mappings") }; axis_opts a_x{ "x", TX }, a_y { "y", TY }, a_z { "z", TZ }; axis_opts a_yaw{ "yaw", Yaw }, a_pitch { "pitch", Pitch }, a_roll { "roll", Roll }; axis_opts* all_axis_opts[6] { &a_x, &a_y, &a_z, &a_yaw, &a_pitch, &a_roll }; value reltrans_mode { b, "relative-translation-mode", reltrans_disabled }; value reltrans_disable_tx { b, "compensate-translation-disable-x-axis", false }; value reltrans_disable_ty { b, "compensate-translation-disable-y-axis", false }; value reltrans_disable_tz { b, "compensate-translation-disable-z-axis", false }; value reltrans_disable_src_yaw { b, "compensate-translation-disable-source-yaw", false }; value reltrans_disable_src_pitch { b, "compensate-translation-disable-source-pitch", false }; value reltrans_disable_src_roll { b, "compensate-translation-disable-source-roll", false }; value tray_enabled { b, "use-system-tray", false }; value tray_start { b, "start-in-tray", false }; value center_at_startup { b, "center-at-startup", true }; //value center_method; value neck_z { b, "neck-depth", 0 }; value neck_enable { b, "neck-enable", false }; key_opts key_start_tracking1 { b, "start-tracking" }; key_opts key_start_tracking2 { b, "start-tracking-alt" }; key_opts key_stop_tracking1 { b, "stop-tracking" }; key_opts key_stop_tracking2 { b, "stop-tracking-alt" }; key_opts key_toggle_tracking1 { b, "toggle-tracking" }; key_opts key_toggle_tracking2 { b, "toggle-tracking-alt" }; key_opts key_restart_tracking1 { b, "restart-tracking" }; key_opts key_restart_tracking2 { b, "restart-tracking-alt" }; key_opts key_center1 { b, "center" }; key_opts key_center2 { b, "center-alt" }; key_opts key_toggle1 { b, "toggle" }; key_opts key_toggle2 { b, "toggle-alt" }; key_opts key_zero1 { b, "zero" }; key_opts key_zero2 { b, "zero-alt" }; key_opts key_toggle_press1 { b, "toggle-press" }; key_opts key_toggle_press2 { b, "toggle-press-alt" }; key_opts key_zero_press1 { b, "zero-press" }; key_opts key_zero_press2 { b, "zero-press-alt" }; value tracklogging_enabled { b, "tracklogging-enabled", false }; value tracklogging_filename { b, "tracklogging-filename", {} }; main_settings(); }; } // ns main_settings_impl using key_opts = main_settings_impl::key_opts; using module_settings = main_settings_impl::module_settings; using main_settings = main_settings_impl::main_settings;