From: Soeren Apel Date: Sun, 8 Apr 2018 20:00:06 +0000 (+0200) Subject: Channels: Re-arrange selector buttons X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=efadabab3de1a4c5b9cd09316de5d9ae66251519;p=pulseview.git Channels: Re-arrange selector buttons --- diff --git a/pv/popups/channels.cpp b/pv/popups/channels.cpp index 99e6376a..585d80df 100644 --- a/pv/popups/channels.cpp +++ b/pv/popups/channels.cpp @@ -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_); diff --git a/pv/popups/channels.hpp b/pv/popups/channels.hpp index 56a7bd1a..d9c5b967 100644 --- a/pv/popups/channels.hpp +++ b/pv/popups/channels.hpp @@ -25,8 +25,9 @@ #include #include +#include #include -#include +#include #include #include @@ -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, 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_;