summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-12-31 13:51:44 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-12-31 13:51:44 +0100
commitef92acc3d03d46818317118655bac8574dfb9340 (patch)
treeae11e1e9a388510102cbe61453ac2eb27e03d15e
parent4411f8aa4508f2759c29181b668ebf949dc3bc8c (diff)
add qlabel one-way transfer option
-rw-r--r--facetracknoir/options.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/facetracknoir/options.h b/facetracknoir/options.h
index 1305bd0a..e77988c7 100644
--- a/facetracknoir/options.h
+++ b/facetracknoir/options.h
@@ -23,6 +23,7 @@
#include <QSpinBox>
#include <QSlider>
#include <QLineEdit>
+#include <QLabel>
#include <QCoreApplication>
#ifdef __GNUC__
@@ -297,6 +298,13 @@ namespace options {
le->setText(v);
}
+ template<>
+ inline void tie_setting(value<QString>& v, QLabel* lb)
+ {
+ base_value::connect(&v, SIGNAL(valueChanged(QString)), lb, SLOT(setText(QString)), v.CONNTYPE);
+ lb->setText(v);
+ }
+
inline pbundle bundle(const QString& group) {
return std::make_shared<impl_bundle>(group);
}