]> sigrok.org Git - pulseview.git/blobdiff - pv/popups/deviceoptions.cpp
Make member variable underscores a suffix instead of a prefix
[pulseview.git] / pv / popups / deviceoptions.cpp
index c864865f4c854cea3ae96f8cec14286720c1cd35..bdc0ab23ed48366353fc14c0b01daaa899d1fbdd 100644 (file)
 
 #include "deviceoptions.h"
 
-#include <boost/foreach.hpp>
-
 #include <QFormLayout>
 #include <QListWidget>
 
 #include <pv/prop/property.h>
 
-using namespace boost;
-using namespace std;
+#include <libsigrok/libsigrok.hpp>
+
+using std::shared_ptr;
+
+using sigrok::Device;
 
 namespace pv {
 namespace popups {
 
-DeviceOptions::DeviceOptions(sr_dev_inst *sdi, QWidget *parent) :
+DeviceOptions::DeviceOptions(shared_ptr<Device> device, QWidget *parent) :
        Popup(parent),
-       _sdi(sdi),
-       _layout(this),
-       _binding(sdi)
+       device_(device),
+       layout_(this),
+       binding_(device)
 {
-       setLayout(&_layout);
+       setLayout(&layout_);
 
-       _layout.addWidget(_binding.get_property_form(this));
+       layout_.addWidget(binding_.get_property_form(this, true));
 }
 
-void DeviceOptions::closeEvent(QCloseEvent*)
+pv::prop::binding::DeviceOptions& DeviceOptions::binding()
 {
-       _binding.commit();
+       return binding_;
 }
 
 } // namespace popups