#include "bool.h"
-using namespace std;
-using namespace boost;
-
namespace pv {
namespace prop {
{
}
-QWidget* Bool::get_widget(QWidget *parent)
+QWidget* Bool::get_widget(QWidget *parent, bool auto_commit)
{
if (_check_box)
return _check_box;
g_variant_unref(value);
}
+ if (auto_commit)
+ connect(_check_box, SIGNAL(stateChanged(int)),
+ this, SLOT(on_state_changed(int)));
+
return _check_box;
}
_check_box->checkState() == Qt::Checked));
}
+void Bool::on_state_changed(int)
+{
+ commit();
+}
+
} // prop
} // pv