]> sigrok.org Git - pulseview.git/blobdiff - pv/popups/deviceoptions.cpp
Build fixes for Qt5 Windows/mingw/MXE support.
[pulseview.git] / pv / popups / deviceoptions.cpp
index c864865f4c854cea3ae96f8cec14286720c1cd35..df9113679d2d5ddddd67c169778ea4820166cddc 100644 (file)
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "deviceoptions.h"
-
-#include <boost/foreach.hpp>
+#include "deviceoptions.hpp"
 
 #include <QFormLayout>
 #include <QListWidget>
 
-#include <pv/prop/property.h>
+#include <pv/prop/property.hpp>
+
+#include <libsigrokcxx/libsigrokcxx.hpp>
+
+using std::shared_ptr;
 
-using namespace boost;
-using namespace std;
+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::binding::Device& DeviceOptions::binding()
 {
-       _binding.commit();
+       return binding_;
 }
 
 } // namespace popups