From 3e56f47a9cef709d4a099a0ac6ff43e361fe4a43 Mon Sep 17 00:00:00 2001 From: Stéphane Lenclud Date: Sun, 28 Apr 2019 00:03:24 +0200 Subject: Easy Tracker: UI rework for custom model with three, four or five vertices. More settings can be changed live without have to restart the tracker. Fixing a few deadlock issues. --- options/tie.cpp | 7 +++++++ options/tie.hpp | 2 ++ 2 files changed, 9 insertions(+) (limited to 'options') diff --git a/options/tie.cpp b/options/tie.cpp index 671a72c2..8220854d 100644 --- a/options/tie.cpp +++ b/options/tie.cpp @@ -72,6 +72,13 @@ void tie_setting(value& v, QComboBox* cb) // XXX TODO need variant with setEnabled based on lambda retval -- sh 20170524 +void tie_setting(value& v, QRadioButton* cb) +{ + cb->setChecked(v); + value_::connect(cb, SIGNAL(toggled(bool)), &v, SLOT(setValue(bool)), v.DIRECT_CONNTYPE); + value_::connect(&v, SIGNAL(valueChanged(bool)), cb, SLOT(setChecked(bool)), v.SAFE_CONNTYPE); +} + void tie_setting(value& v, QCheckBox* cb) { cb->setChecked(v); diff --git a/options/tie.hpp b/options/tie.hpp index c2607a6c..2ac27d64 100644 --- a/options/tie.hpp +++ b/options/tie.hpp @@ -20,6 +20,7 @@ #include #include #include +#include #include @@ -97,6 +98,7 @@ OTR_OPTIONS_EXPORT void tie_setting(value& v, QComboBox* cb); OTR_OPTIONS_EXPORT void tie_setting(value& v, QComboBox* cb); OTR_OPTIONS_EXPORT void tie_setting(value& v, QComboBox* cb); OTR_OPTIONS_EXPORT void tie_setting(value& v, QCheckBox* cb); +OTR_OPTIONS_EXPORT void tie_setting(value& v, QRadioButton* cb); OTR_OPTIONS_EXPORT void tie_setting(value& v, QDoubleSpinBox* dsb); OTR_OPTIONS_EXPORT void tie_setting(value& v, QSpinBox* sb); OTR_OPTIONS_EXPORT void tie_setting(value& v, QLineEdit* le); -- cgit v1.2.3