Thanks.
M


On 3 May 2012, at 11:24, Sascha Zelzer wrote:

> Hi,
> 
> On 05/03/2012 11:59 AM, Clarkson, Matt wrote:
>> Hi there,
>> 
>> I have a question about the new QmitkAbstractInterface, and the new concept 
>> of ZombieViews.
>> 
>> I was to have a plugin that will listen to the focus manager, so as each 
>> QmitkRenderWindow takes focus, the plugin knows which is the current window.
>> Under the QmitkFunctionality I would have registered to the 
>> mitk::FocusManager in the Activated and Deactivated methods, so that when 
>> the View was closed, it was not listening or updating itself unnecessarily.
> In the old QmitkFunctionality class, "activated" and "deactivated" was kind 
> of misleading and only made sense for views which mess with the global 
> application state (like QmitkMeasurementView does by registering interactors).
>> So, now, do I just implement ILifeCycleAwarePart, tracking Activated and 
>> Deactivated states as appropriate? and register with the FocusManager in 
>> Activated and de-register in Deactivated.
> Right, you would just inherit from ILifeCycleAwarePart. But activated and 
> deactivated now maps one to one to the normal life-cycle of views, meaning 
> activated is called if a view is focused (it may have been visible already) 
> and deactivated if it looses focus (because another view is focused, or it is 
> hidden or closed).
>> The given plugin does not "affect" the application state other than through 
>> updating image in the DataStorage, so it does not do things like add 
>> interactors, or remove crosshairs, so as I understand it I do not need to 
>> implement the IZombieViewPart to cleanup.
>> 
>> Does that sound about right?
> Yes, it doesn't look like you need to implement IZombieViewPart. In your 
> case, you probably just want to add your listeners in the 
> "CreateQtPartControl" method and de-registering them in the view's 
> destructor. So you even wouldn't need to implement ILifecycleAwarePart.
>> 
>> Also, is QmitkMeasurementView a good example?  If not, is there another 
>> example?
> This is a zombie ;-) so it might be more complex than what you are looking 
> for. There are also QmitkImageNavigatorView and QmitkImageStatisticsView you 
> could look at.
> 
> Best,
> Sascha
> 



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to