1 #include "SUIT_OverrideCursor.h"
3 /*!Constructor. Initialize wait cursor.*/
4 SUIT_OverrideCursor::SUIT_OverrideCursor()
6 QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
10 SUIT_OverrideCursor::SUIT_OverrideCursor( const QCursor& cursor )
12 QApplication::setOverrideCursor( cursor );
15 /*!Destructor. restoring override cursor.*/
16 SUIT_OverrideCursor::~SUIT_OverrideCursor()
18 QApplication::restoreOverrideCursor();
21 /*! Check cursors is empty */
22 bool SUIT_OverrideCursor::isActive() const
24 return myCursors.isEmpty();
28 void SUIT_OverrideCursor::suspend()
33 while ( QApplication::overrideCursor() )
35 myCursors.prepend( *QApplication::overrideCursor() );
36 QApplication::restoreOverrideCursor();
41 void SUIT_OverrideCursor::resume()
46 for ( QValueList<QCursor>::const_iterator it = myCursors.begin(); it != myCursors.end(); ++it )
47 QApplication::setOverrideCursor( *it );