diff src/gui/window.cc @ 315:34347fd2a2de

session: allow printing status messages ...!
author Paper <paper@paper.us.eu.org>
date Tue, 11 Jun 2024 14:16:40 -0400
parents bf89fbf7ff38
children d928ec7b6a0d
line wrap: on
line diff
--- a/src/gui/window.cc	Tue Jun 11 13:29:45 2024 -0400
+++ b/src/gui/window.cc	Tue Jun 11 14:16:40 2024 -0400
@@ -32,6 +32,7 @@
 #include <QMessageBox>
 #include <QPlainTextEdit>
 #include <QStackedWidget>
+#include <QStatusBar>
 #include <QTextStream>
 #include <QThread>
 #include <QThreadPool>
@@ -80,6 +81,8 @@
 	sidebar_.setFixedWidth(128);
 	sidebar_.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
 
+	statusBar();
+
 	new QHBoxLayout(&main_widget_);
 
 	CreateBars();
@@ -132,6 +135,10 @@
 	playing_thread_timer_.start(5000);
 }
 
+void MainWindow::SetStatusMessage(const std::string& message) {
+	statusBar()->showMessage(Strings::ToQString(message), 2000);
+}
+
 /* Does the main part of what Qt's generic "RetranslateUI" function would do */
 void MainWindow::AddMainWidgets() {
 	int page = sidebar_.GetCurrentItem();