summaryrefslogtreecommitdiffhomepage
path: root/filter-ewma2
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-13 15:05:05 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-13 15:09:26 +0200
commit9a0822c445e56580fb3034224191ec825ea0274a (patch)
tree9fce6a93bb72a0db6b60015b58272abe0fba68ba /filter-ewma2
parent887dd41c5d67c30bd1e9631920d8fc1c3dd1a3f0 (diff)
options/tie: change "tie" overloads
Adjust usages. There are ODR issues with MSVC and it doesn't support C++17 "static inline constexpr" _variables_. Otherwise, "signal_fun" could be a variable and not a function. The usages in accela/ewma2 dialog are more verbose now but the original API was silly.
Diffstat (limited to 'filter-ewma2')
-rw-r--r--filter-ewma2/ftnoir_filter_ewma2_dialog.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp b/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp
index 55e9782e..da572ce4 100644
--- a/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp
+++ b/filter-ewma2/ftnoir_filter_ewma2_dialog.cpp
@@ -20,16 +20,13 @@ dialog_ewma::dialog_ewma()
tie_setting(s.kSmoothingScaleCurve, ui.powCurve);
tie_setting(s.kSmoothingScaleCurve, ui.curve_label,
- [](auto& x) { return x * 100; },
- "%1%", 0, 'f', 2);
+ [](auto& x) { return QStringLiteral("%1%").arg(x * 100, 0, 'f', 2); });
tie_setting(s.kMinSmoothing, ui.min_label,
- [](auto& x) { return x * 100; },
- "%1%", 0, 'f', 2);
+ [](auto& x) { return QStringLiteral("%1%").arg(x * 100, 0, 'f', 2);});
tie_setting(s.kMaxSmoothing, ui.max_label,
- [](auto& x) { return x * 100; },
- "%1%", 0, 'f', 2);
+ [](auto& x) { return QStringLiteral("%1%").arg(x * 100, 0, 'f', 2);});
connect(ui.minSmooth, &QSlider::valueChanged, this,
[&](int v) -> void { if (ui.maxSmooth->value() < v) ui.maxSmooth->setValue(v); });