X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fpopups%2Fprobes.h;h=3760f4200835791afe93a8322c99325a6079ee26;hp=8a1fdd5753efa60a3cb6b89f7eef71efb9b962c4;hb=bfc9f61ebfb8d9c14c2786b34373816758d52e9f;hpb=aca00b1e0d3483926c53dfd856483a397f1c29a5 diff --git a/pv/popups/probes.h b/pv/popups/probes.h index 8a1fdd57..3760f420 100644 --- a/pv/popups/probes.h +++ b/pv/popups/probes.h @@ -21,17 +21,37 @@ #ifndef PULSEVIEW_PV_POPUPS_PROBES_H #define PULSEVIEW_PV_POPUPS_PROBES_H -#include -#include -#include -#include +#include +#include + +#include + +#include +#include +#include +#include #include +struct sr_probe_group; + +class QCheckBox; +class QGridLayout; + namespace pv { class SigSession; +namespace prop { +namespace binding { +class DeviceOptions; +} +} + +namespace view { +class Signal; +} + namespace popups { class Probes : public pv::widgets::Popup @@ -44,8 +64,17 @@ public: private: void set_all_probes(bool set); + void populate_group(const sr_probe_group *group, + const std::vector< boost::shared_ptr > sigs); + + QGridLayout* create_probe_group_grid( + const std::vector< boost::shared_ptr > sigs); + +private: + void showEvent(QShowEvent *e); + private slots: - void item_changed(QListWidgetItem *item); + void on_probe_checked(QWidget *widget); void enable_all_probes(); void disable_all_probes(); @@ -53,12 +82,20 @@ private slots: private: pv::SigSession &_session; - QVBoxLayout _layout; + QFormLayout _layout; + + bool _updating_probes; + + std::vector< boost::shared_ptr > + _group_bindings; + std::map< QCheckBox*, boost::shared_ptr > + _check_box_signal_map; + + QHBoxLayout _buttons_bar; + QPushButton _enable_all_probes; + QPushButton _disable_all_probes; - QListWidget _probes; - QToolBar _probes_bar; - QToolButton _enable_all_probes; - QToolButton _disable_all_probes; + QSignalMapper _check_box_mapper; }; } // popups