#include "double.h"
-using namespace std;
-using namespace boost;
+using boost::optional;
+using std::pair;
namespace pv {
namespace prop {
{
}
-QWidget* Double::get_widget(QWidget *parent)
+QWidget* Double::get_widget(QWidget *parent, bool auto_commit)
{
if (_spin_box)
return _spin_box;
g_variant_unref(value);
}
+ if (auto_commit)
+ connect(_spin_box, SIGNAL(valueChanged(double)),
+ this, SLOT(on_value_changed(double)));
+
return _spin_box;
}
_setter(g_variant_new_double(_spin_box->value()));
}
+void Double::on_value_changed(double)
+{
+ commit();
+}
+
} // prop
} // pv