diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2012-01-09 17:01:44 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2012-01-09 17:01:44 +0000 |
commit | d6086d8203ae4f4b45f3d97960788d603fc78e16 (patch) | |
tree | d27181290c04ca84d27b822aa40b9f7ed904e389 /FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp | |
parent | 10feed03651270c2aa0eb95268e40f0b66fe30d6 (diff) |
Implemented filter-settings changeably while Tracker is active.
Should also be handy to have a IFilterPtr, for logging...
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@99 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp')
-rw-r--r-- | FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp index 130bf47b..f2523145 100644 --- a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp +++ b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp @@ -56,6 +56,8 @@ QWidget() connect(ui.maxSmooth, SIGNAL(valueChanged(int)), this, SLOT(settingChanged(int)));
connect(ui.powCurve, SIGNAL(valueChanged(int)), this, SLOT(settingChanged(int)));
+ qDebug() << "FilterControls() says: started";
+
// Load the settings from the current .INI-file
loadSettings();
}
@@ -75,8 +77,18 @@ void FilterControls::Release() //
// Initialize tracker-client-dialog
//
-void FilterControls::Initialize(QWidget *parent) {
+void FilterControls::Initialize(QWidget *parent, IFilterPtr ptr) {
+ //
+ // The dialog can be opened, while the Tracker is running.
+ // In that case, ptr will point to the active Filter-instance.
+ // This can be used to update settings, while Tracking and may also be handy to display logging-data and such...
+ //
+ pFilter = ptr;
+
+ //
+ //
+ //
QPoint offsetpos(100, 100);
if (parent) {
this->move(parent->pos() + offsetpos);
@@ -89,6 +101,9 @@ void FilterControls::Initialize(QWidget *parent) { //
void FilterControls::doOK() {
save();
+ if (pFilter) {
+ pFilter->Initialize();
+ }
this->close();
}
@@ -134,13 +149,13 @@ void FilterControls::doCancel() { // Load the current Settings from the currently 'active' INI-file.
//
void FilterControls::loadSettings() {
-// qDebug() << "loadSettings says: Starting ";
+ qDebug() << "FilterControls::loadSettings says: Starting ";
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)
-// qDebug() << "loadSettings says: iniFile = " << currentFile;
+ qDebug() << "FilterControls::loadSettings says: iniFile = " << currentFile;
//
// The EWMA2-filter-settings are in the Tracking group: this is because they used to be on the Main Form of FaceTrackNoIR
|