X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMProjectHelpDialog.cpp;h=baf51a9065c012a58a232435df561d3a6ed463d6;hb=72575e97cabe50ea9f2d593bba1b0dcd69d35514;hp=7ced2c2c62daff1a08565d02ad71ee694c81e74b;hpb=9db5150d933dff7a6b833c54847d1c35ac38a9c6;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMProjectHelpDialog.cpp b/lib/creaDevManagerLib/wxCDMProjectHelpDialog.cpp index 7ced2c2..baf51a9 100644 --- a/lib/creaDevManagerLib/wxCDMProjectHelpDialog.cpp +++ b/lib/creaDevManagerLib/wxCDMProjectHelpDialog.cpp @@ -41,15 +41,12 @@ BEGIN_EVENT_TABLE(wxCDMProjectHelpDialog, wxDialog) EVT_BUTTON(ID_BUTTON_CANCEL, wxCDMProjectHelpDialog::OnFinish) -EVT_BUTTON(ID_BUTTON_GOTO_PACKAGE_MANAGER, wxCDMProjectHelpDialog::OnManagePackages) -EVT_BUTTON(ID_BUTTON_GOTO_LIB_MANAGER, wxCDMProjectHelpDialog::OnManageLibraries) -EVT_BUTTON(ID_BUTTON_GOTO_APPLI_MANAGER, wxCDMProjectHelpDialog::OnManageApplications) EVT_CHECKBOX(ID_CHECKBOX_DISABLE_HELP, wxCDMProjectHelpDialog::OnDisableHelp) END_EVENT_TABLE() wxCDMProjectHelpDialog::wxCDMProjectHelpDialog( wxWindow* parent, - wxCDMProjectDescriptionPanel* projectDescription, + modelCDMProject* project, wxWindowID id, const wxString& caption, const wxPoint& position, @@ -58,7 +55,7 @@ wxCDMProjectHelpDialog::wxCDMProjectHelpDialog( ) { wxCDMProjectHelpDialog::Create(parent, id, caption, position, size, style); - this->projectDescription = projectDescription; + this->project = project; } wxCDMProjectHelpDialog::~wxCDMProjectHelpDialog() @@ -100,7 +97,9 @@ void wxCDMProjectHelpDialog::CreateControls() "- Applications: Stand alone programs that use the functions available on your libraries.\n" "- Configuration file: Contains the information of what should or shouldn't be compiled from this project.\n" "\n" - "To the right of the project you will find a tree with the project structure and it's actual content.\n" + "To the right of the description panel you will find a tree with the project structure and it's actual content.\n" + "Bellow the description panel you will find a panel with the project's main actions when you're ready to compile " + "the project. you can hover on this buttons to see more information about what they do.\n" "When you create a project it comes with a default package. If you need to work on it or if you want to create more " "packages you can do it by clicking the \"Package Manager\" button bellow. You can also work with Libraries and " "Applications. Just click in the \"Library Manager\" button or \"Application manager\" button to start working " @@ -124,118 +123,6 @@ void wxCDMProjectHelpDialog::OnFinish(wxCommandEvent& event) this->EndDialog(wxID_CANCEL); } -void wxCDMProjectHelpDialog::OnManagePackages(wxCommandEvent& event) -{ - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED); - newEvent->SetId(1); - newEvent->SetString(wxT("manage_packages")); - newEvent->SetInt(this->projectDescription->GetProject()->GetId()); - wxPostEvent(this->GetParent(), *newEvent); - event.Skip(); - - this->EndDialog(wxID_OK); -} - -void wxCDMProjectHelpDialog::OnManageLibraries(wxCommandEvent& event) -{ - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED); - newEvent->SetId(1); - newEvent->SetString(wxT("manage_libraries")); - wxPostEvent(this->GetParent(), *newEvent); - - wxCommandEvent* newEvent1 = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED); - - if(this->projectDescription->GetProject()->GetLib() != NULL) - { - int CMId = this->projectDescription->GetProject()->GetLib()->GetId(); - newEvent1->SetInt(CMId); - newEvent1->SetId(0); - wxPostEvent(this->GetParent(), *newEvent1); - } - - event.Skip(); - - this->EndDialog(wxID_OK); -} - -void wxCDMProjectHelpDialog::OnManageApplications(wxCommandEvent& event) -{ - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_DISPLAY_CHANGED); - newEvent->SetId(1); - newEvent->SetString(wxT("manage_applications")); - wxPostEvent(this->GetParent(), *newEvent); - - wxCommandEvent* newEvent1 = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED); - - if(this->projectDescription->GetProject()->GetAppli() != NULL) - { - int CMId = this->projectDescription->GetProject()->GetAppli()->GetId(); - newEvent1->SetInt(CMId); - newEvent1->SetId(0); - wxPostEvent(this->GetParent(), *newEvent1); - } - - event.Skip(); - - this->EndDialog(wxID_OK); -} - -void wxCDMProjectHelpDialog::OnAppliMouseEnter(wxMouseEvent& event) -{ - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED); - - if(this->projectDescription->GetProject()->GetAppli() != NULL) - { - int AppId = this->projectDescription->GetProject()->GetAppli()->GetId(); - newEvent->SetInt(AppId); - newEvent->SetId(0); - wxPostEvent(this->GetParent(), *newEvent); - } - event.Skip(); -} - -void wxCDMProjectHelpDialog::OnAppliMouseExit(wxMouseEvent& event) -{ - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED); - - if(this->projectDescription->GetProject()->GetAppli() != NULL) - { - int AppId = this->projectDescription->GetProject()->GetAppli()->GetId(); - newEvent->SetInt(AppId); - newEvent->SetId(0); - wxPostEvent(this->GetParent(), *newEvent); - } - event.Skip(); -} - -void wxCDMProjectHelpDialog::OnLibMouseEnter(wxMouseEvent& event) -{ - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED); - - if(this->projectDescription->GetProject()->GetLib() != NULL) - { - int LbId = this->projectDescription->GetProject()->GetLib()->GetId(); - newEvent->SetInt(LbId); - newEvent->SetId(0); - wxPostEvent(this->GetParent(), *newEvent); - } - event.Skip(); -} - -void wxCDMProjectHelpDialog::OnLibMouseExit(wxMouseEvent& event) -{ - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED); - - if(this->projectDescription->GetProject()->GetLib() != NULL) - { - int LbId = this->projectDescription->GetProject()->GetLib()->GetId(); - newEvent->SetInt(LbId); - newEvent->SetId(0); - wxPostEvent(this->GetParent(), *newEvent); - } - event.Skip(); -} - void wxCDMProjectHelpDialog::OnDisableHelp(wxCommandEvent& event) { wxPostEvent(this->GetParent(), event);