]> sigrok.org Git - pulseview.git/blobdiff - pv/dialogs/settings.cpp
Use proposed clang-tidy fixes
[pulseview.git] / pv / dialogs / settings.cpp
index 1cd7d23c8bf83068e97a91a1e6d518feb528d34b..0dc6b055813ea80320e1ba49ab79ff882854b8a2 100644 (file)
@@ -240,7 +240,7 @@ QWidget *Settings::get_general_settings_form(QWidget *parent) const
        if (current_style.isEmpty())
                style_cb->setCurrentIndex(0);
        else
-               style_cb->setCurrentIndex(style_cb->findText(current_style, 0));
+               style_cb->setCurrentIndex(style_cb->findText(current_style, nullptr));
 
        connect(style_cb, SIGNAL(currentIndexChanged(int)),
                this, SLOT(on_general_style_changed(int)));
@@ -382,6 +382,10 @@ QWidget *Settings::get_decoder_settings_form(QWidget *parent)
                SLOT(on_dec_initialStateConfigurable_changed(int)));
        decoder_layout->addRow(tr("Allow configuration of &initial signal state"), cb);
 
+       cb = create_checkbox(GlobalSettings::Key_Dec_AlwaysShowAllRows,
+               SLOT(on_dec_alwaysshowallrows_changed(int)));
+       decoder_layout->addRow(tr("Always show all &rows, even if no annotation is visible"), cb);
+
        // Annotation export settings
        ann_export_format_ = new QLineEdit();
        ann_export_format_->setText(
@@ -725,6 +729,12 @@ void Settings::on_dec_exportFormat_changed(const QString &text)
        GlobalSettings settings;
        settings.setValue(GlobalSettings::Key_Dec_ExportFormat, text);
 }
+
+void Settings::on_dec_alwaysshowallrows_changed(int state)
+{
+       GlobalSettings settings;
+       settings.setValue(GlobalSettings::Key_Dec_AlwaysShowAllRows, state ? true : false);
+}
 #endif
 
 void Settings::on_log_logLevel_changed(int value)