summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-07-17 15:21:32 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-07-17 15:21:32 +0200
commit193dc65acde81250673eae50d834127121777a24 (patch)
treecbb63b231bb0b6bbd2503276a311490f73fa93c6
parent2a95abb332d9f3eee9bb155a355cfcfc661bbd5f (diff)
Add a button to remove all control points
-rw-r--r--ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui15
-rw-r--r--ftnoir_filter_accela/ftnoir_filter_accela.h1
-rw-r--r--ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp6
3 files changed, 21 insertions, 1 deletions
diff --git a/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui b/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui
index 0fe8f920..1478254e 100644
--- a/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui
+++ b/ftnoir_filter_accela/ftnoir_accela_filtercontrols.ui
@@ -127,7 +127,7 @@
<widget class="QPushButton" name="resetCircle">
<property name="geometry">
<rect>
- <x>130</x>
+ <x>140</x>
<y>70</y>
<width>75</width>
<height>23</height>
@@ -137,6 +137,19 @@
<string>Set curves</string>
</property>
</widget>
+ <widget class="QPushButton" name="removeAllButton">
+ <property name="geometry">
+ <rect>
+ <x>60</x>
+ <y>70</y>
+ <width>75</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Remove all</string>
+ </property>
+ </widget>
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.h b/ftnoir_filter_accela/ftnoir_filter_accela.h
index 637d1a5d..6e98c797 100644
--- a/ftnoir_filter_accela/ftnoir_filter_accela.h
+++ b/ftnoir_filter_accela/ftnoir_filter_accela.h
@@ -96,6 +96,7 @@ private slots:
void settingChanged(bool) { settingsDirty = true; }
void settingChanged(int) { settingsDirty = true; }
void resetCircle();
+ void removeAll();
};
//*******************************************************************************************************
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp b/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp
index 46801bde..cc00f89f 100644
--- a/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp
+++ b/ftnoir_filter_accela/ftnoir_filter_accela_dialog.cpp
@@ -52,6 +52,7 @@ FilterControls::FilterControls() :
connect(ui.scalingConfig, SIGNAL(CurveChanged(bool)), this, SLOT(settingChanged(bool)));
connect(ui.translationScalingConfig, SIGNAL(CurveChanged(bool)), this, SLOT(settingChanged(bool)));
connect(ui.resetCircle, SIGNAL(clicked()), this, SLOT(resetCircle()));
+ connect(ui.removeAllButton, SIGNAL(clicked()), this, SLOT(removeAll()));
// Connect slider for reduction
//connect(ui.slideReduction, SIGNAL(valueChanged(int)), this, SLOT(settingChanged(int)));
@@ -157,6 +158,11 @@ void FilterControls::loadSettings() {
settingsDirty = false;
}
+void FilterControls::removeAll() {
+ translationFunctionConfig.removeAllPoints();
+ functionConfig.removeAllPoints();
+}
+
void FilterControls::resetCircle()
{
QSettings settings("opentrack"); // Registry settings (in HK_USER)