summaryrefslogtreecommitdiffhomepage
path: root/options/tie.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-06-26 22:52:18 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-06-26 23:05:21 +0200
commitee0dd3b6d5ad2b6083372f4e4f0cb57a45aaaff2 (patch)
treedc9374f588200a53a4c2ef556293e176cec97975 /options/tie.hpp
parenta131d0850c731b6b564e493db7148267ceea7e8b (diff)
options/base-value: rename to `value_'
Diffstat (limited to 'options/tie.hpp')
-rw-r--r--options/tie.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/options/tie.hpp b/options/tie.hpp
index ff82142e..59fd0da1 100644
--- a/options/tie.hpp
+++ b/options/tie.hpp
@@ -37,7 +37,7 @@ std::enable_if_t<std::is_enum_v<t>> tie_setting(value<t>& v, QComboBox* cb)
cb->setCurrentIndex(cb->findData(int(static_cast<t>(v))));
v = static_cast<t>(cb->currentData().toInt());
- base_value::connect(cb,
+ value_::connect(cb,
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
&v, [&v, cb](int idx) {
run_in_thread_sync(cb, [&] {
@@ -46,7 +46,7 @@ std::enable_if_t<std::is_enum_v<t>> tie_setting(value<t>& v, QComboBox* cb)
},
v.DIRECT_CONNTYPE);
- base_value::connect(&v, base_value::value_changed<int>(),
+ value_::connect(&v, value_::value_changed<int>(),
cb, [cb](int x) {
run_in_thread_sync(cb, [=] { cb->setCurrentIndex(cb->findData(x)); });
},
@@ -59,13 +59,13 @@ void tie_setting(value<t>& v, QComboBox* cb, From&& fn_to_index, To&& fn_to_valu
cb->setCurrentIndex(fn_to_index(v));
v = fn_to_value(cb->currentIndex(), cb->currentData());
- base_value::connect(cb, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
+ value_::connect(cb, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
&v, [&v, cb, fn_to_value](int idx) {
run_in_thread_sync(cb, [&] {
v = fn_to_value(idx, cb->currentData());
});
}, v.DIRECT_CONNTYPE);
- base_value::connect(&v, base_value::value_changed<t>(),
+ value_::connect(&v, value_::value_changed<t>(),
cb, [&v, cb, fn_to_index](cv_qualified<t>& v) {
run_in_thread_sync(cb, [&] {
cb->setCurrentIndex(fn_to_index(v));
@@ -79,7 +79,7 @@ void tie_setting(value<t>& v, QLabel* lb, F&& fun)
auto closure = [=](cv_qualified<t> x) { lb->setText(fun(x)); };
closure(v());
- base_value::connect(&v, base_value::value_changed<t>(),
+ value_::connect(&v, value_::value_changed<t>(),
lb, closure,
v.SAFE_CONNTYPE);
}
@@ -92,7 +92,7 @@ void tie_setting(value<t>& v, QObject* obj, F&& fun)
fun(v());
- base_value::connect(&v, base_value::value_changed<t>(),
+ value_::connect(&v, value_::value_changed<t>(),
obj, fun,
v.DIRECT_CONNTYPE);
}