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