]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/BaseWidget.h
MPR objects updated
[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     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_QT4
68
69 #endif // __CPPLUGINS__BASEWIDGET__H__
70
71 // eof - $RCSfile$