]> Creatis software - cpPlugins.git/blobdiff - lib/cpBaseQtApplication/Blocker.cxx
Moved to version 1.0
[cpPlugins.git] / lib / cpBaseQtApplication / Blocker.cxx
diff --git a/lib/cpBaseQtApplication/Blocker.cxx b/lib/cpBaseQtApplication/Blocker.cxx
deleted file mode 100644 (file)
index 634f25b..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#include <cpBaseQtApplication/Blocker.h>
-#include <QApplication>
-
-// -------------------------------------------------------------------------
-cpBaseQtApplication::Blocker::
-Blocker( )
-  : QObject( )
-{
-}
-
-// -------------------------------------------------------------------------
-cpBaseQtApplication::Blocker::
-~Blocker( )
-{
-}
-
-// -------------------------------------------------------------------------
-void cpBaseQtApplication::Blocker::
-block( )
-{
-  QApplication* app =
-    dynamic_cast< QApplication* >( QApplication::instance( ) );
-  if( app != NULL )
-  {
-    app->setOverrideCursor( Qt::WaitCursor );
-    app->installEventFilter( this );
-
-  } // fi
-}
-
-// -------------------------------------------------------------------------
-void cpBaseQtApplication::Blocker::
-unblock( )
-{
-  QApplication* app =
-    dynamic_cast< QApplication* >( QApplication::instance( ) );
-  if( app != NULL )
-  {
-    while( app->overrideCursor( ) )
-      app->restoreOverrideCursor( );
-    app->removeEventFilter( this );
-
-  } // fi
-}
-
-// -------------------------------------------------------------------------
-bool cpBaseQtApplication::Blocker::
-eventFilter( QObject* obj, QEvent* event )
-{
-  return( true ); // -> Block all events
-  /* NOTE: this should be the correct implementation:
-     switch( event->type( ) )
-     {
-     //list event you want to prevent here ...
-     case QEvent::KeyPress:
-     case QEvent::KeyRelease:
-     case QEvent::MouseButtonRelease:
-     case QEvent::MouseButtonPress:
-     case QEvent::MouseButtonDblClick:
-     //...
-     return( true );
-     } // hctiws
-     return( this->QObject::eventFilter( obj, event ) );
-  */
-}
-
-// eof - $RCSfile$