Use libsigrok C++ bindings (patch version 7).
[pulseview.git] / pv / prop / binding / binding.h
index b6f12141c33fed9cc368bc840330a96945b58794..9d52731d778556835239af38acffa7c8a17ed3ca 100644 (file)
 #ifndef PULSEVIEW_PV_PROP_BINDING_BINDING_H
 #define PULSEVIEW_PV_PROP_BINDING_BINDING_H
 
+#include <glibmm-2.4/glibmm.h>
+
 #include <vector>
-#include <boost/shared_ptr.hpp>
+#include <memory>
+
+#include <QString>
 
+class QFormLayout;
 class QWidget;
 
 namespace pv {
@@ -36,15 +41,20 @@ namespace binding {
 class Binding
 {
 public:
-       Binding();
+       const std::vector< std::shared_ptr<Property> >& properties();
 
-public:
-       QWidget* get_form(QWidget *parent);
+       void commit();
 
-protected:
-       std::vector< boost::shared_ptr<Property> > _properties;
+       void add_properties_to_form(QFormLayout *layout,
+               bool auto_commit = false) const;
 
-       QWidget *_form;
+       QWidget* get_property_form(QWidget *parent,
+               bool auto_commit = false) const;
+
+       static QString print_gvariant(Glib::VariantBase gvar);
+
+protected:
+       std::vector< std::shared_ptr<Property> > _properties;
 };
 
 } // binding