2 #include <ossia/network/value/value.hpp>
10 struct qt_property_converter;
13 struct qt_property_converter<float>
15 static constexpr
const auto val = ossia::val_type::FLOAT;
17 static auto convert(
float f) {
return f; }
20 struct qt_property_converter<double>
22 static constexpr
const auto val = ossia::val_type::FLOAT;
24 static auto convert(
double f) {
return f; }
27 struct qt_property_converter<int>
31 static auto convert(
int f) {
return f; }
34 struct qt_property_converter<bool>
38 static auto convert(
bool f) {
return f; }
41 struct qt_property_converter<
ossia::impulse>
44 using type = ossia::impulse;
45 static auto convert(ossia::impulse) {
return ossia::impulse{}; }
48 struct qt_property_converter<std::string>
51 using type = std::string;
52 static auto convert(
const std::string& f) {
return f; }
53 static auto convert(std::string&& f) {
return std::move(f); }
57 struct qt_property_converter<QString>
60 using type = std::string;
61 static auto convert(
const QString& f) {
return f.toStdString(); }
65 struct qt_property_converter<char>
69 static int convert(
char f) {
return f; }
73 struct qt_property_converter<QChar>
77 static auto convert(QChar f) {
return f.toLatin1(); }
81 struct qt_property_converter<
ossia::vec2f>
84 using type = ossia::vec2f;
85 static auto convert(
const ossia::vec2f& t) {
return t; }
89 struct qt_property_converter<
ossia::vec3f>
92 using type = ossia::vec3f;
93 static auto convert(
const ossia::vec3f& t) {
return t; }
97 struct qt_property_converter<
ossia::vec4f>
100 using type = ossia::vec4f;
101 static auto convert(
const ossia::vec4f& t) {
return t; }
105 struct qt_property_converter<std::vector<ossia::value>>
108 using type = std::vector<ossia::value>;
109 static auto convert(
const std::vector<ossia::value>& t) {
return t; }
110 static auto convert(std::vector<ossia::value>&& t) {
return std::move(t); }
114 struct qt_property_converter<value_map_type>
117 using type = value_map_type;
118 static auto convert(
const value_map_type& t) {
return t; }
119 static auto convert(value_map_type&& t) {
return std::move(t); }