summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/functionconfig.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-30 07:37:41 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-10-30 08:39:32 +0100
commitaa066bdd4622d4f6824fee864f6be6806813f04d (patch)
tree3df328b8b364cba2373a85827191b259bd78d546 /qfunctionconfigurator/functionconfig.h
parentd6a54431d178632a2bf466c9904f74abd143afe6 (diff)
move to subdirectory-based build system
Closes #224
Diffstat (limited to 'qfunctionconfigurator/functionconfig.h')
-rw-r--r--qfunctionconfigurator/functionconfig.h75
1 files changed, 0 insertions, 75 deletions
diff --git a/qfunctionconfigurator/functionconfig.h b/qfunctionconfigurator/functionconfig.h
deleted file mode 100644
index 6d76d0de..00000000
--- a/qfunctionconfigurator/functionconfig.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (c) 2012-2015, 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.
- */
-
-#pragma once
-
-#include <QList>
-#include <QPointF>
-#include <QString>
-#include <QSettings>
-#include <QMutex>
-#include <vector>
-#include <limits>
-#include "opentrack-compat/qcopyable-mutex.hpp"
-
-class Map {
-private:
- static constexpr int value_count = 10000;
-
- struct State {
- QList<QPointF> input;
- std::vector<float> data;
- };
-
- int precision() const;
- void reload();
- float getValueInternal(int x);
-
- MyMutex _mutex;
- QPointF last_input_value;
- volatile bool activep;
- double max_x;
- double max_y;
-
- State cur, saved;
-public:
- double maxInput() const { return max_x; }
- double maxOutput() const { return max_y; }
- Map();
- Map(double maxx, double maxy)
- {
- setMaxInput(maxx);
- setMaxOutput(maxy);
- reload();
- }
-
- float getValue(float x);
- bool getLastPoint(QPointF& point);
- void removePoint(int i);
- void removeAllPoints() {
- QMutexLocker foo(&_mutex);
- cur.input.clear();
- reload();
- }
-
- void addPoint(QPointF pt);
- void movePoint(int idx, QPointF pt);
- const QList<QPointF> getPoints();
- void setMaxInput(double MaxInput) {
- max_x = MaxInput;
- }
- void setMaxOutput(double MaxOutput) {
- max_y = MaxOutput;
- }
-
- void saveSettings(QSettings& settings, const QString& title);
- void loadSettings(QSettings& settings, const QString& title);
- void invalidate_unsaved_settings();
-
- void setTrackingActive(bool blnActive);
-};