X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_Icons_NDimensions%2FinterfMainPanel.cxx;fp=lib%2FInterface_Icons_NDimensions%2FinterfMainPanel.cxx;h=7d77c933622ace10e4195237b09823ef94fbae81;hb=866b5d203f30800ea0c9c7ab22901776c695ffd0;hp=a1d38ca12cb2c264a1c5e1744e05a9092a39af4b;hpb=68f065a14e782c42c60c7378f8f18c353bc7d9ac;p=creaContours.git diff --git a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx index a1d38ca..7d77c93 100644 --- a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx +++ b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx @@ -55,6 +55,7 @@ interfMainPanel::interfMainPanel(wxWindow * parent, int sizex, int sizey, wxEvtH colorImageLayerPanel = NULL; currentWindow = NULL; testPanel = NULL; + flipPanel = NULL; //CMRU 17-08-09 ------------------------------------------------------------------ infoPanelCalibration = NULL; @@ -472,11 +473,14 @@ void interfMainPanel::onSave() wxContourMainFrame::getInstance()->onSave(); } -void interfMainPanel::onImport(){ +void interfMainPanel::onImport() +{ wxContourMainFrame::getInstance()->onImport(); } -void interfMainPanel::onTest(){ +void interfMainPanel::onTest() +{ + printf("EED interfMainPanel::onTest \n"); if(testPanel==NULL) { testPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, @@ -485,17 +489,15 @@ void interfMainPanel::onTest(){ testPanel->SetSizer(flexsizer, true); testPanel->SetAutoLayout( true ); panelTest = new interfTestPanel(testPanel); - - wxStaticText* stattext = new wxStaticText(mirrorPanel, -1, + wxStaticText* stattext = new wxStaticText(testPanel, -1, wxString(_T(" Test Panel ")), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(""))); - flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE); flexsizer->Add(panelTest, wxEXPAND); testPanel->Layout(); - showPanel(testPanel); } + showPanel(testPanel); } void interfMainPanel::RefreshInterface() @@ -964,6 +966,38 @@ void interfMainPanel::SetContourGroup(int contourGroup) wxContourMainFrame::getInstance()->SetContourGroup( contourGroup); } + +void interfMainPanel::onFlipContours() +{ + printf("EED interfMainPanel::onFlipContours() \n"); + if(flipPanel==NULL) + { + flipPanel = new wxPanel(interfMainPanel::getInstance()->getInfoPanel(), -1, wxDefaultPosition, + wxDefaultSize, wxBORDER_STATIC, wxString(_T(""))); + wxFlexGridSizer* flexsizer = new wxFlexGridSizer(1); + flipPanel->SetSizer(flexsizer, true); + flipPanel->SetAutoLayout( true ); + panelFlip = new interfFlipPanel(flipPanel); + wxStaticText* stattext = new wxStaticText(flipPanel, -1, + wxString(_T(" Flip Contours ")), + wxDefaultPosition, wxDefaultSize, + wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(""))); + flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE); + flexsizer->Add(panelFlip, wxEXPAND); + flipPanel->Layout(); + } + showPanel(flipPanel); +} + + +void interfMainPanel::FlipContours(int typeContourFlip, int flipDirection) +{ + printf("EED interfMainPanel::FlipContours( %d , %d ) \n",typeContourFlip, flipDirection ); + wxContourMainFrame::getInstance()->FlipContours( typeContourFlip , flipDirection ); +} + + + //CMRU 17-08-09 --------------------------------------------- void interfMainPanel::onPrintLabel () {