summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_filter_kalman
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-12-31 09:05:35 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-12-31 09:05:35 +0100
commit754c2e6ce637698d8aaf16d5bf05e8185e17b9ef (patch)
tree5640608dfa5ead2adab766e2002c81b94c77d1ae /ftnoir_filter_kalman
parent2c88cc23a4b68261a43895ecc5197658bbe20884 (diff)
kalman: remove (all) settings not hooked up
Diffstat (limited to 'ftnoir_filter_kalman')
-rw-r--r--ftnoir_filter_kalman/ftnoir_filter_kalman.h16
-rw-r--r--ftnoir_filter_kalman/ftnoir_kalman_filtercontrols.ui120
-rw-r--r--ftnoir_filter_kalman/kalman.cpp47
3 files changed, 4 insertions, 179 deletions
diff --git a/ftnoir_filter_kalman/ftnoir_filter_kalman.h b/ftnoir_filter_kalman/ftnoir_filter_kalman.h
index 9e0d817d..8f5bcd8b 100644
--- a/ftnoir_filter_kalman/ftnoir_filter_kalman.h
+++ b/ftnoir_filter_kalman/ftnoir_filter_kalman.h
@@ -21,13 +21,13 @@
#include <QWidget>
#include <QElapsedTimer>
#include <QObject>
+#include "facetracknoir/options.hpp"
+using namespace options;
class FTNOIR_FILTER_BASE_EXPORT FTNoIR_Filter : public IFilter
{
public:
FTNoIR_Filter();
- ~FTNoIR_Filter() virt_override {
- }
void reset() virt_override;
void FilterHeadPoseData(const double *target_camera_position,
double *new_camera_position) virt_override;
@@ -39,9 +39,6 @@ public:
qint64 timedelta;
};
-void kalman_load_settings(FTNoIR_Filter&);
-void kalman_save_settings(FTNoIR_Filter&);
-
class FTNOIR_FILTER_BASE_EXPORT FTNoIR_FilterDll : public Metadata
{
public:
@@ -55,7 +52,7 @@ class FTNOIR_FILTER_BASE_EXPORT FilterControls: public QWidget, public IFilterDi
{
Q_OBJECT
public:
- explicit FilterControls() : settingsDirty(false) {
+ FilterControls() {
ui.setupUi(this);
QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
@@ -68,19 +65,12 @@ public:
connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
show();
}
- void showEvent ( QShowEvent * ) virt_override {
- show();
- }
- bool settingsDirty;
Ui::KalmanUICFilterControls ui;
virtual void registerFilter(IFilter*) virt_override {}
virtual void unregisterFilter() virt_override {}
public slots:
void doOK();
void doCancel();
- void settingsChanged(double) {
- settingsDirty = true;
- }
};
#endif
diff --git a/ftnoir_filter_kalman/ftnoir_kalman_filtercontrols.ui b/ftnoir_filter_kalman/ftnoir_kalman_filtercontrols.ui
index 7b71712a..d1cff81e 100644
--- a/ftnoir_filter_kalman/ftnoir_kalman_filtercontrols.ui
+++ b/ftnoir_filter_kalman/ftnoir_kalman_filtercontrols.ui
@@ -63,126 +63,6 @@
<string>Cancel</string>
</property>
</widget>
- <widget class="QLabel" name="label_2">
- <property name="geometry">
- <rect>
- <x>9</x>
- <y>30</y>
- <width>169</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>process-noise-covariance</string>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="post">
- <property name="geometry">
- <rect>
- <x>180</x>
- <y>26</y>
- <width>150</width>
- <height>22</height>
- </rect>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <property name="decimals">
- <number>14</number>
- </property>
- <property name="maximum">
- <double>1.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>0.000001000000000</double>
- </property>
- <property name="value">
- <double>0.500000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="pnoise">
- <property name="geometry">
- <rect>
- <x>180</x>
- <y>6</y>
- <width>150</width>
- <height>22</height>
- </rect>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <property name="decimals">
- <number>14</number>
- </property>
- <property name="maximum">
- <double>1.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>0.000001000000000</double>
- </property>
- <property name="value">
- <double>0.500000000000000</double>
- </property>
- </widget>
- <widget class="QLabel" name="label">
- <property name="geometry">
- <rect>
- <x>9</x>
- <y>10</y>
- <width>165</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>post-error-matrix</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- </widget>
- <widget class="QLabel" name="label_3">
- <property name="geometry">
- <rect>
- <x>9</x>
- <y>55</y>
- <width>109</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>accel-coefficient</string>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="accl">
- <property name="geometry">
- <rect>
- <x>181</x>
- <y>47</y>
- <width>150</width>
- <height>22</height>
- </rect>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <property name="decimals">
- <number>6</number>
- </property>
- <property name="maximum">
- <double>1000000000.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>0.000001000000000</double>
- </property>
- <property name="value">
- <double>1.000000000000000</double>
- </property>
- </widget>
</widget>
<resources/>
<connections/>
diff --git a/ftnoir_filter_kalman/kalman.cpp b/ftnoir_filter_kalman/kalman.cpp
index 743eb3d4..bef6ddad 100644
--- a/ftnoir_filter_kalman/kalman.cpp
+++ b/ftnoir_filter_kalman/kalman.cpp
@@ -9,28 +9,7 @@
#include <QDebug>
#include <math.h>
-void kalman_load_settings(FTNoIR_Filter&) {
- QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
-
- QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
- QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
-
- iniFile.beginGroup("ftnoir-filter-kalman");
- iniFile.endGroup();
-}
-
-void kalman_save_settings(FilterControls&) {
- QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
-
- QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
- QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
-
- iniFile.beginGroup("ftnoir-filter-kalman");
- iniFile.endGroup();
-}
-
FTNoIR_Filter::FTNoIR_Filter() {
- kalman_load_settings(*this);
reset();
}
@@ -135,35 +114,11 @@ void FTNoIR_Filter::FilterHeadPoseData(const double* target_camera_position,
}
void FilterControls::doOK() {
- kalman_save_settings(*this);
close();
}
void FilterControls::doCancel() {
- if (settingsDirty) {
- int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
-
- qDebug() << "doCancel says: answer =" << ret;
-
- switch (ret) {
- case QMessageBox::Save:
- kalman_save_settings(*this);
- this->close();
- break;
- case QMessageBox::Discard:
- this->close();
- break;
- case QMessageBox::Cancel:
- // Cancel was clicked
- break;
- default:
- // should never be reached
- break;
- }
- }
- else {
- this->close();
- }
+ close();
}
extern "C" FTNOIR_FILTER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata()