summaryrefslogtreecommitdiffhomepage
path: root/options/value.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-30 15:32:53 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-06 04:21:36 +0200
commit91ca7726d4af5e86a2d5d10ec56685be22b0face (patch)
tree5271aa690ec30cbfdf61332614b0b055aea9e4ee /options/value.hpp
parente4d5b49d74a749b6ac9fc741c5e9942095073cdb (diff)
options: allow tie combobox to qvariant
Diffstat (limited to 'options/value.hpp')
-rw-r--r--options/value.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/options/value.hpp b/options/value.hpp
index 4904c370..48f71d47 100644
--- a/options/value.hpp
+++ b/options/value.hpp
@@ -55,6 +55,7 @@ signals:
OPENTRACK_DEFINE_SIGNAL(const QString&);
OPENTRACK_DEFINE_SIGNAL(const slider_value&);
OPENTRACK_DEFINE_SIGNAL(const QPointF&);
+ OPENTRACK_DEFINE_SIGNAL(const QVariant&);
OPENTRACK_DEFINE_SIGNAL(const QList<double>&);
OPENTRACK_DEFINE_SIGNAL(const QList<float>&);
@@ -69,6 +70,11 @@ protected:
comparator cmp;
std::type_index type_index;
+ void store(const QVariant& datum)
+ {
+ b->store_kv(self_name, datum);
+ }
+
template<typename t>
void store(const t& datum)
{
@@ -82,6 +88,7 @@ public slots:
OPENTRACK_DEFINE_SLOT(const QString&)
OPENTRACK_DEFINE_SLOT(const slider_value&)
OPENTRACK_DEFINE_SLOT(const QPointF&)
+ OPENTRACK_DEFINE_SLOT(const QVariant&)
OPENTRACK_DEFINE_SLOT(const QList<double>&)
OPENTRACK_DEFINE_SLOT(const QList<float>&)