Hi Steffen, generally for this we introduced the interactors, which are connected to the GlobalInteraction. They receive mitkEvents and act according to a statemachine-pattern. See http://www.mitk.org/interaction.html
Best Regards, Ingmar Dipl.-Inform. Med. Ingmar Wegner DKFZ German Cancer Research Center (Deutsches Krebsforschungszentrum) Member of the Helmholtz Association Division Medical and Biological Informatics E130 Im Neuenheimer Feld 280 D-69120 Heidelberg Phone: 49-(0)6221-42-3543 Fax: 49-(0)6221-42-2345 E-Mail: [EMAIL PROTECTED] Web: www.dkfz.de Confidentiality Note: This message is intended only for the use of the named recipient(s) and may obtain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete the message. Any unauthorized use of the information contained in this message is prohibited. -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Steffen Oeltze Gesendet: Freitag, 22. Februar 2008 17:50 An: Baumhauer Matthias; [email protected] Betreff: Re: [mitk-users] keyPress event Matthias, thanks for your quick reply. I actually just want to call a method whenever the user presses a key in my QmitkRenderWindow. I was wondering if there is a simple method as in VTK: vtkCallbackCommand * keypressCB = vtkCallbackCommand::New(); keypressCB->SetCallback(myKeyPressCallback); vtkInteractorStyleTrackballCamera * vtk_style = vtkInteractorStyleTrackballCamera::New(); vtk_style->AddObserver(vtkCommand::KeyPressEvent, keypressCB); Cheers, Steffen Baumhauer Matthias schrieb: > Steffen, > > This is a highly QT related question, you should check QT > documentation/forums. > > Installing an event filter could be one way for receiving all QT events, > however there might be others depending on your particular interest. > > > Code-Snippset: > Somewhere in Qmitk-code: > > myQObjectFromWhichIWantToReceiveEvents->installEventFilter(myclass); > > bool myclass::eventFilter( QObject *o, QEvent *e ) > { > if ( e->type() == QEvent::KeyPress ) > { > // do something > > return TRUE; // eat event > } > else > { > // standard event processing > return FALSE; > } > > } > > > > Regards, > > Matthias > > Matthias Baumhauer Phone: (+49) 6221/42-2328 > Deutsches Krebsforschungszentrum Fax: (+49) 6221/42-2345 > Div. Medical and Biological Informatics (E130) > Im Neuenheimer Feld 280 email: [EMAIL PROTECTED] > D-69120 Heidelberg, Germany http://www.dkfz-heidelberg.de/de/mbi > > > > -----Ursprüngliche Nachricht----- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Steffen Oeltze > Gesendet: Freitag, 22. Februar 2008 17:13 > An: [email protected] > Betreff: [mitk-users] keyPress event > > Hi, > > is there anybody out there who can give me a hint on how to integrate a > simple keyPress-event handling in MITK? A simple example would help a lot. > > Thanks, > Steffen > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users > > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
