From 66ab8bdd95c2fbc1fa33494a5edaa1dbb11e78f8 Mon Sep 17 00:00:00 2001 From: srn Date: Tue, 7 Feb 2006 11:57:11 +0000 Subject: [PATCH] iplemented method getPythonDump --- src/SalomeApp/SalomeApp_Study.cxx | 35 ++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 4233e598a..80b9a15c8 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -853,6 +853,39 @@ QString SalomeApp_Study::getVisulDump(int savePoint) { _PTR(AttributeParameter) ap = studyDS()->GetCommonParameters("Interface Applicative", savePoint); SALOMEDS_IParameters ip(ap); + + /* + char buffer[127]; + sprintf(buffer,"%d", savePoint); + QString sp(buffer); + */ + ip.setDumpPython(true); //Enable DumpPython of visual parameters for modules. - return ""; + QString dump(""); + + dump += "import iparameters\n"; + dump += "ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters(\"Interface Applicative\", 1))\n\n"; + + + vector v = ip.getProperties(); + if(v.size() > 0) { + dump += "#Set up visual properties:\n"; + for(int i = 0; i 0) { + dump += "#Set up lists:\n"; + for(int i = 0; i lst = ip.getValues(v[i]); + dump += "# fill list "+v[i]+"\n"; + for(int j = 0; j < lst.size(); j++) + dump += "ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n"; + } + } + + return dump; } -- 2.39.2