2 #include <Process/TypeConversion.hpp>
4 #include <LocalTree/BaseCallbackWrapper.hpp>
6 #include <score/tools/Debug.hpp>
7 #include <score/tools/std/Invoke.hpp>
9 #include <ossia/network/base/node.hpp>
13 template <
typename T,
typename SetFun>
22 callbackIt = addr.add_callback([
this](
const ossia::value& v) {
23 ossia::qt::run_async(qApp, [
this, v] { setFun(v); });
30 template <
typename T,
typename Callback>
31 auto make_setProperty(ossia::net::parameter_base& addr, Callback prop)
33 return std::make_unique<SetPropertyWrapper<T, Callback>>(addr, prop);
36 template <
typename T,
typename Callback>
37 auto add_setProperty(ossia::net::node_base& n,
const std::string& name, Callback cb)
39 constexpr
const auto t = ossia::qt_property_converter<T>::val;
40 auto node = n.create_child(name);
43 auto addr = node->create_parameter(t);
46 addr->set_access(ossia::access_mode::SET);
48 return make_setProperty<T>(*addr, cb);
Definition: BaseCallbackWrapper.hpp:11
Local tree provides a way to extend the tree given through the Engine::Network::LocalDevice.
Definition: BaseCallbackWrapper.hpp:9
Definition: SetProperty.hpp:15