diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-07-01 18:07:03 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-07-01 18:07:03 +0200 |
commit | a67e8630caf20e7f48151024e9e68dd9271d75c7 (patch) | |
tree | e7418eabdfb4abd6ca88c0ba6a427ca5a40e7c32 /tracker-trackhat/camera.cpp | |
parent | 74dff816c07737b7e697e5d63222e59a9fefe23e (diff) |
options/value: add `QObject::connect` wrapper
This is useful not just to save on complexity in call sites, but also
because I plan on using the Verdigris library to remove needless
`valueChanged()` and `setValue()` overloads from each `value<t>`
instance.
Also fix a bug in `options/tie.hpp` where `QComboBox::setCurrentIndex`
was erroneously called as `Qt::DirectConnection`.
Diffstat (limited to 'tracker-trackhat/camera.cpp')
-rw-r--r-- | tracker-trackhat/camera.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tracker-trackhat/camera.cpp b/tracker-trackhat/camera.cpp index 74e35423..0c18dd03 100644 --- a/tracker-trackhat/camera.cpp +++ b/tracker-trackhat/camera.cpp @@ -57,9 +57,7 @@ trackhat_camera::trackhat_camera() for (auto* slider : { &t.exposure, &t.gain, /*&t.threshold,*/ }) { - QObject::connect(slider, options::value_::value_changed<options::slider_value>(), - &sig, &trackhat_impl::setting_receiver::settings_changed, - Qt::DirectConnection); + slider->connect_to(&sig, &trackhat_impl::setting_receiver::settings_changed, Qt::DirectConnection); } } |