Program: wxMaracas
Module: $RCSfile: CutModel2MainPanel.cxx,v $
Language: C++
- Date: $Date: 2009/11/19 15:00:32 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/11/19 16:34:43 $
+ Version: $Revision: 1.3 $
Copyright: (c) 2002, 2003
License:
void CutModel2MainPanel::initialize(std::string path){
- cutmanager = new CutModel2Manager(path);
+ cutmanager = new CutModelManager(path);
_panelid = 0;
_wxauimanager = new wxAuiManager(this);
try{
checkInvariant();
cutmanager->setInteractor(interactor);
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
}
}
}
-void CutModel2MainPanel::checkInvariant()throw (CutModel2Exception){
+void CutModel2MainPanel::checkInvariant()throw (CutModelException){
if(cutmanager==NULL){
- throw CutModel2Exception("The manager is not initialize");
+ throw CutModelException("The manager is not initialize");
}
}
checkInvariant();
int id = addNewViewPanel();
- cutmanager->onAddCutModel2(id, getModelView(id));
+ cutmanager->onAddCutModel(id, getModelView(id));
_panelid++;
}
_wxauimanager->Update();
}
-int CutModel2MainPanel::addNewViewPanel()throw( CutModel2Exception){
+int CutModel2MainPanel::addNewViewPanel()throw( CutModelException){
- CutModel2View* viewpanel = new CutModel2View(this,cutmanager->getImageRange());
+ CutModelView* viewpanel = new CutModelView(this,cutmanager->getImageRange());
wxAuiPaneInfo paneinfo0;
_wxauimanager->AddPane(viewpanel, paneinfo0.DefaultPane().DestroyOnClose().Centre());
}
CutModel2View* CutModel2MainPanel::getModelView(int id)throw( CutModel2Exception){
- CutModel2View* current = NULL;
+ CutModelView* current = NULL;
for(int i = 0; i < viewpanels.size();i++){
if(viewpanels[i]->getId()==id){
current = viewpanels[i];
checkInvariant();
int result = cutmanager->Undo();
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
checkInvariant();
int result = cutmanager->Redo();
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
checkInvariant();
cutmanager->changeOpacity(id, opacity);
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
}
checkInvariant();
cutmanager->ShowViewBox(id, check);
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
}
checkInvariant();
cutmanager->ExecuteCut(id, range, isinside);
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
}
}
void CutModel2MainPanel::SaveCutModel2Data(std::string filename){
- cutmanager->SaveCutModel2Data(filename);
+ cutmanager->SaveCutModelData(filename);
}
void CutModel2MainPanel::LoadCutModel2Data(std::string filename){
- cutmanager->LoadCutModel2Data(filename);
+ cutmanager->LoadCutModelData(filename);
}
/**
**