Public Member Functions

QmitkCallbackFromGUIThread Class Reference

Qt specific implementation of mitk::CallbackFromGUIThreadImplementation. More...

#include <QmitkCallbackFromGUIThread.h>

Inheritance diagram for QmitkCallbackFromGUIThread:
Inheritance graph
[legend]
Collaboration diagram for QmitkCallbackFromGUIThread:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void CallThisFromGUIThread (itk::Command *, itk::EventObject *)
 Change the current application cursor.
 QmitkCallbackFromGUIThread ()
virtual ~QmitkCallbackFromGUIThread ()
virtual bool event (QEvent *e)

Detailed Description

Qt specific implementation of mitk::CallbackFromGUIThreadImplementation.

Definition at line 29 of file QmitkCallbackFromGUIThread.h.


Constructor & Destructor Documentation

QmitkCallbackFromGUIThread::QmitkCallbackFromGUIThread (  )
QmitkCallbackFromGUIThread::~QmitkCallbackFromGUIThread (  ) [virtual]

Definition at line 63 of file QmitkCallbackFromGUIThread.cpp.

{
}

Member Function Documentation

void QmitkCallbackFromGUIThread::CallThisFromGUIThread ( itk::Command *  cmd,
itk::EventObject *  e 
) [virtual]

Change the current application cursor.

Implements mitk::CallbackFromGUIThreadImplementation.

Definition at line 67 of file QmitkCallbackFromGUIThread.cpp.

{
  QApplication::instance()->postEvent( this, new QmitkCallbackEvent(cmd, e) );
}
bool QmitkCallbackFromGUIThread::event ( QEvent *  e ) [virtual]

Definition at line 72 of file QmitkCallbackFromGUIThread.cpp.

References QmitkCallbackEvent::command(), and QmitkCallbackEvent::itkevent().

{
  QmitkCallbackEvent* event( dynamic_cast<QmitkCallbackEvent*>(e) );

  if (!event) return false;

  itk::Command* cmd( event->command() );
  


  if (cmd)
  {
    if (event->itkevent())
    {
      cmd->Execute( (const itk::Object*) NULL, // no itk::Object here
                    *(event->itkevent()) );
    }
    else
    {
      const itk::NoEvent dummyEvent;
      cmd->Execute( (const itk::Object*) NULL, // no itk::Object here
                    dummyEvent );
    }
  }
  
  return true;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines