From: Soeren Apel Date: Mon, 28 Dec 2015 15:15:29 +0000 (+0100) Subject: Add menu option for coloured/alternating trace background colors X-Git-Tag: pulseview-0.3.0~26 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0fb9d6454c286869d71621b69515802903735057;p=pulseview.git Add menu option for coloured/alternating trace background colors --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 4088c26d..272dac23 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -110,6 +110,7 @@ MainWindow::MainWindow(DeviceManager &device_manager, action_view_zoom_fit_(new QAction(this)), action_view_zoom_one_to_one_(new QAction(this)), action_view_sticky_scrolling_(new QAction(this)), + action_view_coloured_bg_(new QAction(this)), action_view_show_cursors_(new QAction(this)), action_about_(new QAction(this)) #ifdef ENABLE_DECODE @@ -473,6 +474,16 @@ void MainWindow::setup_ui() menu_view->addSeparator(); + action_view_coloured_bg_->setCheckable(true); + action_view_coloured_bg_->setChecked(true); + action_view_coloured_bg_->setShortcut(QKeySequence(Qt::Key_S)); + action_view_coloured_bg_->setObjectName( + QString::fromUtf8("actionViewColouredBg")); + action_view_coloured_bg_->setText(tr("Use &coloured backgrounds")); + menu_view->addAction(action_view_coloured_bg_); + + menu_view->addSeparator(); + action_view_show_cursors_->setCheckable(true); action_view_show_cursors_->setChecked(view_->cursors_shown()); action_view_show_cursors_->setIcon(QIcon::fromTheme("show-cursors", @@ -794,6 +805,10 @@ void MainWindow::on_actionViewStickyScrolling_triggered() view_->enable_sticky_scrolling(action_view_sticky_scrolling_->isChecked()); } +void MainWindow::on_actionViewColouredBg_triggered() +{ +} + void MainWindow::on_actionViewShowCursors_triggered() { assert(view_); diff --git a/pv/mainwindow.hpp b/pv/mainwindow.hpp index bf0aa125..208cbe43 100644 --- a/pv/mainwindow.hpp +++ b/pv/mainwindow.hpp @@ -92,6 +92,7 @@ public: QAction* action_view_zoom_fit() const; QAction* action_view_zoom_one_to_one() const; QAction* action_view_sticky_scrolling() const; + QAction* action_view_coloured_bg() const; QAction* action_view_show_cursors() const; QAction* action_about() const; @@ -160,6 +161,8 @@ private Q_SLOTS: void on_actionViewStickyScrolling_triggered(); + void on_actionViewColouredBg_triggered(); + void on_actionViewShowCursors_triggered(); void on_actionAbout_triggered(); @@ -195,6 +198,7 @@ private: QAction *const action_view_zoom_fit_; QAction *const action_view_zoom_one_to_one_; QAction *const action_view_sticky_scrolling_; + QAction *const action_view_coloured_bg_; QAction *const action_view_show_cursors_; QAction *const action_about_;