From: Joel Holdsworth Date: Sun, 12 Jan 2014 19:54:14 +0000 (+0000) Subject: Replaced QToolBar in probes popup X-Git-Tag: pulseview-0.2.0~149 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=65cbcf462f8bab24ce02c80af64248a0c78c2f6a;p=pulseview.git Replaced QToolBar in probes popup --- diff --git a/pv/popups/probes.cpp b/pv/popups/probes.cpp index 3fffec31..fa0d488d 100644 --- a/pv/popups/probes.cpp +++ b/pv/popups/probes.cpp @@ -44,11 +44,9 @@ namespace popups { Probes::Probes(SigSession &session, QWidget *parent) : Popup(parent), _session(session), - _layout(this), _updating_probes(false), - _probes_bar(this), - _enable_all_probes(this), - _disable_all_probes(this), + _enable_all_probes(tr("Enable All"), this), + _disable_all_probes(tr("Disable All"), this), _check_box_mapper(this) { // Create the layout @@ -111,13 +109,14 @@ Probes::Probes(SigSession &session, QWidget *parent) : connect(&_disable_all_probes, SIGNAL(clicked()), this, SLOT(disable_all_probes())); - _enable_all_probes.setText(tr("Enable All")); - _probes_bar.addWidget(&_enable_all_probes); + _enable_all_probes.setFlat(true); + _disable_all_probes.setFlat(true); - _disable_all_probes.setText(tr("Disable All")); - _probes_bar.addWidget(&_disable_all_probes); + _buttons_bar.addWidget(&_enable_all_probes); + _buttons_bar.addWidget(&_disable_all_probes); + _buttons_bar.addStretch(1); - _layout.addRow(&_probes_bar); + _layout.addRow(&_buttons_bar); // Connect the check-box signal mapper connect(&_check_box_mapper, SIGNAL(mapped(QWidget*)), diff --git a/pv/popups/probes.h b/pv/popups/probes.h index dc7324d1..0dc324a0 100644 --- a/pv/popups/probes.h +++ b/pv/popups/probes.h @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include @@ -85,9 +85,9 @@ private: std::map< QCheckBox*, boost::shared_ptr > _check_box_signal_map; - QToolBar _probes_bar; - QToolButton _enable_all_probes; - QToolButton _disable_all_probes; + QHBoxLayout _buttons_bar; + QPushButton _enable_all_probes; + QPushButton _disable_all_probes; QSignalMapper _check_box_mapper; };