X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fpopups%2Fdeviceoptions.cpp;h=bfb702cf064ce062462b67e5c7f0d0eba3f822d0;hb=e639f241d0731bf402a7e4df335313d866f69fc6;hp=13055fc0e8cdee6c27e9d99b233064876f52e170;hpb=945745012eb57cefa1ef457daf48cfffa99f9ec2;p=pulseview.git
diff --git a/pv/popups/deviceoptions.cpp b/pv/popups/deviceoptions.cpp
index 13055fc..bfb702c 100644
--- a/pv/popups/deviceoptions.cpp
+++ b/pv/popups/deviceoptions.cpp
@@ -14,39 +14,48 @@
* 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 .
*/
-#include "deviceoptions.h"
-
-#include
+#include "deviceoptions.hpp"
#include
#include
-#include
+#include
+
+#include
-using boost::shared_ptr;
+using std::shared_ptr;
+
+using sigrok::Device;
namespace pv {
namespace popups {
-DeviceOptions::DeviceOptions(shared_ptr dev_inst,
- QWidget *parent) :
+DeviceOptions::DeviceOptions(shared_ptr device, QWidget *parent) :
Popup(parent),
- _dev_inst(dev_inst),
- _layout(this),
- _binding(dev_inst)
+ device_(device),
+ layout_(this),
+ binding_(device)
{
- setLayout(&_layout);
+ setLayout(&layout_);
- _layout.addWidget(_binding.get_property_form(this, true));
+ layout_.addWidget(binding_.get_property_form(this, true));
}
-pv::prop::binding::DeviceOptions& DeviceOptions::binding()
+pv::binding::Device& DeviceOptions::binding()
{
- return _binding;
+ return binding_;
+}
+
+void DeviceOptions::show()
+{
+ // Update device config widgets with the current values supplied by the
+ // driver before actually showing the popup dialog
+ binding_.update_property_widgets();
+
+ Popup::show();
}
} // namespace popups