]> sigrok.org Git - pulseview.git/blame_incremental - pv/popups/deviceoptions.cpp
Confirm with user when trying to close sessions with unsaved data
[pulseview.git] / pv / popups / deviceoptions.cpp
... / ...
CommitLineData
1/*
2 * This file is part of the PulseView project.
3 *
4 * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 */
19
20#include "deviceoptions.hpp"
21
22#include <QFormLayout>
23#include <QListWidget>
24
25#include <pv/prop/property.hpp>
26
27#include <libsigrokcxx/libsigrokcxx.hpp>
28
29using std::shared_ptr;
30
31using sigrok::Device;
32
33namespace pv {
34namespace popups {
35
36DeviceOptions::DeviceOptions(shared_ptr<Device> device, QWidget *parent) :
37 Popup(parent),
38 device_(device),
39 layout_(this),
40 binding_(device)
41{
42 setLayout(&layout_);
43
44 layout_.addWidget(binding_.get_property_form(this, true));
45}
46
47pv::binding::Device& DeviceOptions::binding()
48{
49 return binding_;
50}
51
52} // namespace popups
53} // namespace pv