diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-15 02:04:11 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-15 02:04:11 +0200 |
commit | 51fb3e42f915c3b538c423cfb9e5dfae11778717 (patch) | |
tree | 053a64cd587d7cc1fb1fc426da5ab3a3cf4d6b9d /qfunctionconfigurator/functionconfig.h | |
parent | 463737c1b50246c56a67c35c1116732006348593 (diff) | |
parent | b948329c7ae6ab2ff546cba43cdc4aca9b743cfd (diff) |
Merge branch 'master' of github.com:opentrack/opentrack
Conflicts:
facetracknoir/tracker.cpp
ftnoir_filter_accela/ftnoir_filter_accela.cpp
ftnoir_filter_accela/ftnoir_filter_accela.h
ftnoir_filter_base/ftnoir_filter_base.h
ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp
ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
Diffstat (limited to 'qfunctionconfigurator/functionconfig.h')
-rw-r--r-- | qfunctionconfigurator/functionconfig.h | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/qfunctionconfigurator/functionconfig.h b/qfunctionconfigurator/functionconfig.h index 0f60c979..21e9e43e 100644 --- a/qfunctionconfigurator/functionconfig.h +++ b/qfunctionconfigurator/functionconfig.h @@ -1,78 +1,78 @@ -/* Copyright (c) 2011-2012, Stanislaw Halik <sthalik@misaki.pl>
-
- * Permission to use, copy, modify, and/or distribute this
- * software for any purpose with or without fee is hereby granted,
- * provided that the above copyright notice and this permission
- * notice appear in all copies.
- */
-
-#include <QList>
-#include <QPointF>
-#include <QString>
-#include <QSettings>
-#include <QMutex>
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
-
-#ifndef FUNCTION_CONFIG_H
-#define FUNCTION_CONFIG_H
-
-#define MEMOIZE_PRECISION 500
-
-class FTNOIR_TRACKER_BASE_EXPORT FunctionConfig {
-private:
- QMutex* _mutex;
- QList<QPointF> _points;
- void reload();
- float* _data;
- int _size;
- QString _title;
- float getValueInternal(int x);
- QPointF lastValueTracked; // The last input value requested by the Tracker, with it's output-value.
- volatile bool _tracking_active;
- int _max_Input;
- int _max_Output;
- FunctionConfig(const FunctionConfig&) {}
-public:
- //
- // Contructor(s) and destructor
- //
- FunctionConfig();
- FunctionConfig(QString title, int intMaxInput, int intMaxOutput);
- virtual ~FunctionConfig();
-
- float getValue(float x);
- bool getLastPoint(QPointF& point); // Get the last Point that was requested.
-
- //
- // Functions to manipulate the Function
- //
- void removePoint(int i);
- void removeAllPoints() {
- QMutexLocker foo(_mutex);
- _points.clear();
- reload();
- }
-
- void addPoint(QPointF pt);
- void movePoint(int idx, QPointF pt);
- QList<QPointF> getPoints();
- void setMaxInput(int MaxInput) {
- _max_Input = MaxInput;
- }
- void setMaxOutput(int MaxOutput) {
- _max_Output = MaxOutput;
- }
-
- //
- // Functions to load/save the Function-Points to an INI-file
- //
- void saveSettings(QSettings& settings);
- void loadSettings(QSettings& settings);
-
- void setTrackingActive(bool blnActive) {
- _tracking_active = blnActive;
- }
- QString getTitle() { return _title; }
-};
-
-#endif
+/* Copyright (c) 2011-2012, Stanislaw Halik <sthalik@misaki.pl> + + * Permission to use, copy, modify, and/or distribute this + * software for any purpose with or without fee is hereby granted, + * provided that the above copyright notice and this permission + * notice appear in all copies. + */ + +#include <QList> +#include <QPointF> +#include <QString> +#include <QSettings> +#include <QMutex> +#include "ftnoir_tracker_base/ftnoir_tracker_base.h" + +#ifndef FUNCTION_CONFIG_H +#define FUNCTION_CONFIG_H + +#define MEMOIZE_PRECISION 500 + +class FTNOIR_TRACKER_BASE_EXPORT FunctionConfig { +private: + QMutex* _mutex; + QList<QPointF> _points; + void reload(); + float* _data; + int _size; + QString _title; + float getValueInternal(int x); + QPointF lastValueTracked; // The last input value requested by the Tracker, with it's output-value. + volatile bool _tracking_active; + int _max_Input; + int _max_Output; + FunctionConfig(const FunctionConfig&) {} +public: + // + // Contructor(s) and destructor + // + FunctionConfig(); + FunctionConfig(QString title, int intMaxInput, int intMaxOutput); + virtual ~FunctionConfig(); + + float getValue(float x); + bool getLastPoint(QPointF& point); // Get the last Point that was requested. + + // + // Functions to manipulate the Function + // + void removePoint(int i); + void removeAllPoints() { + QMutexLocker foo(_mutex); + _points.clear(); + reload(); + } + + void addPoint(QPointF pt); + void movePoint(int idx, QPointF pt); + QList<QPointF> getPoints(); + void setMaxInput(int MaxInput) { + _max_Input = MaxInput; + } + void setMaxOutput(int MaxOutput) { + _max_Output = MaxOutput; + } + + // + // Functions to load/save the Function-Points to an INI-file + // + void saveSettings(QSettings& settings); + void loadSettings(QSettings& settings); + + void setTrackingActive(bool blnActive) { + _tracking_active = blnActive; + } + QString getTitle() { return _title; } +}; + +#endif |