Add a tooltip for the "Add decoder" button.
[pulseview.git] / pv / toolbars / mainbar.cpp
index 736ef80b1f4ffb9f64ffadbb574cb422eeafa512..1a177fd65eea01c99d900ba68a54ac2c7e4fa875 100644 (file)
@@ -43,8 +43,8 @@
 #include <pv/dialogs/inputoutputoptions.hpp>
 #include <pv/dialogs/storeprogress.hpp>
 #include <pv/mainwindow.hpp>
-#include <pv/popups/deviceoptions.hpp>
 #include <pv/popups/channels.hpp>
+#include <pv/popups/deviceoptions.hpp>
 #include <pv/util.hpp>
 #include <pv/view/view.hpp>
 #include <pv/widgets/exportmenu.hpp>
@@ -56,9 +56,7 @@
 #include <libsigrokcxx/libsigrokcxx.hpp>
 
 using std::back_inserter;
-using std::cerr;
 using std::copy;
-using std::endl;
 using std::list;
 using std::make_pair;
 using std::map;
@@ -205,6 +203,7 @@ MainBar::MainBar(Session &session, QWidget *parent,
                QIcon(":/icons/add-decoder.svg")));
        add_decoder_button_->setPopupMode(QToolButton::InstantPopup);
        add_decoder_button_->setMenu(menu_decoders_add_);
+       add_decoder_button_->setToolTip(tr("Add low-level, non-stacked protocol decoder"));
 #endif
 
        connect(&sample_count_, SIGNAL(value_changed()),
@@ -422,8 +421,7 @@ void MainBar::update_sample_count_selector()
        min_sample_count = min(max(min_sample_count, MinSampleCount),
                max_sample_count);
 
-       sample_count_.show_125_list(
-               min_sample_count, max_sample_count);
+       sample_count_.show_125_list(min_sample_count, max_sample_count);
 
        if (sr_dev->config_check(ConfigKey::LIMIT_SAMPLES, Capability::GET)) {
                auto gvar = sr_dev->config_get(ConfigKey::LIMIT_SAMPLES);
@@ -583,8 +581,7 @@ void MainBar::add_decoder(srd_decoder *decoder)
 #endif
 }
 
-void MainBar::export_file(shared_ptr<OutputFormat> format,
-       bool selection_only)
+void MainBar::export_file(shared_ptr<OutputFormat> format, bool selection_only)
 {
        using pv::dialogs::StoreProgress;
 
@@ -743,7 +740,7 @@ void MainBar::on_sample_rate_changed()
 void MainBar::on_config_changed()
 {
        commit_sample_count();
-       commit_sample_rate();   
+       commit_sample_rate();
 }
 
 void MainBar::on_actionNewView_triggered()