From b1328c013b99a92b5298afb300459beee09a39b6 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 10 Mar 2021 13:38:56 +1100 Subject: [PATCH] core: added shortcut to set status bar message --- app/core.cpp | 6 ++++++ app/core.h | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/app/core.cpp b/app/core.cpp index 6693d5c09..f58eac1a9 100644 --- a/app/core.cpp +++ b/app/core.cpp @@ -65,6 +65,7 @@ #include "widget/menu/menushared.h" #include "widget/taskview/taskviewitem.h" #include "widget/viewer/viewer.h" +#include "window/mainwindow/mainstatusbar.h" #include "window/mainwindow/mainwindow.h" namespace olive { @@ -936,6 +937,11 @@ bool Core::SaveProject(Project* p) } } +void Core::ShowStatusBarMessage(const QString &s) +{ + main_window_->statusBar()->showMessage(s); +} + bool Core::SaveProjectAs(Project* p) { QFileDialog fd(main_window_, tr("Save Project As")); diff --git a/app/core.h b/app/core.h index 901cb2222..663285bd2 100644 --- a/app/core.h +++ b/app/core.h @@ -291,6 +291,13 @@ public: */ bool SaveProject(Project *p); + /** + * @brief Show message in main window's status bar + * + * Shorthand for Core::instance()->main_window()->statusBar()->showMessage(); + */ + void ShowStatusBarMessage(const QString& s); + static const uint kProjectVersion; public slots: