Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkStepperAdapter.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "QmitkStepperAdapter.h"
18 
19 QmitkStepperAdapter::QmitkStepperAdapter(QObject *navigator, mitk::Stepper *stepper, const char *)
20  : QObject(navigator), m_Stepper(stepper)
21 {
22  connect(this, SIGNAL(SendStepper(mitk::Stepper *)), navigator, SLOT(SetStepper(mitk::Stepper *)));
23  connect(this, SIGNAL(Refetch()), navigator, SLOT(Refetch()));
24  emit SendStepper(stepper);
25 
27  m_ObserverTag = m_Stepper->AddObserver(itk::ModifiedEvent(), m_ItkEventListener);
28 
29  emit Refetch();
30 }
31 
33 {
34  m_ItkEventListener->Delete();
35  m_Stepper->RemoveObserver(m_ObserverTag);
36 }
void SetStepper(mitk::Stepper *stepper)
void SendStepper(mitk::Stepper *)
mitk::Stepper::Pointer m_Stepper
Helper class to step through a list.
Definition: mitkStepper.h:51
QmitkStepperAdapter(QObject *navigator, mitk::Stepper *stepper, const char *name)
ItkEventListener::Pointer m_ItkEventListener