X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fmainwindow.cpp;h=1738f9b16cfea0adfcfa65d6018c0bbffab68bf4;hb=3cb15390cef38a29e3befd517b6fd20ca228c2bc;hp=bfdf65b477a2121d3a48d82becd2fae340ca0a73;hpb=33bedfc1262f3a6772f6a741144baf90790297fb;p=pulseview.git diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index bfdf65b..1738f9b 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -346,10 +346,23 @@ void MainWindow::setup_ui() run_stop_button_->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); run_stop_button_->setShortcut(QKeySequence(Qt::Key_Space)); + 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(separator1); layout->addWidget(run_stop_button_); + layout->addWidget(separator2); + layout->addWidget(settings_button_); static_tab_widget_ = new QWidget(); static_tab_widget_->setLayout(layout); @@ -565,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);