From e53ac8d65c17b4d2eb02b592df2e9fb5e204feec Mon Sep 17 00:00:00 2001 From: vargas Date: Tue, 4 May 2010 08:42:24 +0000 Subject: [PATCH] *** empty log message *** --- CMakeLists.txt | 2 + .../interfIOMenu.cxx | 10 +++ .../interfIOMenu.h | 1 + .../interfMainPanel.cxx | 4 + .../interfMainPanel.h | 1 + .../wxContourMainFrame.cxx | 17 +++++ .../wxContourMainFrame.h | 1 + .../GeneralArchitecture/128002 | 6 +- .../GeneralArchitecture.prj | 8 +- lib/doxygen/bouml/buttons/new_button.html | 74 +++++++++++++++++++ 10 files changed, 118 insertions(+), 6 deletions(-) create mode 100644 lib/doxygen/bouml/buttons/new_button.html diff --git a/CMakeLists.txt b/CMakeLists.txt index 997c9bd..637ef17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,8 @@ SET(USE_ITK ON) SET(USE_BOOST ON) SET(USE_XERCES ON) +OPTION (${PROJECT_NAME}_DOC "${PROJECT_NAME}_DOC" OFF) + CREA_FIND_AND_USE_LIBRARIES() SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}) diff --git a/lib/Interface_Icons_NDimensions/interfIOMenu.cxx b/lib/Interface_Icons_NDimensions/interfIOMenu.cxx index 5fc1d49..762a16d 100644 --- a/lib/Interface_Icons_NDimensions/interfIOMenu.cxx +++ b/lib/Interface_Icons_NDimensions/interfIOMenu.cxx @@ -26,6 +26,12 @@ void interfIOMenu::initButtons(wxEvtHandler* evtHandler) { nom.push_back("Import an OSIRIX XML file with contours"); funct.push_back((wxObjectEventFunction) &interfIOMenu:: onImport); + //First step, include the image and the alternate text of the button. + //Obviously, a callback function must also be specified. + path.push_back(datadir + "/test.png"); + nom.push_back("Performing a test on how to add a new button"); + funct.push_back((wxObjectEventFunction) &interfIOMenu:: onTest); + this->addButtons(path, nom); this->setVectorFunction(funct); @@ -46,6 +52,10 @@ void interfIOMenu::onImport(wxCommandEvent& event){ interfMainPanel::getInstance()->onImport(); } +void interfIOMenu::onTest(wxCommandEvent& event){ + interfMainPanel::getInstance()->onTest(); +} + interfIOMenu::~interfIOMenu() { } diff --git a/lib/Interface_Icons_NDimensions/interfIOMenu.h b/lib/Interface_Icons_NDimensions/interfIOMenu.h index 3edd182..4b599d7 100644 --- a/lib/Interface_Icons_NDimensions/interfIOMenu.h +++ b/lib/Interface_Icons_NDimensions/interfIOMenu.h @@ -20,6 +20,7 @@ public: void onSave(wxCommandEvent& event); void onImport(wxCommandEvent& event); + void onTest(wxCommandEvent& event); private: //wxEvtHandler* eventHandler; diff --git a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx index d4f34a0..fcf7d0d 100644 --- a/lib/Interface_Icons_NDimensions/interfMainPanel.cxx +++ b/lib/Interface_Icons_NDimensions/interfMainPanel.cxx @@ -438,6 +438,10 @@ void interfMainPanel::onImport(){ wxContourMainFrame::getInstance()->onImport(); } +void interfMainPanel::onTest(){ + wxContourMainFrame::getInstance()->onTest(); +} + void interfMainPanel::RefreshInterface() { wxContourMainFrame::getInstance()->RefreshInterface(); diff --git a/lib/Interface_Icons_NDimensions/interfMainPanel.h b/lib/Interface_Icons_NDimensions/interfMainPanel.h index 5181f29..bc57279 100644 --- a/lib/Interface_Icons_NDimensions/interfMainPanel.h +++ b/lib/Interface_Icons_NDimensions/interfMainPanel.h @@ -118,6 +118,7 @@ public: void onLoad(); void onSave(); void onImport(); + void onTest(); /////////////////////////////7 void RefreshInterface(); vtkImageData* getImageData(); diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 8c8beb0..1e6ff4c 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -1009,6 +1009,23 @@ void wxContourMainFrame::onImport(){ } } +void wxContourMainFrame::onTest(){ + std::string filename, filenamecontours; + wxFileDialog dialog(NULL, _T("Choose a XML Osirix File"), _T(""), _T(""), _T("*.xml"), wxOPEN ); + + if (dialog.ShowModal() == wxID_OK) + { + filename = dialog.GetPath().mb_str(); + filenamecontours = kernelManager->parseOsirixFile(filename); + + if(filenamecontours.compare("") != 0){ + onLoadContours(filenamecontours); + } + + } +} + + //AD: 29-05-09 void wxContourMainFrame::onSave(){ //CMRU 03-09-09----------------------------------------------------------------------------------------------- diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h index 9c50da0..b412f66 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h @@ -244,6 +244,7 @@ class wxContourMainFrame : public wxPanel { void onLoad(); void onSave(); void onImport(); + void onTest(); void openContours( FILE *pFile, FILE *pFileData, int version, bool staticContour ); void RefreshInterface(); diff --git a/lib/doxygen/bouml/GeneralArchitecture/GeneralArchitecture/128002 b/lib/doxygen/bouml/GeneralArchitecture/GeneralArchitecture/128002 index ac213aa..98cce42 100644 --- a/lib/doxygen/bouml/GeneralArchitecture/GeneralArchitecture/128002 +++ b/lib/doxygen/bouml/GeneralArchitecture/GeneralArchitecture/128002 @@ -1,7 +1,7 @@ -format 66 +format 67 "GeneralArchitecture" // GeneralArchitecture - revision 8 - modified_by 2 "davila" + revision 9 + modified_by 89 "vargas" // class settings //class diagram settings draw_all_relations default hide_attributes default hide_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_infonote default shadow default show_stereotype_properties default diff --git a/lib/doxygen/bouml/GeneralArchitecture/GeneralArchitecture/GeneralArchitecture.prj b/lib/doxygen/bouml/GeneralArchitecture/GeneralArchitecture/GeneralArchitecture.prj index a5637d3..a5a7974 100644 --- a/lib/doxygen/bouml/GeneralArchitecture/GeneralArchitecture/GeneralArchitecture.prj +++ b/lib/doxygen/bouml/GeneralArchitecture/GeneralArchitecture/GeneralArchitecture.prj @@ -1,7 +1,7 @@ -format 66 +format 67 "GeneralArchitecture" - revision 1 - modified_by 2 "davila" + revision 2 + modified_by 89 "vargas" @@ -36,5 +36,7 @@ format 66 mark_for_import + ncouples 1 + key "html dir" value "C:/Users/vargas/Documents/moi/Fichiers Importants/point-html/" package_ref 128002 // GeneralArchitecture end diff --git a/lib/doxygen/bouml/buttons/new_button.html b/lib/doxygen/bouml/buttons/new_button.html new file mode 100644 index 0000000..10d857d --- /dev/null +++ b/lib/doxygen/bouml/buttons/new_button.html @@ -0,0 +1,74 @@ + + +Adding a new Button + + + +

Adding +a new button to creaContours

+After taking a quick look at creaContours' +interface, +it's easy to agree that buttons are a very important part of it! +Adding, editing and deleting contours; extracting statistical data; +performing basic and complex +segmentation. All this is accomplished by pressing on the right button. +

This guide is concerned with the process of adding a new button to creaContours. +For that purpose, a detailed how-to guide is included in this +documentation alongside a sequence diagram that serves as an example of +the process that takes place +once a button is pressed.


+ + \ No newline at end of file -- 2.45.0