1 // SALOME SALOMEGUI : implementation of desktop and GUI kernel
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : QAD_WaitCursor.h
8 // Author : Vadim SANDLER
12 #ifndef QAD_WAITCURSOR_H
13 #define QAD_WAITCURSOR_H
15 #include <qapplication.h>
18 class QAD_EXPORT QAD_WaitCursor {
21 QAD_WaitCursor() : myStarted(false) { start(); }
23 ~QAD_WaitCursor() { stop(); }
25 // sets WAIT cursor if not set yet
26 void start() { if (!myStarted) { QApplication::setOverrideCursor(Qt::waitCursor); myStarted = true; } }
27 // clears WAIT cursor if set
28 void stop() { if (myStarted) { QApplication::restoreOverrideCursor(); myStarted = false; } }
29 // returns true if WAIT cursor is active
30 bool isStarted() { return myStarted; }