]> Creatis software - creaMaracasVisu.git/commitdiff
*** empty log message ***
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 5 Mar 2010 17:54:39 +0000 (17:54 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 5 Mar 2010 17:54:39 +0000 (17:54 +0000)
lib/maracasVisuLib/src/CutModule/interface/CutModelMainPanel.cxx
lib/maracasVisuLib/src/CutModule/kernel/CutModelPolygon.cxx

index a0622b4176268099f622771cdc72a894a57e2964..188d243b465f98ac4ed33f6bb6603cc7a719c25a 100644 (file)
@@ -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);
 
 }
 
index 1d5691b8bc937e7fac15bb42d3344a591aef7197..f29fe9bea476c201a65dca19803acf45b7087669 100644 (file)
@@ -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
+}