projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Key strings passed to decoder options must be newly allocated
[pulseview.git]
/
pv
/
prop
/
double.cpp
diff --git
a/pv/prop/double.cpp
b/pv/prop/double.cpp
index 39e205ee691f2910dd7899ac958ae5d9c69bde3f..188286ae1c4ff08a22687c0ac11704c69920ff23 100644
(file)
--- a/
pv/prop/double.cpp
+++ b/
pv/prop/double.cpp
@@
-50,7
+50,7
@@
Double::~Double()
{
}
{
}
-QWidget* Double::get_widget(QWidget *parent)
+QWidget* Double::get_widget(QWidget *parent
, bool auto_commit
)
{
if (_spin_box)
return _spin_box;
{
if (_spin_box)
return _spin_box;
@@
-70,6
+70,10
@@
QWidget* Double::get_widget(QWidget *parent)
g_variant_unref(value);
}
g_variant_unref(value);
}
+ if (auto_commit)
+ connect(_spin_box, SIGNAL(valueChanged(double)),
+ this, SLOT(on_value_changed(double)));
+
return _spin_box;
}
return _spin_box;
}
@@
-83,5
+87,10
@@
void Double::commit()
_setter(g_variant_new_double(_spin_box->value()));
}
_setter(g_variant_new_double(_spin_box->value()));
}
+void Double::on_value_changed(double)
+{
+ commit();
+}
+
} // prop
} // pv
} // prop
} // pv