]> sigrok.org Git - pulseview.git/commitdiff
MainWindow: Add settings button
authorSoeren Apel <redacted>
Tue, 18 Oct 2016 15:27:14 +0000 (17:27 +0200)
committerSoeren Apel <redacted>
Sun, 4 Dec 2016 13:37:37 +0000 (14:37 +0100)
pv/mainwindow.cpp
pv/mainwindow.hpp

index f0840bca8372c445d7851e0245c67c5397820bf2..e213f511e7b1f92419d5154f337d524dbfc40c73 100644 (file)
@@ -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);
index 0f7ec6431705c010204628c89cc2edd13b7af093..02e1f06e205faab0d014c02aeddf1390b101bc9d 100644 (file)
@@ -139,7 +139,7 @@ private:
        std::map< std::shared_ptr<Session>, 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_;