X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMProjectActionsPanel.cpp;fp=lib%2FcreaDevManagerLib%2FwxCDMProjectActionsPanel.cpp;h=30326590cdc0a764d84c1e217ccce019a927b6f7;hb=2fb5dd9262993efaf56bfc731f4297fdb96bf63e;hp=2d89a2df0f05e76a7fa4dbccbcbc89033138cf1e;hpb=40c574d86b82c2afc5a351f1ad96cc0254008306;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp b/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp index 2d89a2d..3032659 100755 --- a/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp +++ b/lib/creaDevManagerLib/wxCDMProjectActionsPanel.cpp @@ -37,7 +37,11 @@ #include "creaDevManagerIds.h" +#include +#include "wxCDMProjectStructureReportDialog.h" + BEGIN_EVENT_TABLE(wxCDMProjectActionsPanel, wxPanel) +EVT_BUTTON(ID_BUTTON_CHECK_PROJECT, wxCDMProjectActionsPanel::OnBtnCheckProjectStructure) EVT_BUTTON(ID_BUTTON_BUILD_PROJECT, wxCDMProjectActionsPanel::OnBtnBuildProject) EVT_BUTTON(ID_BUTTON_CONFIGURE_BUILD, wxCDMProjectActionsPanel::OnBtnConfigureBuild) EVT_BUTTON(ID_BUTTON_CONNECT_PROJECT, wxCDMProjectActionsPanel::OnBtnConnectProject) @@ -81,17 +85,30 @@ bool wxCDMProjectActionsPanel::Create( void wxCDMProjectActionsPanel::CreateControls() { - wxButton* configurebt = new wxButton(this, ID_BUTTON_CONFIGURE_BUILD, _T("1. Configure Project (CMake)")); - configurebt->SetToolTip(wxT("This is the first step in order to execute the project. Make sure you have selected the desired Build location.")); - wxButton* compilebt = new wxButton(this, ID_BUTTON_BUILD_PROJECT, _T("2. Compile Project")); + wxButton* checkStructbt = new wxButton(this, ID_BUTTON_CHECK_PROJECT, _T("1. Check Project Structure")); + checkStructbt->SetToolTip(wxT("This step checks the project structure and tells what is going to be compiled.")); + wxButton* configurebt = new wxButton(this, ID_BUTTON_CONFIGURE_BUILD, _T("2. Configure Project (CMake)")); + configurebt->SetToolTip(wxT("This is the second step in order to execute the project. Make sure you have selected the desired Build location.")); + wxButton* compilebt = new wxButton(this, ID_BUTTON_BUILD_PROJECT, _T("3. Compile Project")); compilebt->SetToolTip(wxT("This step should be done after configuring the project. This will create the executables.")); - wxButton* plugbt = new wxButton(this, ID_BUTTON_CONNECT_PROJECT, _T("3. Plug Packages (BBTK)")); + wxButton* plugbt = new wxButton(this, ID_BUTTON_CONNECT_PROJECT, _T("4. Plug Packages (BBTK)")); plugbt->SetToolTip(wxT("This step should be done after compiling the project. This will allow to use the boxes in this project to be available in the bbEditor.")); + this->GetSizer()->Add(checkStructbt, 0, wxALL, 5); this->GetSizer()->Add(configurebt, 0, wxALL, 5); this->GetSizer()->Add(compilebt, 0, wxALL, 5); this->GetSizer()->Add(plugbt, 0, wxALL, 5); } +//check project structure +void wxCDMProjectActionsPanel::OnBtnCheckProjectStructure(wxCommandEvent& event) +{ + std::map prjStruct; + this->project->CheckStructure(prjStruct); + std::cout << prjStruct.size() << std::endl; + wxCDMProjectStructureReportDialog* structure = new wxCDMProjectStructureReportDialog(this->GetParent(), prjStruct, wxID_ANY); + structure->Show(true); +} + //configure project void wxCDMProjectActionsPanel::OnBtnConfigureBuild(wxCommandEvent& event) {