]> sigrok.org Git - pulseview.git/commitdiff
Replaced QToolBar in probes popup
authorJoel Holdsworth <redacted>
Sun, 12 Jan 2014 19:54:14 +0000 (19:54 +0000)
committerJoel Holdsworth <redacted>
Sun, 12 Jan 2014 20:03:36 +0000 (20:03 +0000)
pv/popups/probes.cpp
pv/popups/probes.h

index 3fffec310fa79378c233a333aa27f52349accd66..fa0d488de35a3b7c55b64b3fed91efe38faccdc4 100644 (file)
@@ -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*)),
index dc7324d1ddd278cf631fefd72935d1c3a00c462b..0dc324a00ae6071c130619b8b789c49b39df8728 100644 (file)
@@ -24,8 +24,8 @@
 #include <vector>
 
 #include <QFormLayout>
-#include <QToolBar>
-#include <QToolButton>
+#include <QHBoxLayout>
+#include <QPushButton>
 
 #include <pv/widgets/popup.h>
 
@@ -85,9 +85,9 @@ private:
        std::map< QCheckBox*, boost::shared_ptr<pv::view::Signal> >
                _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;
 };