summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Filter_EWMA2
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-09-05 17:29:23 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-09-05 17:29:23 +0000
commit3f082dbee43e6dbdb5d88fceec49298d0d2bce18 (patch)
tree2e8efa00c55edb42d637e3e55542b0df58baa79d /FTNoIR_Filter_EWMA2
parent30a7bbb84e563d07e1b4ef598f5b57041d5e4a8b (diff)
Put extra class in the DLL, which only return the name, description(s) and Icon. Loading the Settings dialog for these resulted in loading the entire Settings-window (without showing it). Unwanted behavior...
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@125 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FTNoIR_Filter_EWMA2')
-rw-r--r--FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.h39
-rw-r--r--FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.vcproj4
-rw-r--r--FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp22
-rw-r--r--FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp27
4 files changed, 27 insertions, 65 deletions
diff --git a/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.h b/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.h
index bd90c1f8..f313d154 100644
--- a/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.h
+++ b/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.h
@@ -45,10 +45,6 @@ public:
void StartFilter();
void FilterHeadPoseData(THeadPoseData *current_camera_position, THeadPoseData *target_camera_position, THeadPoseData *new_camera_position, bool newTarget);
- void getFullName(QString *strToBeFilled);
- void getShortName(QString *strToBeFilled);
- void getDescription(QString *strToBeFilled);
-
private:
void loadSettings(); // Load the settings from the INI-file
THeadPoseData newHeadPose; // Structure with new headpose
@@ -63,11 +59,6 @@ private:
float kMinSmoothing;
float kMaxSmoothing;
float kSmoothingScaleCurve;
-
- QString filterFullName; // Filters' name and description
- QString filterShortName;
- QString filterDescription;
-
};
//*******************************************************************************************************
@@ -86,10 +77,6 @@ public:
void Release(); // Member functions which are accessible from outside the DLL
void Initialize(QWidget *parent, IFilterPtr ptr);
- void getFullName(QString *strToBeFilled);
- void getShortName(QString *strToBeFilled);
- void getDescription(QString *strToBeFilled);
- void getIcon(QIcon *icon);
private:
Ui::UICFilterControls ui;
@@ -99,9 +86,6 @@ private:
/** helper **/
bool settingsDirty;
- QString filterFullName; // Filters' name and description
- QString filterShortName;
- QString filterDescription;
IFilterPtr pFilter; // If the filter was active when the dialog was opened, this will hold a pointer to the Filter instance
private slots:
@@ -111,6 +95,29 @@ private slots:
void settingChanged( int ) { settingsDirty = true; };
};
+//*******************************************************************************************************
+// FaceTrackNoIR Filter DLL. Functions used to get general info on the Filter
+//*******************************************************************************************************
+class FTNoIR_FilterDll : public IFilterDll
+{
+public:
+ FTNoIR_FilterDll();
+ ~FTNoIR_FilterDll();
+
+ void Release();
+ void Initialize();
+
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
+ void getIcon(QIcon *icon);
+
+private:
+ QString filterFullName; // Filters' name and description
+ QString filterShortName;
+ QString filterDescription;
+};
+
#endif //INCLUDED_FTN_FILTER_H
//END
diff --git a/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.vcproj b/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.vcproj
index 918f8b28..28cf8a82 100644
--- a/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.vcproj
+++ b/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.vcproj
@@ -174,6 +174,10 @@
RelativePath=".\ftnoir_filter_ewma2_dialog.cpp"
>
</File>
+ <File
+ RelativePath=".\ftnoir_filter_ewma_dll.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp
index 99a4bd98..965cfd73 100644
--- a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp
+++ b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp
@@ -36,11 +36,6 @@
FTNoIR_Filter::FTNoIR_Filter()
{
- //populate the description strings
- filterFullName = "EWMA Filter Mk2";
- filterShortName = "EWMA";
- filterDescription = "Exponentially Weighted Moving Average filter with dynamic smoothing parameter";
-
first_run = true;
alpha_smoothing = 0.02f; // this is a constant for now, might be a parameter later
loadSettings(); // Load the Settings
@@ -226,23 +221,6 @@ void FTNoIR_Filter::FilterHeadPoseData(THeadPoseData *current_camera_position, T
return;
}
-void FTNoIR_Filter::getFullName(QString *strToBeFilled)
-{
- *strToBeFilled = filterFullName;
-};
-
-
-void FTNoIR_Filter::getShortName(QString *strToBeFilled)
-{
- *strToBeFilled = filterShortName;
-};
-
-
-void FTNoIR_Filter::getDescription(QString *strToBeFilled)
-{
- *strToBeFilled = filterDescription;
-};
-
////////////////////////////////////////////////////////////////////////////////
// Factory function that creates instances if the Filter object.
diff --git a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp
index 7ffe8bb9..9653d4bc 100644
--- a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp
+++ b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp
@@ -37,11 +37,6 @@ QWidget()
{
ui.setupUi( this );
- //populate the description strings
- filterFullName = "EWMA Filter Mk2";
- filterShortName = "EWMA";
- filterDescription = "Exponentially Weighted Moving Average filter with dynamic smoothing parameter";
-
QPoint offsetpos(100, 100);
//if (parent) {
// this->move(parent->pos() + offsetpos);
@@ -187,28 +182,6 @@ void FilterControls::save() {
settingsDirty = false;
}
-void FilterControls::getFullName(QString *strToBeFilled)
-{
- *strToBeFilled = filterFullName;
-};
-
-
-void FilterControls::getShortName(QString *strToBeFilled)
-{
- *strToBeFilled = filterShortName;
-};
-
-
-void FilterControls::getDescription(QString *strToBeFilled)
-{
- *strToBeFilled = filterDescription;
-};
-
-void FilterControls::getIcon(QIcon *icon)
-{
- *icon = QIcon(":/images/filter-16.png");
-};
-
////////////////////////////////////////////////////////////////////////////////
// Factory function that creates instances if the Filter-settings dialog object.