]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/BaseWidget.h
Code cleaning
[cpPlugins.git] / lib / cpPlugins / BaseWidget.h
1 #ifndef __CPPLUGINS__BASEWIDGET__H__
2 #define __CPPLUGINS__BASEWIDGET__H__
3
4 #include <cpPlugins/Config.h>
5
6 #include <cpPlugins/ProcessObject.h>
7
8 // Some forward declarations
9 class vtkRenderWindowInteractor;
10 namespace cpExtensions
11 {
12   namespace QT
13   {
14     class SimpleMPRWidget;
15   }
16 }
17
18 namespace cpPlugins
19 {
20   /**
21    */
22   class cpPlugins_EXPORT BaseWidget
23     : public ProcessObject
24   {
25   public:
26     typedef BaseWidget                      Self;
27     typedef ProcessObject                   Superclass;
28     typedef itk::SmartPointer< Self >       Pointer;
29     typedef itk::SmartPointer< const Self > ConstPointer;
30
31     typedef cpExtensions::QT::SimpleMPRWidget TMPRWidget;
32
33   public:
34     itkTypeMacro( BaseWidget, ProcessObject );
35     cpPlugins_Id_Macro( Widgets::BaseWidget, Widgets );
36
37   public:
38     virtual itk::ModifiedTimeType GetMTime( ) const ITK_OVERRIDE;
39
40     const TMPRWidget* GetMPRViewer( ) const;
41     const vtkRenderWindowInteractor*  GetSingleInteractor( ) const;
42
43     void SetMPRViewer( TMPRWidget* v );
44     void SetSingleInteractor( vtkRenderWindowInteractor* i );
45
46     virtual bool IsInteractive( ) ITK_OVERRIDE;
47     virtual void SetInteractionObjects(
48       const std::vector< void* >& objs
49       ) ITK_OVERRIDE;
50
51   protected:
52     BaseWidget( );
53     virtual ~BaseWidget( );
54
55   private:
56     // Purposely not implemented
57     BaseWidget( const Self& );
58     Self& operator=( const Self& );
59
60   protected:
61     TMPRWidget*                m_MPRViewer;
62     vtkRenderWindowInteractor* m_SingleInteractor;
63   };
64
65 } // ecapseman
66
67 #endif // __CPPLUGINS__BASEWIDGET__H__
68
69 // eof - $RCSfile$