X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fpopups%2Fdeviceoptions.cpp;fp=pv%2Fpopups%2Fdeviceoptions.cpp;h=c864865f4c854cea3ae96f8cec14286720c1cd35;hb=51d4a9ab96a6bf64a1fcd1700e7e174498d4c118;hp=0000000000000000000000000000000000000000;hpb=6c32e6c73b3342fc0e191949965fdec7705d515e;p=pulseview.git diff --git a/pv/popups/deviceoptions.cpp b/pv/popups/deviceoptions.cpp new file mode 100644 index 0000000..c864865 --- /dev/null +++ b/pv/popups/deviceoptions.cpp @@ -0,0 +1,53 @@ +/* + * This file is part of the PulseView project. + * + * Copyright (C) 2012 Joel Holdsworth + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * 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 + */ + +#include "deviceoptions.h" + +#include + +#include +#include + +#include + +using namespace boost; +using namespace std; + +namespace pv { +namespace popups { + +DeviceOptions::DeviceOptions(sr_dev_inst *sdi, QWidget *parent) : + Popup(parent), + _sdi(sdi), + _layout(this), + _binding(sdi) +{ + setLayout(&_layout); + + _layout.addWidget(_binding.get_property_form(this)); +} + +void DeviceOptions::closeEvent(QCloseEvent*) +{ + _binding.commit(); +} + +} // namespace popups +} // namespace pv