summaryrefslogtreecommitdiffhomepage
path: root/options
diff options
context:
space:
mode:
Diffstat (limited to 'options')
-rw-r--r--options/slider.cpp8
-rw-r--r--options/slider.hpp8
2 files changed, 9 insertions, 7 deletions
diff --git a/options/slider.cpp b/options/slider.cpp
index 5c73d867..9ad06e24 100644
--- a/options/slider.cpp
+++ b/options/slider.cpp
@@ -86,6 +86,10 @@ int slider_value::to_slider_pos(int q_min, int q_max) const
return int(std::round(((cur() - min()) * q_diff / div) + q_min));
}
+} // end ns options
+
+using slider_value = options::slider_value;
+
QDataStream& operator << (QDataStream& out, const options::slider_value& v)
{
out << v.cur()
@@ -103,8 +107,6 @@ QDataStream& operator >> (QDataStream& in, options::slider_value& v)
{
double cur = 0, min = 0, max = 0;
in >> cur >> min >> max;
- v = options::slider_value(cur, min, max);
+ v = slider_value(cur, min, max);
return in;
}
-
-} // end ns options
diff --git a/options/slider.hpp b/options/slider.hpp
index 958214ce..ab635d56 100644
--- a/options/slider.hpp
+++ b/options/slider.hpp
@@ -49,8 +49,8 @@ namespace options
slider_value update_from_slider(int pos, int q_min, int q_max) const;
int to_slider_pos(int q_min, int q_max) const;
};
-
- QDebug operator << (QDebug dbg, const options::slider_value& val);
- QDataStream& operator << (QDataStream& out, const options::slider_value& v);
- QDataStream& operator >> (QDataStream& in, options::slider_value& v);
}
+
+OTR_OPTIONS_EXPORT QDebug operator << (QDebug dbg, const options::slider_value& val);
+OTR_OPTIONS_EXPORT QDataStream& operator << (QDataStream& out, const options::slider_value& v);
+OTR_OPTIONS_EXPORT QDataStream& operator >> (QDataStream& in, options::slider_value& v);