X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=1738f9b16cfea0adfcfa65d6018c0bbffab68bf4;hp=f0840bca8372c445d7851e0245c67c5397820bf2;hb=2d25fc473d6dc5d578f45f8d6bb061639afec405;hpb=baa8560e7731220a16190dbcee0854848e12c131 diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index f0840bca..1738f9b1 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); @@ -569,6 +578,14 @@ void MainWindow::on_session_name_changed() } } + // Update the tab widget by finding the main window and the tab from that + for (auto entry : session_windows_) + if (entry.first.get() == session) { + QMainWindow *window = entry.second; + const int index = session_selector_.indexOf(window); + session_selector_.setTabText(index, session->name()); + } + // Refresh window title if the affected session has focus if (session == last_focused_session_.get()) setWindowTitle(session->name() + " - " + WindowTitle);