summaryrefslogtreecommitdiffhomepage
path: root/filter-nm
diff options
context:
space:
mode:
authorTom Brazier <tom_github@firstsolo.net>2023-05-30 16:34:37 +0100
committerTom Brazier <tom_github@firstsolo.net>2023-07-23 14:00:51 +0100
commitbd04206c6a86a46bceff710749ef4119303a1f85 (patch)
treea4027597d51efba7189c63fcc466c62e2978b533 /filter-nm
parent3a1f8606c5b415be00ebf21cd57f4fed6832b800 (diff)
Picked a name - natural movement filter
Diffstat (limited to 'filter-nm')
-rw-r--r--filter-nm/CMakeLists.txt2
-rw-r--r--filter-nm/ftnoir_filter_nm.cpp8
-rw-r--r--filter-nm/ftnoir_filter_nm.h26
-rw-r--r--filter-nm/ftnoir_filter_nm_dialog.cpp14
-rw-r--r--filter-nm/ftnoir_nm_filtercontrols.ui8
-rw-r--r--filter-nm/lang/nl_NL.ts6
-rw-r--r--filter-nm/lang/ru_RU.ts6
-rw-r--r--filter-nm/lang/stub.ts6
-rw-r--r--filter-nm/lang/zh_CN.ts6
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 <algorithm>
-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<slider_value> responsiveness[6];
value<slider_value> drift_speeds[6];
- settings_tom() :
- opts("tom-filter"),
+ settings_nm() :
+ opts("nm-filter"),
responsiveness{ value<slider_value>(b, "x-responsiveness", { 10.0, .0, 20.0 }),
value<slider_value>(b, "y-responsiveness", { 10.0, .0, 20.0 }),
value<slider_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 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>UICdialog_tom</class>
- <widget class="QDialog" name="UICdialog_tom">
+ <class>UICdialog_nm</class>
+ <widget class="QDialog" name="UICdialog_nm">
<property name="geometry">
<rect>
<x>0</x>
@@ -577,7 +577,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
- <receiver>UICdialog_tom</receiver>
+ <receiver>UICdialog_nm</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
@@ -593,7 +593,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
- <receiver>UICdialog_tom</receiver>
+ <receiver>UICdialog_nm</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
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 @@
<!DOCTYPE TS>
<TS version="2.1" language="nl_NL">
<context>
- <name>UICdialog_tom</name>
+ <name>UICdialog_nm</name>
<message>
<source>Dialog</source>
<translation type="unfinished"></translation>
@@ -69,9 +69,9 @@
</message>
</context>
<context>
- <name>tomDll</name>
+ <name>nmDll</name>
<message>
- <source>Tom</source>
+ <source>NaturalMovement</source>
<translation type="unfinished"></translation>
</message>
</context>
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 @@
<!DOCTYPE TS>
<TS version="2.1" language="ru_RU">
<context>
- <name>UICdialog_tom</name>
+ <name>UICdialog_nm</name>
<message>
<source>Dialog</source>
<translation type="unfinished"></translation>
@@ -69,9 +69,9 @@
</message>
</context>
<context>
- <name>tomDll</name>
+ <name>nmDll</name>
<message>
- <source>Tom</source>
+ <source>NaturalMovement</source>
<translation type="unfinished"></translation>
</message>
</context>
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 @@
<!DOCTYPE TS>
<TS version="2.1" language="stub">
<context>
- <name>UICdialog_tom</name>
+ <name>UICdialog_nm</name>
<message>
<source>Dialog</source>
<translation type="unfinished"></translation>
@@ -69,9 +69,9 @@
</message>
</context>
<context>
- <name>tomDll</name>
+ <name>nmDll</name>
<message>
- <source>Tom</source>
+ <source>NaturalMovement</source>
<translation type="unfinished"></translation>
</message>
</context>
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 @@
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
- <name>UICdialog_tom</name>
+ <name>UICdialog_nm</name>
<message>
<source>Dialog</source>
<translation type="unfinished"></translation>
@@ -69,9 +69,9 @@
</message>
</context>
<context>
- <name>tomDll</name>
+ <name>nmDll</name>
<message>
- <source>Tom</source>
+ <source>NaturalMovement</source>
<translation type="unfinished"></translation>
</message>
</context>