From bd04206c6a86a46bceff710749ef4119303a1f85 Mon Sep 17 00:00:00 2001 From: Tom Brazier Date: Tue, 30 May 2023 16:34:37 +0100 Subject: Picked a name - natural movement filter --- filter-nm/CMakeLists.txt | 2 +- filter-nm/ftnoir_filter_nm.cpp | 8 ++++---- filter-nm/ftnoir_filter_nm.h | 26 +++++++++++++------------- filter-nm/ftnoir_filter_nm_dialog.cpp | 14 +++++++------- filter-nm/ftnoir_nm_filtercontrols.ui | 8 ++++---- filter-nm/lang/nl_NL.ts | 6 +++--- filter-nm/lang/ru_RU.ts | 6 +++--- filter-nm/lang/stub.ts | 6 +++--- filter-nm/lang/zh_CN.ts | 6 +++--- 9 files changed, 41 insertions(+), 41 deletions(-) diff --git a/filter-nm/CMakeLists.txt b/filter-nm/CMakeLists.txt index d98e90e2..49daaee2 100644 --- a/filter-nm/CMakeLists.txt +++ b/filter-nm/CMakeLists.txt @@ -1 +1 @@ -otr_module(filter-tom) +otr_module(filter-nm) diff --git a/filter-nm/ftnoir_filter_nm.cpp b/filter-nm/ftnoir_filter_nm.cpp index 6bcfeae0..b616f722 100644 --- a/filter-nm/ftnoir_filter_nm.cpp +++ b/filter-nm/ftnoir_filter_nm.cpp @@ -4,7 +4,7 @@ * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. */ -#include "filter_tom.h" +#include "ftnoir_filter_nm.h" #include "compat/math-imports.hpp" #include "compat/macros.h" @@ -13,11 +13,11 @@ #include -tom::tom() +filter_nm::filter_nm() { } -void tom::filter(const double* input, double* output) +void filter_nm::filter(const double* input, double* output) { // order of axes: x, y, z, yaw, pitch, roll if (unlikely(first_run)) @@ -45,4 +45,4 @@ void tom::filter(const double* input, double* output) std::copy(filtered_output, filtered_output + 6, output); } -OPENTRACK_DECLARE_FILTER(tom, dialog_tom, tomDll) +OPENTRACK_DECLARE_FILTER(filter_nm, dialog_nm, nmDll) diff --git a/filter-nm/ftnoir_filter_nm.h b/filter-nm/ftnoir_filter_nm.h index 0f6d07c2..fe0924d1 100644 --- a/filter-nm/ftnoir_filter_nm.h +++ b/filter-nm/ftnoir_filter_nm.h @@ -6,7 +6,7 @@ */ #pragma once -#include "ui_tom_filtercontrols.h" +#include "ui_ftnoir_nm_filtercontrols.h" #include "api/plugin-api.hpp" #include "compat/timer.hpp" @@ -14,13 +14,13 @@ using namespace options; -struct settings_tom : opts +struct settings_nm : opts { value responsiveness[6]; value drift_speeds[6]; - settings_tom() : - opts("tom-filter"), + settings_nm() : + opts("nm-filter"), responsiveness{ value(b, "x-responsiveness", { 10.0, .0, 20.0 }), value(b, "y-responsiveness", { 10.0, .0, 20.0 }), value(b, "z-responsiveness", { 10.0, .0, 20.0 }), @@ -47,9 +47,9 @@ struct settings_tom : opts */ }; -struct tom : IFilter +struct filter_nm : IFilter { - tom(); + filter_nm(); void filter(const double* input, double* output) override; void center() override { first_run = true; } module_status initialize() override { return status_ok(); } @@ -59,15 +59,15 @@ private: double speeds[6]{}; double filtered_output[6]{}; Timer t; - settings_tom s; + settings_nm s; bool first_run = true; }; -class dialog_tom : public IFilterDialog +class dialog_nm : public IFilterDialog { Q_OBJECT public: - dialog_tom(); + dialog_nm(); void register_filter(IFilter*) override {} void unregister_filter() override {} void save() override; @@ -76,18 +76,18 @@ public: void set_buttons_visible(bool x) override; private: - Ui::UICdialog_tom ui; - settings_tom s; + Ui::UICdialog_nm ui; + settings_nm s; private slots: void doOK(); void doCancel(); }; -class tomDll : public Metadata +class nmDll : public Metadata { Q_OBJECT - QString name() override { return tr("Tom"); } + QString name() override { return tr("NaturalMovement"); } QIcon icon() override { return QIcon(":/images/filter-16.png"); } }; diff --git a/filter-nm/ftnoir_filter_nm_dialog.cpp b/filter-nm/ftnoir_filter_nm_dialog.cpp index 5a6ad3a4..ccf894db 100644 --- a/filter-nm/ftnoir_filter_nm_dialog.cpp +++ b/filter-nm/ftnoir_filter_nm_dialog.cpp @@ -4,11 +4,11 @@ * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. */ -#include "filter_tom.h" +#include "ftnoir_filter_nm.h" using namespace options; -dialog_tom::dialog_tom() +dialog_nm::dialog_nm() { ui.setupUi(this); @@ -61,28 +61,28 @@ dialog_tom::dialog_tom() { return QStringLiteral("%1").arg(x, 0, 'f', 2); }); } -void dialog_tom::doOK() +void dialog_nm::doOK() { save(); close(); } -void dialog_tom::doCancel() +void dialog_nm::doCancel() { close(); } -void dialog_tom::save() +void dialog_nm::save() { s.b->save(); } -void dialog_tom::reload() +void dialog_nm::reload() { s.b->reload(); } -void dialog_tom::set_buttons_visible(bool x) +void dialog_nm::set_buttons_visible(bool x) { ui.buttonBox->setVisible(x); } diff --git a/filter-nm/ftnoir_nm_filtercontrols.ui b/filter-nm/ftnoir_nm_filtercontrols.ui index 1a135c1e..c50cc1a6 100644 --- a/filter-nm/ftnoir_nm_filtercontrols.ui +++ b/filter-nm/ftnoir_nm_filtercontrols.ui @@ -1,7 +1,7 @@ - UICdialog_tom - + UICdialog_nm + 0 @@ -577,7 +577,7 @@ buttonBox accepted() - UICdialog_tom + UICdialog_nm accept() @@ -593,7 +593,7 @@ buttonBox rejected() - UICdialog_tom + UICdialog_nm reject() diff --git a/filter-nm/lang/nl_NL.ts b/filter-nm/lang/nl_NL.ts index ce0aefe3..b3c85f91 100644 --- a/filter-nm/lang/nl_NL.ts +++ b/filter-nm/lang/nl_NL.ts @@ -2,7 +2,7 @@ - UICdialog_tom + UICdialog_nm Dialog @@ -69,9 +69,9 @@ - tomDll + nmDll - Tom + NaturalMovement diff --git a/filter-nm/lang/ru_RU.ts b/filter-nm/lang/ru_RU.ts index b72d73ad..456ed403 100644 --- a/filter-nm/lang/ru_RU.ts +++ b/filter-nm/lang/ru_RU.ts @@ -2,7 +2,7 @@ - UICdialog_tom + UICdialog_nm Dialog @@ -69,9 +69,9 @@ - tomDll + nmDll - Tom + NaturalMovement diff --git a/filter-nm/lang/stub.ts b/filter-nm/lang/stub.ts index f212040f..875051cd 100644 --- a/filter-nm/lang/stub.ts +++ b/filter-nm/lang/stub.ts @@ -2,7 +2,7 @@ - UICdialog_tom + UICdialog_nm Dialog @@ -69,9 +69,9 @@ - tomDll + nmDll - Tom + NaturalMovement diff --git a/filter-nm/lang/zh_CN.ts b/filter-nm/lang/zh_CN.ts index 5a322913..561030af 100644 --- a/filter-nm/lang/zh_CN.ts +++ b/filter-nm/lang/zh_CN.ts @@ -2,7 +2,7 @@ - UICdialog_tom + UICdialog_nm Dialog @@ -69,9 +69,9 @@ - tomDll + nmDll - Tom + NaturalMovement -- cgit v1.2.3