]> sigrok.org Git - pulseview.git/commitdiff
Channels: Re-arrange selector buttons
authorSoeren Apel <redacted>
Sun, 8 Apr 2018 20:00:06 +0000 (22:00 +0200)
committerSoeren Apel <redacted>
Sun, 15 Apr 2018 06:18:34 +0000 (08:18 +0200)
pv/popups/channels.cpp
pv/popups/channels.hpp

index 99e6376aeb5aa70351494de00238645125b061b5..585d80df36d5774e566cc024e2fd766cd3882fdb 100644 (file)
@@ -125,13 +125,12 @@ Channels::Channels(Session &session, QWidget *parent) :
        enable_all_named_channels_.setFlat(true);
        enable_all_changing_channels_.setFlat(true);
 
-       buttons_bar_.addWidget(&enable_all_channels_);
-       buttons_bar_.addWidget(&disable_all_channels_);
-       buttons_bar_.addWidget(&enable_all_logic_channels_);
-       buttons_bar_.addWidget(&enable_all_analog_channels_);
-       buttons_bar_.addWidget(&enable_all_named_channels_);
-       buttons_bar_.addWidget(&enable_all_changing_channels_);
-       buttons_bar_.addStretch(1);
+       buttons_bar_.addWidget(&enable_all_channels_, 0, 0);
+       buttons_bar_.addWidget(&disable_all_channels_, 0, 1);
+       buttons_bar_.addWidget(&enable_all_logic_channels_, 1, 0);
+       buttons_bar_.addWidget(&enable_all_analog_channels_, 1, 1);
+       buttons_bar_.addWidget(&enable_all_named_channels_, 1, 2);
+       buttons_bar_.addWidget(&enable_all_changing_channels_, 1, 3);
 
        layout_.addRow(&buttons_bar_);
 
index 56a7bd1a643abf3611106afc91d3e7e42a5bd3d0..d9c5b967f49980e682239b1729766ce8e819a4cb 100644 (file)
@@ -25,8 +25,9 @@
 #include <memory>
 #include <vector>
 
+#include <QCheckBox>
 #include <QFormLayout>
-#include <QHBoxLayout>
+#include <QGridLayout>
 #include <QPushButton>
 #include <QSignalMapper>
 
@@ -37,9 +38,6 @@ using std::map;
 using std::shared_ptr;
 using std::vector;
 
-class QCheckBox;
-class QGridLayout;
-
 namespace sigrok {
        class ChannelGroup;
 }
@@ -105,7 +103,7 @@ private:
                check_box_signal_map_;
        map< shared_ptr<sigrok::ChannelGroup>, QLabel*> group_label_map_;
 
-       QHBoxLayout buttons_bar_;
+       QGridLayout buttons_bar_;
        QPushButton enable_all_channels_, disable_all_channels_;
        QPushButton enable_all_logic_channels_, enable_all_analog_channels_;
        QPushButton enable_all_named_channels_, enable_all_changing_channels_;