From: Soeren Apel Date: Tue, 18 Oct 2016 15:27:14 +0000 (+0200) Subject: MainWindow: Add settings button X-Git-Tag: pulseview-0.4.0~226 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4d1ec09aed2931962808a2b103de8bf1d26e4a60;p=pulseview.git MainWindow: Add settings button --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index f0840bca..e213f511 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -346,14 +346,23 @@ void MainWindow::setup_ui() run_stop_button_->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); run_stop_button_->setShortcut(QKeySequence(Qt::Key_Space)); - QFrame *separator = new QFrame(); - separator->setFrameStyle(QFrame::VLine | QFrame::Raised); + settings_button_ = new QToolButton(); + settings_button_->setIcon(QIcon::fromTheme("configure", + QIcon(":/icons/configure.png"))); + settings_button_->setAutoRaise(true); + + QFrame *separator1 = new QFrame(); + separator1->setFrameStyle(QFrame::VLine | QFrame::Raised); + QFrame *separator2 = new QFrame(); + separator2->setFrameStyle(QFrame::VLine | QFrame::Raised); QHBoxLayout* layout = new QHBoxLayout(); layout->setContentsMargins(2, 2, 2, 2); layout->addWidget(new_session_button_); - layout->addWidget(separator); + layout->addWidget(separator1); layout->addWidget(run_stop_button_); + layout->addWidget(separator2); + layout->addWidget(settings_button_); static_tab_widget_ = new QWidget(); static_tab_widget_->setLayout(layout); diff --git a/pv/mainwindow.hpp b/pv/mainwindow.hpp index 0f7ec643..02e1f06e 100644 --- a/pv/mainwindow.hpp +++ b/pv/mainwindow.hpp @@ -139,7 +139,7 @@ private: std::map< std::shared_ptr, QMainWindow*> session_windows_; QWidget *static_tab_widget_; - QToolButton *new_session_button_, *run_stop_button_; + QToolButton *new_session_button_, *run_stop_button_, *settings_button_; QTabWidget session_selector_; QSignalMapper session_state_mapper_;