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