X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;ds=sidebyside;f=pv%2Ftoolbars%2Fmainbar.cpp;h=50e1908fb66031005cefbbadcbc9439461c1ace3;hb=61501398c32a261d87430337536f04dea174698a;hp=de476e04c94444eaf58c0d3317297efc7b3a5ea3;hpb=73e170f93ce9deb7bba04966564dcd8af8dfe7e1;p=pulseview.git diff --git a/pv/toolbars/mainbar.cpp b/pv/toolbars/mainbar.cpp index de476e0..50e1908 100644 --- a/pv/toolbars/mainbar.cpp +++ b/pv/toolbars/mainbar.cpp @@ -110,9 +110,13 @@ MainBar::MainBar(Session &session, MainWindow &main_window) : // Save button QToolButton *const save_button = new QToolButton(this); + vector open_actions; + open_actions.push_back(main_window.action_save_as()); + open_actions.push_back(main_window.action_save_selection_as()); + widgets::ExportMenu *export_menu = new widgets::ExportMenu(this, session.device_manager().context(), - main_window.action_save_as()); + open_actions); connect(export_menu, SIGNAL(format_selected(std::shared_ptr)), &main_window_, @@ -584,10 +588,11 @@ bool MainBar::eventFilter(QObject *watched, QEvent *event) { if ((watched == &sample_count_ || watched == &sample_rate_) && (event->type() == QEvent::ToolTip)) { - double sec = (double)sample_count_.value() / sample_rate_.value(); + auto sec = pv::util::Timestamp(sample_count_.value()) / sample_rate_.value(); QHelpEvent *help_event = static_cast(event); - QString str = tr("Total sampling time: %1").arg(pv::util::format_second(sec)); + QString str = tr("Total sampling time: %1").arg( + pv::util::format_time_si(sec, pv::util::SIPrefix::unspecified, 0, "s", false)); QToolTip::showText(help_event->globalPos(), str); return true;