]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/BaseWidget.cxx
First dump for version 0.1.0
[cpPlugins.git] / lib / cpPlugins / BaseWidget.cxx
1 #include <cpPlugins/BaseWidget.h>
2
3 // -------------------------------------------------------------------------
4 const cpPlugins::BaseWidget::TMPRWidget* cpPlugins::BaseWidget::
5 GetMPRViewer( ) const
6 {
7   return( this->m_MPRViewer );
8 }
9
10 // -------------------------------------------------------------------------
11 const vtkRenderWindowInteractor* cpPlugins::BaseWidget::
12 GetSingleInteractor( ) const
13 {
14   return( this->m_SingleInteractor );
15 }
16
17 // -------------------------------------------------------------------------
18 void cpPlugins::BaseWidget::
19 SetMPRViewer( cpPlugins::BaseWidget::TMPRWidget* v )
20 {
21   if( this->m_MPRViewer != v )
22   {
23     this->m_MPRViewer = v;
24     this->Modified( );
25
26   } // fi
27 }
28
29 // -------------------------------------------------------------------------
30 void cpPlugins::BaseWidget::
31 SetSingleInteractor( vtkRenderWindowInteractor* i )
32 {
33   if( this->m_SingleInteractor != i )
34   {
35     this->m_SingleInteractor = i;
36     this->Modified( );
37
38   } // fi
39 }
40
41 // -------------------------------------------------------------------------
42 cpPlugins::BaseWidget::
43 BaseWidget( )
44   : Superclass( ),
45     m_MPRViewer( NULL ),
46     m_SingleInteractor( NULL )
47 {
48 }
49
50 // -------------------------------------------------------------------------
51 cpPlugins::BaseWidget::
52 ~BaseWidget( )
53 {
54   // Warning: Qt's smartpointers require this to avoid segfaults
55   this->m_MPRViewer = NULL;
56   this->m_SingleInteractor = NULL;
57 }
58
59 // eof - $RCSfile$