summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/ftnoir_tracker_pt_settings.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-13 18:53:28 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-13 18:53:28 +0200
commit9da6dff1800d6b6598e6ad04465ee8b9cabb4167 (patch)
tree2f1692597748ce37d2ce147e8ed9f0c7d71d00e9 /tracker-pt/ftnoir_tracker_pt_settings.h
parent535e81402a65fa410e98899cd1780784d2f9815a (diff)
tracker/pt, options: fix threshold slider
It's only the tie_setting(slider_value, QSlider) that has race-free slider updates. Needed to update the threshold slider representation. Remove the tie_setting(int, QSlider) overload since it doesn't have the logic. Add a migration. Add base_value::notify() for use-cases like the checkbox updating the label.
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt_settings.h')
-rw-r--r--tracker-pt/ftnoir_tracker_pt_settings.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt_settings.h b/tracker-pt/ftnoir_tracker_pt_settings.h
index 6bbba16b..8250edba 100644
--- a/tracker-pt/ftnoir_tracker_pt_settings.h
+++ b/tracker-pt/ftnoir_tracker_pt_settings.h
@@ -26,8 +26,7 @@ struct settings_pt : opts
value<QString> camera_name;
value<int> cam_res_x,
cam_res_y,
- cam_fps,
- threshold;
+ cam_fps;
value<double> min_point_size, max_point_size;
value<int> m01_x, m01_y, m01_z;
@@ -45,13 +44,15 @@ struct settings_pt : opts
value<bool> auto_threshold;
value<pt_color_type> blob_color;
+ value<slider_value> threshold_slider;
+
settings_pt() :
opts("tracker-pt"),
camera_name(b, "camera-name", ""),
cam_res_x(b, "camera-res-width", 640),
cam_res_y(b, "camera-res-height", 480),
cam_fps(b, "camera-fps", 30),
- threshold(b, "threshold-primary", 128),
+ threshold_slider(b, "threshold-slider", slider_value(128, 0, 255)),
min_point_size(b, "min-point-size", 1),
max_point_size(b, "max-point-size", 50),
m01_x(b, "m_01-x", 0),