]> sigrok.org Git - pulseview.git/blobdiff - pv/prop/binding/binding.cpp
Moved get_property_form out of pv::prop::binding::Binding
[pulseview.git] / pv / prop / binding / binding.cpp
index 5d411686f4a820f8ea686e191091f1b6d8c5500b..7d38cb4629b5498c5d9cd0bc92dd4982909b8177 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#include <QFormLayout>
-#include <QWidget>
-
-#include <boost/foreach.hpp>
-
 #include "binding.h"
 
-#include <pv/prop/property.h>
-
-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<Property> p, _properties)
-       {
-               assert(p);
-               layout->addRow(p->name(), p->get_widget(_form));
-       }
-
-       return _form;
-}
-
-void Binding::commit()
+const std::vector< boost::shared_ptr<Property> >& Binding::properties()
 {
-       BOOST_FOREACH(shared_ptr<Property> p, _properties)
-       {
-               assert(p);
-               p->commit();
-       }
+       return _properties;
 }
 
 } // binding