forked from Ivasoft/DSView
v0.4 release
This commit is contained in:
@@ -43,7 +43,7 @@ Bool::~Bool()
|
||||
{
|
||||
}
|
||||
|
||||
QWidget* Bool::get_widget(QWidget *parent)
|
||||
QWidget* Bool::get_widget(QWidget *parent, bool auto_commit)
|
||||
{
|
||||
if (_check_box)
|
||||
return _check_box;
|
||||
@@ -58,6 +58,10 @@ QWidget* Bool::get_widget(QWidget *parent)
|
||||
g_variant_unref(value);
|
||||
}
|
||||
|
||||
if (auto_commit)
|
||||
connect(_check_box, SIGNAL(stateChanged(int)),
|
||||
this, SLOT(on_state_changed(int)));
|
||||
|
||||
return _check_box;
|
||||
}
|
||||
|
||||
@@ -77,5 +81,11 @@ void Bool::commit()
|
||||
_check_box->checkState() == Qt::Checked));
|
||||
}
|
||||
|
||||
|
||||
void Bool::on_state_changed(int)
|
||||
{
|
||||
commit();
|
||||
}
|
||||
|
||||
} // prop
|
||||
} // pv
|
||||
|
||||
Reference in New Issue
Block a user