2 * This file is part of the PulseView project.
4 * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
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.
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.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef PULSEVIEW_PV_POPUPS_PROBES_H
22 #define PULSEVIEW_PV_POPUPS_PROBES_H
26 #include <QFormLayout>
27 #include <QHBoxLayout>
28 #include <QPushButton>
30 #include <pv/widgets/popup.h>
51 class Probes : public pv::widgets::Popup
56 Probes(SigSession &_session, QWidget *parent);
59 void set_all_probes(bool set);
61 void populate_group(const sr_probe_group *group,
62 const std::vector< boost::shared_ptr<pv::view::Signal> > sigs);
64 QGridLayout* create_probe_group_grid(
65 const std::vector< boost::shared_ptr<pv::view::Signal> > sigs);
68 void showEvent(QShowEvent *e);
71 void on_probe_checked(QWidget *widget);
73 void enable_all_probes();
74 void disable_all_probes();
77 pv::SigSession &_session;
81 bool _updating_probes;
83 std::vector< boost::shared_ptr<pv::prop::binding::DeviceOptions> >
85 std::map< QCheckBox*, boost::shared_ptr<pv::view::Signal> >
86 _check_box_signal_map;
88 QHBoxLayout _buttons_bar;
89 QPushButton _enable_all_probes;
90 QPushButton _disable_all_probes;
92 QSignalMapper _check_box_mapper;
98 #endif // PULSEVIEW_PV_POPUPS_PROBES_H