#include <wxWidgetMesure2D.h>
Public Member Functions | |
wxWidgetMesure2D (wxWindow *parent) | |
~wxWidgetMesure2D () | |
void | OnActiveMessureTool (wxCommandEvent &event) |
void | OnVisibleMessureTool (wxCommandEvent &event) |
void | OnCloseContour (wxCommandEvent &event) |
void | OnVisibleInformation (wxCommandEvent &event) |
void | SetMesureScale (double mesureScale) |
manualContourModel * | GetManualContourModel () |
virtual void | ConfigureA (wxVtk2DBaseView *wxvtk2Dbaseview) |
Protected Member Functions | |
virtual wxWindow * | CreateWin1a (wxWindow *parent) |
Protected Attributes | |
wxVtk2DBaseView * | _wxvtk2Dbaseview |
Private Member Functions | |
void | ActiveMessureTool (bool ok) |
Private Attributes | |
wxCheckBox * | _cb_messuretool |
wxCheckBox * | _cb_mt_visible |
wxCheckBox * | _cb_closeContour |
wxCheckBox * | _cb_visibleText |
manualContourControler * | _manContourControl_1 |
manualContourModel * | _mContourModel_1 |
manualViewContour * | _mViewContour_1 |
Definition at line 12 of file wxWidgetMesure2D.h.
wxWidgetMesure2D::wxWidgetMesure2D | ( | wxWindow * | parent | ) |
Definition at line 11 of file wxWidgetMesure2D.cxx.
wxWidgetMesure2D::~wxWidgetMesure2D | ( | ) |
Definition at line 19 of file wxWidgetMesure2D.cxx.
void wxWidgetMesure2D::ActiveMessureTool | ( | bool | ok | ) | [private] |
Definition at line 113 of file wxWidgetMesure2D.cxx.
References _manContourControl_1, _wxvtk2Dbaseview, wxVtkBaseView::GetInteractorStyleBaseView(), and InteractorStyleMaracas::SetActive().
Referenced by OnActiveMessureTool(), and OnVisibleMessureTool().
00114 { 00115 ((vtkInteractorStyleBaseView*)_wxvtk2Dbaseview->GetInteractorStyleBaseView())->SetActiveAllInteractors(!ok); 00116 _manContourControl_1->SetActive( ok ); 00117 }
void wxWidgetMesure2D::ConfigureA | ( | wxVtk2DBaseView * | wxvtk2Dbaseview | ) | [virtual] |
Reimplemented in wxWidgetMesure2D_Plane.
Definition at line 59 of file wxWidgetMesure2D.cxx.
References _manContourControl_1, _mContourModel_1, _mViewContour_1, _wxvtk2Dbaseview, manualContourBaseControler::CreateNewManualContour(), CreateWin1a(), wxVtkBaseView::GetInteractorStyleBaseView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), manualViewContour::RefreshContour(), InteractorStyleMaracas::SetActive(), manualViewBaseContour::SetModel(), manualContourBaseControler::SetModelView(), manualViewBaseContour::SetRange(), manualViewBaseContour::SetWxVtkBaseView(), and manualContourBaseControler::SetZ().
00060 { 00061 _wxvtk2Dbaseview = wxvtk2Dbaseview; 00062 00063 // Contorno 1 00064 _manContourControl_1 = new manualContourControler(); 00065 _mContourModel_1 = new manualContourModel(); 00066 _mViewContour_1 = new manualViewContour(); 00067 _mViewContour_1->SetModel( _mContourModel_1 ); 00068 _mViewContour_1->SetWxVtkBaseView( _wxvtk2Dbaseview ); 00069 _mViewContour_1->SetRange( 1 ); 00070 00071 // EED 3 oct 2006 00072 // double spc[3]; 00073 // _wxvtk2Dbaseview->GetSpacing( spc ); 00074 // _mViewContour_1->SetSpacing( spc ); 00075 00076 00077 00078 _manContourControl_1->SetZ( 1000 ); 00079 _manContourControl_1->SetModelView( _mContourModel_1 , _mViewContour_1 ); 00080 ((vtkInteractorStyleBaseView*)_wxvtk2Dbaseview->GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _manContourControl_1 ); 00081 _manContourControl_1->CreateNewManualContour(); 00082 _manContourControl_1->SetActive( false ); 00083 _mViewContour_1->RefreshContour(); 00084 00085 //EED 27 Oct 2007 00086 00087 // this->ReplaceWindow( this->GetWindow1() , CreateWin1a(this) ); 00088 // this->ReplaceWindow( this->GetWindow2() , _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor() ); 00089 // CreateWin1a(this->GetWindow1() ); 00090 00091 wxBoxSizer *sizerA = new wxBoxSizer(wxHORIZONTAL); 00092 sizerA->Add( CreateWin1a( this->GetWindow1()) ,1, wxGROW ); 00093 this->GetWindow1()->SetSizer(sizerA); 00094 this->SetAutoLayout(true); 00095 this->Layout(); 00096 00097 wxBoxSizer *sizerB = new wxBoxSizer(wxHORIZONTAL); 00098 sizerB->Add( _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor() ,1, wxGROW ); 00099 this->GetWindow2()->SetSizer(sizerB); 00100 this->SetAutoLayout(true); 00101 this->Layout(); 00102 00103 00104 // this->SplitHorizontally( CreateWin1a(this) , _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor() , 2 ); 00105 00106 00107 //EEDxx2.4 00108 // this->FitInside(); 00109 }
wxWindow * wxWidgetMesure2D::CreateWin1a | ( | wxWindow * | parent | ) | [protected, virtual] |
Reimplemented in wxWidgetMesure2D_Plane, and wxWidgetMesure2D_Plane_in_MPR.
Definition at line 23 of file wxWidgetMesure2D.cxx.
References _cb_closeContour, _cb_messuretool, _cb_mt_visible, _cb_visibleText, OnActiveMessureTool(), OnCloseContour(), OnVisibleInformation(), and OnVisibleMessureTool().
Referenced by ConfigureA(), and wxWidgetMesure2D_Plane::CreateWin1a().
00024 { 00025 wxPanel *panel = new wxPanel(parent,-1); 00026 00027 _cb_messuretool = new wxCheckBox(panel,-1,_T("Active messure tool ")); 00028 _cb_mt_visible = new wxCheckBox(panel,-1,_T("Visibles ")); 00029 _cb_closeContour = new wxCheckBox(panel,-1,_T("Close/Open ")); 00030 _cb_visibleText = new wxCheckBox(panel,-1,_T("Information ")); 00031 00032 _cb_mt_visible->SetValue(true); 00033 _cb_closeContour->SetValue(true); 00034 _cb_visibleText->SetValue(true); 00035 00036 wxFlexGridSizer *sizer = new wxFlexGridSizer(4); 00037 00038 sizer->Add(_cb_messuretool); 00039 sizer->Add(_cb_mt_visible); 00040 sizer->Add(_cb_closeContour); 00041 sizer->Add(_cb_visibleText); 00042 00043 panel->SetAutoLayout(true); 00044 panel->SetSizer(sizer); 00045 panel->SetSize(400,30); 00046 panel->Layout(); 00047 //EEDxx2.4 00048 // panel->FitInside(); 00049 00050 Connect(_cb_messuretool->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &wxWidgetMesure2D::OnActiveMessureTool ); 00051 Connect(_cb_mt_visible->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &wxWidgetMesure2D::OnVisibleMessureTool ); 00052 Connect(_cb_closeContour->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &wxWidgetMesure2D::OnCloseContour ); 00053 Connect(_cb_visibleText->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &wxWidgetMesure2D::OnVisibleInformation ); 00054 00055 return panel; 00056 }
manualContourModel * wxWidgetMesure2D::GetManualContourModel | ( | ) |
Definition at line 176 of file wxWidgetMesure2D.cxx.
References _mContourModel_1.
00177 { 00178 return _mContourModel_1; 00179 }
void wxWidgetMesure2D::OnActiveMessureTool | ( | wxCommandEvent & | event | ) |
Definition at line 120 of file wxWidgetMesure2D.cxx.
References _cb_closeContour, _cb_messuretool, _cb_mt_visible, _cb_visibleText, _mViewContour_1, _wxvtk2Dbaseview, ActiveMessureTool(), wxVtk2DBaseView::Refresh(), wxVtkBaseView::RefreshView(), and manualViewBaseContour::SetVisible().
Referenced by CreateWin1a().
00121 { 00122 ActiveMessureTool( _cb_messuretool->GetValue() ); 00123 if ( _cb_messuretool->GetValue() == true ) 00124 { 00125 _cb_mt_visible->SetValue(true); 00126 _mViewContour_1->SetVisible( _cb_mt_visible->GetValue() ); 00127 _cb_closeContour->Enable(true); 00128 _cb_visibleText->Enable(true); 00129 } else{ 00130 _cb_closeContour->Enable(false); 00131 _cb_visibleText->Enable(false); 00132 } 00133 _wxvtk2Dbaseview->Refresh(); 00134 _wxvtk2Dbaseview->RefreshView(); 00135 }
void wxWidgetMesure2D::OnCloseContour | ( | wxCommandEvent & | event | ) |
Definition at line 154 of file wxWidgetMesure2D.cxx.
References _cb_closeContour, _mContourModel_1, _mViewContour_1, _wxvtk2Dbaseview, wxVtk2DBaseView::Refresh(), manualViewBaseContour::Refresh(), wxVtkBaseView::RefreshView(), and manualContourModel::SetCloseContour().
Referenced by CreateWin1a().
00155 { 00156 _mContourModel_1->SetCloseContour( _cb_closeContour->GetValue() ); 00157 _mViewContour_1->Refresh(); 00158 _wxvtk2Dbaseview->Refresh(); 00159 _wxvtk2Dbaseview->RefreshView(); 00160 00161 }
void wxWidgetMesure2D::OnVisibleInformation | ( | wxCommandEvent & | event | ) |
Definition at line 163 of file wxWidgetMesure2D.cxx.
References _cb_visibleText, _mViewContour_1, _wxvtk2Dbaseview, wxVtk2DBaseView::Refresh(), manualViewBaseContour::Refresh(), wxVtkBaseView::RefreshView(), and manualViewBaseContour::SetShowText().
Referenced by CreateWin1a().
00164 { 00165 _mViewContour_1->SetShowText( _cb_visibleText->GetValue() ); 00166 _mViewContour_1->Refresh(); 00167 _wxvtk2Dbaseview->Refresh(); 00168 _wxvtk2Dbaseview->RefreshView(); 00169 }
void wxWidgetMesure2D::OnVisibleMessureTool | ( | wxCommandEvent & | event | ) |
Definition at line 138 of file wxWidgetMesure2D.cxx.
References _cb_closeContour, _cb_messuretool, _cb_mt_visible, _cb_visibleText, _mViewContour_1, _wxvtk2Dbaseview, ActiveMessureTool(), wxVtk2DBaseView::Refresh(), manualViewBaseContour::Refresh(), wxVtkBaseView::RefreshView(), and manualViewBaseContour::SetVisible().
Referenced by CreateWin1a().
00139 { 00140 _cb_messuretool->SetValue( _cb_mt_visible->GetValue() ); 00141 if (_cb_messuretool->GetValue()==true) 00142 { 00143 _cb_closeContour->Enable(true); 00144 _cb_visibleText->Enable(true); 00145 } 00146 ActiveMessureTool( _cb_messuretool->GetValue() ); 00147 _mViewContour_1->SetVisible( _cb_mt_visible->GetValue() ); 00148 _mViewContour_1->Refresh(); 00149 _wxvtk2Dbaseview->Refresh(); 00150 _wxvtk2Dbaseview->RefreshView(); 00151 }
void wxWidgetMesure2D::SetMesureScale | ( | double | mesureScale | ) |
Definition at line 171 of file wxWidgetMesure2D.cxx.
References _mViewContour_1, and manualViewContour::SetMesureScale().
Referenced by wxMPRWidget::ConfigureVTK().
00172 { 00173 _mViewContour_1->SetMesureScale(mesureScale); 00174 }
wxCheckBox* wxWidgetMesure2D::_cb_closeContour [private] |
Definition at line 34 of file wxWidgetMesure2D.h.
Referenced by CreateWin1a(), OnActiveMessureTool(), OnCloseContour(), and OnVisibleMessureTool().
wxCheckBox* wxWidgetMesure2D::_cb_messuretool [private] |
Definition at line 32 of file wxWidgetMesure2D.h.
Referenced by CreateWin1a(), OnActiveMessureTool(), and OnVisibleMessureTool().
wxCheckBox* wxWidgetMesure2D::_cb_mt_visible [private] |
Definition at line 33 of file wxWidgetMesure2D.h.
Referenced by CreateWin1a(), OnActiveMessureTool(), and OnVisibleMessureTool().
wxCheckBox* wxWidgetMesure2D::_cb_visibleText [private] |
Definition at line 35 of file wxWidgetMesure2D.h.
Referenced by CreateWin1a(), OnActiveMessureTool(), OnVisibleInformation(), and OnVisibleMessureTool().
Definition at line 37 of file wxWidgetMesure2D.h.
Referenced by ActiveMessureTool(), and ConfigureA().
Definition at line 38 of file wxWidgetMesure2D.h.
Referenced by ConfigureA(), GetManualContourModel(), and OnCloseContour().
Definition at line 39 of file wxWidgetMesure2D.h.
Referenced by ConfigureA(), OnActiveMessureTool(), OnCloseContour(), OnVisibleInformation(), OnVisibleMessureTool(), and SetMesureScale().
wxVtk2DBaseView* wxWidgetMesure2D::_wxvtk2Dbaseview [protected] |
Definition at line 29 of file wxWidgetMesure2D.h.
Referenced by ActiveMessureTool(), wxWidgetMesure2D_Plane::CircleLine(), ConfigureA(), wxWidgetMesure2D_Plane::ConfigureCircleLine(), wxWidgetMesure2D_Plane::OnActiveCirlcle(), wxWidgetMesure2D_Plane::OnActiveLine(), OnActiveMessureTool(), OnCloseContour(), OnVisibleInformation(), and OnVisibleMessureTool().