diff options
author | Stanislaw Halik <sthalik@tehran.lain.pl> | 2019-04-28 21:12:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-28 21:12:48 +0000 |
commit | 00a1a3d81b82a411cd8cbdf5a480c4007b2b60bc (patch) | |
tree | e559543b174d7e84fac3a073c9dc55761ccb80c3 /options | |
parent | fba47374dcbb12ffb168e2b2563d25b8e00b1d45 (diff) | |
parent | 5b3d825f1eace207502371427e15d8b54a237f83 (diff) |
Merge pull request #937 from opentrack/easy-tracker-more-models
Easy tracker more models
Diffstat (limited to 'options')
-rw-r--r-- | options/tie.cpp | 7 | ||||
-rw-r--r-- | options/tie.hpp | 2 |
2 files changed, 9 insertions, 0 deletions
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<QVariant>& v, QComboBox* cb) // XXX TODO need variant with setEnabled based on lambda retval -- sh 20170524 +void tie_setting(value<bool>& 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<bool>& 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 <QLineEdit> #include <QLabel> #include <QTabWidget> +#include <QRadioButton> #include <cmath> @@ -97,6 +98,7 @@ OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QComboBox* cb); OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QComboBox* cb); OTR_OPTIONS_EXPORT void tie_setting(value<QVariant>& v, QComboBox* cb); OTR_OPTIONS_EXPORT void tie_setting(value<bool>& v, QCheckBox* cb); +OTR_OPTIONS_EXPORT void tie_setting(value<bool>& v, QRadioButton* cb); OTR_OPTIONS_EXPORT void tie_setting(value<double>& v, QDoubleSpinBox* dsb); OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QSpinBox* sb); OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QLineEdit* le); |