X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fprop%2Fbinding%2Fbinding.cpp;h=7d38cb4629b5498c5d9cd0bc92dd4982909b8177;hp=e75b9556d638054b141a346125587e24f04e1b2b;hb=479bcabe6b4d0b1f51984085d9944ce6b03ed07c;hpb=c8df600577e9c7b1ca90baf6bd01ccc980f89464 diff --git a/pv/prop/binding/binding.cpp b/pv/prop/binding/binding.cpp index e75b9556..7d38cb46 100644 --- a/pv/prop/binding/binding.cpp +++ b/pv/prop/binding/binding.cpp @@ -18,42 +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) +const std::vector< boost::shared_ptr >& Binding::properties() { - 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; + return _properties; } } // binding