]> Creatis software - crea.git/commitdiff
Feature #1711 CreaDevManager application implementation
authorDaniel Gonzalez <daniel.gonzalez@creatis.insa-lyon.fr>
Fri, 19 Apr 2013 13:05:58 +0000 (15:05 +0200)
committerDaniel Gonzalez <daniel.gonzalez@creatis.insa-lyon.fr>
Fri, 19 Apr 2013 13:05:58 +0000 (15:05 +0200)
Fix: Help in inclusions for Appli, Lib, Package Manager, Applications, Libraries, Packages. Now showing the code behind.
Feature: Now the build path can be opened.
Fix: Tree panel minimum size fixed to 250 px.

appli/creaDevManager/creaDevManager.cpp
lib/creaDevManagerLib/creaDevManagerIds.h
lib/creaDevManagerLib/wxCDMAppliDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMApplicationDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMLibDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMLibraryDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMMainFrame.cpp
lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.cpp
lib/creaDevManagerLib/wxCDMPackageManagerPanel.cpp
lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.h

index fd922da7e8e70de8ff6bb946ffda26e6334c0216..a57d7b23ba822e5a053b8663574ab7d16b4280f9 100644 (file)
@@ -49,7 +49,7 @@ bool wxCreaDevManagerApp::OnInit()
 
   mainWindow = new wxCDMMainFrame(NULL);
   SetTopWindow(mainWindow);
-  mainWindow->SetSize(750, 700);
+  mainWindow->SetSize(850, 700);
   wxToolTip::SetDelay(700);
   mainWindow->Show(true);
   std::cout << "Crea DevManager opened." << std::endl;
index bdd9a15d5a25556350be90703fdbc10e4bafb35b..2ac39608f999fa89354957495b88a6e2884dde23 100644 (file)
 #define ID_BUTTON_OPEN_COMMAND          10317
 #define ID_BUTTON_SET_VERSION           10318
 #define ID_BUTTON_SET_BUILD_PATH        10319
-#define ID_BUTTON_SET_AUTHOR            10320
-#define ID_BUTTON_SET_DESCRIPTION       10321
-#define ID_BUTTON_SET_NAME              10322
-#define ID_BUTTON_SET_CATEGORY          10323
-
-
-#define ID_BUTTON_BUILD_PROJECT         10324
-#define ID_BUTTON_CONFIGURE_BUILD       10325
-#define ID_BUTTON_CONNECT_PROJECT       10326
-
-#define ID_BUTTON_GOTO_PACKAGE_MANAGER  10327
-#define ID_BUTTON_GOTO_APPLI_MANAGER    10328
-#define ID_BUTTON_GOTO_LIB_MANAGER      10329
-
-#define ID_LINK_SELECT_PACKAGE          10330
-#define ID_LINK_SELECT_LIBRARY          10331
-#define ID_LINK_SELECT_APPLICATION      10332
-#define ID_LINK_SELECT_BLACKBOX         10333
-
-#define ID_CHECK_INCLUDE_LIBRARY        10334
-#define ID_CHECK_INCLUDE_3RDLIBRARY     10335
-#define ID_CHECK_INCLUDE_PACKAGE        10336
-#define ID_CHECK_INCLUDE_APPLICATION    10337
-
-#define ID_CHECKBOX_ENABLE_HELP         10338
-#define ID_CHECKBOX_DISABLE_HELP        10339
-#define ID_CHECKBOX_TOGGLE_HELP         10340
-
-#define ID_BUTTON_CHECK_PROJECT         10341
-
-#define ID_MENU_OPEN_RECENT1            10342
-#define ID_MENU_OPEN_RECENT2            10343
-#define ID_MENU_OPEN_RECENT3            10344
-#define ID_MENU_OPEN_RECENT4            10345
-#define ID_MENU_OPEN_RECENT5            10346
+#define ID_BUTTON_OPEN_BUILD_PATH       10320
+#define ID_BUTTON_SET_AUTHOR            10321
+#define ID_BUTTON_SET_DESCRIPTION       10322
+#define ID_BUTTON_SET_NAME              10323
+#define ID_BUTTON_SET_CATEGORY          10324
+
+
+#define ID_BUTTON_BUILD_PROJECT         10325
+#define ID_BUTTON_CONFIGURE_BUILD       10326
+#define ID_BUTTON_CONNECT_PROJECT       10327
+
+#define ID_BUTTON_GOTO_PACKAGE_MANAGER  10328
+#define ID_BUTTON_GOTO_APPLI_MANAGER    10329
+#define ID_BUTTON_GOTO_LIB_MANAGER      10330
+
+#define ID_LINK_SELECT_PACKAGE          10331
+#define ID_LINK_SELECT_LIBRARY          10332
+#define ID_LINK_SELECT_APPLICATION      10333
+#define ID_LINK_SELECT_BLACKBOX         10334
+
+#define ID_CHECK_INCLUDE_LIBRARY        10335
+#define ID_CHECK_INCLUDE_3RDLIBRARY     10336
+#define ID_CHECK_INCLUDE_PACKAGE        10337
+#define ID_CHECK_INCLUDE_APPLICATION    10338
+
+#define ID_CHECKBOX_ENABLE_HELP         10339
+#define ID_CHECKBOX_DISABLE_HELP        10340
+#define ID_CHECKBOX_TOGGLE_HELP         10341
+
+#define ID_BUTTON_CHECK_PROJECT         10342
+
+#define ID_MENU_OPEN_RECENT1            10343
+#define ID_MENU_OPEN_RECENT2            10344
+#define ID_MENU_OPEN_RECENT3            10345
+#define ID_MENU_OPEN_RECENT4            10346
+#define ID_MENU_OPEN_RECENT5            10347
 
 #endif /* CREADEVMANAGERIDS_H_ */
index ac06179f96fee894b51d7ee69f93da8e5dc48aec..9f818515305b4d9c6f4b5f24d9ef68fbe4e01887 100644 (file)
@@ -158,6 +158,11 @@ void wxCDMAppliDescriptionPanel::CreateControls()
 
       //help icon
       wxButton* pApplicationHlp = new wxButton(propertiesPanel, wxID_ANY, wxT("?"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
+      pApplicationHlp->Enable(false);
+      tt = "When this application is included in the CMakeLists file, the\nfollowing line is included in the CMakeList.txt file in the\nappli folder:\n"
+          "ADD_SUBDIRECTORY(" + applications[i]->GetName() + ")";
+      pApplicationHlp->SetToolTip(crea::std2wx(tt));
+
       propertiesGridSizer -> Add(pApplicationHlp, 0, wxEXPAND | wxALIGN_CENTER);
     }
 
index 9f91b854fe918fffa389f0ac424e1c5491cd2975..70a45fa6d7877a933e23cdf489efe917983ac067 100644 (file)
@@ -191,7 +191,14 @@ void wxCDMApplicationDescriptionPanel::CreateControls()
     wxCheckBox* ChBIncl = new wxCheckBox(
         includesPanel, ID_CHECK_INCLUDE_3RDLIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
       );
-    ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " library is included in the project configuration for this application."));
+    ChBIncl->SetToolTip(crea::std2wx(
+        "When this box is checked the " + it->first + " library\n"
+        "is included in the project configuration for\n"
+        "this application including the following instruction\n"
+        "in the application's folder CMakeLists.txt file:\n"
+        "SET ( ${LIBRARY_NAME}_LINK_LIBRARIES\n"
+        "  ${" + it->first+ "_LIBRARIES}\n"
+        ")"));
     ChBIncl->SetName(crea::std2wx(it->first));
     ChBIncl->SetValue(it->second);
     includesGridSizer->Add(ChBIncl, 1, wxEXPAND);
@@ -240,7 +247,17 @@ void wxCDMApplicationDescriptionPanel::CreateControls()
     wxCheckBox* ChBIncl = new wxCheckBox(
         includesPanel, ID_CHECK_INCLUDE_LIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
       );
-    ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " custom library is included in the project configuration for this application."));
+    ChBIncl->SetToolTip(crea::std2wx(
+        "When this box is checked the " + it->first + " custom\n"
+        "library is included in the project configuration for\n"
+        "this application including the following code in the\n"
+        "application's folder CMakeLists.txt file:\n"
+        "INCLUDE_DIRECTORIES (\n"
+        "  ../../lib/"+ it->first + "\n"
+        ")\n"
+        "SET ( ${EXE_NAME}_LINK_LIBRARIES\n"
+        "  " + it->first+ "\n"
+        ")"));
     ChBIncl->SetName(crea::std2wx(it->first));
     ChBIncl->SetValue(it->second);
     includesLibGridSizer->Add(ChBIncl, 1, wxEXPAND);
index 5a7147055ab8222ab49db8ee700b3b7c913c3d5f..4dec780e7faf18e1cf673e4e15c6e088e3008d18 100644 (file)
@@ -156,6 +156,11 @@ void wxCDMLibDescriptionPanel::CreateControls()
 
       //help icon
       wxButton* pLibraryHlp = new wxButton(propertiesPanel, wxID_ANY, wxT("?"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
+      pLibraryHlp->Enable(false);
+      tt = "When this library is included in the CMakeLists file, the\nfollowing line is included in the CMakeList.txt file in the lib\nfolder:\n"
+          "ADD_SUBDIRECTORY(" + libraries[i]->GetName() + ")";
+      pLibraryHlp->SetToolTip(crea::std2wx(tt));
+
       propertiesGridSizer -> Add(pLibraryHlp, 0, wxEXPAND | wxALIGN_CENTER);
     }
 
index d97d019ddb4e761c805586607978cea6cd0970ad..53472bb96a374ae8a523fecc33a41815170936d0 100644 (file)
@@ -192,7 +192,14 @@ void wxCDMLibraryDescriptionPanel::CreateControls()
     wxCheckBox* ChBIncl = new wxCheckBox(
         includesPanel, ID_CHECK_INCLUDE_3RDLIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
       );
-    ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " library is included in the project configuration for this library."));
+    ChBIncl->SetToolTip(crea::std2wx(
+        "When this box is checked the " + it->first + " library\n"
+        "is included in the project configuration for\n"
+        "this library including the following instruction\n"
+        "in the library's folder CMakeLists.txt file:\n"
+        "SET ( ${LIBRARY_NAME}_LINK_LIBRARIES\n"
+        "  ${" + it->first+ "_LIBRARIES}\n"
+        ")"));
     ChBIncl->SetName(crea::std2wx(it->first));
     ChBIncl->SetValue(it->second);
     includesGridSizer->Add(ChBIncl, 1, wxEXPAND);
@@ -241,7 +248,17 @@ void wxCDMLibraryDescriptionPanel::CreateControls()
     wxCheckBox* ChBIncl = new wxCheckBox(
         includesPanel, ID_CHECK_INCLUDE_LIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
       );
-    ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " custom library is included in the project configuration for this library."));
+    ChBIncl->SetToolTip(crea::std2wx(
+        "When this box is checked the " + it->first + " custom\n"
+        "library is included in the project configuration for\n"
+        "this library including the following code in the\n"
+        "library's CMakeLists.txt file:\n"
+        "INCLUDE_DIRECTORIES (\n"
+        "  ../"+ it->first + "\n"
+        ")\n"
+        "SET ( ${LIBRARY_NAME}_LINK_LIBRARIES\n"
+        "  " + it->first+ "\n"
+        ")"));
     ChBIncl->SetName(crea::std2wx(it->first));
     ChBIncl->SetValue(it->second);
     includesLibGridSizer->Add(ChBIncl, 1, wxEXPAND);
index eb0a2d4e3a5824150ddab38adccc74f82c6e4399..3b64a1e182cf118705ab70ef5c3ce968a04ccf56 100755 (executable)
@@ -282,7 +282,7 @@ void wxCDMMainFrame::CreateControls()
   );
 
   auiManager.AddPane(panel_Properties, wxAuiPaneInfo().BestSize(600,400).CenterPane().Name(wxT("panel_Properties")).Caption(wxT("")).CloseButton(false));
-  auiManager.AddPane(tree_Projects, wxAuiPaneInfo().Left().MinSize(300,300).BestSize(300,400).CloseButton(false).Name(wxT("tree_Projects")).Caption(wxT("Project Tree")).CloseButton(false));
+  auiManager.AddPane(tree_Projects, wxAuiPaneInfo().Left().MinSize(250,300).BestSize(250,400).CloseButton(false).Name(wxT("tree_Projects")).Caption(wxT("Project Tree")).CloseButton(false));
   auiManager.Update();
   //auiManager.LoadPerspective(pers,true);
   wxToolTip::Enable(true);
index 839131c165d22e66ac2645017b527ba03b6852a8..e88415b928f664d02a94bb51519c8e978198f005 100644 (file)
@@ -128,7 +128,13 @@ void wxCDMPackageConfigurationDialog::CreateControls()
       wxCheckBox* ChBIncl = new wxCheckBox(
           includesPanel, ID_CHECK_INCLUDE_3RDLIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
         );
-      ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " library is included in the project configuration for this library."));
+      ChBIncl->SetToolTip(crea::std2wx(
+          "When this box is checked the " + it->first + " library\n"
+          "is included in the project configuration for\n"
+          "this package including the following instruction\n"
+          "in the package's folder CMakeLists.txt file:\n"
+          "SET(${BBTK_PACKAGE_NAME}_USE_" + it->first+ "  ON)\n"
+          ));
       ChBIncl->SetName(crea::std2wx(it->first));
       ChBIncl->SetValue(it->second);
       includesGridSizer->Add(ChBIncl, 1, wxEXPAND);
@@ -177,7 +183,17 @@ void wxCDMPackageConfigurationDialog::CreateControls()
       wxCheckBox* ChBIncl = new wxCheckBox(
           includesPanel, ID_CHECK_INCLUDE_LIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
         );
-      ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " custom library is included in the project configuration for this library."));
+      ChBIncl->SetToolTip(crea::std2wx(
+          "When this box is checked the " + it->first + " custom\n"
+          "library is included in the project configuration for\n"
+          "this packages including the following code in the\n"
+          "package's folder CMakeLists.txt file:\n"
+          "SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS\n"
+          "  ../lib/"+ it->first + "\n"
+          ")\n"
+          "SET(${BBTK_PACKAGE_NAME}_LIBS\n"
+          "  " + it->first+ "\n"
+          ")"));
       ChBIncl->SetName(crea::std2wx(it->first));
       ChBIncl->SetValue(it->second);
       includesLibGridSizer->Add(ChBIncl, 1, wxEXPAND);
index c7d0d778821b4749822ea380943725594c4981ad..d7a28be83fcd02f4e64d4289fc6c4b9ddf67fa99 100644 (file)
@@ -149,6 +149,11 @@ void wxCDMPackageManagerPanel::CreateControls()
 
       //help icon
       wxButton* pPackageHlp = new wxButton(propertiesPanel, wxID_ANY, wxT("?"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
+      pPackageHlp->Enable(false);
+      tt = "When this package is included in the CMakeLists file, the\nfollowing line is included in the CMakeList.txt file in the\nproject folder:\n"
+          "ADD_SUBDIRECTORY(" + packages[i]->GetName() + ")";
+      pPackageHlp->SetToolTip(crea::std2wx(tt));
+
       propertiesGridSizer -> Add(pPackageHlp, 0, wxEXPAND | wxALIGN_CENTER);
     }
 
index 844d8cb1bf70dbec010dc2ec10f307a4b37e508b..920408c988b061519ed47c1e0cdf9f5439e1c5f6 100644 (file)
@@ -49,6 +49,7 @@ EVT_BUTTON(ID_BUTTON_GOTO_LIB_MANAGER, wxCDMProjectDescriptionPanel::OnBtnManage
 EVT_BUTTON(ID_BUTTON_GOTO_APPLI_MANAGER, wxCDMProjectDescriptionPanel::OnBtnManageApplications)
 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMProjectDescriptionPanel::OnBtnEditCMakeLists)
 EVT_BUTTON(ID_BUTTON_SET_BUILD_PATH, wxCDMProjectDescriptionPanel::OnBtnSetBuildPath)
+EVT_BUTTON(ID_BUTTON_OPEN_BUILD_PATH, wxCDMProjectDescriptionPanel::OnBtnOpenBuild)
 EVT_BUTTON(ID_BUTTON_OPEN_FOLDER, wxCDMProjectDescriptionPanel::OnBtnOpenFolder)
 EVT_BUTTON(ID_BUTTON_SET_VERSION, wxCDMProjectDescriptionPanel::OnBtnSetVersion)
 END_EVENT_TABLE()
@@ -147,10 +148,16 @@ void wxCDMProjectDescriptionPanel::CreateControls()
   wxBoxSizer* pBuildLocationsz = new wxBoxSizer(wxHORIZONTAL);
   this->buildPathtc = new wxStaticText(propertiesPanel, -1, crea::std2wx(this->project->GetBuildPath()));
   this->buildPathtc->SetMaxSize(wxSize(200,-1));
-  wxButton* pBuildLocationbt = new wxButton(propertiesPanel, ID_BUTTON_SET_BUILD_PATH, wxT("Choose"));
+
+  wxButton* pBuildLocationbt = new wxButton(propertiesPanel, ID_BUTTON_SET_BUILD_PATH, wxT("Choose..."));
   pBuildLocationbt->SetToolTip(wxT("Select a new location for compiling the project."));
+
+  wxButton* pBuildOpenbt = new wxButton(propertiesPanel, ID_BUTTON_OPEN_BUILD_PATH, wxT("Open"));
+  pBuildOpenbt->SetToolTip(wxT("Open the binaries folder in the file explorer."));
+
   pBuildLocationsz->Add(this->buildPathtc, 1, wxALIGN_CENTER, 1);
   pBuildLocationsz->Add(pBuildLocationbt, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 10);
+  pBuildLocationsz->Add(pBuildOpenbt, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 10);
 
   propertiesGridSizer->Add(pVersion, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
   propertiesGridSizer->Add(pVersionsz, 1, wxEXPAND);
@@ -306,8 +313,7 @@ void wxCDMProjectDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event)
     }
 }
 
-void
-wxCDMProjectDescriptionPanel::OnBtnSetBuildPath(wxCommandEvent& event)
+void wxCDMProjectDescriptionPanel::OnBtnSetBuildPath(wxCommandEvent& event)
 {
   wxDirDialog* dialog = new wxDirDialog(this, wxT("Choose the new build location for the project"));
   if(dialog->ShowModal())
@@ -319,8 +325,14 @@ wxCDMProjectDescriptionPanel::OnBtnSetBuildPath(wxCommandEvent& event)
   this->buildPathtc->SetLabel(crea::std2wx(this->project->GetBuildPath()));
 }
 
-void
-wxCDMProjectDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
+void wxCDMProjectDescriptionPanel::OnBtnOpenBuild(wxCommandEvent& event)
+{
+  std::string* result;
+  if(CDMUtilities::openFileExplorer(this->project->GetBuildPath()))
+    wxMessageBox(crea::std2wx(*result),_T("Open Folder - Error!"),wxOK | wxICON_ERROR);
+}
+
+void wxCDMProjectDescriptionPanel::OnBtnOpenFolder(wxCommandEvent& event)
 {
   std::string* result;
   if(!this->project->OpenInFileExplorer(result))
index 74a71d79b5f35ef885a921d1c0ebb82d22984b58..d210e32ac2281dc941a888c27a1f01d9f5bc1bc0 100644 (file)
@@ -144,6 +144,10 @@ protected:
    * Handles when the choose build path button is pressed.
    */
   void OnBtnSetBuildPath(wxCommandEvent& event);
+  /**
+   * Handles when the open build folder button is pressed.
+   */
+  void OnBtnOpenBuild(wxCommandEvent& event);
   /**
    * Handles when the open containing folder button is pressed.
    */