summaryrefslogtreecommitdiffhomepage
path: root/options/slider.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'options/slider.hpp')
-rw-r--r--options/slider.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/options/slider.hpp b/options/slider.hpp
index bda1d398..da6bf214 100644
--- a/options/slider.hpp
+++ b/options/slider.hpp
@@ -8,6 +8,9 @@
#pragma once
#include "export.hpp"
+
+#include "compat/util.hpp"
+
#include <QMetaType>
#include <QDataStream>
#include <QDebug>
@@ -31,6 +34,7 @@ namespace options
slider_value& operator=(const slider_value& v);
bool operator==(const slider_value& v) const;
operator double() const { return cur_; }
+ explicit operator int() const { return iround(cur_); }
double cur() const { return cur_; }
double min() const { return min_; }
double max() const { return max_; }