summaryrefslogtreecommitdiffhomepage
path: root/tracker-trackhat/dialog.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-05-26 21:43:30 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-06-05 14:44:25 +0200
commit21a3c7028b51378577410028a0394753ba45c2e7 (patch)
tree15542f096b002c0ee046d52e399033c09bc37e2d /tracker-trackhat/dialog.cpp
parentf045b65d7e3f2d65195e02c4b6097f2c9886222c (diff)
tracker/trackhat: add back gain slider
Diffstat (limited to 'tracker-trackhat/dialog.cpp')
-rw-r--r--tracker-trackhat/dialog.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/tracker-trackhat/dialog.cpp b/tracker-trackhat/dialog.cpp
index cfff03ba..02ecc637 100644
--- a/tracker-trackhat/dialog.cpp
+++ b/tracker-trackhat/dialog.cpp
@@ -36,16 +36,24 @@ trackhat_dialog::trackhat_dialog()
tie_setting(t.exposure, ui.exposure_slider);
ui.exposure_label->setValue((int)*t.exposure);
- ui.point_filter_limit_label->setValue(*t.point_filter_limit);
connect(&t.exposure, value_::value_changed<slider_value>(), ui.exposure_label,
[this] { ui.exposure_label->setValue((int)*t.exposure); }, Qt::QueuedConnection);
- connect(&t.point_filter_limit, value_::value_changed<slider_value>(), ui.point_filter_limit_label,
- [this] { ui.point_filter_limit_label->setValue(*t.point_filter_limit); }, Qt::QueuedConnection);
- // threshold
+ // gain
+
+ ui.gain_slider->setMinimum((int)t.gain->min());
+ ui.gain_slider->setMaximum((int)t.gain->max());
+
+ tie_setting(t.gain, ui.gain_slider);
+ ui.gain_label->setValue((int)*t.gain);
+
+ connect(&t.gain, value_::value_changed<slider_value>(), ui.gain_label,
+ [this] { ui.gain_label->setValue((int)*t.gain); }, Qt::QueuedConnection);
#if 0
+ // threshold
+
tie_setting(t.threshold, ui.threshold_slider);
ui.threshold_label->setValue((int)*t.threshold);
@@ -57,6 +65,10 @@ trackhat_dialog::trackhat_dialog()
// point filter
+ ui.point_filter_limit_label->setValue(*t.point_filter_limit);
+ connect(&t.point_filter_limit, value_::value_changed<slider_value>(), ui.point_filter_limit_label,
+ [this] { ui.point_filter_limit_label->setValue(*t.point_filter_limit); }, Qt::QueuedConnection);
+
tie_setting(t.enable_point_filter, ui.enable_point_filter);
tie_setting(t.point_filter_coefficient, ui.point_filter_slider);
ui.point_filter_label->setValue(*t.point_filter_coefficient);