X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fprop%2Fbinding%2Fbinding.cpp;h=7d38cb4629b5498c5d9cd0bc92dd4982909b8177;hb=479bcabe6b4d0b1f51984085d9944ce6b03ed07c;hp=9455ad5905258d00bb4c1c7518610754490ab291;hpb=3a69ef6b7e1a0c4effdcc3e66c00fc9dbc973613;p=pulseview.git diff --git a/pv/prop/binding/binding.cpp b/pv/prop/binding/binding.cpp index 9455ad59..7d38cb46 100644 --- a/pv/prop/binding/binding.cpp +++ b/pv/prop/binding/binding.cpp @@ -18,51 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include - -#include - #include "binding.h" -#include - -using namespace boost; - namespace pv { namespace prop { namespace binding { -Binding::Binding() : - _form(NULL) -{ -} - -QWidget* Binding::get_form(QWidget *parent) -{ - if(_form) - return _form; - - _form = new QWidget(parent); - QFormLayout *const layout = new QFormLayout(_form); - _form->setLayout(layout); - - BOOST_FOREACH(shared_ptr p, _properties) - { - assert(p); - layout->addRow(p->name(), p->get_widget(_form)); - } - - return _form; -} - -void Binding::commit() +const std::vector< boost::shared_ptr >& Binding::properties() { - BOOST_FOREACH(shared_ptr p, _properties) - { - assert(p); - p->commit(); - } + return _properties; } } // binding