1 #include "SUIT_OverrideCursor.h"
3 SUIT_OverrideCursor::SUIT_OverrideCursor()
5 QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
8 SUIT_OverrideCursor::SUIT_OverrideCursor( const QCursor& cursor )
10 QApplication::setOverrideCursor( cursor );
13 SUIT_OverrideCursor::~SUIT_OverrideCursor()
15 QApplication::restoreOverrideCursor();
18 bool SUIT_OverrideCursor::isActive() const
20 return myCursors.isEmpty();
23 void SUIT_OverrideCursor::suspend()
28 while ( QApplication::overrideCursor() )
30 myCursors.prepend( *QApplication::overrideCursor() );
31 QApplication::restoreOverrideCursor();
35 void SUIT_OverrideCursor::resume()
40 for ( QValueList<QCursor>::const_iterator it = myCursors.begin(); it != myCursors.end(); ++it )
41 QApplication::setOverrideCursor( *it );