diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-10 14:08:22 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-12-10 14:08:22 +0100 | 
| commit | 2508a1865bf393335b1bf674a8e1e7995a313b53 (patch) | |
| tree | 83e5d62ea010a32616f984d987d12834ebde2bd3 | |
| parent | e6412ba2e9dc6c56664dbcf81ef299499434891a (diff) | |
options: rename template
| -rw-r--r-- | gui/main-window.cpp | 6 | ||||
| -rw-r--r-- | gui/mapping-dialog.cpp | 2 | ||||
| -rw-r--r-- | options/base-value.hpp | 2 | ||||
| -rw-r--r-- | options/tie.cpp | 8 | ||||
| -rw-r--r-- | options/tie.hpp | 6 | ||||
| -rw-r--r-- | spline/spline.cpp | 4 | 
6 files changed, 14 insertions, 14 deletions
| diff --git a/gui/main-window.cpp b/gui/main-window.cpp index b0f26cbe..637cbef5 100644 --- a/gui/main-window.cpp +++ b/gui/main-window.cpp @@ -162,9 +162,9 @@ MainWindow::MainWindow() :                  this,                  [&](const QString&) { if (pFilterDialog) pFilterDialog = nullptr; }); -        connect(&m.tracker_dll, base_value::signal_fun<QString>(), this, &MainWindow::save_modules, Qt::QueuedConnection); -        connect(&m.protocol_dll, base_value::signal_fun<QString>(), this, &MainWindow::save_modules, Qt::QueuedConnection); -        connect(&m.filter_dll, base_value::signal_fun<QString>(), this, &MainWindow::save_modules, Qt::QueuedConnection); +        connect(&m.tracker_dll, base_value::value_changed<QString>(), this, &MainWindow::save_modules, Qt::QueuedConnection); +        connect(&m.protocol_dll, base_value::value_changed<QString>(), this, &MainWindow::save_modules, Qt::QueuedConnection); +        connect(&m.filter_dll, base_value::value_changed<QString>(), this, &MainWindow::save_modules, Qt::QueuedConnection);          tie_setting(m.tracker_dll, ui.iconcomboTrackerSource);          tie_setting(m.protocol_dll, ui.iconcomboProtocol); diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp index 607563a7..8d754b6b 100644 --- a/gui/mapping-dialog.cpp +++ b/gui/mapping-dialog.cpp @@ -116,7 +116,7 @@ void MapWidget::load()          if (altp)          {              connect(&axis.opts.altp, -                    base_value::signal_fun<bool>(), +                    base_value::value_changed<bool>(),                      this,                      [&](bool f) -> void {qfc.setEnabled(f); qfc.force_redraw();});              qfc.setEnabled(axis.opts.altp); diff --git a/options/base-value.hpp b/options/base-value.hpp index f000edb1..aabced2a 100644 --- a/options/base-value.hpp +++ b/options/base-value.hpp @@ -38,7 +38,7 @@ public:      // MSVC has ODR problems in 15.4      // no C++17 "constexpr inline" for data declarations in MSVC      template<typename t> -    constexpr static auto signal_fun() +    constexpr static auto value_changed()      {          return static_cast<signal_sig<t>>(&base_value::valueChanged);      } diff --git a/options/tie.cpp b/options/tie.cpp index c0552d71..9e693f5c 100644 --- a/options/tie.cpp +++ b/options/tie.cpp @@ -55,7 +55,7 @@ OTR_OPTIONS_EXPORT void tie_setting(value<QVariant>& v, QComboBox* cb)                          &v, [cb, &v](int idx) {          v = cb->itemData(idx);      }, v.DIRECT_CONNTYPE); -    base_value::connect(&v, base_value::signal_fun<QVariant>(), +    base_value::connect(&v, base_value::value_changed<QVariant>(),                          cb,                          [cb, set_idx](const QVariant& var) {          run_in_thread_sync(cb, [&]() { @@ -91,13 +91,13 @@ OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QLineEdit* le)  {      le->setText(v);      base_value::connect(le, SIGNAL(textChanged(QString)), &v, SLOT(setValue(QString)), v.DIRECT_CONNTYPE); -    base_value::connect(&v, base_value::signal_fun<QString>(), le, &QLineEdit::setText, v.SAFE_CONNTYPE); +    base_value::connect(&v, base_value::value_changed<QString>(), le, &QLineEdit::setText, v.SAFE_CONNTYPE);  }  OTR_OPTIONS_EXPORT void tie_setting(value<QString>& v, QLabel* lb)  {      lb->setText(v); -    base_value::connect(&v, base_value::signal_fun<QString>(), lb, &QLabel::setText, v.SAFE_CONNTYPE); +    base_value::connect(&v, base_value::value_changed<QString>(), lb, &QLabel::setText, v.SAFE_CONNTYPE);  }  OTR_OPTIONS_EXPORT void tie_setting(value<int>& v, QTabWidget* t) @@ -133,7 +133,7 @@ OTR_OPTIONS_EXPORT void tie_setting(value<slider_value>& v, QSlider* w)      v.DIRECT_CONNTYPE);      base_value::connect(&v, -                        base_value::signal_fun<slider_value>(), +                        base_value::value_changed<slider_value>(),                          w,                          [=, &v](double) {          run_in_thread_sync(w, [=, &v]() diff --git a/options/tie.hpp b/options/tie.hpp index ad38faf8..8d5fe6c5 100644 --- a/options/tie.hpp +++ b/options/tie.hpp @@ -47,7 +47,7 @@ tie_setting(value<t>& v, QComboBox* cb)                                                 });                          },                          v.DIRECT_CONNTYPE); -    base_value::connect(&v, base_value::signal_fun<int>(), +    base_value::connect(&v, base_value::value_changed<int>(),                          cb, [cb](int x) {                              run_in_thread_sync(cb, [&]() { cb->setCurrentIndex(cb->findData(x)); });                          }, @@ -60,7 +60,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::signal_fun<t>(), +    base_value::connect(&v, base_value::value_changed<t>(),                          lb, closure,                          v.SAFE_CONNTYPE);  } @@ -73,7 +73,7 @@ void tie_setting(value<t>& v, QObject* obj, F&& fun)      fun(v()); -    base_value::connect(&v, base_value::signal_fun<t>(), +    base_value::connect(&v, base_value::value_changed<t>(),                          obj, fun,                          v.DIRECT_CONNTYPE);  } diff --git a/spline/spline.cpp b/spline/spline.cpp index d58d7c21..4a5da6f3 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -360,9 +360,9 @@ void spline::set_bundle(bundle b, const QString& axis_name, Axis axis)                                            s.get(), [&]() { invalidate_settings(); });              // this isn't strictly necessary for the spline but helps the widget -            conn_maxx = QObject::connect(&s->opts.clamp_x_, base_value::signal_fun<int>(), +            conn_maxx = QObject::connect(&s->opts.clamp_x_, base_value::value_changed<int>(),                                           ctx.get(), [&](double) { invalidate_settings(); }); -            conn_maxy = QObject::connect(&s->opts.clamp_y_, base_value::signal_fun<int>(), +            conn_maxy = QObject::connect(&s->opts.clamp_y_, base_value::value_changed<int>(),                                           ctx.get(), [&](double) { invalidate_settings(); });          } | 
