Author: leuven
Date: Sun Jan 23 10:17:52 2011
New Revision: 37304
URL: http://www.lyx.org/trac/changeset/37304
Log:
add busy spinner to status bar when threads are running in the background
Added:
lyx-devel/trunk/lib/images/busy.gif (contents, props changed)
Modified:
lyx-devel/trunk/src/frontends/qt4/GuiView.cpp
Added: lyx-devel/trunk/lib/images/busy.gif
==============================================================================
Binary file. No diff available.
Modified: lyx-devel/trunk/src/frontends/qt4/GuiView.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiView.cpp Sat Jan 22 19:58:26
2011 (r37303)
+++ lyx-devel/trunk/src/frontends/qt4/GuiView.cpp Sun Jan 23 10:17:52
2011 (r37304)
@@ -88,9 +88,11 @@
#include <QDesktopWidget>
#include <QDragEnterEvent>
#include <QDropEvent>
+#include <QLabel>
#include <QList>
#include <QMenu>
#include <QMenuBar>
+#include <QMovie>
#include <QPainter>
#include <QPixmap>
#include <QPixmapCache>
@@ -441,6 +443,19 @@
// For Drag&Drop.
setAcceptDrops(true);
+ // add busy indicator to statusbar
+ QLabel * busylabel = new QLabel(statusBar());
+ statusBar()->addPermanentWidget(busylabel);
+ QString fn = toqstr(lyx::libFileSearch("images",
"busy.gif").absFileName());
+ QMovie * busyanim = new QMovie(fn, QByteArray(), busylabel);
+ busylabel->setMovie(busyanim);
+ busyanim->start();
+ busylabel->hide();
+ connect(&d.processing_thread_watcher_, SIGNAL(started()),
+ busylabel, SLOT(show()));
+ connect(&d.processing_thread_watcher_, SIGNAL(finished()),
+ busylabel, SLOT(hide()));
+
statusBar()->setSizeGripEnabled(true);
updateStatusBar();