Hi Miklos, yes, this would work. But you can modify the one in the resources, as this file was introduced to allow you to modify the behavior without chaning the source code. But your version works as well. Just as a note, I'm unsure what you mean by Qt resources, to include the OurCustomDisplayConfigMITKTools.xml you have to add it winthin the files.cmake into the very last section.
Regards, Christian ________________________________________ From: Miklos Espak [[email protected]] Sent: Thursday, March 28, 2013 11:52 PM To: Weber, Christian(1) Cc: mitk-users Subject: Re: [mitk-users] GlobalInteraction::INFORM_ONE Thank you so much Christian, this works very well! Am I right that if I want to disable the middle button move with the tools through the MITK API instead of modifying the xml in the MITK sources, then I have to put the following code fragment after (or instead) setting the notification policy to INFORM_ONE? std::list<mitk::ServiceReference> listEventObserver; ServiceTracker<InteractionEventObserver*>* eventObserverTracker= new ServiceTracker<InteractionEventObserver*>(GetModuleContext()); eventObserverTracker->Open(); eventObserverTracker->GetServiceReferences(listEventObserver); for (std::list<mitk::ServiceReference>::iterator it = listEventObserver.begin(); it != listEventObserver.end(); ++it) { InteractionEventObserver* interactionEventObserver = eventObserverTracker->GetService(*it); if (interactionEventObserver != NULL) { DisplayInteractor* displayInteractor = dynamic_cast<DisplayInteractor*>(interactionEventObserver); if (displayInteractor != NULL) { // here the regular configuration is loaded again displayInteractor->LoadEventConfig("OurCustomDisplayConfigMITKTools.xml","Mitk"); } } } eventObserverTracker->Close(); delete eventObserverTracker; ... and add our custom display config to the Qt resources? Thanks, Miklos ------------------------------------------------------------------------------ Own the Future-Intel(R) Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2 _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
