]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Modifications to avoid compilation errors about conversion between std::string and...
authormkr <mkr@opencascade.com>
Fri, 24 Mar 2006 11:49:44 +0000 (11:49 +0000)
committermkr <mkr@opencascade.com>
Fri, 24 Mar 2006 11:49:44 +0000 (11:49 +0000)
src/VISUGUI/VisuGUI_GaussPointsDlg.cxx
src/VISUGUI/VisuGUI_Module.cxx
src/VISUGUI/VisuGUI_PopupTools.cxx
src/VISUGUI/VisuGUI_ScalarBarDlg.cxx
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_TimeAnimation.h
src/VVTK/VVTK_Recorder.cxx
src/VVTK/VVTK_SegmentationCursorDlg.cxx

index 7492c7f570bf6ccec2dfaaa7dd4c49cb7fb9dcdb..bfe5bb0d506e1ce71a4837b503e73e2f68327304 100644 (file)
@@ -314,13 +314,13 @@ void VisuGUI_GaussScalarBarPane::initFromPrsObject(VISU::GaussPoints_i* thePrs)
   const VISU::TNames& aCompNames = aField->myCompNames;
   const VISU::TNames& aUnitNames = aField->myUnitNames;
   for(int i = 0; i < aNbComp; i++){
-    QString aComponent = QString(aCompNames[i]).simplifyWhiteSpace();
+    QString aComponent = QString(aCompNames[i].c_str()).simplifyWhiteSpace();
     if(aComponent.isNull() || aComponent == "")
       aComponent = "Component " + QString::number(i+1);
     else
       aComponent = "[" + QString::number(i+1) + "] " + aComponent;
 
-    QString anUnit = QString(aUnitNames[i]).simplifyWhiteSpace();
+    QString anUnit = QString(aUnitNames[i].c_str()).simplifyWhiteSpace();
     if(anUnit.isNull() || anUnit == "")
       anUnit = "-";
     
index 743559b58e129753f31e6c1b797f360d275d7daf..e5b5b0607e65ad15cc3bdc76a5d57de2f6ec1652 100644 (file)
@@ -1020,37 +1020,37 @@ namespace
     float aColor[3];
     vtkRenderer* aRenderer = theViewWindow->getRenderer();
     aRenderer->GetBackground(aColor);
-    Storable::DataToStream(theStr,std::string("myColor") + theSuffix + ".R",aColor[0]);
-    Storable::DataToStream(theStr,std::string("myColor") + theSuffix + ".G",aColor[1]);
-    Storable::DataToStream(theStr,std::string("myColor") + theSuffix + ".B",aColor[2]);
+    Storable::DataToStream(theStr,(std::string("myColor") + theSuffix + ".R").c_str(),aColor[0]);
+    Storable::DataToStream(theStr,(std::string("myColor") + theSuffix + ".G").c_str(),aColor[1]);
+    Storable::DataToStream(theStr,(std::string("myColor") + theSuffix + ".B").c_str(),aColor[2]);
       
     double aPosition[3];
     vtkCamera* aCamera = aRenderer->GetActiveCamera();
     aCamera->GetPosition(aPosition);
-    Storable::DataToStream(theStr,std::string("myPosition") + theSuffix + "[0]",aPosition[0]);
-    Storable::DataToStream(theStr,std::string("myPosition") + theSuffix + "[1]",aPosition[1]);
-    Storable::DataToStream(theStr,std::string("myPosition") + theSuffix + "[2]",aPosition[2]);
+    Storable::DataToStream(theStr,(std::string("myPosition") + theSuffix + "[0]").c_str(),aPosition[0]);
+    Storable::DataToStream(theStr,(std::string("myPosition") + theSuffix + "[1]").c_str(),aPosition[1]);
+    Storable::DataToStream(theStr,(std::string("myPosition") + theSuffix + "[2]").c_str(),aPosition[2]);
 
     double aFocalPnt[3];
     aCamera->GetFocalPoint(aFocalPnt);
-    Storable::DataToStream(theStr,std::string("myFocalPnt") + theSuffix + "[0]",aFocalPnt[0]);
-    Storable::DataToStream(theStr,std::string("myFocalPnt") + theSuffix + "[1]",aFocalPnt[1]);
-    Storable::DataToStream(theStr,std::string("myFocalPnt") + theSuffix + "[2]",aFocalPnt[2]);
+    Storable::DataToStream(theStr,(std::string("myFocalPnt") + theSuffix + "[0]").c_str(),aFocalPnt[0]);
+    Storable::DataToStream(theStr,(std::string("myFocalPnt") + theSuffix + "[1]").c_str(),aFocalPnt[1]);
+    Storable::DataToStream(theStr,(std::string("myFocalPnt") + theSuffix + "[2]").c_str(),aFocalPnt[2]);
       
     double aViewUp[3];
     aCamera->GetViewUp(aViewUp);
-    Storable::DataToStream(theStr,std::string("myViewUp") + theSuffix + "[0]",aViewUp[0]);
-    Storable::DataToStream(theStr,std::string("myViewUp") + theSuffix + "[1]",aViewUp[1]);
-    Storable::DataToStream(theStr,std::string("myViewUp") + theSuffix + "[2]",aViewUp[2]);
+    Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[0]").c_str(),aViewUp[0]);
+    Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[1]").c_str(),aViewUp[1]);
+    Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[2]").c_str(),aViewUp[2]);
       
     float aParallelScale = aCamera->GetParallelScale();
-    Storable::DataToStream(theStr,std::string("myParallelScale") + theSuffix,aParallelScale);
+    Storable::DataToStream(theStr,(std::string("myParallelScale") + theSuffix).c_str(),aParallelScale);
       
     double aScaleFactor[3];
     theViewWindow->GetScale(aScaleFactor);
-    Storable::DataToStream(theStr,std::string("myScaleFactor") + theSuffix + "[0]",aScaleFactor[0]);
-    Storable::DataToStream(theStr,std::string("myScaleFactor") + theSuffix + "[1]",aScaleFactor[1]);
-    Storable::DataToStream(theStr,std::string("myScaleFactor") + theSuffix + "[2]",aScaleFactor[2]);
+    Storable::DataToStream(theStr,(std::string("myScaleFactor") + theSuffix + "[0]").c_str(),aScaleFactor[0]);
+    Storable::DataToStream(theStr,(std::string("myScaleFactor") + theSuffix + "[1]").c_str(),aScaleFactor[1]);
+    Storable::DataToStream(theStr,(std::string("myScaleFactor") + theSuffix + "[2]").c_str(),aScaleFactor[2]);
   }
 
   //---------------------------------------------------------------
@@ -1137,7 +1137,7 @@ namespace
        aSegmentationMode = "Sphere";
       }
       
-      Storable::DataToStream(theStr,"mySegmentationMode",aSegmentationMode);
+      Storable::DataToStream(theStr,"mySegmentationMode",aSegmentationMode.c_str());
     }
   }
 
@@ -1789,7 +1789,7 @@ std::string getParam( const std::string& paramName, const int index )
 {
   QStringList lst = QStringList::split( gSeparator, QString( paramName.c_str() ) );
   if ( !lst.isEmpty() && index < lst.size() )
-    return lst[index];
+    return lst[index].latin1();
   return "";
 }
 
@@ -1856,13 +1856,13 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
           viewerType == VVTK_Viewer::Type().latin1() ) {
 
        // used as inner map key for locating the actor.
-       QString viewerTypeIndex = viewerType + QString::number( viewIndex );
+       QString viewerTypeIndex = QString( viewerType.c_str() ) + QString::number( viewIndex );
 
        if ( paramName == "Visibility" && displayer() ) {
          // if VVTK, then we must create viewer first, because 
 
          QPtrList<SUIT_ViewManager> lst;
-         getApp()->viewManagers( viewerType, lst );
+         getApp()->viewManagers( viewerType.c_str(), lst );
 
          // SVTK/VVTK ViewManager always has 1 ViewWindow, so view index is index of view manager
          if ( viewIndex >= 0 && viewIndex < lst.count() ) {
@@ -1946,7 +1946,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
 
        if ( paramName == "Visibility" && displayer() ) {
          QPtrList<SUIT_ViewManager> lst;
-         getApp()->viewManagers( viewerType, lst );
+         getApp()->viewManagers( viewerType.c_str(), lst );
 
          if ( viewIndex >= 0 && viewIndex < lst.count() ) {
            SUIT_ViewManager* vman = lst.at( viewIndex );
index 624662df665c5f1f71589d618838e53701b2a013..20c99b44d9c346d06cd3baaf21376075d59f7a61 100644 (file)
@@ -174,7 +174,7 @@ QString VisuGUI_Selection::medEntity( const int ind ) const
 QString VisuGUI_Selection::medSource( const int ind ) const
 {
   _PTR(Study) aStudyDS = GetStudy()->studyDS();
-  if(_PTR(SObject) aSObject = aStudyDS->FindObjectID(entry(ind))){
+  if(_PTR(SObject) aSObject = aStudyDS->FindObjectID(entry(ind).latin1())){
     VISU::Result_var aRes;
     if(VISU::Result_i* aResult = CheckResult(myModule,aSObject,aRes)){
       using namespace VISU;
index 54c96b88ecbbc46435ecdaf58da03ad7f1d09f24..d6f49d8994785dba0cf7b902293c282ac5162ca9 100644 (file)
@@ -576,13 +576,13 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ScalarMap_i* thePrs) {
   const VISU::TNames& aCompNames = aField->myCompNames;
   const VISU::TNames& aUnitNames = aField->myUnitNames;
   for(int i = 0; i < aNbComp; i++){
-    QString aComponent = QString(aCompNames[i]).simplifyWhiteSpace();
+    QString aComponent = QString(aCompNames[i].c_str()).simplifyWhiteSpace();
     if(aComponent.isNull() || aComponent == "")
       aComponent = "Component " + QString::number(i+1);
     else
       aComponent = "[" + QString::number(i+1) + "] " + aComponent;
 
-    QString anUnit = QString(aUnitNames[i]).simplifyWhiteSpace();
+    QString anUnit = QString(aUnitNames[i].c_str()).simplifyWhiteSpace();
     if(anUnit.isNull() || anUnit == "")
       anUnit = "-";
     
index 54f79c9ccc9e21590de8f949197f8242fa0fc6ae..3aac42a0318429ea2dc0a06d109d7a99afd8c5f0 100644 (file)
@@ -159,7 +159,7 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject
   setFactor(myPrs->GetScale());
   myTimeStampsCombo->setDisabled(isAnim);
 
-  QString aFieldName(myPrs->GetScalarFieldName());
+  QString aFieldName(myPrs->GetScalarFieldName().c_str());
   float aIterFloat = GetFloatValueOfTimeStamp(myPrs->GetMeshName().c_str(),
                                              myPrs->GetScalarFieldName().c_str(),
                                              myPrs->GetScalarIteration(),
index 53191604996c1c1bcef7932a7b47877367954435..4d2cea5f0d736b2b4237f4de46a8da8e4cce028e 100644 (file)
@@ -19,6 +19,9 @@
 #include <qbuttongroup.h>
 #include <qwidgetstack.h>
 
+#include <vector>
+#include <map>
+
 class VisuGUI;
 class VISU_TimeAnimation;
 
index e9c734e9c37baa683752a997c259b11821d44230..f5e9b4774ae5ab741bed45dbb7b91379d59efd33 100755 (executable)
@@ -449,7 +449,7 @@ VVTK_Recorder
 \r
   if(MYDEBUG) cout<<"VVTK_Recorder::MakeFileAVI - "<<aString<<endl;\r
 \r
-  QFileInfo aFileInfo(myName);\r
+  QFileInfo aFileInfo(myName.c_str());\r
   QString aDirPath = aFileInfo.dirPath(TRUE);\r
   QString aBaseName = aFileInfo.fileName();\r
   QString aCommand = \r
index 63487fed62b3c685aa0d4815e480d6734b45e1b3..c58035435679e38da20418db2c90cd98a3b39e7c 100644 (file)
@@ -96,7 +96,7 @@ namespace VISU
     static TTextureMap aTextureMap;
     
     TTextureValue aTextureValue;
-    TTextureKey aTextureKey(theMainTexture,theAlphaTexture);
+    TTextureKey aTextureKey(theMainTexture.latin1(),theAlphaTexture.latin1());
     TTextureMap::const_iterator anIter = aTextureMap.find(aTextureKey);
     if(anIter != aTextureMap.end()){
       aTextureValue = anIter->second;