]> Creatis software - crea.git/commitdiff
Feature #1711
authorDaniel Felipe Gonzalez <daniel.gonzalez@creatis.insa-lyon.fr>
Wed, 6 Feb 2013 17:37:26 +0000 (18:37 +0100)
committerDaniel Felipe Gonzalez <daniel.gonzalez@creatis.insa-lyon.fr>
Wed, 6 Feb 2013 17:37:26 +0000 (18:37 +0100)
CreaDevManager application implementation

- Fixed new package validators and adaptors
- Fixed new black box validators and adaptors. VTK ImageAlgorithm and VTK PolyDataAlgorithm box creation doesn't work in windows bbCreateBlackBox command.

lib/creaDevManagerLib/modelCDMPackageSrc.cpp
lib/creaDevManagerLib/modelCDMProject.cpp
lib/creaDevManagerLib/wxCDMNewBlackBoxDialog.cpp

index 5c10bba10b32c7c84b77d4fe44758204ec974536..529bfe2c32b40f39313b5063982b943e4d0d6f77 100644 (file)
@@ -225,6 +225,7 @@ modelCDMBlackBox* modelCDMPackageSrc::CreateBlackBox(
   command += " \"" + bbCategories + "\"";
 
   //excecute command
+  //wxMessageBox(crea::std2wx("Command: ->" + command + "<-"),_T("Creating Black Box"),wxOK | wxICON_INFORMATION);
   if(system(command.c_str()))
     {
       result = new std::string("Error executing command '" + command + "'");
index 520fc0e8d822c92d637a3e1b0e21920ff9df9729..a021a1025a7424a6c6e1149de3a21ff9f5e54a64 100644 (file)
@@ -345,7 +345,7 @@ modelCDMIProjectTreeNode* modelCDMProject::CreatePackage(
   //fixing input parameters
   std::vector<std::string> words;
 
-  CDMUtilities::splitter::split(words,name," ",CDMUtilities::splitter::no_empties);
+  CDMUtilities::splitter::split(words,name," '/\"\\,.",CDMUtilities::splitter::no_empties);
   std::string nameFixed = "";
   for (int i = 0; i < (int)(words.size()); i++)
     {
@@ -353,7 +353,7 @@ modelCDMIProjectTreeNode* modelCDMProject::CreatePackage(
     }
 
   words.clear();
-  CDMUtilities::splitter::split(words,authors," ",CDMUtilities::splitter::no_empties);
+  CDMUtilities::splitter::split(words,authors," '/\"\\,.",CDMUtilities::splitter::no_empties);
   std::string authorFixed;
   for (int i = 0; i < (int)(words.size()); i++)
     {
@@ -362,13 +362,13 @@ modelCDMIProjectTreeNode* modelCDMProject::CreatePackage(
 
   words.clear();
   std::string descriptionFixed;
-  CDMUtilities::splitter::split(words,authorsEmail," ",CDMUtilities::splitter::no_empties);
+  CDMUtilities::splitter::split(words,authorsEmail," '/\"\\,",CDMUtilities::splitter::no_empties);
   for (int i = 0; i < (int)(words.size()); i++)
     {
-      descriptionFixed += words[i];
+      descriptionFixed += words[i] + "/";
     }
   words.clear();
-  CDMUtilities::splitter::split(words,description," ",CDMUtilities::splitter::no_empties);
+  CDMUtilities::splitter::split(words,description," '\"",CDMUtilities::splitter::no_empties);
   for (int i = 0; i < (int)(words.size()); i++)
     {
       descriptionFixed += "_" + words[i];
index 166ba83eaa52a7fd83537e5df432c05cf6409a15..7e0c69f4516ef76a6dea84ecad82e6900bbe5522 100644 (file)
@@ -101,12 +101,50 @@ const wxString wxCDMNewBlackBoxDialog::GetBlackBoxCategories() const
 
 const wxString wxCDMNewBlackBoxDialog::GetBlackBoxType() const
 {
-  return this->blackBoxType->GetString(this->blackBoxType->GetCurrentSelection());
+  wxString res;
+  switch(this->blackBoxType->GetCurrentSelection())
+  {
+  case 0:
+    res = wxT("std");
+    break;
+  case 1:
+    res = wxT("widget");
+    break;
+  case 2:
+#ifdef _WIN32
+       res = wxT("VTK_ImageAlgorithm");
+#else
+    res = wxT("VTK-ImageAlgorithm");
+#endif
+    break;
+  case 3:
+#ifdef _WIN32
+       res = wxT("VTK_PolyDataAlgorithm");
+#else
+    res = wxT("VTK-PolyAlgorithm");
+#endif
+    break;
+  default:
+         res = wxT("std");
+  }
+  return res;
 }
 
 const wxString wxCDMNewBlackBoxDialog::GetBlackBoxFormat() const
 {
-  return this->blackBoxFormat->GetString(this->blackBoxFormat->GetCurrentSelection());
+  wxString res;
+  switch(this->blackBoxFormat->GetCurrentSelection())
+  {
+  case 0:
+    res = wxT("C++");
+    break;
+  case 1:
+    res = wxT("XML");
+    break;
+  default:
+         res = wxT("C++");
+  }
+  return res;
 }
 
 void wxCDMNewBlackBoxDialog::CreateControls()
@@ -137,10 +175,10 @@ void wxCDMNewBlackBoxDialog::CreateControls()
   this->blackBoxCategories = new wxTextCtrl(this, -1);
   wxString BBTypes[] =
       {
-          wxT("std"),
-          wxT("VTK-ImageAlgorithm"),
-          wxT("VTK-PolyAlgorithm"),
-          wxT("widget")
+          wxT("Basic - AtomicBlackBox"),
+                 wxT("Widget - WxBlackBox"),
+          wxT("VTK ImageAlgorithm - Basic and vtkImageAlgorithm (standard vtk I/O)"),
+          wxT("VTK PolyDataAlgorithm - Basic and vtkPolyDataAlgorithm (standard vtk I/O)")
       };
   this->blackBoxType = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 4, BBTypes);