From 1fadbd2eff9144dd071f862fb268809dda2400d1 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Fri, 5 Mar 2010 17:54:39 +0000 Subject: [PATCH] *** empty log message *** --- .../CutModule/interface/CutModelMainPanel.cxx | 52 +++++++++++-------- .../src/CutModule/kernel/CutModelPolygon.cxx | 4 +- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.cxx b/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.cxx index a0622b4..188d243 100644 --- a/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.cxx +++ b/lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.cxx @@ -3,8 +3,8 @@ Program: wxMaracas Module: $RCSfile: CutModelMainPanel.cxx,v $ Language: C++ -Date: $Date: 2010/02/24 13:56:06 $ -Version: $Revision: 1.6 $ +Date: $Date: 2010/03/05 17:54:39 $ +Version: $Revision: 1.7 $ Copyright: (c) 2002, 2003 License: @@ -59,7 +59,7 @@ void CutModelMainPanel::initialize(std::string path){ //RaC 5-02-2010 Add tabs _notebook = new wxAuiNotebook(this,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxAUI_NB_TOP |wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS); - _notebook->AddPage(new ToolBarCutModel(_notebook),"Cutter",true); + _notebook->AddPage(new ToolBarCutModel(_notebook),_T("Cutter"),true); //_wxauimanager->AddPane(new ToolBarCutModel(this),paneinfo.ToolbarPane().Top()); _wxauimanager->AddPane(_notebook,paneinfo.Center()); addPolygonCutterTab(); @@ -161,7 +161,7 @@ void CutModelMainPanel::onCheckChanged(){ btnExecutePolygonCut->Enable(false); _notebook->GetPage(0)->Enable(false); _radioinsideout->Enable(false); - lblMessagePolygon->SetLabel("Drawing polygon..."); + lblMessagePolygon->SetLabel(_T("Drawing polygon...")); } else { @@ -172,7 +172,7 @@ void CutModelMainPanel::onCheckChanged(){ btnExecutePolygonCut->Enable(true); _notebook->GetPage(0)->Enable(true); _radioinsideout->Enable(true); - lblMessagePolygon->SetLabel("Contour saved! Click on Execute Cut"); + lblMessagePolygon->SetLabel(_T("Contour saved! Click on Execute Cut")); } cutmanager->UpdatePolygon(_isCheck); @@ -181,11 +181,11 @@ void CutModelMainPanel::onCheckChanged(){ //RaC -void CutModelMainPanel::onExecuteCutPolygon(){ +void CutModelMainPanel::onExecuteCutPolygon() +{ //Cuts Polygon cutmanager->ExecuteCutPolygon(_radioinsideout->GetSelection()); - lblMessagePolygon->SetLabel("No contour drawed"); - + lblMessagePolygon->SetLabel(_T("No contour drawed")); } @@ -204,8 +204,11 @@ void CutModelMainPanel::onAddCutModel(){ showErrorDialog(e.getCause()); } } -void CutModelMainPanel::ShowCurrentPanel(int id){ - for(int i = 0; i < viewpanels.size();i++){ + +void CutModelMainPanel::ShowCurrentPanel(int id) +{ + int i; + for(i = 0; i < (int) viewpanels.size();i++){ if(viewpanels[i]->getId()==id){ _wxauimanager->GetPane(viewpanels[i]).Show(true); cutmanager->RefreshActor(id); @@ -229,21 +232,27 @@ int CutModelMainPanel::addNewViewPanel()throw( CutModelException){ } -CutModelView* CutModelMainPanel::getModelView(int id)throw( CutModelException){ - +CutModelView* CutModelMainPanel::getModelView(int id)throw( CutModelException) +{ CutModelView* current = NULL; - for(int i = 0; i < viewpanels.size();i++){ - if(viewpanels[i]->getId()==id){ + int i; + for(i = 0; i < (int)viewpanels.size();i++) + { + if(viewpanels[i]->getId()==id) + { current = viewpanels[i]; } } - if(current == NULL){ + if(current == NULL) + { std::string s = "Id not found"; throw CutModelException(s); } return current; } -void CutModelMainPanel::onUndo(){ + +void CutModelMainPanel::onUndo() + { try{ checkInvariant(); int result = cutmanager->Undo(); @@ -331,7 +340,8 @@ void CutModelMainPanel::ExecuteCut(int id, double* range, bool isinside){ } void CutModelMainPanel::ExecuteAll(){ - for(int i = 0; i < viewpanels.size(); i++){ + int i; + for(i = 0; i < (int)viewpanels.size(); i++){ viewpanels[i]->ExecuteCut(); } @@ -381,12 +391,12 @@ void CutModelMainPanel::addPolygonCutterTab(){ panel->SetSizer(sizer); sizer->AddSpacer(20); - wxCheckBox *item = new wxCheckBox(panel,10,"Draw Polygon",wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,""); + wxCheckBox *item = new wxCheckBox(panel,10,_T("Draw Polygon"),wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,_T("") ); item->SetValue(false); Connect(item->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)(&PolygonCutterEventHandlerCutModel::onCheckChanged)); sizer->Add(item, 0, wxALIGN_LEFT); - lblMessagePolygon = new wxStaticText(panel,30,"No contour drawed",wxDefaultPosition,wxDefaultSize,0,""); + lblMessagePolygon = new wxStaticText(panel,30,_T("No contour drawed"),wxDefaultPosition,wxDefaultSize,0,_T("") ); sizer->Add(lblMessagePolygon, 0, wxALIGN_LEFT); wxString choices0[2]; @@ -395,12 +405,12 @@ void CutModelMainPanel::addPolygonCutterTab(){ _radioinsideout = new wxRadioBox(panel,-1,_T(""), wxDefaultPosition, wxDefaultSize,2,choices0); sizer->Add(_radioinsideout, wxALIGN_LEFT); - btnExecutePolygonCut = new wxButton(panel,20,"Execute Cut",wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,""); + btnExecutePolygonCut = new wxButton(panel,20,_T("Execute Cut"),wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,_T("") ); Connect(btnExecutePolygonCut->GetId(), wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)(&PolygonCutterEventHandlerCutModel::onExecuteCutPolygon)); sizer->Add(btnExecutePolygonCut, 0, wxALIGN_LEFT); - _notebook->AddPage(panel, "Polygon Cutter", false); + _notebook->AddPage(panel, _T("Polygon Cutter"), false); } diff --git a/lib/maracasVisuLib/src/CutModule/kernel/CutModelPolygon.cxx b/lib/maracasVisuLib/src/CutModule/kernel/CutModelPolygon.cxx index 1d5691b..f29fe9b 100644 --- a/lib/maracasVisuLib/src/CutModule/kernel/CutModelPolygon.cxx +++ b/lib/maracasVisuLib/src/CutModule/kernel/CutModelPolygon.cxx @@ -1,6 +1,6 @@ -#include "CutModelPolygon.H" +#include "CutModelPolygon.h" CutModelPolygon::CutModelPolygon() @@ -357,4 +357,4 @@ void CutModelPolygon::setPoints(vtkPoints *pPoints) void CutModelPolygon::setDirection(double *pDirection) { _direction=pDirection; -} \ No newline at end of file +} -- 2.45.1