mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +00:00
add busy spinner to status bar when threads are running in the background
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37304 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a2435792ce
commit
edf0e85f4b
BIN
lib/images/busy.gif
Normal file
BIN
lib/images/busy.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -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 @@ GuiView::GuiView(int id)
|
||||
// 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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user