summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/functionconfig.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-12 00:30:13 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-12 00:30:13 +0200
commit88f985ca34275fc1cc014c5b8fa618ca95233db7 (patch)
treefd1a2418d20a21f843b66b0cec0dc0a7aa503068 /qfunctionconfigurator/functionconfig.h
parentf50ef9ca768f676c38fb7f24c15d38e2f72126fb (diff)
spline editor needs discard changes on cancel
Diffstat (limited to 'qfunctionconfigurator/functionconfig.h')
-rw-r--r--qfunctionconfigurator/functionconfig.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/qfunctionconfigurator/functionconfig.h b/qfunctionconfigurator/functionconfig.h
index 7d21fd63..e24f54cf 100644
--- a/qfunctionconfigurator/functionconfig.h
+++ b/qfunctionconfigurator/functionconfig.h
@@ -20,17 +20,22 @@
class OPENTRACK_EXPORT Map {
private:
+ struct State {
+ QList<QPointF> input;
+ std::vector<float> data;
+ };
+
static constexpr long MEMOIZE_PRECISION = 25;
void reload();
float getValueInternal(int x);
MyMutex _mutex;
- QList<QPointF> input;
- std::vector<float> data;
QPointF last_input_value;
volatile bool activep;
int max_x;
int max_y;
+
+ State cur, saved;
public:
int maxInput() const { return max_x; }
int maxOutput() const { return max_y; }
@@ -46,7 +51,7 @@ public:
void removePoint(int i);
void removeAllPoints() {
QMutexLocker foo(&_mutex);
- input.clear();
+ cur.input.clear();
reload();
}
@@ -62,6 +67,7 @@ public:
void saveSettings(QSettings& settings, const QString& title);
void loadSettings(QSettings& settings, const QString& title);
+ void invalidate_unsaved_settings();
void setTrackingActive(bool blnActive);
};