diff options
Diffstat (limited to 'tracker-trackhat')
-rw-r--r-- | tracker-trackhat/camera.cpp | 4 | ||||
-rw-r--r-- | tracker-trackhat/dialog.cpp | 21 |
2 files changed, 13 insertions, 12 deletions
diff --git a/tracker-trackhat/camera.cpp b/tracker-trackhat/camera.cpp index 0c18dd03..74e35423 100644 --- a/tracker-trackhat/camera.cpp +++ b/tracker-trackhat/camera.cpp @@ -57,7 +57,9 @@ trackhat_camera::trackhat_camera() for (auto* slider : { &t.exposure, &t.gain, /*&t.threshold,*/ }) { - slider->connect_to(&sig, &trackhat_impl::setting_receiver::settings_changed, Qt::DirectConnection); + QObject::connect(slider, options::value_::value_changed<options::slider_value>(), + &sig, &trackhat_impl::setting_receiver::settings_changed, + Qt::DirectConnection); } } diff --git a/tracker-trackhat/dialog.cpp b/tracker-trackhat/dialog.cpp index e18c89cf..4ef64f50 100644 --- a/tracker-trackhat/dialog.cpp +++ b/tracker-trackhat/dialog.cpp @@ -37,7 +37,8 @@ trackhat_dialog::trackhat_dialog() tie_setting(t.exposure, ui.exposure_slider); ui.exposure_label->setValue((int)*t.exposure); - t.exposure.connect_to(ui.exposure_label, [this] { ui.exposure_label->setValue((int)*t.exposure); }); + connect(&t.exposure, value_::value_changed<slider_value>(), ui.exposure_label, + [this] { ui.exposure_label->setValue((int)*t.exposure); }, Qt::QueuedConnection); // gain @@ -47,7 +48,8 @@ trackhat_dialog::trackhat_dialog() tie_setting(t.gain, ui.gain_slider); ui.gain_label->setValue((int)*t.gain); - t.gain.connect_to(ui.gain_label, [this] { 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 @@ -64,24 +66,21 @@ trackhat_dialog::trackhat_dialog() // point filter ui.point_filter_limit_label->setValue(*t.point_filter_limit); - t.point_filter_limit.connect_to(ui.point_filter_limit_label, [this] { - 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); - t.point_filter_coefficient.connect_to(ui.point_filter_label, [this] { - ui.point_filter_label->setValue(*t.point_filter_coefficient); - }); + connect(&t.point_filter_coefficient, value_::value_changed<slider_value>(), ui.point_filter_label, + [this] { ui.point_filter_label->setValue(*t.point_filter_coefficient); }, Qt::QueuedConnection); tie_setting(t.point_filter_deadzone, ui.point_filter_deadzone); ui.point_filter_deadzone_label->setValue(*t.point_filter_deadzone); - t.point_filter_deadzone.connect_to(ui.point_filter_deadzone_label, [this] { - ui.point_filter_deadzone_label->setValue(*t.point_filter_deadzone); - }); + connect(&t.point_filter_deadzone, value_::value_changed<slider_value>(), ui.point_filter_deadzone_label, + [this] { ui.point_filter_deadzone_label->setValue(*t.point_filter_deadzone); }, Qt::QueuedConnection); // led |