]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
First executable version
authorabd <abd@opencascade.com>
Mon, 13 Aug 2007 09:09:39 +0000 (09:09 +0000)
committerabd <abd@opencascade.com>
Mon, 13 Aug 2007 09:09:39 +0000 (09:09 +0000)
120 files changed:
adm_local/unix/make_common_starter.am
configure.ac
src/CONVERTOR/VISUConvertor.cxx
src/CONVERTOR/VISU_Convertor.cxx
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_MedConvertor.cxx
src/CONVERTOR/VISU_MedConvertor.hxx
src/GUITOOLS/VisuGUI_TableDlg.cxx
src/GUITOOLS/VisuGUI_TableDlg.h
src/OBJECT/VISU_Actor.cxx
src/VISUGUI/VISU_images.ts [new file with mode: 0644]
src/VISUGUI/VISU_msg_en.ts [new file with mode: 0644]
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI.h
src/VISUGUI/VisuGUI_BuildProgressDlg.cxx
src/VISUGUI/VisuGUI_BuildProgressDlg.h
src/VISUGUI/VisuGUI_CacheDlg.cxx
src/VISUGUI/VisuGUI_CacheDlg.h
src/VISUGUI/VisuGUI_ClippingDlg.cxx
src/VISUGUI/VisuGUI_ClippingDlg.h
src/VISUGUI/VisuGUI_CursorDlg.cxx
src/VISUGUI/VisuGUI_CursorDlg.h
src/VISUGUI/VisuGUI_CutLinesDlg.cxx
src/VISUGUI/VisuGUI_CutLinesDlg.h
src/VISUGUI/VisuGUI_CutPlanesDlg.cxx
src/VISUGUI/VisuGUI_CutPlanesDlg.h
src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_DeformedShapeDlg.h
src/VISUGUI/VisuGUI_DialogRunner.cxx
src/VISUGUI/VisuGUI_DialogRunner.h
src/VISUGUI/VisuGUI_Displayer.cxx
src/VISUGUI/VisuGUI_EditContainerDlg.cxx
src/VISUGUI/VisuGUI_EditContainerDlg.h
src/VISUGUI/VisuGUI_FieldFilter.cxx
src/VISUGUI/VisuGUI_FileDlg.cxx
src/VISUGUI/VisuGUI_GaussPointsDlg.cxx
src/VISUGUI/VisuGUI_GaussPointsDlg.h
src/VISUGUI/VisuGUI_InputPane.cxx
src/VISUGUI/VisuGUI_InputPane.h
src/VISUGUI/VisuGUI_IsoSurfacesDlg.cxx
src/VISUGUI/VisuGUI_IsoSurfacesDlg.h
src/VISUGUI/VisuGUI_Module.cxx
src/VISUGUI/VisuGUI_NameDlg.cxx
src/VISUGUI/VisuGUI_NameDlg.h
src/VISUGUI/VisuGUI_OffsetDlg.cxx
src/VISUGUI/VisuGUI_OffsetDlg.h
src/VISUGUI/VisuGUI_Plot3DDlg.cxx
src/VISUGUI/VisuGUI_Plot3DDlg.h
src/VISUGUI/VisuGUI_PopupTools.cxx
src/VISUGUI/VisuGUI_PopupTools.h
src/VISUGUI/VisuGUI_Prs3dDlg.cxx
src/VISUGUI/VisuGUI_Prs3dDlg.h
src/VISUGUI/VisuGUI_Prs3dTools.h
src/VISUGUI/VisuGUI_ScalarBarDlg.cxx
src/VISUGUI/VisuGUI_ScalarBarDlg.h
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.cxx
src/VISUGUI/VisuGUI_ScalarMapOnDeformedShapeDlg.h
src/VISUGUI/VisuGUI_Selection.cxx
src/VISUGUI/VisuGUI_Selection.h
src/VISUGUI/VisuGUI_SetupPlot2dDlg.cxx
src/VISUGUI/VisuGUI_SetupPlot2dDlg.h
src/VISUGUI/VisuGUI_Slider.cxx
src/VISUGUI/VisuGUI_Slider.h
src/VISUGUI/VisuGUI_StreamLinesDlg.cxx
src/VISUGUI/VisuGUI_StreamLinesDlg.h
src/VISUGUI/VisuGUI_TimeAnimation.cxx
src/VISUGUI/VisuGUI_TimeAnimation.h
src/VISUGUI/VisuGUI_Timer.h
src/VISUGUI/VisuGUI_Tools.cxx
src/VISUGUI/VisuGUI_TransparencyDlg.cxx
src/VISUGUI/VisuGUI_TransparencyDlg.h
src/VISUGUI/VisuGUI_VectorsDlg.cxx
src/VISUGUI/VisuGUI_VectorsDlg.h
src/VISUGUI/VisuGUI_ViewTools.cxx
src/VISU_I/Makefile.am
src/VISU_I/VISUConfig.cc
src/VISU_I/VISUConfig.hh
src/VISU_I/VISU_ColoredPrs3dCache_i.cc
src/VISU_I/VISU_ColoredPrs3dHolder_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_CorbaMedConvertor.cxx
src/VISU_I/VISU_CutLines_i.cc
src/VISU_I/VISU_CutPlanes_i.cc
src/VISU_I/VISU_DeformedShape_i.cc
src/VISU_I/VISU_DumpPython.cc
src/VISU_I/VISU_GaussPoints_i.hh
src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_IsoSurfaces_i.cc
src/VISU_I/VISU_Mesh_i.cc
src/VISU_I/VISU_Plot3D_i.cc
src/VISU_I/VISU_Prs3d_i.cc
src/VISU_I/VISU_Result_i.cc
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc
src/VISU_I/VISU_ScalarMap_i.cc
src/VISU_I/VISU_StreamLines_i.cc
src/VISU_I/VISU_Table_i.cc
src/VISU_I/VISU_Table_i.hh
src/VISU_I/VISU_TimeAnimation.cxx
src/VISU_I/VISU_TimeAnimation.h
src/VISU_I/VISU_Vectors_i.cc
src/VISU_I/VISU_ViewManager_i.cc
src/VISU_I/VISU_View_i.cc
src/VVTK/VVTK_ImageWriter.cxx
src/VVTK/VVTK_ImageWriterMgr.cxx
src/VVTK/VVTK_MainWindow.cxx
src/VVTK/VVTK_PickingDlg.cxx
src/VVTK/VVTK_PickingDlg.h
src/VVTK/VVTK_PrimitiveBox.cxx
src/VVTK/VVTK_PrimitiveBox.h
src/VVTK/VVTK_Recorder.cxx
src/VVTK/VVTK_RecorderDlg.cxx
src/VVTK/VVTK_RecorderDlg.h
src/VVTK/VVTK_SegmentationCursorDlg.cxx
src/VVTK/VVTK_SegmentationCursorDlg.h
src/VVTK/VVTK_SizeBox.cxx
src/VVTK/VVTK_SizeBox.h
src/VVTK/VVTK_ViewManager.cxx
src/VVTK/VVTK_ViewModel.cxx
src/VVTK/VVTK_ViewWindow.cxx
src/VVTK/VVTK_ViewWindow.h

index 6a4c36d2340be80640e0484af5b11df1bd69be27..d53f5c10d993212d71a1e075eafee96b6e160133 100644 (file)
@@ -41,10 +41,10 @@ docdir             = $(datadir)/doc/@PACKAGE@
        $(MOC) $< -o $@
 
 # qm-files generation
-%.qm: %.po
-       $(MSG2QM) $< $@
+%.qm: %.ts
+       $(LRELEASE) $< -qm $@
 
-EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.po)
+EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.ts)
 
 mostlyclean-local:
        rm -f @builddir@/*_moc.cxx
index cb5d6e3215a488c8d529e7e7c2dbbb1b86b91b00..b98bf77ea85ed369a03648b30efd9b6a545fa577 100644 (file)
@@ -212,13 +212,13 @@ echo
 
 CHECK_QT
 
-echo
-echo ---------------------------------------------
-echo testing msg2qm
-echo ---------------------------------------------
-echo
+dnl echo
+dnl echo ---------------------------------------------
+dnl echo testing msg2qm
+dnl echo ---------------------------------------------
+dnl echo
 
-CHECK_MSG2QM
+dnl CHECK_MSG2QM
 
 echo
 echo ---------------------------------------------
index d92e9d8c2758bb49f232c619817ec42a35af08cc..63a5f481b7913fbd31640188d9a76c233e9f83f8 100644 (file)
 #include <fstream>     
 #include <strstream>
 #include <vtkCellType.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
 #include <memory>      
 #include "VISU_Convertor_impl.hxx"
 
 #include <vtkUnstructuredGrid.h>
 
+#include <QDir>
+#include <QFileInfo>
+#include <QStringList>
+
+
 using namespace std;
 
 #ifdef DEBUG
@@ -184,11 +186,11 @@ int main(int argc, char** argv){
     for(int i = 0; i < 1; i++){
       if(fi.exists()){
        if(fi.isDir()){
-         QDir aDir(fi.absFilePath());
-         QStringList aStringList = aDir.entryList("*.med",QDir::Files);
+         QDir aDir(fi.absoluteFilePath());
+         QStringList aStringList = aDir.entryList(QStringList("*.med"),QDir::Files);
          int jEnd = aStringList.count();
          for(int j = 0; j < jEnd; j++){
-           parseFile(aDir.filePath(aStringList[j]).latin1());
+           parseFile((const char*)aDir.filePath(aStringList[j]).toLatin1());
          }
        }else{
          parseFile(argv[1]);
index 1c6fd8d8c8d547bbbdb5cefa861333472e93d737..8f8849dba33f35a271c64d0f5df7916946670c09 100644 (file)
@@ -27,7 +27,7 @@
 #include "VISU_Convertor.hxx"
 #include "VISU_ConvertorUtils.hxx"
 
-#include <qstring.h>
+#include <QString>
 
 #include <utility>
 
@@ -52,8 +52,8 @@ VISU_Convertor
     aName.sprintf("%g, -", aTime.first);
   else
     aName.sprintf("%g, %s", aTime.first, aTime.second.c_str());
-  aName = aName.simplifyWhiteSpace();
-  return aName.latin1();
+  aName = aName.simplified();
+  return (const char*)aName.toLatin1();
 }
 
 
@@ -64,20 +64,20 @@ VISU_Convertor
               unsigned int theTimeId) 
 {
   static QString aName;
-  aName = QString(theName.c_str()).simplifyWhiteSpace();
-  int iEnd = strlen(aName);
+  aName = QString(theName.c_str()).simplified();
+  int iEnd = strlen((const char*)aName.toLatin1());
   static int VtkHighLevelLength = 12; //25
   if(iEnd > VtkHighLevelLength) iEnd = VtkHighLevelLength;
   char* aNewName = new char[iEnd+1];
   aNewName[iEnd] = '\0';
-  strncpy(aNewName, aName, iEnd);
+  strncpy(aNewName, (const char*)aName.toLatin1(), iEnd);
   std::replace(aNewName, aNewName + iEnd, ' ', '_');
   if(true || theTimeId == 0)
     aName = aNewName;
   else
     aName.sprintf("%s_%d",aNewName,theTimeId);
   delete[] aNewName;
-  return aName.latin1();
+  return (const char*)aName.toLatin1();
 }
 
 
index c2cd889314fd9b8f78a3ba473cc5b5578c4932c5..8f22e0e597fc15b910caac7c9120955bfba06ea2 100644 (file)
@@ -48,8 +48,8 @@
 #include <vtkCellLinks.h>
 #include <vtkUnsignedCharArray.h>
 
-#include <qstring.h>
-#include <qfileinfo.h>
+#include <QString>
+#include <QFileInfo>
 
 #include <memory>
 
@@ -76,7 +76,7 @@ namespace
   {
     static QString aString;
     aString.sprintf(fmt.c_str(),val);
-    return aString.latin1();
+    return (const char*)aString.toLatin1();
   }
 
 
@@ -695,7 +695,7 @@ VISU_Convertor_impl
       aMeshOnEntity->myIsVTKDone = true;
 
       if(MYDEBUGWITHFILES){
-       std::string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
+       std::string aMeshName = (const char*)QString(theMeshName.c_str()).simplified().toLatin1();
        std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-";
        aFileName += aMeshName + dtos("-%d-",int(theEntity)) + "-MeshOnEntity.vtk";
        VISU::WriteToFile(anAppendFilter->GetOutput(),aFileName);
@@ -762,8 +762,8 @@ VISU_Convertor_impl
       aFamily->myIsVTKDone = true;
 
       if(MYDEBUGWITHFILES){
-       std::string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
-       std::string aFamilyName = QString(theFamilyName.c_str()).simplifyWhiteSpace().latin1();
+       std::string aMeshName = (const char*)QString(theMeshName.c_str()).simplified().toLatin1();
+       std::string aFamilyName = (const char*)QString(theFamilyName.c_str()).simplified().toLatin1();
        std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-";
        aFileName += aMeshName + dtos("-%d-",int(theEntity)) + aFamilyName + "-FamilyOnEntity.vtk";
        VISU::WriteToFile(aSource.GetPointer(),aFileName);
@@ -845,8 +845,8 @@ VISU_Convertor_impl
       aGroup->myIsVTKDone = true;
 
       if(MYDEBUGWITHFILES){
-       std::string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
-       std::string aGroupName = QString(theGroupName.c_str()).simplifyWhiteSpace().latin1();
+       std::string aMeshName = (const char*)QString(theMeshName.c_str()).simplified().toLatin1();
+       std::string aGroupName = (const char*)QString(theGroupName.c_str()).simplified().toLatin1();
        std::string aFileName = std::string(getenv("HOME"))+"/"+getenv("USER")+"-";
        aFileName += aMeshName + "-" + aGroupName + "-MeshOnGroup.vtk";
        VISU::WriteToFile(anAppendFilter->GetOutput(),aFileName);
@@ -950,8 +950,8 @@ VISU_Convertor_impl
       anUnstructuredGridIDMapper->myIsVTKDone = true;
 
       if(MYDEBUGWITHFILES){
-       std::string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
-       std::string aFieldName = QString(theFieldName.c_str()).simplifyWhiteSpace().latin1();
+       std::string aMeshName = (const char*)QString(theMeshName.c_str()).simplified().toLatin1();
+       std::string aFieldName = (const char*)QString(theFieldName.c_str()).simplified().toLatin1();
        std::string aPrefix = std::string(getenv("HOME"))+"/"+getenv("USER")+"-";
        std::string aFileName = aPrefix + aMeshName + dtos("-%d-",int(theEntity)) + 
          aFieldName + dtos("-%d", theStampsNum) + "-TimeStampOnMesh.vtk";
@@ -1039,8 +1039,8 @@ VISU_Convertor_impl
       aGaussPtsIDFilter->myIsVTKDone = true;
 
       if(MYDEBUGWITHFILES){
-       std::string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
-       std::string aFieldName = QString(theFieldName.c_str()).simplifyWhiteSpace().latin1();
+       std::string aMeshName = (const char*)QString(theMeshName.c_str()).simplified().toLatin1();
+       std::string aFieldName = (const char*)QString(theFieldName.c_str()).simplified().toLatin1();
        std::string aPrefix = std::string(getenv("HOME"))+"/"+getenv("USER")+"-";
        std::string aFileName = aPrefix + aMeshName + dtos("-%d-",int(theEntity)) + 
          aFieldName + dtos("-%d",theStampsNum) + "-TimeStampOnGaussPts.vtk";
index 31cf0d9d50fde8048f5e296f1b89124f51eb1d45..9f52e37cdb4abf3e3424b6d71eb95db2e6395d0e 100644 (file)
@@ -1329,7 +1329,7 @@ VISU_MedConvertor
   myMed(theMed)
 {
   myFileInfo.setFile(QString(theFileName.c_str()));
-  myName = myFileInfo.baseName().latin1();
+  myName = (const char*)myFileInfo.baseName().toLatin1();
 }
 
 
index 4b95024400aec10df7833567149016144e19737f..3392d3e82e170c379a358c6c3d58b4fbdd484fb2 100644 (file)
@@ -30,7 +30,7 @@
 #include "MED_GaussUtils.hxx"
 
 #include <boost/thread/mutex.hpp>
-#include <qfileinfo.h>
+#include <QFileInfo>
 
 namespace VISU
 {
index 5dc1a5470d11c53191e9a596b8c8584824b3def0..38106537be9a2be65e0715967f6200f676e8498d 100644 (file)
 
 #include "LightApp_Application.h"
 
+#include "CAM_Module.h"
+
 #include "SALOMEDSClient_Study.hxx"
 #include "SALOMEDSClient_GenericAttribute.hxx"
 #include "SALOMEDSClient_AttributeTableOfInteger.hxx"
 #include "SALOMEDSClient_AttributeTableOfReal.hxx"
 #include "SALOMEDSClient_StudyBuilder.hxx"
 
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qtable.h>
-#include <qtabwidget.h>
-#include <qvaluelist.h>
-#include <qmemarray.h>
-#include <qinputdialog.h>
-#include <qlabel.h>
+#include <QLayout>
+#include <QValidator>
+#include <QTableWidget>
+#include <QTabWidget>
+#include <QList>
+#include <QVector>
+#include <QInputDialog>
+#include <QLabel>
+#include <QIntValidator>
+#include <QDoubleValidator>
+#include <QKeyEvent>
+#include <QHeaderView>
+
 #include "utilities.h"
+
 using namespace std;
 
 #define MARGIN_SIZE       11
@@ -53,13 +61,72 @@ using namespace std;
 #define MIN_TABLE_WIDTH   200
 #define MIN_TABLE_HEIGHT  200
 
+NumDelegateItem::NumDelegateItem( QObject* parent, NumValidator mode )
+  : QItemDelegate( parent ),
+    myMode( mode )
+{
+}
 
-class VisuGUI_Table : public QTable {
+NumDelegateItem::~NumDelegateItem()
+{
+}
+
+QWidget * NumDelegateItem::createEditor( QWidget * parent,
+                                         const QStyleOptionViewItem & option,
+                                         const QModelIndex & index ) const
+{
+  QLineEdit *editor = new QLineEdit(parent);
+  switch ( myMode )
+  {
+  case NV_Int:
+    editor->setValidator( new QIntValidator( editor ) );
+    break;
+  case NV_Real:
+    editor->setValidator( new QDoubleValidator( editor ) );
+    break;
+  default:
+    editor->setText( "No validator!" );
+  }
+  
+  return editor;
+}
+
+void NumDelegateItem::setEditorData( QWidget * editor,
+                                     const QModelIndex & index ) const
+{
+  QLineEdit *aLE = qobject_cast<QLineEdit*>(editor);
+  if ( !aLE )
+    return;
+  
+  switch ( myMode )
+  {
+  case NV_Int:
+    {
+      int value = index.model()->data(index, Qt::DisplayRole).toInt();
+      aLE->setText( QString("%1").arg( value ) );
+      break;
+    }
+  case NV_Real:
+    {
+      double value = index.model()->data(index, Qt::DisplayRole).toDouble();
+      aLE->setText( QString("%1").arg( value ) );
+      break;
+    }
+  default:
+    aLE->setText( "No validator!!!" );
+  }  
+}
+
+
+
+
+
+/*class VisuGUI_Table : public QTableWidget {
 public:
-  VisuGUI_Table( Orientation orient, QWidget* parent = 0, const char* name = 0 ) 
-    : QTable( parent, name ), myValidator( 0 ), myOrientation( orient ) {}
-  VisuGUI_Table( Orientation orient, int numRows, int numCols, QWidget* parent = 0, const char* name = 0 )
-    : QTable( numRows, numCols, parent, name ), myValidator( 0 ), myOrientation( orient ) {}
+  VisuGUI_Table( Orientation orient, QWidget* parent = 0 ) 
+    : QTableWidget( parent ), myValidator( 0 ), myOrientation( orient ) {}
+  VisuGUI_Table( Orientation orient, int numRows, int numCols, QWidget* parent = 0 )
+    : QTableWidget( numRows, numCols, parent ), myValidator( 0 ), myOrientation( orient ) {}
   
   void setValidator( QValidator* v = 0 ) { myValidator = v;  }
   bool isEditing() const { return QTable::isEditing(); }
@@ -67,7 +134,7 @@ public:
 protected:
   QWidget* createEditor ( int row, int col, bool initFromCell ) const
     {
-      bool testUnits = ( myOrientation == Horizontal && col == 0 ) || ( myOrientation == Vertical && row == 0 );
+      bool testUnits = ( myOrientation == Qt::Horizontal && col == 0 ) || ( myOrientation == Qt::Vertical && row == 0 );
       QWidget* wg = QTable::createEditor( row, col, initFromCell );
       if ( wg && wg->inherits("QLineEdit") && myValidator && !testUnits ) 
        (( QLineEdit*)wg)->setValidator( myValidator );
@@ -77,7 +144,7 @@ protected:
 protected:
   QValidator* myValidator;
   Orientation myOrientation;
-};
+  };*/
 
 /*!
   Constructor
@@ -86,12 +153,12 @@ VisuGUI_TableDlg::VisuGUI_TableDlg( QWidget* parent,
                                    _PTR(SObject) obj, 
                                    bool edit,
                                    int which,
-                                   Orientation orient,
+                                   Qt::Orientation orient,
                                    bool showColumnTitles )
-     : QDialog( parent, "", false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+     : QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
        myIntTable( 0 ), myRealTable( 0 )
 {
-  setCaption( edit ? tr( "EDIT_TABLE_TLT" ) : tr( "VIEW_TABLE_TLT" ) );
+  setWindowTitle( edit ? tr( "EDIT_TABLE_TLT" ) : tr( "VIEW_TABLE_TLT" ) );
   setSizeGripEnabled( true );
 
   myObject = obj;
@@ -113,17 +180,21 @@ VisuGUI_TableDlg::VisuGUI_TableDlg( QWidget* parent,
   QWidget* top;
   QVBoxLayout* tl;
   if ( bDoInt && bDoReal ) {
-    top = new QTabWidget( this, "TabWidget" );
-    ( ( QTabWidget* ) top) ->setMargin( MARGIN_SIZE );
+    top = new QTabWidget( this );
+    //( ( QTabWidget* ) top) ->setMargin( MARGIN_SIZE );
   }
   else {
-    top = new QWidget( this, "DumbWidget" );
+    top = new QWidget( this );
     tl  = new QVBoxLayout( top ); tl->setMargin( 0 ); tl->setSpacing( SPACING_SIZE );
   }
 
   if ( bDoInt ) {
     myIntTable = new VisuGUI_TableWidget( top, "myIntTable", edit, orient, showColumnTitles );
-    myIntTable->getTable()->setValidator( new QIntValidator( this ) );
+    //myIntTable->getTable()->setValidator( new QIntValidator( this ) );
+    //QAbstractItemDelegate* item = myIntTable->getTable()->itemDelegate();
+    myIntTable->getTable()->setItemDelegate( new NumDelegateItem( myIntTable, NumDelegateItem::NV_Int ) );
+    //item->deleteLater();
+                                 
     if ( bDoInt && bDoReal )
       ( ( QTabWidget* )top )->addTab( myIntTable, tr( "TABLE_OF_INTEGER_TLT" ) );
     else
@@ -131,15 +202,18 @@ VisuGUI_TableDlg::VisuGUI_TableDlg( QWidget* parent,
   }
   if ( bDoReal ) {
     myRealTable = new VisuGUI_TableWidget( top, "myRealTable", edit, orient, showColumnTitles );
-    myRealTable->getTable()->setValidator( new QDoubleValidator( this ) );
+    //myRealTable->getTable()->setValidator( new QDoubleValidator( this ) );
+    //QAbstractItemDelegate* item = myIntTable->getTable()->itemDelegate();
+    myIntTable->getTable()->setItemDelegate( new NumDelegateItem( myIntTable, NumDelegateItem::NV_Real ) );
+    //item->deleteLater();
     if ( bDoInt && bDoReal )
       ( ( QTabWidget* )top )->addTab( myRealTable, tr( "TABLE_OF_REAL_TLT" ) );
     else
       tl->addWidget( myRealTable );
   }
   if ( !bDoInt && !bDoReal ) {
-    QLabel *dumbLabel = new QLabel( tr( "ERR_TABLE_NOT_AVAILABLE" ), top, "DumbLabel" );
-    dumbLabel->setAlignment( AlignCenter );
+    QLabel *dumbLabel = new QLabel( tr( "ERR_TABLE_NOT_AVAILABLE" ), top );
+    dumbLabel->setAlignment( Qt::AlignCenter );
     tl->addWidget( dumbLabel );
   }
 
@@ -227,20 +301,20 @@ void VisuGUI_TableDlg::onOK()
              }
              if ( !bEmptyRow ) {  // Skip rows with no data !!!
                // set row title
-               tblIntAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : rowTitles[ i ].latin1() ); 
+               tblIntAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : (const char*)rowTitles[ i ].toLatin1() ); 
                // set row unit
-               tblIntAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : units[ i ].latin1() ); 
+               tblIntAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : (const char*)units[ i ].toLatin1() ); 
                nRow++;
              }
            }
            if ( nRow > 0 ) { // Set columns only if table is not empty, otherwise exception is raised !!!
              // column titles
              for ( i = 0; i < colTitles.count(); i++ )
-               tblIntAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : colTitles[ i ].latin1() );
+               tblIntAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : (const char*)colTitles[ i ].toLatin1() );
            }
          }
          // title
-         tblIntAttr->SetTitle( myIntTable->getTableTitle().latin1() );
+         tblIntAttr->SetTitle( (const char*)myIntTable->getTableTitle().toLatin1() );
        }
        if ( myRealTable ) {
          builder->RemoveAttribute( myObject, "AttributeTableOfReal" );
@@ -271,20 +345,20 @@ void VisuGUI_TableDlg::onOK()
              }
              if ( !bEmptyRow ) {  // Skip rows with no data !!!
                // set row title
-               tblRealAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : rowTitles[ i ].latin1() ); 
+               tblRealAttr->SetRowTitle( nRow+1, rowTitles[ i ].isNull() ? "" : (const char*)rowTitles[ i ].toLatin1() ); 
                // set row unit
-               tblRealAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : units[ i ].latin1() );
+               tblRealAttr->SetRowUnit( nRow+1, units[ i ].isNull() ? "" : (const char*)units[ i ].toLatin1() );
                nRow++;
              }
            }
            if ( nRow > 0 ) { // Set columns only if table is not empty, otherwise exception is raised !!!
              // column titles
              for ( i = 0; i < colTitles.count(); i++ )
-               tblRealAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : colTitles[ i ].latin1() );
+               tblRealAttr->SetColumnTitle( i+1, colTitles[ i ].isNull() ? "" : (const char*)colTitles[ i ].toLatin1() );
            }
          }
          // title
-         tblRealAttr->SetTitle( myRealTable->getTableTitle().latin1() );
+         tblRealAttr->SetTitle( (const char*)myRealTable->getTableTitle().toLatin1() );
        }
        if ( myIntTable || myRealTable)
          builder->CommitCommand(); // commit transaction !!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -295,7 +369,7 @@ void VisuGUI_TableDlg::onOK()
        MESSAGE("VisuGUI_TableDlg::onOK : Exception has been caught !!!");
        builder->AbortCommand();  // abort transaction  !!!!!!!!!!!!!!!!!!!!!!!!!!!
        done = false;
-       SUIT_MessageBox::error1 ( this, tr("ERR_ERROR"), tr("ERR_APP_EXCEPTION"), tr ("BUT_OK") );
+       SUIT_MessageBox::critical ( this, tr("ERR_ERROR"), tr("ERR_APP_EXCEPTION") );
       }
     }
   }
@@ -319,10 +393,9 @@ void VisuGUI_TableDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
   }
 }
 
@@ -464,7 +537,7 @@ void VisuGUI_TableDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
@@ -477,42 +550,47 @@ void VisuGUI_TableDlg::keyPressEvent( QKeyEvent* e )
 VisuGUI_TableWidget::VisuGUI_TableWidget( QWidget* parent, 
                                              const char* name, 
                                              bool edit, 
-                                             Orientation orient,
+                                             Qt::Orientation orient,
                                              bool showColumnTitles )
-     : QWidget( parent, name ), myOrientation( orient )
+     : QWidget( parent ), myOrientation( orient )
 {
   QGridLayout* mainLayout = new QGridLayout( this );
   mainLayout->setMargin( 0 );
   mainLayout->setSpacing( SPACING_SIZE );
 
-  myTitleEdit = new QLineEdit( this, "TitleEdit" );
-  myTitleEdit->setAlignment( AlignCenter );
+  myTitleEdit = new QLineEdit( this );
+  myTitleEdit->setAlignment( Qt::AlignCenter );
   myTitleEdit->setReadOnly( !edit );
   QFont fnt = myTitleEdit->font();
   fnt.setBold( true ); 
   myTitleEdit->setFont( fnt );
 
-  myTable = new VisuGUI_Table( orient, this, "Table" );
-  myTable->setNumRows( 5 );
-  myTable->setNumCols( 5 );
+  //myTable = new VisuGUI_Table( orient, this );
+  myTable = new QTableWidget( 5, 5, this );
+  //myTable->setNumRows( 5 );
+  //myTable->setNumCols( 5 );
   myTable->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
   myTable->setMinimumSize( MIN_TABLE_WIDTH, MIN_TABLE_HEIGHT );
-  myTable->setSelectionMode( QTable::Single );
+  myTable->setSelectionMode( QAbstractItemView::SingleSelection );
   myTable->setShowGrid( true );
-  myTable->setColumnMovingEnabled( false );
-  myTable->setRowMovingEnabled( false );
-  myTable->setReadOnly( !edit );
+  myTable->horizontalHeader()->setMovable( false );
+  myTable->verticalHeader()->setMovable( false );
+  //myTable->setColumnMovingEnabled( false );
+  //myTable->setRowMovingEnabled( false );
   myTable->setDragEnabled( false );
+  //myTable->setReadOnly( !edit );
+  myTable->setEditTriggers( edit ? QAbstractItemView::AllEditTriggers : QAbstractItemView::NoEditTriggers );
+
   setUnitsTitle( tr( "UNITS_TLT" ) );
 
   if ( !showColumnTitles ) {
-    if ( myOrientation == Horizontal ) {
+    if ( myOrientation == Qt::Horizontal ) {
       myTable->horizontalHeader()->hide();
-      myTable->setTopMargin( 0 );
+      //myTable->setTopMargin( 0 );
     }
     else {
       myTable->verticalHeader()->hide();
-      myTable->setLeftMargin( 0 );
+      //myTable->setLeftMargin( 0 );
     }
   }
 
@@ -520,13 +598,13 @@ VisuGUI_TableWidget::VisuGUI_TableWidget( QWidget* parent,
   mainLayout->addWidget( myTable, 1, 0 );
 
   if ( edit ) {
-    myAddRowBtn    = new QPushButton( tr( "ADD_ROW_BTN" ), this, "AddRowBtn" );
-    myDelRowBtn    = new QPushButton( tr( "REMOVE_ROW_BTN" ), this, "DelRowBtn" );
-    myAddColBtn    = new QPushButton( tr( "ADD_COLUMN_BTN" ), this, "AddColBtn" );
-    myDelColBtn    = new QPushButton( tr( "REMOVE_COLUMN_BTN" ), this, "DelColBtn" );
-    myAdjustBtn    = new QPushButton( tr( "ADJUST_CELLS_BTN" ), this, "AdjustBtn" );
-    mySelectAllBtn = new QPushButton( tr( "SELECT_ALL_BTN" ), this, "SelectAllBtn" );
-    myClearBtn     = new QPushButton( tr( "CLEAR_BTN"), this, "ClearBtn" );
+    myAddRowBtn    = new QPushButton( tr( "ADD_ROW_BTN" ), this );
+    myDelRowBtn    = new QPushButton( tr( "REMOVE_ROW_BTN" ), this );
+    myAddColBtn    = new QPushButton( tr( "ADD_COLUMN_BTN" ), this );
+    myDelColBtn    = new QPushButton( tr( "REMOVE_COLUMN_BTN" ), this );
+    myAdjustBtn    = new QPushButton( tr( "ADJUST_CELLS_BTN" ), this );
+    mySelectAllBtn = new QPushButton( tr( "SELECT_ALL_BTN" ), this );
+    myClearBtn     = new QPushButton( tr( "CLEAR_BTN"), this );
     QVBoxLayout* btnLayout = new QVBoxLayout; btnLayout->setMargin( 0 ); btnLayout->setSpacing( SPACING_SIZE );
     btnLayout->addWidget( myAddRowBtn );
     btnLayout->addWidget( myDelRowBtn );
@@ -578,14 +656,14 @@ QString VisuGUI_TableWidget::getTableTitle()
 */
 void VisuGUI_TableWidget::setNumRows( const int num )
 {
-  myOrientation == Horizontal ? myTable->setNumRows( num ) : myTable->setNumCols( num );
+  myOrientation == Qt::Horizontal ? myTable->setRowCount( num ) : myTable->setColumnCount( num );
 }
 /*!
   Gets total number of rows
 */
 int VisuGUI_TableWidget::getNumRows()
 {
-  return myOrientation == Horizontal ? myTable->numRows() : myTable->numCols();
+  return myOrientation == Qt::Horizontal ? myTable->rowCount() : myTable->columnCount();
 }
 /*!
   Sets total number of columns
@@ -593,8 +671,8 @@ int VisuGUI_TableWidget::getNumRows()
 void VisuGUI_TableWidget::setNumCols( const int num )
 {
   // !!! first column contains units !!!
-  myOrientation == Horizontal ? myTable->setNumCols( num+1 ) : myTable->setNumRows( num+1 );
-//  myOrientation == Horizontal ? myTable->setColumnReadOnly( 0, true ) : myTable->setRowReadOnly( 0, true );
+  myOrientation == Qt::Horizontal ? myTable->setColumnCount( num+1 ) : myTable->setRowCount( num+1 );
+//  myOrientation == Qt::Horizontal ? myTable->setColumnReadOnly( 0, true ) : myTable->setRowReadOnly( 0, true );
 }
 /*!
   Gets total number of columns
@@ -602,18 +680,24 @@ void VisuGUI_TableWidget::setNumCols( const int num )
 int VisuGUI_TableWidget::getNumCols()
 {
   // !!! first column contains units !!!
-  return myOrientation == Horizontal ? myTable->numCols()-1 : myTable->numRows()-1;
+  return myOrientation == Qt::Horizontal ? myTable->columnCount()-1 : myTable->rowCount()-1;
 }
 /*!
   Sets rows titles
 */
 void VisuGUI_TableWidget::setRowTitles( QStringList& tlts )
 {
-  for ( int i = 0; i < tlts.count(); i++ ) {
-    myOrientation == Horizontal ? 
-      myTable->verticalHeader()->setLabel( i, tlts[i] ) : 
-      myTable->horizontalHeader()->setLabel( i, tlts[i] );
-  }
+  QStringList aLabels;
+  for ( int i = 0; i < tlts.count(); i++ )
+    tlts[i].isNull() ? aLabels.append("") : aLabels.append( tlts[i] );
+
+  myOrientation == Qt::Horizontal ?
+    myTable->setVerticalHeaderLabels( aLabels ) :
+    myTable->setHorizontalHeaderLabels( aLabels );
+    
+    //  myTable->verticalHeader()->setLabel( i, tlts[i] ) : 
+    //myTable->horizontalHeader()->setLabel( i, tlts[i] );
+  //}
 }
 /*!
   Gets rows titles
@@ -621,14 +705,14 @@ void VisuGUI_TableWidget::setRowTitles( QStringList& tlts )
 void VisuGUI_TableWidget::getRowTitles( QStringList& tlts )
 {
   tlts.clear();
-  if ( myOrientation == Horizontal ) {
-    for ( int i = 0; i < myTable->numRows(); i++ ) {
-      tlts.append( myTable->verticalHeader()->label( i ) );
+  if ( myOrientation == Qt::Horizontal ) {
+    for ( int i = 0; i < myTable->rowCount(); i++ ) {
+      tlts.append( myTable->verticalHeaderItem(i) ? myTable->verticalHeaderItem(i)->text() : "" );
     }
   }
   else {
-    for ( int i = 0; i < myTable->numCols(); i++ ) {
-      tlts.append( myTable->horizontalHeader()->label( i ) );
+    for ( int i = 0; i < myTable->columnCount(); i++ ) {
+      tlts.append( myTable->horizontalHeaderItem(i) ? myTable->horizontalHeaderItem(i)->text() : "" );
     }
   }
 }
@@ -637,12 +721,14 @@ void VisuGUI_TableWidget::getRowTitles( QStringList& tlts )
 */
 void VisuGUI_TableWidget::setColTitles( QStringList& tlts )
 {
-  // !!! first column contains units !!!
-  for ( int i = 0; i < tlts.count(); i++ ) {
-    myOrientation == Horizontal ? 
-      myTable->horizontalHeader()->setLabel( i+1, tlts[i].isNull() ? "" : tlts[i] ) :
-      myTable->verticalHeader()->setLabel( i+1, tlts[i].isNull() ? "" : tlts[i] );
-  }
+  QStringList aLabels;
+  for ( int i = 0; i < tlts.count(); i++ )
+    tlts[i].isNull() ? aLabels.append("") : aLabels.append( tlts[i] );
+
+  myOrientation == Qt::Horizontal ?
+    myTable->setHorizontalHeaderLabels( aLabels ) :
+    myTable->setVerticalHeaderLabels( aLabels );
+  
   setUnitsTitle( tr( "UNITS_TLT" ) );
 }
 /*!
@@ -652,14 +738,14 @@ void VisuGUI_TableWidget::getColTitles( QStringList& tlts )
 {
   // !!! first column contains units !!!
   tlts.clear();
-  if ( myOrientation == Horizontal ) {
-    for ( int i = 1; i < myTable->numCols(); i++ ) {
-      tlts.append( myTable->horizontalHeader()->label( i ) );
-    }
+  if ( myOrientation == Qt::Horizontal ) {
+    for ( int i = 1; i < myTable->columnCount(); i++ ) {
+      tlts.append( myTable->horizontalHeaderItem(i) ? myTable->horizontalHeaderItem(i)->text() : "" );
+    }    
   }
   else {
-    for ( int i = 1; i < myTable->numRows(); i++ ) {
-      tlts.append( myTable->verticalHeader()->label( i ) );
+    for ( int i = 1; i < myTable->rowCount(); i++ ) {
+      tlts.append( myTable->verticalHeaderItem(i) ? myTable->verticalHeaderItem(i)->text() : "" );
     }
   }
 }
@@ -668,15 +754,27 @@ void VisuGUI_TableWidget::getColTitles( QStringList& tlts )
 */
 void VisuGUI_TableWidget::setUnitsTitle( const QString& tlt ) {
   // !!! first column contains units !!!
-  myOrientation == Horizontal ? myTable->horizontalHeader()->setLabel( 0, tlt.isNull() ? "" : tlt ) : myTable->verticalHeader()->setLabel( 0, tlt.isNull() ? "" : tlt );
+  myOrientation == Qt::Horizontal ?
+    myTable->horizontalHeaderItem(0)->setText( tlt.isNull() ? "" : tlt ) :
+    myTable->verticalHeaderItem(0)->setText( tlt.isNull() ? "" : tlt );
 }
 /*!
   Sets units
 */
 void VisuGUI_TableWidget::setUnits( QStringList& units )
 {
-  for ( int i = 0; i < units.count(); i++ ) {
-    myOrientation == Horizontal ? myTable->setText( i, 0, units[i].isNull() ? "" : units[i] ) : myTable->setText( 0, i, units[i].isNull() ? "" : units[i] );
+  QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+  if ( aModel )
+  {
+    QModelIndex anIndex;
+    for ( int i = 0; i < units.count(); i++ )
+    {
+      myOrientation == Qt::Horizontal ?
+        anIndex = aModel->index( i, 0 ) :
+        anIndex = aModel->index( 0, i );
+
+      aModel->setData( anIndex, QVariant( units[i].isNull() ? "" : units[i] ) );      
+    }
   }
 }
 /*!
@@ -685,13 +783,18 @@ void VisuGUI_TableWidget::setUnits( QStringList& units )
 void VisuGUI_TableWidget::getUnits( QStringList& units )
 {
   units.clear();
-  if ( myOrientation == Horizontal ) {
-    for ( int i = 0; i < myTable->numRows(); i++ )
-      units.append( myTable->text( i, 0 ).isNull() ? QString("") : myTable->text( i, 0 ) );
-  }
-  else {
-    for ( int i = 0; i < myTable->numCols(); i++ )
-      units.append( myTable->text( 0, i ).isNull() ? QString("") : myTable->text( 0, i ) );
+  QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+  if ( aModel )
+  {
+    if ( myOrientation == Qt::Horizontal )
+    {
+      for ( int i = 0; i < myTable->rowCount(); i++ )
+        units.append( aModel->index( i, 0 ).data().toString() );
+    }
+    else {
+      for ( int i = 0; i < myTable->columnCount(); i++ )
+        units.append( aModel->index( 0, i ).data().toString() );
+    }
   }
 }
 /*!
@@ -699,15 +802,17 @@ void VisuGUI_TableWidget::getUnits( QStringList& units )
 */
 void VisuGUI_TableWidget::setRowData( int row, QStringList& data )
 {
-  if ( row >= 0 && row < getNumRows() ) {
-    for ( int i = 0; i < data.count(); i++ ) {
-      if ( data[i].isNull() ) {
-       myOrientation == Horizontal ? myTable->clearCell( row, i+1 ) :
-                                     myTable->clearCell( i+1, row );
-      }
-      else {
-       myOrientation == Horizontal ? myTable->setText( row, i+1, data[i] ) :
-                                     myTable->setText( i+1, row, data[i] );
+  QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+  if ( aModel )
+  {
+    QModelIndex anIndex; 
+    if ( row >= 0 && row < getNumRows() ) {
+      for ( int i = 0; i < data.count(); i++ )
+      {
+        myOrientation == Qt::Horizontal ? anIndex = aModel->index( row, i+1 ) :
+                                          anIndex = aModel->index( i+1, row );
+        aModel->setData( anIndex, QVariant( data[i] ) );
+          
       }
     }
   }
@@ -718,14 +823,20 @@ void VisuGUI_TableWidget::setRowData( int row, QStringList& data )
 void VisuGUI_TableWidget::getRowData( int row, QStringList& data )
 {
   data.clear();
-  if ( row >= 0 && row < getNumRows() ) {
-    if ( myOrientation == Horizontal ) {
-      for ( int i = 1; i < myTable->numCols(); i++ )
-       data.append( myTable->text( row, i ) );
-    }
-    else {
-      for ( int i = 1; i < myTable->numRows(); i++ )
-       data.append( myTable->text( i, row ) );
+  QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myTable->model() );
+  if ( aModel )
+  {
+    if ( row >= 0 && row < getNumRows() )
+    {
+      if ( myOrientation == Qt::Horizontal )
+      {
+        for ( int i = 1; i < myTable->columnCount(); i++ )
+          data.append( aModel->index( row, i ).data().toString() );
+      }
+      else {
+        for ( int i = 1; i < myTable->rowCount(); i++ )
+          data.append( aModel->index( i, row ).data().toString() );
+      }
     }
   }
 }
@@ -734,39 +845,38 @@ void VisuGUI_TableWidget::getRowData( int row, QStringList& data )
 */
 void VisuGUI_TableWidget::adjustTable()
 {
-  int i;
-  for ( i = 0; i < myTable->numRows(); i++ )
-    myTable->adjustRow( i );
-  for ( i = 0; i < myTable->numCols(); i++ )
-    myTable->adjustColumn( i );
+  myTable->resizeRowsToContents();
+  myTable->resizeColumnsToContents();
 }
 /*!
   Called when selection changed in table
 */
 void VisuGUI_TableWidget::updateButtonsState()
 {
-  if ( myTable->isReadOnly() )
+  if ( myTable->editTriggers() == QAbstractItemView::NoEditTriggers )
     return;
   bool bDR = false; // <Delete Row(s)>
   bool bDC = false; // <Delete Column(s)>
   bool bSA = false; // <Select All>
   bool bCT = false; // <Clear>
   int i;
-  int c = myOrientation == Horizontal ? 0 : 1;
-  for ( i = c; i < myTable->numRows(); i++ ) {
+  //TO DO column/row selection check
+  /*int c = myOrientation == Qt::Horizontal ? 0 : 1;
+  for ( i = c; i < myTable->rowCount(); i++ ) {
+    
     if ( myTable->isRowSelected( i, true ) )
       bDR = true;
     else 
       bSA = true;
   }
-  c = myOrientation == Horizontal ? 1 : 0;
-  for ( i = c; i < myTable->numCols(); i++ ) {
+  c = myOrientation == Qt::Horizontal ? 1 : 0;
+  for ( i = c; i < myTable->columnCount(); i++ ) {
     if ( myTable->isColumnSelected( i, true ) )
       bDC = true;
     else 
       bSA = true;
-  }
-  int nbSel = myTable->numSelections();
+      }*/
+  /*int nbSel = myTable->numSelections();
   for ( i = 0; i < nbSel; i++ ) {
     QTableSelection ts = myTable->selection( i );
     for ( int j = ts.topRow(); j < ts.bottomRow()+1; j++) {
@@ -775,7 +885,19 @@ void VisuGUI_TableWidget::updateButtonsState()
          bCT = true;
       }
     }
+    }*/
+  QList<QTableWidgetItem*> aSelection = myTable->selectedItems();
+  QList<QTableWidgetItem*>::ConstIterator anIt = aSelection.constBegin(),
+    anEndIt = aSelection.constEnd();
+  for ( ; anIt !=  anEndIt; anIt++ )
+  {
+    if( *anIt )
+    {
+      bCT = true;
+      break;
+    }
   }
+  
   if ( myTable->item( myTable->currentRow(), myTable->currentColumn() ) )
     bCT = true;
   myDelRowBtn->setEnabled( bDR );
@@ -788,7 +910,7 @@ void VisuGUI_TableWidget::updateButtonsState()
 */
 void VisuGUI_TableWidget::addRow()
 {
-  myTable->insertRows( myTable->numRows(), 1 );
+  myTable->insertRow( myTable->rowCount() );
   updateButtonsState();
 }
 /*!
@@ -796,7 +918,7 @@ void VisuGUI_TableWidget::addRow()
 */
 void VisuGUI_TableWidget::addCol()
 {
-  myTable->insertColumns( myTable->numCols(), 1 );
+  myTable->insertColumn( myTable->columnCount() );
   updateButtonsState();
 }
 /*!
@@ -804,10 +926,11 @@ void VisuGUI_TableWidget::addCol()
 */
 void VisuGUI_TableWidget::delRow()
 {
-  int c = myOrientation == Horizontal ? 0 : 1;
-  QValueList<int> il;
+  //TODO
+  /*int c = myOrientation == Qt::Horizontal ? 0 : 1;
+  QList<int> il;
   int i;
-  for ( i = c; i < myTable->numRows(); i++ )
+  for ( i = c; i < myTable->rowCount(); i++ )
     if ( myTable->isRowSelected( i, true ) )
       il.append( i );
   if ( il.count() > 0 ) {
@@ -815,7 +938,8 @@ void VisuGUI_TableWidget::delRow()
     for ( i = 0; i < il.count(); i++ )
       ildel[ i ] = il[ i ];
     myTable->removeRows( ildel );
-  }
+    }*/
+  
   updateButtonsState();
 }
 /*!
@@ -823,7 +947,8 @@ void VisuGUI_TableWidget::delRow()
 */
 void VisuGUI_TableWidget::delCol()
 {
-  int c = myOrientation == Horizontal ? 1 : 0;
+  //TODO
+  /*int c = myOrientation == Qt::Horizontal ? 1 : 0;
   QValueList<int> il;
   int i;
   for ( i = c; i < myTable->numCols(); i++ )
@@ -834,7 +959,7 @@ void VisuGUI_TableWidget::delCol()
     for ( i = 0; i < il.count(); i++ )
       ildel[ i ] = il[ i ];
     myTable->removeColumns( ildel );
-  }
+    }*/
   updateButtonsState();
 }
 /*!
@@ -842,10 +967,11 @@ void VisuGUI_TableWidget::delCol()
 */
 void VisuGUI_TableWidget::selectAll()
 {
-  myTable->clearSelection();
+  /*myTable->clearSelection();
   QTableSelection ts;
   ts.init( 0, 0 ); ts.expandTo( myTable->numRows()-1, myTable->numCols()-1 );
-  myTable->addSelection( ts );
+  myTable->addSelection( ts );*/
+  myTable->selectAll();
   updateButtonsState();
 }
 /*!
@@ -853,15 +979,15 @@ void VisuGUI_TableWidget::selectAll()
 */
 void VisuGUI_TableWidget::clearTable()
 {
-  int nbSel = myTable->numSelections();
+  /*int nbSel = myTable->numSelections();
   for ( int i = 0; i < nbSel; i++ ) {
     QTableSelection ts = myTable->selection( i );
     for ( int j = ts.topRow(); j < ts.bottomRow()+1; j++) {
-      if ( myOrientation == Vertical && j == 0 ) {
+      if ( myOrientation == Qt::Vertical && j == 0 ) {
 //     continue;      // UNITS
       }
       for ( int k = ts.leftCol(); k < ts.rightCol()+1; k++) {
-       if ( myOrientation == Horizontal && k == 0 ) {
+       if ( myOrientation == Qt::Horizontal && k == 0 ) {
 //       continue;   // UNITS
        }
        myTable->clearCell( j, k );
@@ -870,7 +996,8 @@ void VisuGUI_TableWidget::clearTable()
   }
   if ( nbSel == 0 )
     myTable->clearCell( myTable->currentRow(), myTable->currentColumn() );
-  myTable->clearSelection();
+    myTable->clearSelection();*/
+  myTable->clearContents();
   updateButtonsState();
 }
 /*!
@@ -879,14 +1006,15 @@ void VisuGUI_TableWidget::clearTable()
 bool VisuGUI_TableWidget::eventFilter( QObject* o, QEvent* e )
 {
   if ( e->type() == QEvent::MouseButtonDblClick) {
-    QMouseEvent* me = ( QMouseEvent* )e;
-    if ( me->button() == LeftButton && !myTable->isReadOnly() ) {
+    //TODO
+    /*QMouseEvent* me = ( QMouseEvent* )e;
+    if ( me->button() == Qt::LeftButton && (myTable->editTriggers() != QAbstractItemView::NoEditTriggers ) ) {
       if ( o == myTable->horizontalHeader() ) {
        for ( int i = 0; i < myTable->horizontalHeader()->count(); i++ ) {
          QRect rect = myTable->horizontalHeader()->sectionRect( i );
          rect.addCoords( 1, 1, -1, -1 );
          if ( rect.contains( myTable->horizontalHeader()->mapFromGlobal( me->globalPos() ) ) ) {
-           if ( myOrientation == Vertical || i != 0 ) {
+           if ( myOrientation == Qt::Vertical || i != 0 ) {
              bool bOk;
              QString tlt = QInputDialog::getText( tr( "SET_TITLE_TLT" ), 
                                                   tr( "TITLE_LBL" ),
@@ -906,7 +1034,7 @@ bool VisuGUI_TableWidget::eventFilter( QObject* o, QEvent* e )
          QRect rect = myTable->verticalHeader()->sectionRect( i );
          rect.addCoords( 1, 1, -1, -1 );
          if ( rect.contains( myTable->verticalHeader()->mapFromGlobal( me->globalPos() ) ) ) {
-           if ( myOrientation == Horizontal || i != 0 ) {
+           if ( myOrientation == Qt::Horizontal || i != 0 ) {
              bool bOk;
              QString tlt = QInputDialog::getText( tr( "SET_TITLE_TLT" ), 
                                                   tr( "TITLE_LBL" ),
@@ -921,24 +1049,21 @@ bool VisuGUI_TableWidget::eventFilter( QObject* o, QEvent* e )
          }
        }
       }
-    }    
-  }
+      }*/    
+  }     
   else if ( e->type() == QEvent::KeyRelease && o == myTable ) {
     QKeyEvent* ke = (QKeyEvent*)e;
-    if ( ke->key() == Key_Delete && !myTable->isEditing() ) {
+    if ( ke->key() == Qt::Key_Delete && (myTable->editTriggers() != QAbstractItemView::NoEditTriggers) ) {
       clearTable();
     }
-    else if ( ke->key() == Key_Backspace && !myTable->isEditing() ) {
+    else if ( ke->key() == Qt::Key_Backspace && (myTable->editTriggers() != QAbstractItemView::NoEditTriggers) ) {
       clearTable();
       int i = myTable->currentRow();
       int j = myTable->currentColumn() - 1;
-      if ( j < 0 ) { j = myTable->numCols()-1; i--; }
+      if ( j < 0 ) { j = myTable->columnCount()-1; i--; }
       if ( i >= 0 && j >= 0 )
        myTable->setCurrentCell( i, j );
     }
   }
   return QWidget::eventFilter( o, e );
 }
-
-
-
index 44621d27c92462cb940ecd286cd3ba569c854ae2..d36731ee0a2e7e395ab969a9a2715b07a77eceb4 100644 (file)
 #ifndef VisuGUI_TABLE_DLG_H
 #define VisuGUI_TABLE_DLG_H
 
-#include <qdialog.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <QDialog>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QItemDelegate>
 
-class VisuGUI_Table;
+class QTableWidget;
 class VisuGUI_TableWidget;
 
 #include <SALOMEDSClient_SObject.hxx>
@@ -47,7 +48,7 @@ public:
                    _PTR(SObject) obj, 
                    bool edit = false,
                    int which = ttAuto, 
-                   Orientation orient = Horizontal,
+                   Qt::Orientation orient = Qt::Horizontal,
                    bool showColumnTitles = true );
   ~VisuGUI_TableDlg();
 
@@ -78,7 +79,7 @@ public:
   VisuGUI_TableWidget( QWidget* parent = 0, 
                       const char* name = 0, 
                       bool edit = false, 
-                      Orientation orient = Horizontal,
+                      Qt::Orientation orient = Qt::Horizontal,
                       bool showColumnTitles = true );
   ~VisuGUI_TableWidget();
 
@@ -98,7 +99,7 @@ public:
   void    setRowData( int row, QStringList& data );
   void    getRowData( int row, QStringList& data );
 
-  VisuGUI_Table*   getTable()     { return myTable; } 
+  QTableWidget*     getTable()     { return myTable; } 
   QLineEdit*       getTitleEdit() { return myTitleEdit; }
 
   bool    eventFilter( QObject* o, QEvent* e);
@@ -115,7 +116,7 @@ public slots:
 
 private:
   QLineEdit*       myTitleEdit;
-  VisuGUI_Table*   myTable;
+  QTableWidget*    myTable;
   QPushButton*     myAddRowBtn;
   QPushButton*     myAddColBtn;
   QPushButton*     myDelRowBtn;
@@ -123,7 +124,24 @@ private:
   QPushButton*     myAdjustBtn;
   QPushButton*     mySelectAllBtn;
   QPushButton*     myClearBtn;
-  Orientation      myOrientation;
+  Qt::Orientation  myOrientation;
+};
+
+class NumDelegateItem: public QItemDelegate
+{
+public:
+  enum NumValidator{ NV_Int, NV_Real };
+
+  NumDelegateItem( QObject* parent, NumValidator mode = NV_Int );
+  virtual ~NumDelegateItem();
+
+  virtual QWidget * createEditor( QWidget * parent,
+                                 const QStyleOptionViewItem & option,
+                                 const QModelIndex & index ) const;
+  virtual void setEditorData( QWidget * editor,
+                             const QModelIndex & index ) const;
+private:
+  int         myMode;
 };
 
 #endif // VisuGUI_TABLE_DLG_H
index 853d56c5b737bc52d59f2efb7b3413131b2c7062..de0ddc513fc3fe05330cc63130cb5b719030ddd5 100644 (file)
@@ -30,6 +30,7 @@
 #include "VISU_PipeLine.hxx"
 #include "VTKViewer_ShrinkFilter.h"
 #include "VTKViewer_GeometryFilter.h"
+#include "SALOME_InteractiveObject.hxx"
  
 #include <stdexcept>
 #include <sstream>
diff --git a/src/VISUGUI/VISU_images.ts b/src/VISUGUI/VISU_images.ts
new file mode 100644 (file)
index 0000000..dd7a9d4
--- /dev/null
@@ -0,0 +1,294 @@
+<!DOCTYPE TS>
+<TS version="1.1" >
+    <context>
+        <name>@default</name>
+        <message>
+            <source>ICON_ADD</source>
+            <translation>Visu_add.png</translation>
+        </message>
+        <message>
+            <source>ICON_CUBE_AXES</source>
+            <translation>Visu_graduated_axes.png</translation>
+        </message>
+        <message>
+            <source>ICON_CUT_LINES</source>
+            <translation>Visu_cutlines.png</translation>
+        </message>
+        <message>
+            <source>ICON_CUT_PLANES</source>
+            <translation>Visu_cutplanes.png</translation>
+        </message>
+        <message>
+            <source>ICON_DEFORMED_SHAPE</source>
+            <translation>Visu_deformed.png</translation>
+        </message>
+        <message>
+            <source>ICON_ERASE_ALL</source>
+            <translation>Visu_eraseall.png</translation>
+        </message>
+        <message>
+            <source>ICON_GAUSS_NEW_VIEWER</source>
+            <translation>Visu_points.png</translation>
+        </message>
+        <message>
+            <source>ICON_GAUSS_POINTS</source>
+            <translation>Visu_gauss_points.png</translation>
+        </message>
+        <message>
+            <source>ICON_GLOBAL_SELECTION</source>
+            <translation>Visu_selectall.png</translation>
+        </message>
+        <message>
+            <source>ICON_HOLO_RENDER</source>
+            <translation>Visu_holo_render.png</translation>
+        </message>
+        <message>
+            <source>ICON_IMPORT_MED</source>
+            <translation>Visu_import_med.png</translation>
+        </message>
+        <message>
+            <source>ICON_ISO_SURFACES</source>
+            <translation>Visu_isosurfaces.png</translation>
+        </message>
+        <message>
+            <source>ICON_LOAD_TEXTURE</source>
+            <translation>Visu_load_texture.png</translation>
+        </message>
+        <message>
+            <source>ICON_MULTIPR_VIEW_FULL</source>
+            <translation>Visu_tree_multipr_full.png</translation>
+        </message>
+        <message>
+            <source>ICON_MULTIPR_VIEW_HIDE</source>
+            <translation>Visu_tree_multipr_hide.png</translation>
+        </message>
+        <message>
+            <source>ICON_MULTIPR_VIEW_LOW</source>
+            <translation>Visu_tree_multipr_low.png</translation>
+        </message>
+        <message>
+            <source>ICON_MULTIPR_VIEW_MEDIUM</source>
+            <translation>Visu_tree_multipr_medium.png</translation>
+        </message>
+        <message>
+            <source>ICON_OBJBROWSER_Visu</source>
+            <translation>Visu_tree_visu.png</translation>
+        </message>
+        <message>
+            <source>ICON_PARTIAL_SELECTION</source>
+            <translation>Visu_selectonly.png</translation>
+        </message>
+        <message>
+            <source>ICON_PLOT2D</source>
+            <translation>Visu_plot2d.png</translation>
+        </message>
+        <message>
+            <source>ICON_PLOT_3D</source>
+            <translation>Visu_plot3d.png</translation>
+        </message>
+        <message>
+            <source>ICON_POINTS</source>
+            <translation>Visu_points.png</translation>
+        </message>
+        <message>
+            <source>ICON_REMOVE</source>
+            <translation>Visu_remove.png</translation>
+        </message>
+        <message>
+            <source>ICON_SCALAR_MAP</source>
+            <translation>Visu_scalars.png</translation>
+        </message>
+        <message>
+            <source>ICON_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
+            <translation>Visu_scalarmapondeformedshape.png</translation>
+        </message>
+        <message>
+            <source>ICON_SCALING</source>
+            <translation>Visu_scaling.png</translation>
+        </message>
+        <message>
+            <source>ICON_SLIDER_AVI</source>
+            <translation>Visu_slider_avi.png</translation>
+        </message>
+        <message>
+            <source>ICON_SLIDER_FIRST</source>
+            <translation>Visu_slider_first.png</translation>
+        </message>
+        <message>
+            <source>ICON_SLIDER_LAST</source>
+            <translation>Visu_slider_last.png</translation>
+        </message>
+        <message>
+            <source>ICON_SLIDER_MORE</source>
+            <translation>Visu_slider_more.png</translation>
+        </message>
+        <message>
+            <source>ICON_SLIDER_NEXT</source>
+            <translation>Visu_slider_next.png</translation>
+        </message>
+        <message>
+            <source>ICON_SLIDER_PAUSE</source>
+            <translation>Visu_slider_pause.png</translation>
+        </message>
+        <message>
+            <source>ICON_SLIDER_PLAY</source>
+            <translation>Visu_slider_play.png</translation>
+        </message>
+        <message>
+            <source>ICON_SLIDER_PREVIOUS</source>
+            <translation>Visu_slider_previous.png</translation>
+        </message>
+        <message>
+            <source>ICON_STREAM_LINES</source>
+            <translation>Visu_streamlines.png</translation>
+        </message>
+        <message>
+            <source>ICON_SURFACE</source>
+            <translation>Visu_surface.png</translation>
+        </message>
+        <message>
+            <source>ICON_SWEEP</source>
+            <translation>Visu_scalars_anim.png</translation>
+        </message>
+        <message>
+            <source>ICON_TIMEANIMATION</source>
+            <translation>Visu_anim.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_CONTAINER</source>
+            <translation>Visu_tree_container.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_CURVE</source>
+            <translation>Visu_tree_curve.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_CUT_LINES</source>
+            <translation>Visu_tree_cutlines.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_CUT_LINES_GROUPS</source>
+            <translation>Visu_tree_cutlines_gr.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_CUT_PLANES</source>
+            <translation>Visu_tree_cutplanes.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_CUT_PLANES_GROUPS</source>
+            <translation>Visu_tree_cutplanes_gr.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_DEFORMED_SHAPE</source>
+            <translation>Visu_tree_deformed.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_DEFORMED_SHAPE_GROUPS</source>
+            <translation>Visu_tree_deformed_gr.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_GAUSS_POINTS</source>
+            <translation>Visu_tree_gauss_points.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_ISO_SURFACES</source>
+            <translation>Visu_tree_isosurfaces.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_ISO_SURFACES_GROUPS</source>
+            <translation>Visu_tree_isosurfaces_gr.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_MESH</source>
+            <translation>Visu_tree_mesh.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_PLOT_3D</source>
+            <translation>Visu_tree_plot3d.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_PLOT_3D_GROUPS</source>
+            <translation>Visu_tree_plot3d_gr.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_RESULT</source>
+            <translation>Visu_tree_result.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_SCALAR_MAP</source>
+            <translation>Visu_tree_scalars.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_SCALAR_MAP_GROUPS</source>
+            <translation>Visu_tree_scalars_gr.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
+            <translation>Visu_tree_scalarmapondeformedshape.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_SCALAR_MAP_ON_DEFORMED_SHAPE_GROUPS</source>
+            <translation>Visu_tree_scalarmapondeformedshape_gr.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_STREAM_LINES</source>
+            <translation>Visu_tree_streamlines.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_STREAM_LINES_GROUPS</source>
+            <translation>Visu_tree_streamlines_gr.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_TABLE</source>
+            <translation>Visu_tree_table.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_VECTORS</source>
+            <translation>Visu_tree_vectors.png</translation>
+        </message>
+        <message>
+            <source>ICON_TREE_VECTORS_GROUPS</source>
+            <translation>Visu_tree_vectors_gr.png</translation>
+        </message>
+        <message>
+            <source>ICON_VECTORS</source>
+            <translation>Visu_vectors.png</translation>
+        </message>
+        <message>
+            <source>ICON_VVTK_INTERACTOR_STYLE_SWITCH</source>
+            <translation>Visu_vvtk_switch.png</translation>
+        </message>
+        <message>
+            <source>ICON_VVTK_PLANE_SEGMENTATION_SWITCH</source>
+            <translation>Visu_PlaneSegmentation.png</translation>
+        </message>
+        <message>
+            <source>ICON_VVTK_RECORDING_PAUSE</source>
+            <translation>Visu_recording_pause.png</translation>
+        </message>
+        <message>
+            <source>ICON_VVTK_RECORDING_PLAY</source>
+            <translation>Visu_recording_play.png</translation>
+        </message>
+        <message>
+            <source>ICON_VVTK_RECORDING_START</source>
+            <translation>Visu_recording_start.png</translation>
+        </message>
+        <message>
+            <source>ICON_VVTK_RECORDING_STOP</source>
+            <translation>Visu_recording_stop.png</translation>
+        </message>
+        <message>
+            <source>ICON_VVTK_SELECTION_MODE_SWITCH</source>
+            <translation>Visu_points.png</translation>
+        </message>
+        <message>
+            <source>ICON_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
+            <translation>Visu_SphereSegmentation.png</translation>
+        </message>
+        <message>
+            <source>ICON_WIREFRAME</source>
+            <translation>Visu_wireframe.png</translation>
+        </message>
+    </context>
+</TS>
diff --git a/src/VISUGUI/VISU_msg_en.ts b/src/VISUGUI/VISU_msg_en.ts
new file mode 100644 (file)
index 0000000..c7c43fe
--- /dev/null
@@ -0,0 +1,3086 @@
+<!DOCTYPE TS>
+<TS version="1.1" >
+    <context>
+        <name>@default</name>
+        <message>
+            <source>ASSIGNED</source>
+            <translation>Assigned</translation>
+        </message>
+        <message>
+            <source>ATTRIBUTES_LBL</source>
+            <translation>Attributes</translation>
+        </message>
+        <message>
+            <source>AXIS_LBL</source>
+            <translation>Axis</translation>
+        </message>
+        <message>
+            <source>BTN_RESET</source>
+            <translation>Reset</translation>
+        </message>
+        <message>
+            <source>DATA_LBL</source>
+            <translation>Data</translation>
+        </message>
+        <message>
+            <source>ERR_CANT_BUILD_PRESENTATION</source>
+            <translation>The object can't be built</translation>
+        </message>
+        <message>
+            <source>ERR_CANT_CREATE_ACTOR</source>
+            <translation>Can't create actor for this presentation</translation>
+        </message>
+        <message>
+            <source>ERR_CANT_CREATE_ANIMATION</source>
+            <translation>Can't create animation for these fields:\n number of time stamps or number of components is not the same!</translation>
+        </message>
+        <message>
+            <source>ERR_CANT_FIND_MED_COMPONENT</source>
+            <translation>Failed to activate MED engine!</translation>
+        </message>
+        <message>
+            <source>ERR_CANT_FIND_VISU_COMPONENT</source>
+            <translation>Failed to activate VISU engine!</translation>
+        </message>
+        <message>
+            <source>ERR_NO_MEMORY_TO_BUILD</source>
+            <translation>Please, free %1 Mb to make the cache enlarging possible\n(for example, try to delete some holders)</translation>
+        </message>
+        <message>
+            <source>IMPORT_DONE</source>
+            <translation>Importing is done</translation>
+        </message>
+        <message>
+            <source>INF_DONE</source>
+            <translation> done</translation>
+        </message>
+        <message>
+            <source>INF_VISU</source>
+            <translation>Post-Pro Info</translation>
+        </message>
+        <message>
+            <source>NO_GROUPS</source>
+            <translation>No groups in the mesh</translation>
+        </message>
+        <message>
+            <source>PARALLEL_ANIMATION</source>
+            <translation>Parallel Animation</translation>
+        </message>
+        <message>
+            <source>PERIOD_2PI</source>
+            <translation>From -PI to PI</translation>
+        </message>
+        <message>
+            <source>PERIOD_PI</source>
+            <translation>From 0 to PI</translation>
+        </message>
+        <message>
+            <source>PRS_ON_GROUPS</source>
+            <translation>Use Only Groups</translation>
+        </message>
+        <message>
+            <source>SUCCESSIVE_ANIMATION</source>
+            <translation>Successive Animation</translation>
+        </message>
+        <message>
+            <source>TIT_OFFSETDLG</source>
+            <translation>Translate Presentation</translation>
+        </message>
+        <message>
+            <source>TLT_SETUP_PLOT2D</source>
+            <translation>Setup Plot 2d</translation>
+        </message>
+        <message>
+            <source>UNITS_LBL</source>
+            <translation>Units</translation>
+        </message>
+        <message>
+            <source>VISU_3DCACHE_PROPS</source>
+            <translation>3D Cache properties</translation>
+        </message>
+        <message>
+            <source>VISU_COLORS_AND_LABELS</source>
+            <translation>Colors &amp;&amp; Labels</translation>
+        </message>
+        <message>
+            <source>VISU_COMPONENT</source>
+            <translation>Component</translation>
+        </message>
+        <message>
+            <source>VISU_COS_SWEEP</source>
+            <translation>Cosinusoidal ( (1 - cos(t))/2 )</translation>
+        </message>
+        <message>
+            <source>VISU_CUTLINE_PREF</source>
+            <translation>CutLine preferences</translation>
+        </message>
+        <message>
+            <source>VISU_CUT_LINES</source>
+            <translation>Cut Lines</translation>
+        </message>
+        <message>
+            <source>VISU_CUT_PLANES</source>
+            <translation>Cut Planes</translation>
+        </message>
+        <message>
+            <source>VISU_DEFORMED_SHAPE</source>
+            <translation>Deformed Shape</translation>
+        </message>
+        <message>
+            <source>VISU_DISP_ONLY</source>
+            <translation>Display only on creation</translation>
+        </message>
+        <message>
+            <source>VISU_FIELD_RANGE</source>
+            <translation>Field range</translation>
+        </message>
+        <message>
+            <source>VISU_FONT</source>
+            <translation>Font</translation>
+        </message>
+        <message>
+            <source>VISU_FONT_ARIAL</source>
+            <translation>Arial</translation>
+        </message>
+        <message>
+            <source>VISU_FONT_COURIER</source>
+            <translation>Courier</translation>
+        </message>
+        <message>
+            <source>VISU_FONT_TIMES</source>
+            <translation>Times</translation>
+        </message>
+        <message>
+            <source>VISU_HEIGHT</source>
+            <translation>Height:</translation>
+        </message>
+        <message>
+            <source>VISU_HORIZONTAL</source>
+            <translation>Horizontal</translation>
+        </message>
+        <message>
+            <source>VISU_IMPOSED_RANGE</source>
+            <translation>Imposed range</translation>
+        </message>
+        <message>
+            <source>VISU_IS2PI</source>
+            <translation>Parameter varies:</translation>
+        </message>
+        <message>
+            <source>VISU_ISO_SURFACES</source>
+            <translation>Iso Surfaces</translation>
+        </message>
+        <message>
+            <source>VISU_LABELS</source>
+            <translation>Labels</translation>
+        </message>
+        <message>
+            <source>VISU_LIMITED</source>
+            <translation>Limited</translation>
+        </message>
+        <message>
+            <source>VISU_LINEAR_SWEEP</source>
+            <translation>Linear</translation>
+        </message>
+        <message>
+            <source>VISU_LOGARITHMIC_SCALING</source>
+            <translation>Logarithmic scaling</translation>
+        </message>
+        <message>
+            <source>VISU_MAX</source>
+            <translation>Max:</translation>
+        </message>
+        <message>
+            <source>VISU_MEMORY_LIMIT</source>
+            <translation>Memory limit (Mb)</translation>
+        </message>
+        <message>
+            <source>VISU_MEMORY_MODE</source>
+            <translation>Memory mode</translation>
+        </message>
+        <message>
+            <source>VISU_MESH</source>
+            <translation>Mesh</translation>
+        </message>
+        <message>
+            <source>VISU_MIN</source>
+            <translation>Min:</translation>
+        </message>
+        <message>
+            <source>VISU_MINIMAL</source>
+            <translation>Minimal</translation>
+        </message>
+        <message>
+            <source>VISU_MINMAX_IMPOSED_RANGE</source>
+            <translation>Min and max for imposed range</translation>
+        </message>
+        <message>
+            <source>VISU_MODULUS</source>
+            <translation>Modulus</translation>
+        </message>
+        <message>
+            <source>VISU_NB_COLORS</source>
+            <translation>Nb. of colors</translation>
+        </message>
+        <message>
+            <source>VISU_NB_CYCLES</source>
+            <translation>Number of cycles</translation>
+        </message>
+        <message>
+            <source>VISU_NB_LABELS</source>
+            <translation>Nb. of labels</translation>
+        </message>
+        <message>
+            <source>VISU_NB_STEPS</source>
+            <translation>Number of steps</translation>
+        </message>
+        <message>
+            <source>VISU_ORIENTATION</source>
+            <translation>Orientation</translation>
+        </message>
+        <message>
+            <source>VISU_ORIGIN_AND_SIZE</source>
+            <translation>Origin &amp;&amp; Size</translation>
+        </message>
+        <message>
+            <source>VISU_PLOT3D</source>
+            <translation>Plot3D</translation>
+        </message>
+        <message>
+            <source>VISU_PREF_MED_FULL_LOAD</source>
+            <translation>Full MED loading</translation>
+        </message>
+        <message>
+            <source>VISU_PREF_MED_IMPORT</source>
+            <translation>MED files import</translation>
+        </message>
+        <message>
+            <source>VISU_PREF_SECOND_TAB</source>
+            <translation>Scalar range, Sweep, MED import, Shading</translation>
+        </message>
+        <message>
+            <source>VISU_RANGE_TO_USE</source>
+            <translation>Range to use</translation>
+        </message>
+        <message>
+            <source>VISU_REPRESENT_PROPS</source>
+            <translation>Representation properties</translation>
+        </message>
+        <message>
+            <source>VISU_SCALAR_BAR</source>
+            <translation>Scalar Bar</translation>
+        </message>
+        <message>
+            <source>VISU_SCALAR_MAP</source>
+            <translation>Scalar Map</translation>
+        </message>
+        <message>
+            <source>VISU_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
+            <translation>Scalar Map on Def. Shape</translation>
+        </message>
+        <message>
+            <source>VISU_SCALAR_MODE</source>
+            <translation>Scalar mode</translation>
+        </message>
+        <message>
+            <source>VISU_SCALAR_RANGE</source>
+            <translation>Scalar range</translation>
+        </message>
+        <message>
+            <source>VISU_SHRINK</source>
+            <translation>Shrink</translation>
+        </message>
+        <message>
+            <source>VISU_SIN_SWEEP</source>
+            <translation>Sinusoidal ( sin( t - PI/2 ) )</translation>
+        </message>
+        <message>
+            <source>VISU_STREAM_LINES</source>
+            <translation>Stream Lines</translation>
+        </message>
+        <message>
+            <source>VISU_SWEEPING_MODES</source>
+            <translation>Mode of the sweeping </translation>
+        </message>
+        <message>
+            <source>VISU_SWEEPING_PREF</source>
+            <translation>Sweeping preferences</translation>
+        </message>
+        <message>
+            <source>VISU_TIME_STEP</source>
+            <translation>Time step(second)</translation>
+        </message>
+        <message>
+            <source>VISU_TITLE</source>
+            <translation>Title</translation>
+        </message>
+        <message>
+            <source>VISU_USE_SHADING</source>
+            <translation>Use Shading</translation>
+        </message>
+        <message>
+            <source>VISU_VECTORS</source>
+            <translation>Vectors</translation>
+        </message>
+        <message>
+            <source>VISU_VERTICAL</source>
+            <translation>Vertical</translation>
+        </message>
+        <message>
+            <source>VISU_WIDTH</source>
+            <translation>Width:</translation>
+        </message>
+        <message>
+            <source>VISU_X</source>
+            <translation>X:</translation>
+        </message>
+        <message>
+            <source>VISU_Y</source>
+            <translation>Y:</translation>
+        </message>
+        <message>
+            <source>WRN_EXTRA_MEMORY_REQUIRED</source>
+            <translation>Cache need more memory to build the presentation (%1 Mb).\nDo you want to enlarge the cache?</translation>
+        </message>
+        <message>
+            <source>WRN_NO_AVAILABLE_DATA</source>
+            <translation>No Available data in selection</translation>
+        </message>
+        <message>
+            <source>WRN_STUDY_LOCKED</source>
+            <translation>Current Study is locked</translation>
+        </message>
+        <message>
+            <source>WRN_VISU</source>
+            <translation>Post-Pro Warning</translation>
+        </message>
+        <message>
+            <source>WRN_VISU_WARNING</source>
+            <translation>Warning</translation>
+        </message>
+    </context>
+    <context>
+        <name>VVTK_MainWindow</name>
+        <message>
+            <source>DSC_VVTK_RECORDING_PAUSE</source>
+            <translation>Pause recording</translation>
+        </message>
+        <message>
+            <source>DSC_VVTK_RECORDING_PLAY</source>
+            <translation>Play recording</translation>
+        </message>
+        <message>
+            <source>DSC_VVTK_RECORDING_START</source>
+            <translation>Start recording</translation>
+        </message>
+        <message>
+            <source>DSC_VVTK_RECORDING_STOP</source>
+            <translation>Stop recording</translation>
+        </message>
+        <message>
+            <source>LBL_TOOLBAR_RECORD_LABEL</source>
+            <translation>Recording Operations</translation>
+        </message>
+        <message>
+            <source>MNU_VVTK_RECORDING_PAUSE</source>
+            <translation>Pause recording</translation>
+        </message>
+        <message>
+            <source>MNU_VVTK_RECORDING_PLAY</source>
+            <translation>Play recording</translation>
+        </message>
+        <message>
+            <source>MNU_VVTK_RECORDING_START</source>
+            <translation>Start recording</translation>
+        </message>
+        <message>
+            <source>MNU_VVTK_RECORDING_STOP</source>
+            <translation>Stop recording</translation>
+        </message>
+        <message>
+            <source>MSG_NO_AVI_MAKER</source>
+            <translation>Tool jpeg2yuv, necessary for AVI recording, is not available.\nPlease, refer to the documentation.</translation>
+        </message>
+    </context>
+    <context>
+        <name>VVTK_MainWindow1</name>
+        <message>
+            <source>DSC_VVTK_INTERACTOR_STYLE_SWITCH</source>
+            <translation>Interaction Style Switch</translation>
+        </message>
+        <message>
+            <source>DSC_VVTK_PLANE_SEGMENTATION_SWITCH</source>
+            <translation>Plane Segmentation</translation>
+        </message>
+        <message>
+            <source>DSC_VVTK_SELECTION_MODE_SWITCH</source>
+            <translation>Selection Mode Switch</translation>
+        </message>
+        <message>
+            <source>DSC_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
+            <translation>Sphere Segmentation</translation>
+        </message>
+        <message>
+            <source>LBL_TOOLBAR_GAUSS_LABEL</source>
+            <translation>Gauss Viewer Tools</translation>
+        </message>
+        <message>
+            <source>MNU_VVTK_INTERACTOR_STYLE_SWITCH</source>
+            <translation>Interaction Style Switch</translation>
+        </message>
+        <message>
+            <source>MNU_VVTK_PLANE_SEGMENTATION_SWITCH</source>
+            <translation>Plane Segmentation</translation>
+        </message>
+        <message>
+            <source>MNU_VVTK_SELECTION_MODE_SWITCH</source>
+            <translation>Selection Mode Switch</translation>
+        </message>
+        <message>
+            <source>MNU_VVTK_SPHERE_SEGMENTATION_SWITCH</source>
+            <translation>Sphere Segmentation</translation>
+        </message>
+    </context>
+    <context>
+        <name>VVTK_PickingDlg</name>
+        <message>
+            <source>BELOW_POINT</source>
+            <translation>Centered below the point</translation>
+        </message>
+        <message>
+            <source>CAMERA_TITLE</source>
+            <translation>Movement of the camera</translation>
+        </message>
+        <message>
+            <source>CURSOR_SIZE</source>
+            <translation>Size of the cursor :</translation>
+        </message>
+        <message>
+            <source>CURSOR_TITLE</source>
+            <translation>Cursor</translation>
+        </message>
+        <message>
+            <source>DISPLAY_PARENT_MESH</source>
+            <translation>Display parent mesh element</translation>
+        </message>
+        <message>
+            <source>INFO_WINDOW_TITLE</source>
+            <translation>Information window</translation>
+        </message>
+        <message>
+            <source>PARENT_MESH_TITLE</source>
+            <translation>Parent mesh element</translation>
+        </message>
+        <message>
+            <source>PICKING_DLG_TITLE</source>
+            <translation>Picking</translation>
+        </message>
+        <message>
+            <source>POINT_TOLERANCE</source>
+            <translation>Point tolerance :</translation>
+        </message>
+        <message>
+            <source>POSITION</source>
+            <translation>Position :</translation>
+        </message>
+        <message>
+            <source>PYRAMID_HEIGHT</source>
+            <translation>Height of the pyramids :</translation>
+        </message>
+        <message>
+            <source>SELECTION_COLOR</source>
+            <translation>Selection cursor color :</translation>
+        </message>
+        <message>
+            <source>STEP_NUMBER</source>
+            <translation>Number of steps between two positions :</translation>
+        </message>
+        <message>
+            <source>TOLERANCE_TITLE</source>
+            <translation>Tolerance</translation>
+        </message>
+        <message>
+            <source>TOP_LEFT_CORNER</source>
+            <translation>Top-left corner of the 3D view</translation>
+        </message>
+        <message>
+            <source>TRANSPARENCY</source>
+            <translation>Transparency :</translation>
+        </message>
+        <message>
+            <source>ZOOM_FACTOR</source>
+            <translation>Zoom at first selected point (ratio) :</translation>
+        </message>
+    </context>
+    <context>
+        <name>VVTK_PrimitiveBox</name>
+        <message>
+            <source>ALPHA_TEXTURE</source>
+            <translation>Alpha Channel Texture (16x16) : </translation>
+        </message>
+        <message>
+            <source>ALPHA_THRESHOLD</source>
+            <translation>Alpha Channel Threshold : </translation>
+        </message>
+        <message>
+            <source>CLAMP</source>
+            <translation>Maximum Size (Clamp) : </translation>
+        </message>
+        <message>
+            <source>FACE_LIMIT</source>
+            <translation>Notify when number of faces exceeds : </translation>
+        </message>
+        <message>
+            <source>FACE_NUMBER</source>
+            <translation>Number of faces : </translation>
+        </message>
+        <message>
+            <source>GEOMETRICAL_SPHERE</source>
+            <translation>Geometrical Sphere</translation>
+        </message>
+        <message>
+            <source>MAIN_TEXTURE</source>
+            <translation>Main Texture (16x16) : </translation>
+        </message>
+        <message>
+            <source>OPENGL_POINT</source>
+            <translation>OpenGL Point</translation>
+        </message>
+        <message>
+            <source>POINT_SPRITE</source>
+            <translation>Point Sprite</translation>
+        </message>
+        <message>
+            <source>PRIMITIVE_TITLE</source>
+            <translation>Primitive</translation>
+        </message>
+        <message>
+            <source>RESOLUTION</source>
+            <translation>Resolution : </translation>
+        </message>
+    </context>
+    <context>
+        <name>VVTK_RecorderDlg</name>
+        <message>
+            <source>ALL_DISLPAYED_FRAMES</source>
+            <translation>Recording all displayed frames</translation>
+        </message>
+        <message>
+            <source>CLOSE</source>
+            <translation>Close</translation>
+        </message>
+        <message>
+            <source>DLG_RECORDER_TITLE</source>
+            <translation>Recorder</translation>
+        </message>
+        <message>
+            <source>FILE_NAME</source>
+            <translation>Save to file : </translation>
+        </message>
+        <message>
+            <source>FLT_ALL_FILES</source>
+            <translation>All Files (*.*)</translation>
+        </message>
+        <message>
+            <source>FLT_AVI_FILES</source>
+            <translation>AVI Files (*.avi)</translation>
+        </message>
+        <message>
+            <source>FPS</source>
+            <translation>FPS : </translation>
+        </message>
+        <message>
+            <source>PROGRESSIVE</source>
+            <translation>Progressive</translation>
+        </message>
+        <message>
+            <source>QUALITY</source>
+            <translation>Quality : </translation>
+        </message>
+        <message>
+            <source>RECORDING_MODE</source>
+            <translation>Mode : </translation>
+        </message>
+        <message>
+            <source>SETTINGS</source>
+            <translation>Settings</translation>
+        </message>
+        <message>
+            <source>SKIPPED_FRAMES</source>
+            <translation>Recording at a given FPS</translation>
+        </message>
+        <message>
+            <source>START</source>
+            <translation>Start</translation>
+        </message>
+    </context>
+    <context>
+        <name>VVTK_SegmentationCursorDlg</name>
+        <message>
+            <source>DEPTH</source>
+            <translation>Depth of the cursor: </translation>
+        </message>
+        <message>
+            <source>DEPTH_TITLE</source>
+            <translation>Depth</translation>
+        </message>
+        <message>
+            <source>DIRECTION_DX</source>
+            <translation>DX: </translation>
+        </message>
+        <message>
+            <source>DIRECTION_DY</source>
+            <translation>DY: </translation>
+        </message>
+        <message>
+            <source>DIRECTION_DZ</source>
+            <translation>DZ: </translation>
+        </message>
+        <message>
+            <source>DIRECTION_TITLE</source>
+            <translation>Direction</translation>
+        </message>
+        <message>
+            <source>GAUSS_POINTS_TAB</source>
+            <translation>Gauss Points</translation>
+        </message>
+        <message>
+            <source>INCREMENT</source>
+            <translation>+/- Ratio : </translation>
+        </message>
+        <message>
+            <source>INSIDE_GAUSS_POINTS</source>
+            <translation>Inside Cursor Gauss Points Presentation</translation>
+        </message>
+        <message>
+            <source>MAGNIFICATION</source>
+            <translation>Magnification (%) : </translation>
+        </message>
+        <message>
+            <source>MAGNIFICATION_TITLE</source>
+            <translation>Magnification</translation>
+        </message>
+        <message>
+            <source>ORIGIN_TITLE</source>
+            <translation>Origin</translation>
+        </message>
+        <message>
+            <source>ORIGIN_X</source>
+            <translation>X: </translation>
+        </message>
+        <message>
+            <source>ORIGIN_Y</source>
+            <translation>Y: </translation>
+        </message>
+        <message>
+            <source>ORIGIN_Z</source>
+            <translation>Z: </translation>
+        </message>
+        <message>
+            <source>OUTSIDE_GAUSS_POINTS</source>
+            <translation>Outside Cursor Gauss Points Presentation</translation>
+        </message>
+        <message>
+            <source>RADIUS</source>
+            <translation>Radius of the cursor :</translation>
+        </message>
+        <message>
+            <source>RADIUS_TITLE</source>
+            <translation>Radius</translation>
+        </message>
+        <message>
+            <source>RATIO</source>
+            <translation>+/- Ratio :</translation>
+        </message>
+        <message>
+            <source>SEGMENTATION_CURSOR_DLG_TITLE</source>
+            <translation>Segmentation Cursor</translation>
+        </message>
+        <message>
+            <source>SEGMENTATION_CURSOR_TAB</source>
+            <translation>Segmentation Cursor</translation>
+        </message>
+    </context>
+    <context>
+        <name>VVTK_SizeBox</name>
+        <message>
+            <source>COLOR</source>
+            <translation>Color : </translation>
+        </message>
+        <message>
+            <source>COLOR_TITLE</source>
+            <translation>Color</translation>
+        </message>
+        <message>
+            <source>GEOM_SIZE</source>
+            <translation>Size of points (%) : </translation>
+        </message>
+        <message>
+            <source>INCREMENT</source>
+            <translation>+/- Ratio : </translation>
+        </message>
+        <message>
+            <source>MAGNIFICATION</source>
+            <translation>Magnification (%) : </translation>
+        </message>
+        <message>
+            <source>MAX_SIZE</source>
+            <translation>max size (%) : </translation>
+        </message>
+        <message>
+            <source>MIN_SIZE</source>
+            <translation>Range values for min size (%) : </translation>
+        </message>
+        <message>
+            <source>OUTSIDE_SIZE</source>
+            <translation>Percentage of normal size(%) : </translation>
+        </message>
+        <message>
+            <source>SIZE_TITLE</source>
+            <translation>Size</translation>
+        </message>
+        <message>
+            <source>UNIFORM_COLOR</source>
+            <translation>Uniform Color</translation>
+        </message>
+    </context>
+    <context>
+        <name>VVTK_ViewManager</name>
+        <message>
+            <source>VTK_VIEW_TITLE</source>
+            <translation>Gauss scene:%1 - viewer:%2</translation>
+        </message>
+    </context>
+    <context>
+        <name>VVTK_ViewWindow</name>
+        <message>
+            <source>LBL_TOOLBAR_LABEL</source>
+            <translation>GAUSS viewer tools</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI</name>
+        <message>
+            <source>DLG_LINEWIDTH_CMT1</source>
+            <translation>Set value between</translation>
+        </message>
+        <message>
+            <source>DLG_LINEWIDTH_CMT2</source>
+            <translation>1 (thin) and 10 (thick)</translation>
+        </message>
+        <message>
+            <source>DLG_LINEWIDTH_TITLE</source>
+            <translation>Line Width</translation>
+        </message>
+        <message>
+            <source>DLG_OPACITY_CMT1</source>
+            <translation>Set value between</translation>
+        </message>
+        <message>
+            <source>DLG_OPACITY_CMT2</source>
+            <translation>0 (transparent) and 100 (opaque)</translation>
+        </message>
+        <message>
+            <source>DLG_OPACITY_TITLE</source>
+            <translation>Opacity</translation>
+        </message>
+        <message>
+            <source>ERR_ACTIVATE_VIEW3D</source>
+            <translation>Please activate 3D view before</translation>
+        </message>
+        <message>
+            <source>ERR_ERROR_DURING_EXPORT</source>
+            <translation>Error has been occured during exporting to file</translation>
+        </message>
+        <message>
+            <source>ERR_SCALARBAR_PARAMS</source>
+            <translation>Warning! The parameters is incorrect</translation>
+        </message>
+        <message>
+            <source>FLT_ALL_FILES</source>
+            <translation>All Files (*.*)</translation>
+        </message>
+        <message>
+            <source>FLT_MED_FILES</source>
+            <translation>MED Files (*.med)</translation>
+        </message>
+        <message>
+            <source>FLT_TABLE_FILES</source>
+            <translation>Tables (*.xls *.txt *.tab)</translation>
+        </message>
+        <message>
+            <source>IMPORT_FROM_FILE</source>
+            <translation>Import from File</translation>
+        </message>
+        <message>
+            <source>MEN_ARRANGE_ACTORS</source>
+            <translation>Arrange Actors</translation>
+        </message>
+        <message>
+            <source>MEN_CACHE_PROPERTIES</source>
+            <translation>Properties</translation>
+        </message>
+        <message>
+            <source>MEN_CELL_COLOR</source>
+            <translation>Cell color</translation>
+        </message>
+        <message>
+            <source>MEN_CLEAR_CONTAINER</source>
+            <translation>Clear</translation>
+        </message>
+        <message>
+            <source>MEN_CLIPPING</source>
+            <translation>Clipping planes</translation>
+        </message>
+        <message>
+            <source>MEN_COLOR</source>
+            <translation>Color...</translation>
+        </message>
+        <message>
+            <source>MEN_COPY_PRS</source>
+            <translation>Copy</translation>
+        </message>
+        <message>
+            <source>MEN_CREATE_CURVES</source>
+            <translation>Create Curves</translation>
+        </message>
+        <message>
+            <source>MEN_CREATE_MANY_PRS</source>
+            <translation>Create Presentations</translation>
+        </message>
+        <message>
+            <source>MEN_CREATE_PLOT2D</source>
+            <translation>Create Plot2d View</translation>
+        </message>
+        <message>
+            <source>MEN_CREATE_PRS</source>
+            <translation>Create Presentation</translation>
+        </message>
+        <message>
+            <source>MEN_CREATE_TABLE</source>
+            <translation>Create Table</translation>
+        </message>
+        <message>
+            <source>MEN_CUBE_AXES</source>
+            <translation>Graduated axes</translation>
+        </message>
+        <message>
+            <source>MEN_CURVE_PROPS</source>
+            <translation>Properties...</translation>
+        </message>
+        <message>
+            <source>MEN_CUT_LINES</source>
+            <translation>Cut Lines</translation>
+        </message>
+        <message>
+            <source>MEN_CUT_PLANES</source>
+            <translation>Cut Planes</translation>
+        </message>
+        <message>
+            <source>MEN_DEFORMED_SHAPE</source>
+            <translation>Deformed Shape</translation>
+        </message>
+        <message>
+            <source>MEN_DELETE_OBJS</source>
+            <translation>Delete</translation>
+        </message>
+        <message>
+            <source>MEN_DELETE_VIEWPARAMS</source>
+            <translation>Delete view parameters</translation>
+        </message>
+        <message>
+            <source>MEN_DISPLAY</source>
+            <translation>Display</translation>
+        </message>
+        <message>
+            <source>MEN_DISPLAY_ONLY</source>
+            <translation>Display Only</translation>
+        </message>
+        <message>
+            <source>MEN_DISPLAY_SELECTION</source>
+            <translation>Display Selection</translation>
+        </message>
+        <message>
+            <source>MEN_EDGE_COLOR</source>
+            <translation>Edge Color</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_CONTAINER</source>
+            <translation>Edit...</translation>
+        </message>
+        <message>
+            <source>MEN_EDIT_PRS</source>
+            <translation>Edit...</translation>
+        </message>
+        <message>
+            <source>MEN_ERASE</source>
+            <translation>Erase</translation>
+        </message>
+        <message>
+            <source>MEN_ERASE_ALL</source>
+            <translation>Erase All</translation>
+        </message>
+        <message>
+            <source>MEN_EXPORT_TABLE</source>
+            <translation>Export Table</translation>
+        </message>
+        <message>
+            <source>MEN_FREE_SCALAR_BARS</source>
+            <translation>Use Field Range</translation>
+        </message>
+        <message>
+            <source>MEN_GLOBAL_SELECTION</source>
+            <translation>Global Selection</translation>
+        </message>
+        <message>
+            <source>MEN_HOLO_RENDER</source>
+            <translation>Holo render</translation>
+        </message>
+        <message>
+            <source>MEN_IMPORT</source>
+            <translation>Import</translation>
+        </message>
+        <message>
+            <source>MEN_IMPORT_FROM_FILE</source>
+            <translation>MED file</translation>
+        </message>
+        <message>
+            <source>MEN_IMPORT_MED_FIELD</source>
+            <translation>Import Field</translation>
+        </message>
+        <message>
+            <source>MEN_IMPORT_MED_STRUCTURE</source>
+            <translation>Import Structure</translation>
+        </message>
+        <message>
+            <source>MEN_IMPORT_MED_TIMESTAMP</source>
+            <translation>Import TimeStamp</translation>
+        </message>
+        <message>
+            <source>MEN_IMPORT_TABLE</source>
+            <translation>Table from file</translation>
+        </message>
+        <message>
+            <source>MEN_INSIDEFRAME</source>
+            <translation>Insideframe</translation>
+        </message>
+        <message>
+            <source>MEN_ISO_SURFACES</source>
+            <translation>Iso Surfaces</translation>
+        </message>
+        <message>
+            <source>MEN_LINE_WIDTH</source>
+            <translation>Line Width</translation>
+        </message>
+        <message>
+            <source>MEN_MERGE_SCALAR_BARS</source>
+            <translation>Merge Scalar Range</translation>
+        </message>
+        <message>
+            <source>MEN_MULTIPR_VIEW_FULL_RES</source>
+            <translation>Display at full resolution</translation>
+        </message>
+        <message>
+            <source>MEN_MULTIPR_VIEW_HIDE</source>
+            <translation>Hide</translation>
+        </message>
+        <message>
+            <source>MEN_MULTIPR_VIEW_LOW_RES</source>
+            <translation>Display at low resolution</translation>
+        </message>
+        <message>
+            <source>MEN_MULTIPR_VIEW_MEDIUM_RES</source>
+            <translation>Display at medium resolution</translation>
+        </message>
+        <message>
+            <source>MEN_NOSHADING</source>
+            <translation>Shading Off</translation>
+        </message>
+        <message>
+            <source>MEN_OPACITY</source>
+            <translation>Opacity</translation>
+        </message>
+        <message>
+            <source>MEN_PARALLEL_ANIMATION</source>
+            <translation>Parallel Animation...</translation>
+        </message>
+        <message>
+            <source>MEN_PARTIAL_SELECTION</source>
+            <translation>Partial Selection</translation>
+        </message>
+        <message>
+            <source>MEN_PLOT3D_FROM_CUTPLANE</source>
+            <translation>Plot3d</translation>
+        </message>
+        <message>
+            <source>MEN_PLOT_3D</source>
+            <translation>Plot3D</translation>
+        </message>
+        <message>
+            <source>MEN_POINTS</source>
+            <translation>Points</translation>
+        </message>
+        <message>
+            <source>MEN_PROPERTIES</source>
+            <translation>Properties</translation>
+        </message>
+        <message>
+            <source>MEN_RENAME</source>
+            <translation>Rename...</translation>
+        </message>
+        <message>
+            <source>MEN_RENAME_CONTAINER</source>
+            <translation>Rename...</translation>
+        </message>
+        <message>
+            <source>MEN_RENAME_TABLE</source>
+            <translation>Rename...</translation>
+        </message>
+        <message>
+            <source>MEN_REPRESENTATION</source>
+            <translation>Representation</translation>
+        </message>
+        <message>
+            <source>MEN_RESTORE_VIEWPARAMS</source>
+            <translation>Restore view parameters</translation>
+        </message>
+        <message>
+            <source>MEN_SAVE_VIEWPARAMS</source>
+            <translation>Save view parameters</translation>
+        </message>
+        <message>
+            <source>MEN_SCALAR_MAP</source>
+            <translation>Scalar Map</translation>
+        </message>
+        <message>
+            <source>MEN_SCALAR_MAP_ON_DEFORMED_SHAPE</source>
+            <translation>Scalar Map on Deformed Shape</translation>
+        </message>
+        <message>
+            <source>MEN_SCALING</source>
+            <translation>Scaling</translation>
+        </message>
+        <message>
+            <source>MEN_SELECTION</source>
+            <translation>Selection</translation>
+        </message>
+        <message>
+            <source>MEN_SELECTION_INFO</source>
+            <translation>Selection Info...</translation>
+        </message>
+        <message>
+            <source>MEN_SHADING</source>
+            <translation>Shading On</translation>
+        </message>
+        <message>
+            <source>MEN_SHOW_ANIMATION</source>
+            <translation>Show...</translation>
+        </message>
+        <message>
+            <source>MEN_SHOW_TABLE</source>
+            <translation>Show Table</translation>
+        </message>
+        <message>
+            <source>MEN_SHRINK</source>
+            <translation>Shrink</translation>
+        </message>
+        <message>
+            <source>MEN_STREAM_LINES</source>
+            <translation>Stream Lines</translation>
+        </message>
+        <message>
+            <source>MEN_SUCCCESSIVE_ANIMATION</source>
+            <translation>Successive Animation...</translation>
+        </message>
+        <message>
+            <source>MEN_SURFACE</source>
+            <translation>Surface</translation>
+        </message>
+        <message>
+            <source>MEN_SURFACEFRAME</source>
+            <translation>Surfaceframe</translation>
+        </message>
+        <message>
+            <source>MEN_SWEEP</source>
+            <translation>Sweep</translation>
+        </message>
+        <message>
+            <source>MEN_TRANSLATE_PRS</source>
+            <translation>Translate Presentation</translation>
+        </message>
+        <message>
+            <source>MEN_UNSHRINK</source>
+            <translation>Unshrink</translation>
+        </message>
+        <message>
+            <source>MEN_VECTORS</source>
+            <translation>Vectors</translation>
+        </message>
+        <message>
+            <source>MEN_VISUALIZATION</source>
+            <translation>Visualization</translation>
+        </message>
+        <message>
+            <source>MEN_WIREFRAME</source>
+            <translation>Wireframe</translation>
+        </message>
+        <message>
+            <source>TOOL_IMPORT</source>
+            <translation>Import Toolbar</translation>
+        </message>
+        <message>
+            <source>TOOL_REPRESENTATION</source>
+            <translation>Representation Toolbar</translation>
+        </message>
+        <message>
+            <source>TOOL_VISUALISATION</source>
+            <translation>Visualization Toolbar</translation>
+        </message>
+        <message>
+            <source>USE_BUILD_PROGRESS</source>
+            <translation>Use build progress</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_AxisWg</name>
+        <message>
+            <source>AXIS_NAME</source>
+            <translation>Axis name</translation>
+        </message>
+        <message>
+            <source>FONT</source>
+            <translation>Font</translation>
+        </message>
+        <message>
+            <source>IS_VISIBLE</source>
+            <translation>Is visible</translation>
+        </message>
+        <message>
+            <source>LABELS</source>
+            <translation>Labels</translation>
+        </message>
+        <message>
+            <source>LENGTH</source>
+            <translation>Length</translation>
+        </message>
+        <message>
+            <source>NAME</source>
+            <translation>Name</translation>
+        </message>
+        <message>
+            <source>NUMBER</source>
+            <translation>Number</translation>
+        </message>
+        <message>
+            <source>OFFSET</source>
+            <translation>Offset</translation>
+        </message>
+        <message>
+            <source>TICK_MARKS</source>
+            <translation>Tick marks</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_BuildProgressDlg</name>
+        <message>
+            <source>BUILD_ALL</source>
+            <translation>Build all</translation>
+        </message>
+        <message>
+            <source>BUILD_AT_ONCE</source>
+            <translation>Build at once</translation>
+        </message>
+        <message>
+            <source>BUILD_ENTITIES</source>
+            <translation>Build entities</translation>
+        </message>
+        <message>
+            <source>BUILD_FIELDS</source>
+            <translation>Build fields</translation>
+        </message>
+        <message>
+            <source>BUILD_GROUPS</source>
+            <translation>Build groups</translation>
+        </message>
+        <message>
+            <source>BUILD_MINMAX</source>
+            <translation>Build min/max</translation>
+        </message>
+        <message>
+            <source>CLOSE</source>
+            <translation>Close</translation>
+        </message>
+        <message>
+            <source>CLOSE_AT_FINISH</source>
+            <translation>Close dialog at finish</translation>
+        </message>
+        <message>
+            <source>DLG_BUILD_PROGRESS_TITLE</source>
+            <translation>Build progress</translation>
+        </message>
+        <message>
+            <source>ERR_ERROR_IN_THE_FILE</source>
+            <translation>Error in the file</translation>
+        </message>
+        <message>
+            <source>FILE_NAME</source>
+            <translation>Import file : </translation>
+        </message>
+        <message>
+            <source>FLT_ALL_FILES</source>
+            <translation>All Files (*.*)</translation>
+        </message>
+        <message>
+            <source>FLT_MED_FILES</source>
+            <translation>MED Files (*.med)</translation>
+        </message>
+        <message>
+            <source>HELP</source>
+            <translation>Help</translation>
+        </message>
+        <message>
+            <source>IMPORT_FROM_FILE</source>
+            <translation>Import from File</translation>
+        </message>
+        <message>
+            <source>IMPORT_PROGRESS</source>
+            <translation>Import progress</translation>
+        </message>
+        <message>
+            <source>IMPORT_SETTINGS</source>
+            <translation>Settings</translation>
+        </message>
+        <message>
+            <source>IMPORT_TIME</source>
+            <translation>Time</translation>
+        </message>
+        <message>
+            <source>START</source>
+            <translation>Start</translation>
+        </message>
+        <message>
+            <source>TIME</source>
+            <translation>Elapsed time : </translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_CacheDlg</name>
+        <message>
+            <source>CACHE_TITLE</source>
+            <translation>Cache properties</translation>
+        </message>
+        <message>
+            <source>FREE</source>
+            <translation>Free</translation>
+        </message>
+        <message>
+            <source>LIMITED_MEMORY</source>
+            <translation>Limited memory</translation>
+        </message>
+        <message>
+            <source>MEMORY STATE</source>
+            <translation>Memory state</translation>
+        </message>
+        <message>
+            <source>MEMORY_MODE</source>
+            <translation>Memory mode</translation>
+        </message>
+        <message>
+            <source>MINIMAL_MEMORY</source>
+            <translation>Minimal memory</translation>
+        </message>
+        <message>
+            <source>USED_BY_CACHE</source>
+            <translation>Used by cache</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_ClippingDlg</name>
+        <message>
+            <source>AUTO_APPLY_CHK</source>
+            <translation>Auto Apply</translation>
+        </message>
+        <message>
+            <source>BUT_DELETE</source>
+            <translation>Delete</translation>
+        </message>
+        <message>
+            <source>BUT_NEW</source>
+            <translation>New</translation>
+        </message>
+        <message>
+            <source>GRP_IJK_AXIS</source>
+            <translation>Axis</translation>
+        </message>
+        <message>
+            <source>GRP_PARAMETERS</source>
+            <translation>Parameters</translation>
+        </message>
+        <message>
+            <source>GRP_PLANES</source>
+            <translation>Clipping planes</translation>
+        </message>
+        <message>
+            <source>I_RADIO_BTN</source>
+            <translation>I</translation>
+        </message>
+        <message>
+            <source>J_RADIO_BTN</source>
+            <translation>J</translation>
+        </message>
+        <message>
+            <source>K_RADIO_BTN</source>
+            <translation>K</translation>
+        </message>
+        <message>
+            <source>LBL_DISTANCE</source>
+            <translation>Distance</translation>
+        </message>
+        <message>
+            <source>LBL_IJK_INDEX</source>
+            <translation>Index (from 0 to ...)</translation>
+        </message>
+        <message>
+            <source>LBL_IJK_INDEX_TO_arg</source>
+            <translation>Index (from 0 to %1) </translation>
+        </message>
+        <message>
+            <source>LBL_ORIENTATION</source>
+            <translation>Orientation</translation>
+        </message>
+        <message>
+            <source>LBL_ROTATION_XY</source>
+            <translation>Rotation around Z (X to Y):</translation>
+        </message>
+        <message>
+            <source>LBL_ROTATION_XZ</source>
+            <translation>Rotation around Y (X to Z):</translation>
+        </message>
+        <message>
+            <source>LBL_ROTATION_YX</source>
+            <translation>Rotation around Z (Y to X):</translation>
+        </message>
+        <message>
+            <source>LBL_ROTATION_YZ</source>
+            <translation>Rotation around X (Y to Z):</translation>
+        </message>
+        <message>
+            <source>LBL_ROTATION_ZX</source>
+            <translation>Rotation around Y (Z to X):</translation>
+        </message>
+        <message>
+            <source>LBL_ROTATION_ZY</source>
+            <translation>Rotation around X (Z to Y):</translation>
+        </message>
+        <message>
+            <source>PARALLEL_XOY_COMBO_ITEM</source>
+            <translation>|| X-Y</translation>
+        </message>
+        <message>
+            <source>PARALLEL_YOZ_COMBO_ITEM</source>
+            <translation>|| Y-Z</translation>
+        </message>
+        <message>
+            <source>PARALLEL_ZOX_COMBO_ITEM</source>
+            <translation>|| Z-X</translation>
+        </message>
+        <message>
+            <source>PLANES_COMBO_ITEM_i</source>
+            <translation>Plane# %1</translation>
+        </message>
+        <message>
+            <source>PLANES_COMBO_ITEM_no</source>
+            <translation>No planes</translation>
+        </message>
+        <message>
+            <source>REVERSE_NORMAL_CHK</source>
+            <translation>Reverse normal</translation>
+        </message>
+        <message>
+            <source>SHOW_PREVIEW_CHK</source>
+            <translation>Show preview</translation>
+        </message>
+        <message>
+            <source>TAB_IJK_STRUCTURED</source>
+            <translation>IJK (Structured)</translation>
+        </message>
+        <message>
+            <source>TAB_NON_STRUCTURED</source>
+            <translation>Non structured</translation>
+        </message>
+        <message>
+            <source>TITLE</source>
+            <translation>Change Clipping</translation>
+        </message>
+        <message>
+            <source>WRN_EMPTY_RESULTING_PRS</source>
+            <translation>Impossible to use given clipping planes because of VTK restrictions. \n Please, provide non-empty resulting presentation.</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_CubeAxesDlg</name>
+        <message>
+            <source>CAPTION</source>
+            <translation>Graduated axes</translation>
+        </message>
+        <message>
+            <source>IS_VISIBLE</source>
+            <translation>Is visible</translation>
+        </message>
+        <message>
+            <source>X_AXIS</source>
+            <translation>X axis</translation>
+        </message>
+        <message>
+            <source>Y_AXIS</source>
+            <translation>Y axis</translation>
+        </message>
+        <message>
+            <source>Z_AXIS</source>
+            <translation>Z axis</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_CursorDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>TextLabel1</source>
+            <translation>Set value between</translation>
+        </message>
+        <message>
+            <source>TextLabel2</source>
+            <translation>minimal and maximal</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_CutLinesDlg</name>
+        <message>
+            <source>BASE_PLANE_POS</source>
+            <translation>Base plane position</translation>
+        </message>
+        <message>
+            <source>LBL_ABSOLUTE_LENGTH</source>
+            <translation>Use absolute length</translation>
+        </message>
+        <message>
+            <source>LBL_GENERATE_CURVES</source>
+            <translation>Generate Curves</translation>
+        </message>
+        <message>
+            <source>LBL_GENERATE_TABLE</source>
+            <translation>Generate Data Table</translation>
+        </message>
+        <message>
+            <source>LBL_INVERT_CURVES</source>
+            <translation>Invert all curves</translation>
+        </message>
+        <message>
+            <source>LBL_LINES_CUT</source>
+            <translation>Cut planes</translation>
+        </message>
+        <message>
+            <source>LBL_LINES_PLANE</source>
+            <translation>Plane of lines</translation>
+        </message>
+        <message>
+            <source>LBL_NB_PLANS</source>
+            <translation>Number of planes:</translation>
+        </message>
+        <message>
+            <source>LBL_POS</source>
+            <translation>Displacement (0...1):</translation>
+        </message>
+        <message>
+            <source>LBL_ROTATION</source>
+            <translation>Rotations</translation>
+        </message>
+        <message>
+            <source>LBL_ROT_X</source>
+            <translation>Rotation around X (Y to Z):</translation>
+        </message>
+        <message>
+            <source>LBL_ROT_Y</source>
+            <translation>Rotation around Y (Z to X):</translation>
+        </message>
+        <message>
+            <source>LBL_ROT_Z</source>
+            <translation>Rotation around Z (X to Y):</translation>
+        </message>
+        <message>
+            <source>LBL_SHOW_PREVIEW</source>
+            <translation>Show preview</translation>
+        </message>
+        <message>
+            <source>PARALLEL_XOY</source>
+            <translation>|| X-Y</translation>
+        </message>
+        <message>
+            <source>PARALLEL_YOZ</source>
+            <translation>|| Y-Z</translation>
+        </message>
+        <message>
+            <source>PARALLEL_ZOX</source>
+            <translation>|| Z-X</translation>
+        </message>
+        <message>
+            <source>SET_DEFAULT</source>
+            <translation>Set default</translation>
+        </message>
+        <message>
+            <source>TXT_ORIENTATION</source>
+            <translation>Orientation</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_CutPlanesDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_CutPlanesPane</name>
+        <message>
+            <source>LBL_NB_PLANS</source>
+            <translation>Number of planes:</translation>
+        </message>
+        <message>
+            <source>LBL_POS</source>
+            <translation>Displacement (0...1):</translation>
+        </message>
+        <message>
+            <source>LBL_ROTATION</source>
+            <translation>Rotations</translation>
+        </message>
+        <message>
+            <source>LBL_ROT_X</source>
+            <translation>Rotation around X (Y to Z):</translation>
+        </message>
+        <message>
+            <source>LBL_ROT_Y</source>
+            <translation>Rotation around Y (Z to X):</translation>
+        </message>
+        <message>
+            <source>LBL_ROT_Z</source>
+            <translation>Rotation around Z (X to Y):</translation>
+        </message>
+        <message>
+            <source>LBL_SHOW_PREVIEW</source>
+            <translation>Show preview</translation>
+        </message>
+        <message>
+            <source>PARALLEL_XOY</source>
+            <translation>// X-Y</translation>
+        </message>
+        <message>
+            <source>PARALLEL_YOZ</source>
+            <translation>// Y-Z</translation>
+        </message>
+        <message>
+            <source>PARALLEL_ZOX</source>
+            <translation>// Z-X</translation>
+        </message>
+        <message>
+            <source>TXT_ORIENTATION</source>
+            <translation>Orientation</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_DeformedShapeDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>DEFORMED_SHAPE_TAB</source>
+            <translation>Deformed Shape</translation>
+        </message>
+        <message>
+            <source>DLG_TITLE</source>
+            <translation>Deformed Shape</translation>
+        </message>
+        <message>
+            <source>INPUT_TAB</source>
+            <translation>Input</translation>
+        </message>
+        <message>
+            <source>MAGNITUDE_COLORING</source>
+            <translation>Magnitude coloring</translation>
+        </message>
+        <message>
+            <source>SCALAR_BAR_TAB</source>
+            <translation>Scalar Bar</translation>
+        </message>
+        <message>
+            <source>SCALE_FACTOR</source>
+            <translation>Scale Factor:</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_EditContainerDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>LBL_CONTAINER</source>
+            <translation>Container</translation>
+        </message>
+        <message>
+            <source>LBL_STUDY</source>
+            <translation>Study</translation>
+        </message>
+        <message>
+            <source>TXT_CURVE</source>
+            <translation>Curve</translation>
+        </message>
+        <message>
+            <source>TXT_TABLE</source>
+            <translation>Table</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_FileDlg</name>
+        <message>
+            <source>FULL_LOAD</source>
+            <translation>Full loading for current file</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_FontWg</name>
+        <message>
+            <source>ARIAL</source>
+            <translation>Arial</translation>
+        </message>
+        <message>
+            <source>BOLD</source>
+            <translation>Bold</translation>
+        </message>
+        <message>
+            <source>COURIER</source>
+            <translation>Courier</translation>
+        </message>
+        <message>
+            <source>ITALIC</source>
+            <translation>Italic</translation>
+        </message>
+        <message>
+            <source>SHADOW</source>
+            <translation>Shadow</translation>
+        </message>
+        <message>
+            <source>TIMES</source>
+            <translation>Times</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_GaussPointsDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>DEFORMED_SHAPE</source>
+            <translation>Deformed Shape</translation>
+        </message>
+        <message>
+            <source>DEFORMED_SHAPE_TITLE</source>
+            <translation>Deformed Shape</translation>
+        </message>
+        <message>
+            <source>DLG_PREF_TITLE</source>
+            <translation>Gauss Points Preferences</translation>
+        </message>
+        <message>
+            <source>DLG_PROP_TITLE</source>
+            <translation>Gauss Points Properties</translation>
+        </message>
+        <message>
+            <source>DLG_TITLE</source>
+            <translation>Gauss Points</translation>
+        </message>
+        <message>
+            <source>GAUSS_POINTS_TAB</source>
+            <translation>Gauss Points</translation>
+        </message>
+        <message>
+            <source>GEOMETRY</source>
+            <translation>Geometry</translation>
+        </message>
+        <message>
+            <source>INPUT_TAB</source>
+            <translation>Input</translation>
+        </message>
+        <message>
+            <source>PRS_TITLE</source>
+            <translation>Presentation</translation>
+        </message>
+        <message>
+            <source>RESULTS</source>
+            <translation>Results</translation>
+        </message>
+        <message>
+            <source>SCALAR_BAR_TAB</source>
+            <translation>Scalar Bar</translation>
+        </message>
+        <message>
+            <source>SCALE_FACTOR</source>
+            <translation>Scale Factor :</translation>
+        </message>
+        <message>
+            <source>WARNING</source>
+            <translation>Warning</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_GaussScalarBarPane</name>
+        <message>
+            <source>ACTIVE_BAR_GRP</source>
+            <translation>Active bar</translation>
+        </message>
+        <message>
+            <source>BICOLOR</source>
+            <translation>Bicolor</translation>
+        </message>
+        <message>
+            <source>COLORS_LABELS_GRP</source>
+            <translation>Colors and labels</translation>
+        </message>
+        <message>
+            <source>DIMENSIONS_GRP</source>
+            <translation>Dimensions</translation>
+        </message>
+        <message>
+            <source>DISPLAYED</source>
+            <translation>Displayed</translation>
+        </message>
+        <message>
+            <source>FIELD_RANGE_BTN</source>
+            <translation>Use field range</translation>
+        </message>
+        <message>
+            <source>GLOBAL</source>
+            <translation>Global</translation>
+        </message>
+        <message>
+            <source>HORIZONTAL_BTN</source>
+            <translation>Horizontal</translation>
+        </message>
+        <message>
+            <source>IMPOSED_RANGE_BTN</source>
+            <translation>Use imposed range</translation>
+        </message>
+        <message>
+            <source>LBL_HEIGHT</source>
+            <translation>Height:</translation>
+        </message>
+        <message>
+            <source>LBL_MAX</source>
+            <translation>Max:</translation>
+        </message>
+        <message>
+            <source>LBL_MIN</source>
+            <translation>Min:</translation>
+        </message>
+        <message>
+            <source>LBL_NB_COLORS</source>
+            <translation>Nb. of colors:</translation>
+        </message>
+        <message>
+            <source>LBL_NB_LABELS</source>
+            <translation>Nb. of labels:</translation>
+        </message>
+        <message>
+            <source>LBL_SPACING</source>
+            <translation>Spacing:</translation>
+        </message>
+        <message>
+            <source>LBL_WIDTH</source>
+            <translation>Width:</translation>
+        </message>
+        <message>
+            <source>LBL_X</source>
+            <translation>X:</translation>
+        </message>
+        <message>
+            <source>LBL_Y</source>
+            <translation>Y:</translation>
+        </message>
+        <message>
+            <source>LOCAL</source>
+            <translation>Local</translation>
+        </message>
+        <message>
+            <source>LOGARITHMIC_SCALING</source>
+            <translation>Logarithmic scaling</translation>
+        </message>
+        <message>
+            <source>ORIENTATION_GRP</source>
+            <translation>Orientation</translation>
+        </message>
+        <message>
+            <source>ORIGIN_GRP</source>
+            <translation>Origin</translation>
+        </message>
+        <message>
+            <source>RAINBOW</source>
+            <translation>Rainbow</translation>
+        </message>
+        <message>
+            <source>SAVE_DEFAULT_CHK</source>
+            <translation>Save as default values</translation>
+        </message>
+        <message>
+            <source>SCALAR_RANGE_GRP</source>
+            <translation>Scalar range</translation>
+        </message>
+        <message>
+            <source>VERTICAL_BTN</source>
+            <translation>Vertical</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_InputPane</name>
+        <message>
+            <source>ENTITY</source>
+            <translation>Entity :</translation>
+        </message>
+        <message>
+            <source>FIELD</source>
+            <translation>Field :</translation>
+        </message>
+        <message>
+            <source>MED_FILE</source>
+            <translation>Source File :</translation>
+        </message>
+        <message>
+            <source>MESH</source>
+            <translation>Mesh :</translation>
+        </message>
+        <message>
+            <source>PRS_DATA_SOUIRCE</source>
+            <translation>Data Source</translation>
+        </message>
+        <message>
+            <source>REINITIALIZE</source>
+            <translation>Auto Update</translation>
+        </message>
+        <message>
+            <source>TIME_STAMP</source>
+            <translation>Time Stamp :</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_IsoSurfPane</name>
+        <message>
+            <source>MAX_VALUE</source>
+            <translation>Maximum value:</translation>
+        </message>
+        <message>
+            <source>MIN_VALUE</source>
+            <translation>Minimum value:</translation>
+        </message>
+        <message>
+            <source>MSG_MINMAX_VALUES</source>
+            <translation>Min value can not be higher or equal to Max value</translation>
+        </message>
+        <message>
+            <source>NB_SURFACES</source>
+            <translation>Number of surfaces:</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_IsoSurfacesDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>DEFINE_ISOSURFACES</source>
+            <translation>Iso Surfaces Definition</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_ItemContainer</name>
+        <message>
+            <source>AUTO_CHECK_LBL</source>
+            <translation>Auto assign</translation>
+        </message>
+        <message>
+            <source>CIRCLE_MARKER_LBL</source>
+            <translation>Circle</translation>
+        </message>
+        <message>
+            <source>CROSS_MARKER_LBL</source>
+            <translation>Cross</translation>
+        </message>
+        <message>
+            <source>DAHSDOTDOT_LINE_LBL</source>
+            <translation>DashDotDot</translation>
+        </message>
+        <message>
+            <source>DASHDOT_LINE_LBL</source>
+            <translation>DashDot</translation>
+        </message>
+        <message>
+            <source>DASH_LINE_LBL</source>
+            <translation>Dash</translation>
+        </message>
+        <message>
+            <source>DIAMOND_MARKER_LBL</source>
+            <translation>Diamond</translation>
+        </message>
+        <message>
+            <source>DOT_LINE_LBL</source>
+            <translation>Dot</translation>
+        </message>
+        <message>
+            <source>DTRIANGLE_MARKER_LBL</source>
+            <translation>Downward triangle</translation>
+        </message>
+        <message>
+            <source>H</source>
+            <translation> H </translation>
+        </message>
+        <message>
+            <source>LTRIANGLE_MARKER_LBL</source>
+            <translation>Leftward triangle</translation>
+        </message>
+        <message>
+            <source>NONE_LINE_LBL</source>
+            <translation>None</translation>
+        </message>
+        <message>
+            <source>NONE_MARKER_LBL</source>
+            <translation>None</translation>
+        </message>
+        <message>
+            <source>RECTANGLE_MARKER_LBL</source>
+            <translation>Rectangle</translation>
+        </message>
+        <message>
+            <source>RTRIANGLE_MARKER_LBL</source>
+            <translation>Rightward triangle</translation>
+        </message>
+        <message>
+            <source>SOLID_LINE_LBL</source>
+            <translation>Solid</translation>
+        </message>
+        <message>
+            <source>UTRIANGLE_MARKER_LBL</source>
+            <translation>Upward triangle</translation>
+        </message>
+        <message>
+            <source>V</source>
+            <translation> V </translation>
+        </message>
+        <message>
+            <source>XCROSS_MARKER_LBL</source>
+            <translation>Diagonal cross</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_Module</name>
+        <message>
+            <source>MEN_DESK_FILE_SAVE_GUI_STATE</source>
+            <translation>Save VISU state</translation>
+        </message>
+        <message>
+            <source>MEN_GAUSS</source>
+            <translation>Gauss</translation>
+        </message>
+        <message>
+            <source>MEN_GAUSS_CREATE_PRS</source>
+            <translation>Gauss Points</translation>
+        </message>
+        <message>
+            <source>MEN_GAUSS_NEW_VIEWER</source>
+            <translation>Points view</translation>
+        </message>
+        <message>
+            <source>MEN_OVERWRITE_CONFIGURATION</source>
+            <translation>Overwrite current configuration</translation>
+        </message>
+        <message>
+            <source>MEN_RESTORE_CONFIGURATION</source>
+            <translation>Restore current configuration</translation>
+        </message>
+        <message>
+            <source>MEN_SAVE_CONFIGURATION</source>
+            <translation>Store current configuration</translation>
+        </message>
+        <message>
+            <source>MEN_VISUALISATION</source>
+            <translation>Visualization</translation>
+        </message>
+        <message>
+            <source>PRP_DESK_FILE_SAVE_GUI_STATE</source>
+            <translation>Saves current state of viewers, displayed objects, etc.</translation>
+        </message>
+        <message>
+            <source>TOOL_IMPORT</source>
+            <translation>Import Toolbar</translation>
+        </message>
+        <message>
+            <source>TOOL_VISUALISATION</source>
+            <translation>Visualization Toolbar</translation>
+        </message>
+        <message>
+            <source>TOT_DESK_FILE_SAVE_GUI_STATE</source>
+            <translation>Save VISU state</translation>
+        </message>
+        <message>
+            <source>VISU_CAMERA_MOVE_PREF</source>
+            <translation>Number of steps between two positions</translation>
+        </message>
+        <message>
+            <source>VISU_CAMERA_PREF_GROUP_TTL</source>
+            <translation>Camera movements</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_INSIDE_CURSOR_PREF_TAB_TTL</source>
+            <translation>Inside Cursor</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_OUTSIDE_CURSOR_PREF_TAB_TTL</source>
+            <translation>Outside Cursor</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_ACTIVE_BAR</source>
+            <translation>Active bar</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_ALPHA_TEXTURE</source>
+            <translation>Alpha Channel Texture (16x16)</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_ALPHA_THRESHOLD</source>
+            <translation>Alpha Channel Threshold</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_BICOLOR</source>
+            <translation>Bicolor</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_CLAMP</source>
+            <translation>Maximum Size (Clamp)</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_COLOR</source>
+            <translation>Color</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_COLOR_GROUP_TTL</source>
+            <translation>Color</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_DEFORMED_SHAPE_GROUP_TTL</source>
+            <translation>Deformed Shape</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_DISPLAY_GLOBAL</source>
+            <translation>Display global bar</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_FACE_LIMIT</source>
+            <translation>Notify when number of faces exceeds</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_GEOMSPHERE</source>
+            <translation>Geometrical sphere</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_GEOM_GROUP_TTL</source>
+            <translation>Geometry</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_GLOBAL</source>
+            <translation>Global</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_INCREMENT</source>
+            <translation>+/- Ratio</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_LOCAL</source>
+            <translation>Local</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_MAGNIFICATION</source>
+            <translation>Magnification (%)</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_MAGNIFICATION_GROUP_TTL</source>
+            <translation>Magnification (Inside and Outside)</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_MAIN_TEXTURE</source>
+            <translation>Main Texture (16x16)</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_MAX_SIZE</source>
+            <translation>Range value for max size (%)</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_MIN_SIZE</source>
+            <translation>Range value for min size (%)</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_OPENGLPOINT</source>
+            <translation>OpenGL point</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_POINTSPRITE</source>
+            <translation>Point sprite</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_PRIMITIVE_GROUP_TTL</source>
+            <translation>Primitive</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_PRIMITIVE_TYPE</source>
+            <translation>Primitive Type</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_RAINBOW</source>
+            <translation>Rainbow</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_RESOLUTION</source>
+            <translation>Geometrical sphere resolution</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_SCALAR_BAR_MODE</source>
+            <translation>Scalar bar mode</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_SCALE_FACTOR</source>
+            <translation>Scale factor</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_SIZE</source>
+            <translation>Size of points (%)</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_SIZE_GROUP_TTL</source>
+            <translation>Size</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_SPACING</source>
+            <translation>Spacing</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_TAB_TTL</source>
+            <translation>Gauss Points</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_PREF_UNIFORM_COLOR</source>
+            <translation>Uniform Color</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_SCALAR_BAR_PREF_GROUP_TTL</source>
+            <translation>Gauss Points Scalar Bar</translation>
+        </message>
+        <message>
+            <source>VISU_GAUSS_SCALAR_BAR_PREF_TAB_TTL</source>
+            <translation>Gauss Points Scalar Bar</translation>
+        </message>
+        <message>
+            <source>VISU_KEYBOARD_PREF</source>
+            <translation>[+]/[-] Speed increment</translation>
+        </message>
+        <message>
+            <source>VISU_KEYBOARD_PREF_GROUP_TTL</source>
+            <translation>Keyboard</translation>
+        </message>
+        <message>
+            <source>VISU_MOUSE_PREF</source>
+            <translation>Mouse behaviour</translation>
+        </message>
+        <message>
+            <source>VISU_MOUSE_PREF_GROUP_TLT</source>
+            <translation>Mouse</translation>
+        </message>
+        <message>
+            <source>VISU_MOUSE_PREF_KEYBOARD_FREE</source>
+            <translation>Keyboard free</translation>
+        </message>
+        <message>
+            <source>VISU_MOUSE_PREF_STANDARD</source>
+            <translation>Salome standard controls</translation>
+        </message>
+        <message>
+            <source>VISU_MOUSE_PREF_TAB_TLT</source>
+            <translation>Navigation</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_BELOW_POINT</source>
+            <translation>Centered below the point</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_CAMERA_GROUP_TTL</source>
+            <translation>Movement of the camera</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_CURSOR_GROUP_TTL</source>
+            <translation>Cursor</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_CURSOR_SIZE</source>
+            <translation>Size of the cursor</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_DISPLAY_PARENT_MESH</source>
+            <translation>Display parent mesh element</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_INFO_WINDOW_GROUP_TTL</source>
+            <translation>Information window</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_PARENT_MESH_TTL</source>
+            <translation>Parent mesh element</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_POINT_SELECTION_TOLERANCE</source>
+            <translation>Point selection tolerance</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_POSITION</source>
+            <translation>Position</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_PYRAMID_HEIGHT</source>
+            <translation>Height of the pyramids</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_SELECTION_COLOR</source>
+            <translation>Selection cursor color</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_STEP_NUMBER</source>
+            <translation>Number of steps between two positions</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_TAB_TTL</source>
+            <translation>Picking</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_TOLERANCE_GROUP_TTL</source>
+            <translation>Tolerance</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_TOP_LEFT_CORNER</source>
+            <translation>Top-left corner of the 3D view</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_TRANSPARENCY</source>
+            <translation>Transparency</translation>
+        </message>
+        <message>
+            <source>VISU_PICKING_PREF_ZOOM_FACTOR</source>
+            <translation>Zoom at first selected point (ratio)</translation>
+        </message>
+        <message>
+            <source>VISU_RECORDER_PREF_ALL_DISLPAYED_FRAMES</source>
+            <translation>Recording all displayed frames</translation>
+        </message>
+        <message>
+            <source>VISU_RECORDER_PREF_FPS</source>
+            <translation>FPS</translation>
+        </message>
+        <message>
+            <source>VISU_RECORDER_PREF_GROUP_TTL</source>
+            <translation>Settings</translation>
+        </message>
+        <message>
+            <source>VISU_RECORDER_PREF_PROGRESSIVE</source>
+            <translation>Progressive</translation>
+        </message>
+        <message>
+            <source>VISU_RECORDER_PREF_QUALITY</source>
+            <translation>Quality</translation>
+        </message>
+        <message>
+            <source>VISU_RECORDER_PREF_RECORDING_MODE</source>
+            <translation>Mode</translation>
+        </message>
+        <message>
+            <source>VISU_RECORDER_PREF_SKIPPED_FRAMES</source>
+            <translation>Recording at a given FPS</translation>
+        </message>
+        <message>
+            <source>VISU_RECORDER_PREF_TAB_TTL</source>
+            <translation>Recorder</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF</source>
+            <translation>Spacemouse</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_1</source>
+            <translation>Decrease speed increment</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_2</source>
+            <translation>Increase speed increment</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_3</source>
+            <translation>Decrease Gauss points magnification</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_4</source>
+            <translation>Increase Gauss points magnification</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_5</source>
+            <translation>Dominant / combined switch</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_*</source>
+            <translation>Button *</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_1</source>
+            <translation>Button 1</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_10</source>
+            <translation>Button 10</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_11</source>
+            <translation>Button 11</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_2</source>
+            <translation>Button 2</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_3</source>
+            <translation>Button 3</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_4</source>
+            <translation>Button 4</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_5</source>
+            <translation>Button 5</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_6</source>
+            <translation>Button 6</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_7</source>
+            <translation>Button 7</translation>
+        </message>
+        <message>
+            <source>VISU_SPACEMOUSE_PREF_BTN_8</source>
+            <translation>Button 8</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_NameDlg</name>
+        <message>
+            <source>NAME_LBL</source>
+            <translation>Name: </translation>
+        </message>
+        <message>
+            <source>TLT_RENAME</source>
+            <translation>Rename</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_NonIsometricDlg</name>
+        <message>
+            <source>&amp;Apply</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;Reset</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>DLG_TITLE</source>
+            <translation>Scaling</translation>
+        </message>
+        <message>
+            <source>LBL_X</source>
+            <translation>X :</translation>
+        </message>
+        <message>
+            <source>LBL_Y</source>
+            <translation>Y :</translation>
+        </message>
+        <message>
+            <source>LBL_Z</source>
+            <translation>Z :</translation>
+        </message>
+        <message>
+            <source>O&amp;K</source>
+            <translation></translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_Plot3DDlg</name>
+        <message>
+            <source>INPUT_TAB_TITLE</source>
+            <translation>Input</translation>
+        </message>
+        <message>
+            <source>PLOT3D_TAB_TITLE</source>
+            <translation>Plot 3D</translation>
+        </message>
+        <message>
+            <source>SCALAR_BAR_TAB_TITLE</source>
+            <translation>Scalar Bar</translation>
+        </message>
+        <message>
+            <source>TITLE</source>
+            <translation>Plot3D Definition</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_Plot3DPane</name>
+        <message>
+            <source>CONTOUR</source>
+            <translation>Contour</translation>
+        </message>
+        <message>
+            <source>NUMBER_CONTOURS</source>
+            <translation>Number of contours:</translation>
+        </message>
+        <message>
+            <source>ORIENTATION</source>
+            <translation>Orientation</translation>
+        </message>
+        <message>
+            <source>POSITION</source>
+            <translation>Position</translation>
+        </message>
+        <message>
+            <source>POSITION_VALUE</source>
+            <translation>Value: </translation>
+        </message>
+        <message>
+            <source>PRESENTATION_TYPE</source>
+            <translation>Presentation type</translation>
+        </message>
+        <message>
+            <source>PREVIEW</source>
+            <translation>Preview cutting plane</translation>
+        </message>
+        <message>
+            <source>RELATIVE</source>
+            <translation>Relative</translation>
+        </message>
+        <message>
+            <source>ROTATIONS</source>
+            <translation>Rotations</translation>
+        </message>
+        <message>
+            <source>ROTATION_X</source>
+            <translation>Rotation around X (Y to Z):</translation>
+        </message>
+        <message>
+            <source>ROTATION_Y</source>
+            <translation>Rotation around Y (Z to X):</translation>
+        </message>
+        <message>
+            <source>ROTATION_Z</source>
+            <translation>Rotation around Z (X to Y):</translation>
+        </message>
+        <message>
+            <source>SCALE</source>
+            <translation>Scale Factor:</translation>
+        </message>
+        <message>
+            <source>SURFACE</source>
+            <translation>Surface</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_ScalarBarDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>DLG_PREF_TITLE</source>
+            <translation>Scalar Bar Preferences</translation>
+        </message>
+        <message>
+            <source>DLG_PROP_TITLE</source>
+            <translation>Scalar Bar Properties</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_ScalarBarPane</name>
+        <message>
+            <source>COLORS_LABELS_GRP</source>
+            <translation>Colors and labels</translation>
+        </message>
+        <message>
+            <source>DIMENSIONS_GRP</source>
+            <translation>Dimensions</translation>
+        </message>
+        <message>
+            <source>FIELD_RANGE_BTN</source>
+            <translation>Use field range</translation>
+        </message>
+        <message>
+            <source>HORIZONTAL_BTN</source>
+            <translation>Horizontal</translation>
+        </message>
+        <message>
+            <source>IMPOSED_RANGE_BTN</source>
+            <translation>Use imposed range</translation>
+        </message>
+        <message>
+            <source>LBL_HEIGHT</source>
+            <translation>Height:</translation>
+        </message>
+        <message>
+            <source>LBL_MAX</source>
+            <translation>Max:</translation>
+        </message>
+        <message>
+            <source>LBL_MIN</source>
+            <translation>Min:</translation>
+        </message>
+        <message>
+            <source>LBL_NB_COLORS</source>
+            <translation>Nb. of colors:</translation>
+        </message>
+        <message>
+            <source>LBL_NB_LABELS</source>
+            <translation>Nb. of labels:</translation>
+        </message>
+        <message>
+            <source>LBL_SHOW_PREVIEW</source>
+            <translation>Show preview</translation>
+        </message>
+        <message>
+            <source>LBL_WIDTH</source>
+            <translation>Width:</translation>
+        </message>
+        <message>
+            <source>LBL_X</source>
+            <translation>X:</translation>
+        </message>
+        <message>
+            <source>LBL_Y</source>
+            <translation>Y:</translation>
+        </message>
+        <message>
+            <source>LOGARITHMIC_SCALING</source>
+            <translation>Logarithmic scaling</translation>
+        </message>
+        <message>
+            <source>MSG_MINMAX_VALUES</source>
+            <translation>Min value can not be higher or equal to Max value</translation>
+        </message>
+        <message>
+            <source>ORIENTATION_GRP</source>
+            <translation>Orientation</translation>
+        </message>
+        <message>
+            <source>ORIGIN_GRP</source>
+            <translation>Origin</translation>
+        </message>
+        <message>
+            <source>SAVE_DEFAULT_CHK</source>
+            <translation>Save as default values</translation>
+        </message>
+        <message>
+            <source>SCALAR_RANGE_GRP</source>
+            <translation>Scalar range</translation>
+        </message>
+        <message>
+            <source>VERTICAL_BTN</source>
+            <translation>Vertical</translation>
+        </message>
+        <message>
+            <source>WRN_LOGARITHMIC_FIELD_RANGE</source>
+            <translation>Logarithmic scaling: field range contains negative values, use imposed range instead</translation>
+        </message>
+        <message>
+            <source>WRN_LOGARITHMIC_RANGE</source>
+            <translation>Logarithmic scaling: use imposed range values > 0</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_ScalarMapOnDeformedShapeDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>DLG_TITLE</source>
+            <translation>Scalar Map on Deformed Shape</translation>
+        </message>
+        <message>
+            <source>FIELD_ITEM</source>
+            <translation>Scalar Field:</translation>
+        </message>
+        <message>
+            <source>INPUT_TAB</source>
+            <translation>Input</translation>
+        </message>
+        <message>
+            <source>SCALAR_BAR_TAB</source>
+            <translation>Scalar Bar</translation>
+        </message>
+        <message>
+            <source>SCALAR_MAP_ON_DEFORMED_SHAPE_TAB</source>
+            <translation>Scalar Map on Deformed Shape</translation>
+        </message>
+        <message>
+            <source>SCALE_FACTOR</source>
+            <translation>Scale Factor:</translation>
+        </message>
+        <message>
+            <source>TIMESTAMP_ITEM</source>
+            <translation>Current Time Stamp:</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_SetupPlot2dDlg</name>
+        <message>
+            <source>BUT_NO</source>
+            <translation>No</translation>
+        </message>
+        <message>
+            <source>BUT_YES</source>
+            <translation>Yes</translation>
+        </message>
+        <message>
+            <source>QUE_WANT_SAME_UNITS</source>
+            <translation>Do you want to choose all items with the same units for vertical axis?</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_Slider</name>
+        <message>
+            <source>AVI</source>
+            <translation>AVI</translation>
+        </message>
+        <message>
+            <source>CACHE_MEMORY</source>
+            <translation>Cache:</translation>
+        </message>
+        <message>
+            <source>FREE_MEMORY</source>
+            <translation>Free:</translation>
+        </message>
+        <message>
+            <source>MORE</source>
+            <translation>More...</translation>
+        </message>
+        <message>
+            <source>SPEED</source>
+            <translation>Speed:</translation>
+        </message>
+        <message>
+            <source>TOOLBAR_TITLE</source>
+            <translation>Slider</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_StreamLinesDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>DLG_TITLE</source>
+            <translation>Stream lines Preferences</translation>
+        </message>
+        <message>
+            <source>LBL_DIRECTION</source>
+            <translation>Direction</translation>
+        </message>
+        <message>
+            <source>LBL_INTEGRATION_STEP</source>
+            <translation>Integration Step</translation>
+        </message>
+        <message>
+            <source>LBL_PROPAGATION_TIME</source>
+            <translation>Propagation Time</translation>
+        </message>
+        <message>
+            <source>LBL_SOURCE_TYPE</source>
+            <translation>Source type</translation>
+        </message>
+        <message>
+            <source>LBL_STEP_LENGTH</source>
+            <translation>Step Length</translation>
+        </message>
+        <message>
+            <source>LBL_USED_POINTS</source>
+            <translation>Used points (0..1)</translation>
+        </message>
+        <message>
+            <source>MAGNITUDE_COLORING_CHK</source>
+            <translation>Magnitude coloring</translation>
+        </message>
+        <message>
+            <source>SOURCE_GRP</source>
+            <translation>Source</translation>
+        </message>
+        <message>
+            <source>USE_COLOR_BTN</source>
+            <translation>Use Color</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_SweepPrefDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>DLG_TITLE</source>
+            <translation>Sweeping Preferences</translation>
+        </message>
+        <message>
+            <source>LBL_NB_CYCLES</source>
+            <translation>Number of cycles:</translation>
+        </message>
+        <message>
+            <source>LBL_NB_STEPS</source>
+            <translation>Number of steps:</translation>
+        </message>
+        <message>
+            <source>LBL_TIME_STEP</source>
+            <translation>Time step (second):</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_TableDlg</name>
+        <message>
+            <source>EDIT_TABLE_TLT</source>
+            <translation>Edit Table</translation>
+        </message>
+        <message>
+            <source>ERR_TABLE_NOT_AVAILABLE</source>
+            <translation>Table is not available</translation>
+        </message>
+        <message>
+            <source>TABLE_OF_INTEGER_TLT</source>
+            <translation>Table of integer</translation>
+        </message>
+        <message>
+            <source>TABLE_OF_REAL_TLT</source>
+            <translation>Table of real</translation>
+        </message>
+        <message>
+            <source>VIEW_TABLE_TLT</source>
+            <translation>View Table</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_TableWidget</name>
+        <message>
+            <source>ADD_COLUMN_BTN</source>
+            <translation>Add Column</translation>
+        </message>
+        <message>
+            <source>ADD_ROW_BTN</source>
+            <translation>Add Row</translation>
+        </message>
+        <message>
+            <source>ADJUST_CELLS_BTN</source>
+            <translation>Adjust Cells</translation>
+        </message>
+        <message>
+            <source>CLEAR_BTN</source>
+            <translation>Clear</translation>
+        </message>
+        <message>
+            <source>REMOVE_COLUMN_BTN</source>
+            <translation>Remove Column(s)</translation>
+        </message>
+        <message>
+            <source>REMOVE_ROW_BTN</source>
+            <translation>Remove Row(s)</translation>
+        </message>
+        <message>
+            <source>SELECT_ALL_BTN</source>
+            <translation>Select All</translation>
+        </message>
+        <message>
+            <source>SET_TITLE_TLT</source>
+            <translation>Set title</translation>
+        </message>
+        <message>
+            <source>TITLE_LBL</source>
+            <translation>Title:</translation>
+        </message>
+        <message>
+            <source>UNITS_TLT</source>
+            <translation>Units</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_TextPrefDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>LBL_BOLD</source>
+            <translation>Bold</translation>
+        </message>
+        <message>
+            <source>LBL_ITALIC</source>
+            <translation>Italic</translation>
+        </message>
+        <message>
+            <source>LBL_LABELS</source>
+            <translation>Labels</translation>
+        </message>
+        <message>
+            <source>LBL_SHADOW</source>
+            <translation>Shadow</translation>
+        </message>
+        <message>
+            <source>LBL_TITLE</source>
+            <translation>Title</translation>
+        </message>
+        <message>
+            <source>TIT_TEXT_PREF</source>
+            <translation>Text property</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_TimeAnimationDlg</name>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>ERROR</source>
+            <translation>Error</translation>
+        </message>
+        <message>
+            <source>MSG_NO_ANIMATIONDATA</source>
+            <translation>There is no data for animation</translation>
+        </message>
+        <message>
+            <source>MSG_NO_AVI_MAKER</source>
+            <translation>Tool jpeg2yuv, necessary for AVI recording, is not available.\nPlease, refer to the documentation.</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_TransparencyDlg</name>
+        <message>
+            <source>BUT_CLOSE</source>
+            <translation>Close</translation>
+        </message>
+        <message>
+            <source>TRANSPARENCY_OPAQUE</source>
+            <translation>Opaque</translation>
+        </message>
+        <message>
+            <source>TRANSPARENCY_TITLE</source>
+            <translation>Change Transparency</translation>
+        </message>
+        <message>
+            <source>TRANSPARENCY_TRANSPARENT</source>
+            <translation>Transparent</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_VectorsDlg</name>
+        <message>
+            <source>&amp;Cancel</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>&amp;OK</source>
+            <translation></translation>
+        </message>
+        <message>
+            <source>ARROWS_BTN</source>
+            <translation>Arrows</translation>
+        </message>
+        <message>
+            <source>CENTER_BTN</source>
+            <translation>Center</translation>
+        </message>
+        <message>
+            <source>CONES2_BTN</source>
+            <translation>Cones (2)</translation>
+        </message>
+        <message>
+            <source>CONES6_BTN</source>
+            <translation>Cones (6)</translation>
+        </message>
+        <message>
+            <source>DLG_TITLE</source>
+            <translation>Vector Field Representation</translation>
+        </message>
+        <message>
+            <source>GLYPH_POSITION_GRP</source>
+            <translation>Glyph position</translation>
+        </message>
+        <message>
+            <source>GLYPH_TYPE_GRP</source>
+            <translation>Glyph type</translation>
+        </message>
+        <message>
+            <source>HEAD_BTN</source>
+            <translation>Head</translation>
+        </message>
+        <message>
+            <source>LBL_LINE_WIDTH</source>
+            <translation>Line width:</translation>
+        </message>
+        <message>
+            <source>LBL_SCALE_FACTOR</source>
+            <translation>Scale factor:</translation>
+        </message>
+        <message>
+            <source>MAGNITUDE_COLORING_CHK</source>
+            <translation>Magnitude coloring</translation>
+        </message>
+        <message>
+            <source>SEL_COLOR_BTN</source>
+            <translation>Select Color</translation>
+        </message>
+        <message>
+            <source>TAIL_BTN</source>
+            <translation>Tail</translation>
+        </message>
+        <message>
+            <source>USE_GLYPHS_CHK</source>
+            <translation>Use glyphs</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_SelectionDlg</name>
+        <message>
+            <source>WINDOW_TITLE</source>
+            <translation>Data on elements</translation>
+        </message>
+        <message>
+            <source>MODE_TITLE</source>
+            <translation>Selection</translation>
+        </message>
+       <message>
+            <source>MODE_POINT</source>
+            <translation>Point</translation>
+        </message>
+       <message>
+            <source>MODE_CELL</source>
+            <translation>Cell</translation>
+        </message>
+       <message>
+            <source>MODE_ACTOR</source>
+            <translation>Actor</translation>
+        </message>
+       <message>
+            <source>MESH_NAME_LBL</source>
+            <translation>Mesh name:</translation>
+        </message>
+       <message>
+           <source>FIELD_NAME_LBL</source>
+            <translation>Field name:</translation>
+        </message>
+       <message>
+           <source>POINT_DATA_TITLE</source>
+            <translation>Data of Point</translation>
+        </message>
+       <message>
+           <source>DATA_SCALAR_LBL</source>
+            <translation>Scalar Value:</translation>
+        </message>
+       <message>
+           <source>DATA_VECTOR_LBL</source>
+            <translation>Vector Value:</translation>
+        </message>
+        <message>
+           <source>POINT_COORD_TITLE</source>
+            <translation>Coordinates</translation>
+        </message>
+       <message>
+           <source>CELL_DATA_TITLE</source>
+            <translation>Data of Cell</translation>
+        </message>
+       <message>
+           <source>CELL_DATA_ID_LBL</source>
+            <translation>ID:</translation>
+        </message>
+       <message>
+           <source>CELL_DATA_SCALAR_HDR</source>
+            <translation>Scalar</translation>
+        </message>
+       <message>
+           <source>CELL_DATA_VECTOR_HDR</source>
+            <translation>Vector</translation>
+        </message>
+       <message>
+           <source>ACTOR_DATA_POSITION_TITLE</source>
+            <translation>Position</translation>
+        </message>
+       <message>
+           <source>ACTOR_DATA_SIZE_TITLE</source>
+            <translation>Size</translation>
+        </message>
+    </context>
+</TS>
index 96610a36773aac86e1dcea0a1f7e7c1656317b8f..7968682ffdd25114ba88580361d001712a1f4ccc 100644 (file)
 #include <vector>
 
 // QT Includes
-#include <qptrlist.h>
-#include <qptrvector.h>
-#include <qcolordialog.h>
-#include <qdatetime.h>
+#include <QList>
+#include <QVector>
+#include <QColorDialog>
+#include <QDateTime>
+#include <QMenu>
 
 // VTK Includes
 #include <vtkRenderer.h>
@@ -53,6 +54,7 @@
 
 #include "SUIT_ViewWindow.h"
 #include "SUIT_ViewManager.h"
+#include "SUIT_Desktop.h"
 
 #include "CAM_Module.h"
 
@@ -65,7 +67,9 @@
 #include "Plot2d_SetupCurveDlg.h"
 #include "Plot2d_ViewManager.h"
 
-#include "OB_Browser.h"
+#include "QtxPagePrefMgr.h"
+//TODO
+//#include "OB_Browser.h"
 
 #include "SALOME_ListIteratorOfListIO.hxx"
 
 #include "SalomeApp_DataModel.h"
 #include "SalomeApp_Study.h"
 #include "SalomeApp_CheckFileDlg.h"
+
 #include "LightApp_SelectionMgr.h"
 #include "LightApp_Selection.h"
 #include "LightApp_Preferences.h"
 
 #include "QtxAction.h"
+#include "QtxFontEdit.h"
 
 #include "VISUConfig.hh"
 #include "VISU_Gen_i.hh"
@@ -191,7 +197,7 @@ VisuGUI
   bool toUseBuildProgress = aResourceMgr->booleanValue("VISU", "use_build_progress", false);
 
   SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg( GetDesktop(this), true, tr("USE_BUILD_PROGRESS") );
-  fd->setCaption( tr( "IMPORT_FROM_FILE" ) );
+  fd->setWindowTitle( tr( "IMPORT_FROM_FILE" ) );
   fd->setFilters( aFilter );
   fd->SetChecked( toUseBuildProgress );
   fd->exec();
@@ -211,18 +217,17 @@ VisuGUI
       bool toBuildAll = aResourceMgr->booleanValue( "VISU", "full_med_loading", false );
       bool toBuildAtOnce = aResourceMgr->booleanValue( "VISU", "build_at_once", false );
       
-      QString anInfo("Importing From File " + aFileInfo.filePath() + "..." ); 
+      QString anInfo("Importing From File " + aFileInfo.absoluteFilePath() + "..." ); 
       application()->putInfo( anInfo );
 
-      QApplication::setOverrideCursor(Qt::waitCursor);
+      QApplication::setOverrideCursor(Qt::WaitCursor);
       // MULTIPR: CreateResult
-      VISU::Result_var aResult = GetVisuGen(this)->CreateResult( aFileInfo.filePath() );
+      VISU::Result_var aResult = GetVisuGen(this)->CreateResult( (const char*)aFileInfo.absoluteFilePath().toLatin1() );
 
       if (CORBA::is_nil(aResult.in())) {
-       SUIT_MessageBox::warn1(GetDesktop(this),
-                              tr("WRN_VISU"),
-                              VisuGUI_BuildProgressDlg::tr("ERR_ERROR_IN_THE_FILE"),
-                              tr("BUT_OK"));
+       SUIT_MessageBox::warning(GetDesktop(this),
+                                tr("WRN_VISU"),
+                                VisuGUI_BuildProgressDlg::tr("ERR_ERROR_IN_THE_FILE") );
        QApplication::restoreOverrideCursor();
       }else{
        aResult->SetBuildFields( toBuildFields, toBuildMinMax );
@@ -262,17 +267,16 @@ VisuGUI
                               tr("MEN_IMPORT_TABLE"),
                               true);
   if (aFileInfo.exists()) {
-    application()->putInfo( tr("MEN_IMPORT_TABLE") + " " + aFileInfo.filePath() + " ..." );
+    application()->putInfo( tr("MEN_IMPORT_TABLE") + " " + aFileInfo.absoluteFilePath() + " ..." );
 
-    CORBA::Object_var anObject = GetVisuGen(this)->ImportTables(aFileInfo.filePath());
+    CORBA::Object_var anObject = GetVisuGen(this)->ImportTables((const char*)aFileInfo.absoluteFilePath().toLatin1());
 
     if (CORBA::is_nil(anObject.in())) {
-      SUIT_MessageBox::warn1(GetDesktop(this),
-                             tr("WRN_VISU"),
-                             tr("ERR_ERROR_IN_THE_FILE"),
-                             tr("BUT_OK"));
+      SUIT_MessageBox::warning( GetDesktop(this),
+                                tr("WRN_VISU"),
+                                tr("ERR_ERROR_IN_THE_FILE") );
     } else {
-      application()->putInfo(aFileInfo.filePath()+tr("INF_DONE"));
+      application()->putInfo(aFileInfo.absoluteFilePath()+tr("INF_DONE"));
       UpdateObjBrowser(this);
     }
   }
@@ -328,7 +332,7 @@ VisuGUI
        if (!aTabAttr) return;
         aTitle = aTabAttr->GetTitle().c_str();
       }
-      aTitle.simplifyWhiteSpace();
+      aTitle.simplified();
       aTitle = aTitle.replace(QRegExp(" "), "_").replace(QRegExp("\\*"), "" );
 
       // get default path for the file
@@ -361,20 +365,20 @@ VisuGUI
         aResourceMgr->setValue("VISU", "OutputDir", aDir);
 
        try {
-         GetVisuGen(this)->ExportTableToFile(GetSObject(aSObj), aFile.latin1());
+         GetVisuGen(this)->ExportTableToFile(GetSObject(aSObj), (const char*)aFile.toLatin1());
           application()->putInfo(aFile + " " + tr("INF_DONE"));
        } catch(std::exception& exc) {
          INFOS(exc.what());
-         SUIT_MessageBox::warn1(GetDesktop(this),
-                                 tr("WRN_VISU"),
-                                tr("ERR_ERROR_DURING_EXPORT") + " " + tr(exc.what()),
-                                tr("BUT_OK"));
+         SUIT_MessageBox::warning(GetDesktop(this),
+                                   tr("WRN_VISU"),
+                                  tr("ERR_ERROR_DURING_EXPORT") + " " + tr(exc.what()) );
+
        } catch(...) {
-         INFOS(tr("ERR_ERROR_DURING_EXPORT"));
-         SUIT_MessageBox::warn1(GetDesktop(this),
-                                 tr("WRN_VISU"),
-                                tr("ERR_ERROR_DURING_EXPORT"),
-                                tr("BUT_OK") );
+         INFOS((const char*)tr("ERR_ERROR_DURING_EXPORT").toLatin1());
+         SUIT_MessageBox::warning( GetDesktop(this),
+                                    tr("WRN_VISU"),
+                                   tr("ERR_ERROR_DURING_EXPORT") );
+                                  
        }
       }
     }
@@ -395,7 +399,7 @@ VisuGUI
   aSelectionMgr->selectedObjects(aListIO);
 
   SALOME_ListIteratorOfListIO It (aListIO);
-  QApplication::setOverrideCursor(Qt::waitCursor);
+  QApplication::setOverrideCursor(Qt::WaitCursor);
   for (; It.More(); It.Next()) {
     Handle(SALOME_InteractiveObject) anIO = It.Value();
     SALOMEDS::SObject_var aSObject = aStudy->FindObjectID(anIO->getEntry());
@@ -673,7 +677,7 @@ VisuGUI
   if (!aSelectionMgr)
     return;
 
-  QApplication::setOverrideCursor(Qt::waitCursor);
+  QApplication::setOverrideCursor(Qt::WaitCursor);
 
   SALOME_ListIO aSel, aList;
   aSelectionMgr->selectedObjects(aSel);
@@ -722,7 +726,7 @@ VisuGUI
 ::OnErasePrs()
 {
   if(MYDEBUG) MESSAGE("OnErasePrs");
-  QApplication::setOverrideCursor(Qt::waitCursor);
+  QApplication::setOverrideCursor(Qt::WaitCursor);
 
   SALOME_ListIO aList, aSel;
   LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
@@ -1089,12 +1093,12 @@ VisuGUI
     return;
   
   VisuGUI_CursorDlg* CursorDlg =
-    new VisuGUI_CursorDlg (GetDesktop(this), tr("DLG_LINEWIDTH_TITLE"), TRUE);
+    new VisuGUI_CursorDlg (GetDesktop(this), (const char*)tr("DLG_LINEWIDTH_TITLE").toLatin1(), TRUE);
 
   CursorDlg->Comment1->setText(tr("DLG_LINEWIDTH_CMT1"));
   CursorDlg->Comment2->setText(tr("DLG_LINEWIDTH_CMT2"));
-  CursorDlg->SpinBox1->setMinValue(1);
-  CursorDlg->SpinBox1->setMaxValue(10);
+  CursorDlg->SpinBox1->setMinimum(1);
+  CursorDlg->SpinBox1->setMaximum(10);
 
   float oldlwid = anActor->GetLineWidth();
   int intlwid = int(oldlwid);
@@ -1247,7 +1251,7 @@ VisuGUI
              // if study is not locked - create new container, create curves and insert them
              // into container, then plot container if current viewer is of VIEW_PLOT2D type
              int horIndex;
-             QValueList<int> verIndices, zIndices;
+             QList<int> verIndices, zIndices;
              aDlg->getCurvesSource( horIndex, verIndices, zIndices );
              if( horIndex >= 0 && verIndices.count() > 0 ){
                CORBA::Object_var aContainerObj = GetVisuGen(this)->CreateContainer();
@@ -1287,7 +1291,7 @@ VisuGUI
              }
              // if study is locked just get curves info and plot them
              // if current viewer is of VIEW_PLOT2D type
-             QPtrList<Plot2d_Curve> container;
+             QList<Plot2d_Curve*> container;
              aDlg->getCurves( container );
              if ( !container.isEmpty() ) {
                GetPlot2dViewer( this )->getActiveViewFrame()->displayCurves( container, true );
@@ -1310,7 +1314,7 @@ VisuGUI
           // if study is not locked - create new table and container objects, create curves
           // and insert them into container, then plot container if current viewer is of VIEW_PLOT2D type
           int horIndex;
-          QValueList<int> verIndices, zIndices;
+          QList<int> verIndices, zIndices;
           aDlg->getCurvesSource( horIndex, verIndices, zIndices );
           if ( horIndex >= 0 && verIndices.count() > 0 ) {
             VISU::Table_var aTableObject = GetVisuGen(this)->CreateTable(aSObject->GetID().c_str());
@@ -1351,7 +1355,7 @@ VisuGUI
            aSObjectName = QString( aName->Value().c_str() );
          }
           // if study is locked just get curves info and plot them
-          QPtrList<Plot2d_Curve> container;
+          QList<Plot2d_Curve*> container;
           aDlg->getCurves( container );
           if ( !container.isEmpty() ) {
             GetPlot2dViewer( this )->getActiveViewFrame()->displayCurves( container, true );
@@ -1385,8 +1389,8 @@ VisuGUI
       if(!IsStudyLocked(GetCStudy(GetAppStudy(this)))){
         Plot2d_SetupCurveDlg aDlg(GetDesktop( this ));
 
-        aDlg.setLine( (int)aCurve->GetLine(), aCurve->GetLineWidth() );
-        aDlg.setMarker( (int)aCurve->GetMarker() );
+        aDlg.setLine( (Plot2d::LineType)aCurve->GetLine(), aCurve->GetLineWidth() );
+        aDlg.setMarker( (Plot2d::MarkerType)aCurve->GetMarker() );
         SALOMEDS::Color aColor = aCurve->GetColor();
         aDlg.setColor( QColor( (int)(aColor.R*255.), (int)(aColor.G*255.), (int)(aColor.B*255.) ) );
         if( aDlg.exec() == QDialog::Accepted ) {
@@ -1480,7 +1484,7 @@ VisuGUI
     return;
 
   if (aListIO.Extent() == 0) {
-    VISU::View3D_i::SaveViewParams(aViewMgr, VISU::View3D_i::GenerateViewParamsName().latin1());
+    VISU::View3D_i::SaveViewParams(aViewMgr, (const char*)VISU::View3D_i::GenerateViewParamsName().toLatin1());
   } else {
     const Handle(SALOME_InteractiveObject)& anIO = aListIO.First();
     VISU::View3D_i::SaveViewParams(aViewMgr, anIO->getName());
@@ -1536,24 +1540,24 @@ VisuGUI
     _PTR(AttributeName) aName (anAttr);
     QString Name = VisuGUI_NameDlg::getName( GetDesktop( this ), aName->Value().c_str() );
     if (!Name.isEmpty()) {
-      QApplication::setOverrideCursor(Qt::waitCursor);
+      QApplication::setOverrideCursor(Qt::WaitCursor);
 
       // rename specific objects
       if(VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase){
        switch(aBase->GetType()){
        case VISU::TCURVE: { // Curve object
          if(VISU::Curve_i* aCurve = dynamic_cast<VISU::Curve_i*>(aBase))
-           aCurve->SetName(Name.latin1(), true);
+           aCurve->SetName((const char*)Name.toLatin1(), true);
          break;
        }
        case VISU::TTABLE: { // Table object
          if(VISU::Table_i* aTable = dynamic_cast<VISU::Table_i*>(aBase))
-           aTable->SetName(Name.latin1(), true);
+           aTable->SetName((const char*)Name.toLatin1(), true);
          break;
        }
        case VISU::TCONTAINER: { // Container object
          if(VISU::Container_i* aContainer = dynamic_cast<VISU::Container_i*>(aBase))
-           aContainer->SetName(Name.latin1(), true);
+           aContainer->SetName((const char*)Name.toLatin1(), true);
          break;
        }
        default: {
@@ -1564,16 +1568,18 @@ VisuGUI
     if (!Name.isEmpty()) {
       // rename the study object
       Handle(SALOME_InteractiveObject) anIO = aSelectionItem.myIO;
-      aName->SetValue(Name.latin1()); // rename the SObject
-      anIO->setName(Name.latin1()); // rename the InteractiveObject
+      aName->SetValue((const char*)Name.toLatin1()); // rename the SObject
+      anIO->setName((const char*)Name.toLatin1()); // rename the InteractiveObject
       
       ViewManagerList aViewManagerList;
+      ViewManagerList::Iterator anIt;
       getApp()->viewManagers(SPlot2d_Viewer::Type(), aViewManagerList);
-      SUIT_ViewManager* aViewManager = aViewManagerList.first();
-      for(; aViewManager; aViewManager = aViewManagerList.next()){
-       if(Plot2d_ViewManager* aManager = dynamic_cast<Plot2d_ViewManager*>(aViewManager)){
+      anIt = aViewManagerList.begin();
+      for(; anIt != aViewManagerList.end(); anIt++ )
+      {
+       if(Plot2d_ViewManager* aManager = dynamic_cast<Plot2d_ViewManager*>(*anIt)){
          if(SPlot2d_Viewer* aViewer = dynamic_cast<SPlot2d_Viewer*>(aManager->getViewModel()))
-           aViewer->renameAll( anIO, Name.latin1() );
+           aViewer->renameAll( anIO, (const char*)Name.toLatin1() );
        }
       }
 
@@ -1589,7 +1595,7 @@ void
 VisuGUI
 ::OnClippingPlanes()
 {
-  new VisuGUI_ClippingDlg (this, "", false);
+  new VisuGUI_ClippingDlg (this, false);
 }
 
 //----------------------------------------------------------------------------
@@ -1624,7 +1630,7 @@ VisuGUI
   int is2Pi = aResourceMgr->integerValue("VISU", "sweeping_is2PI", 0);
 
   // Sweep
-  QApplication::setOverrideCursor(Qt::waitCursor);
+  QApplication::setOverrideCursor(Qt::WaitCursor);
 
   for (int j = 0; j < aCycles; j++) {
     for (int i = 0; i <= aSteps; i++) {
@@ -1677,10 +1683,9 @@ VisuGUI
   for (; It.More(); It.Next()) {
     _PTR(SObject) aSObject = aCStudy->FindObjectID(It.Value()->getEntry());
     if ( !aAnimationDlg->addField(aSObject) ) {
-      SUIT_MessageBox::warn1(GetDesktop(this),
-                          tr("WRN_VISU"),
-                          tr("ERR_CANT_CREATE_ANIMATION"),
-                          tr("BUT_OK"));
+      SUIT_MessageBox::warning(GetDesktop(this),
+                               tr("WRN_VISU"),
+                               tr("ERR_CANT_CREATE_ANIMATION") );
       delete aAnimationDlg;
       return;
     }
@@ -1808,10 +1813,9 @@ VisuGUI
   if (GetActiveViewWindow<SVTK_ViewWindow>(this))
     (new VisuGUI_SelectionDlg(this))->show();
   else
-    SUIT_MessageBox::warn1(GetDesktop(this),
-                           tr("WRN_VISU"),
-                           tr("ERR_ACTIVATE_VIEW3D"),
-                           tr("BUT_OK") );
+    SUIT_MessageBox::warning(GetDesktop(this),
+                             tr("WRN_VISU"),
+                             tr("ERR_ACTIVATE_VIEW3D") );
 }
 
 //----------------------------------------------------------------------------
@@ -1932,7 +1936,7 @@ VisuGUI
     Handle(SALOME_InteractiveObject) anIO = anIter.Value();
     if (anIO->hasEntry()) {
       QString anEntry(anIO->getEntry());
-      VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, anEntry);
+      VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)anEntry.toLatin1());
       if(VISU::Prs3d_i* aPrsObject = VISU::GetPrs3dFromBase(anObjectInfo.myBase))
        aDlg->addPresentation(aPrsObject);
     }
@@ -1976,338 +1980,338 @@ VisuGUI
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
 
   // Create actions
-  //createAction( VISU_IMPORT_FROM_FILE, "", QIconSet(),
+  //createAction( VISU_IMPORT_FROM_FILE, "", QIcon(),
   //              tr("MEN_IMPORT_FROM_FILE"), "", (CTRL + Key_I), aParent, false,
   //              this, SLOT(OnImportFromFile()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_IMPORT_MED"));
-  createAction( VISU_IMPORT_FROM_FILE, tr("IMPORT_FROM_FILE"), QIconSet(aPixmap),
-                tr("MEN_IMPORT_FROM_FILE"), "", (CTRL + Key_I), aParent, false,
+  createAction( VISU_IMPORT_FROM_FILE, tr("IMPORT_FROM_FILE"), QIcon(aPixmap),
+                tr("MEN_IMPORT_FROM_FILE"), "", (Qt::CTRL + Qt::Key_I), aParent, false,
                 this, SLOT(OnImportFromFile()));
 
-  createAction( VISU_IMPORT_TABLE, "", QIconSet(),
+  createAction( VISU_IMPORT_TABLE, "", QIcon(),
                 tr("MEN_IMPORT_TABLE"), "", 0, aParent, false,
                 this, SLOT(OnImportTableFromFile()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_SCALAR_MAP"));
-  createAction( VISU_SCALAR_MAP, tr("MEN_SCALAR_MAP"), QIconSet(aPixmap),
+  createAction( VISU_SCALAR_MAP, tr("MEN_SCALAR_MAP"), QIcon(aPixmap),
                 tr("MEN_SCALAR_MAP"), "", 0, aParent, false,
                 this, SLOT(OnCreateScalarMap()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_DEFORMED_SHAPE"));
-  createAction( VISU_DEFORMED_SHAPE, tr("MEN_DEFORMED_SHAPE"), QIconSet(aPixmap),
+  createAction( VISU_DEFORMED_SHAPE, tr("MEN_DEFORMED_SHAPE"), QIcon(aPixmap),
                 tr("MEN_DEFORMED_SHAPE"), "", 0, aParent, false,
                 this, SLOT(OnCreateDeformedShape()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_SCALAR_MAP_ON_DEFORMED_SHAPE"));
-  createAction( VISU_SCALAR_MAP_ON_DEFORMED_SHAPE, tr("MEN_SCALAR_MAP_ON_DEFORMED_SHAPE"), QIconSet(aPixmap),
+  createAction( VISU_SCALAR_MAP_ON_DEFORMED_SHAPE, tr("MEN_SCALAR_MAP_ON_DEFORMED_SHAPE"), QIcon(aPixmap),
                 tr("MEN_SCALAR_MAP_ON_DEFORMED_SHAPE"), "", 0, aParent, false,
                 this, SLOT(OnCreateScalarMapOnDeformedShape()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_VECTORS"));
-  createAction( VISU_VECTORS, tr("MEN_VECTORS"), QIconSet(aPixmap),
+  createAction( VISU_VECTORS, tr("MEN_VECTORS"), QIcon(aPixmap),
                 tr("MEN_VECTORS"), "", 0, aParent, false,
                 this, SLOT(OnCreateVectors()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_ISO_SURFACES"));
-  createAction( VISU_ISO_SURFACES, tr("MEN_ISO_SURFACES"), QIconSet(aPixmap),
+  createAction( VISU_ISO_SURFACES, tr("MEN_ISO_SURFACES"), QIcon(aPixmap),
                 tr("MEN_ISO_SURFACES"), "", 0, aParent, false,
                 this, SLOT(OnCreateIsoSurfaces()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_CUT_PLANES"));
-  createAction( VISU_CUT_PLANES, tr("MEN_CUT_PLANES"), QIconSet(aPixmap),
+  createAction( VISU_CUT_PLANES, tr("MEN_CUT_PLANES"), QIcon(aPixmap),
                 tr("MEN_CUT_PLANES"), "", 0, aParent, false,
                 this, SLOT(OnCreateCutPlanes()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_STREAM_LINES"));
-  createAction( VISU_STREAM_LINES, tr("MEN_STREAM_LINES"), QIconSet(aPixmap),
+  createAction( VISU_STREAM_LINES, tr("MEN_STREAM_LINES"), QIcon(aPixmap),
                 tr("MEN_STREAM_LINES"), "", 0, aParent, false,
                 this, SLOT(OnCreateStreamLines()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_CUT_LINES"));
-  createAction( VISU_CUT_LINES, tr("MEN_CUT_LINES"), QIconSet(aPixmap),
+  createAction( VISU_CUT_LINES, tr("MEN_CUT_LINES"), QIcon(aPixmap),
                 tr("MEN_CUT_LINES"), "", 0, aParent, false,
                 this, SLOT(OnCreateCutLines()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PLOT_3D"));
-  createAction( VISU_PLOT_3D, tr("MEN_PLOT_3D"), QIconSet(aPixmap),
+  createAction( VISU_PLOT_3D, tr("MEN_PLOT_3D"), QIcon(aPixmap),
                 tr("MEN_PLOT_3D"), "", 0, aParent, false,
                 this, SLOT(OnCreatePlot3D()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PLOT2D"));
-  createAction( VISU_PLOT2D, tr("MEN_CREATE_PLOT2D"), QIconSet(aPixmap),
+  createAction( VISU_PLOT2D, tr("MEN_CREATE_PLOT2D"), QIcon(aPixmap),
                 tr("MEN_CREATE_PLOT2D"), "", 0, aParent, false,
                 this, SLOT(OnCreatePlot2dView()));
 
-  createAction( VISU_DELETE_OBJS, tr("MEN_DELETE_OBJS"), QIconSet(),
+  createAction( VISU_DELETE_OBJS, tr("MEN_DELETE_OBJS"), QIcon(),
                 tr("MEN_DELETE_OBJS"), "", 0, aParent, false,
                 this, SLOT(OnDeleteObjects()));
 
-  createAction( VISU_SHOW_TABLE, tr("MEN_SHOW_TABLE"), QIconSet(),
+  createAction( VISU_SHOW_TABLE, tr("MEN_SHOW_TABLE"), QIcon(),
                 tr("MEN_SHOW_TABLE"), "", 0, aParent, false,
                 this, SLOT(OnShowTable()));
 
-  createAction( VISU_CREATE_CURVES, tr("MEN_CREATE_CURVES"), QIconSet(),
+  createAction( VISU_CREATE_CURVES, tr("MEN_CREATE_CURVES"), QIcon(),
                 tr("MEN_CREATE_CURVES"), "", 0, aParent, false,
                 this, SLOT(OnPlotData()));
 
-  createAction( VISU_EXPORT_TABLE, tr("MEN_EXPORT_TABLE"), QIconSet(),
+  createAction( VISU_EXPORT_TABLE, tr("MEN_EXPORT_TABLE"), QIcon(),
                 tr("MEN_EXPORT_TABLE"), "", 0, aParent, false,
                 this, SLOT(OnExportTableToFile()));
 
-  createAction( VISU_IMPORT_MED_STRUCTURE, tr("MEN_IMPORT_MED_STRUCTURE"), QIconSet(),
+  createAction( VISU_IMPORT_MED_STRUCTURE, tr("MEN_IMPORT_MED_STRUCTURE"), QIcon(),
                 tr("MEN_IMPORT_MED_STRUCTURE"), "", 0, aParent, false,
                 this, SLOT(OnImportMedField()));
 
-  createAction( VISU_IMPORT_MED_TIMESTAMP, tr("MEN_IMPORT_MED_TIMESTAMP"), QIconSet(),
+  createAction( VISU_IMPORT_MED_TIMESTAMP, tr("MEN_IMPORT_MED_TIMESTAMP"), QIcon(),
                 tr("MEN_IMPORT_MED_TIMESTAMP"), "", 0, aParent, false,
                 this, SLOT(OnImportMedField()));
 
-  createAction( VISU_IMPORT_MED_FIELD, tr("MEN_IMPORT_MED_FIELD"), QIconSet(),
+  createAction( VISU_IMPORT_MED_FIELD, tr("MEN_IMPORT_MED_FIELD"), QIcon(),
                 tr("MEN_IMPORT_MED_FIELD"), "", 0, aParent, false,
                 this, SLOT(OnImportMedField()));
 
-  createAction( VISU_CREATE_PRS, tr("MEN_CREATE_PRS"), QIconSet(),
+  createAction( VISU_CREATE_PRS, tr("MEN_CREATE_PRS"), QIcon(),
                 tr("MEN_CREATE_PRS"), "", 0, aParent, false,
                 this, SLOT(OnCreateMesh()));
 
-  createAction( VISU_CREATE_MANY_PRS, tr("MEN_CREATE_MANY_PRS"), QIconSet(),
+  createAction( VISU_CREATE_MANY_PRS, tr("MEN_CREATE_MANY_PRS"), QIcon(),
                 tr("MEN_CREATE_MANY_PRS"), "", 0, aParent, false,
                 this, SLOT(OnCreateManyMesh()));
 
-  createAction( VISU_TRANSLATE_PRS, tr("MEN_TRANSLATE_PRS"), QIconSet(),
+  createAction( VISU_TRANSLATE_PRS, tr("MEN_TRANSLATE_PRS"), QIcon(),
                 tr("MEN_TRANSLATE_PRS"), "", 0, aParent, false,
                 this, SLOT(OnTranslatePrs()));
 
-  createAction( VISU_MERGE_SCALAR_BARS, tr("MEN_MERGE_SCALAR_BARS"), QIconSet(),
+  createAction( VISU_MERGE_SCALAR_BARS, tr("MEN_MERGE_SCALAR_BARS"), QIcon(),
                 tr("MEN_MERGE_SCALAR_BARS"), "", 0, aParent, false,
                 this, SLOT(OnMergeScalarBars()));
 
-  createAction( VISU_FREE_SCALAR_BARS, tr("MEN_FREE_SCALAR_BARS"), QIconSet(),
+  createAction( VISU_FREE_SCALAR_BARS, tr("MEN_FREE_SCALAR_BARS"), QIcon(),
                 tr("MEN_FREE_SCALAR_BARS"), "", 0, aParent, false,
                 this, SLOT(OnFreeScalarBars()));
 
-  createAction( VISU_ERASE, tr("MEN_ERASE"), QIconSet(),
+  createAction( VISU_ERASE, tr("MEN_ERASE"), QIcon(),
                 tr("MEN_ERASE"), "", 0, aParent, false,
                 this, SLOT(OnErasePrs()));
 
-  createAction( VISU_DISPLAY, tr("MEN_DISPLAY"), QIconSet(),
+  createAction( VISU_DISPLAY, tr("MEN_DISPLAY"), QIcon(),
                 tr("MEN_DISPLAY"), "", 0, aParent, false,
                 this, SLOT(OnDisplayPrs()));
 
-  createAction( VISU_DISPLAY_ONLY, tr("MEN_DISPLAY_ONLY"), QIconSet(),
+  createAction( VISU_DISPLAY_ONLY, tr("MEN_DISPLAY_ONLY"), QIcon(),
                 tr("MEN_DISPLAY_ONLY"), "", 0, aParent, false,
                 this, SLOT(OnDisplayOnlyPrs()));
 
-  createAction( VISU_COPY_PRS, tr("MEN_COPY_PRS"), QIconSet(),
+  createAction( VISU_COPY_PRS, tr("MEN_COPY_PRS"), QIcon(),
                 tr("MEN_COPY_PRS"), "", 0, aParent, false,
                 this, SLOT(OnCopyPresentation()));
 
-  createAction( VISU_CURVE_PROPS, tr("MEN_CURVE_PROPS"), QIconSet(),
+  createAction( VISU_CURVE_PROPS, tr("MEN_CURVE_PROPS"), QIcon(),
                 tr("MEN_CURVE_PROPS"), "", 0, aParent, false,
                 this, SLOT(OnCurveProperties()));
 
-  createAction( VISU_RENAME, tr("MEN_RENAME"), QIconSet(), tr("MEN_RENAME"), "", 0, aParent, false,
+  createAction( VISU_RENAME, tr("MEN_RENAME"), QIcon(), tr("MEN_RENAME"), "", 0, aParent, false,
                 this, SLOT(OnRename()));
 
-  createAction( VISU_EDIT_CONTAINER, tr("MEN_EDIT_CONTAINER"), QIconSet(),
+  createAction( VISU_EDIT_CONTAINER, tr("MEN_EDIT_CONTAINER"), QIcon(),
                 tr("MEN_EDIT_CONTAINER"), "", 0, aParent, false,
                 this, SLOT(OnEditContainer()));
 
-  createAction( VISU_CLEAR_CONTAINER, tr("MEN_CLEAR_CONTAINER"), QIconSet(),
+  createAction( VISU_CLEAR_CONTAINER, tr("MEN_CLEAR_CONTAINER"), QIcon(),
                 tr("MEN_CLEAR_CONTAINER"), "", 0, aParent, false,
                 this, SLOT(OnClearContainer()));
 
-  createAction( VISU_SAVE_VIEW_PARAMS, tr("MEN_SAVE_VIEWPARAMS"), QIconSet(),
+  createAction( VISU_SAVE_VIEW_PARAMS, tr("MEN_SAVE_VIEWPARAMS"), QIcon(),
                 tr("MEN_SAVE_VIEWPARAMS"), "", 0, aParent, false,
                 this, SLOT(OnSaveViewParams()));
-  createAction( VISU_SAVE_VIEW_PARAMS_1, tr("MEN_SAVE_VIEWPARAMS"), QIconSet(),
+  createAction( VISU_SAVE_VIEW_PARAMS_1, tr("MEN_SAVE_VIEWPARAMS"), QIcon(),
                 tr("MEN_SAVE_VIEWPARAMS"), "", 0, aParent, false,
                 this, SLOT(OnSaveViewParams()));
 
-  createAction( VISU_RESTORE_VIEW_PARAMS, tr("MEN_RESTORE_VIEWPARAMS"), QIconSet(),
+  createAction( VISU_RESTORE_VIEW_PARAMS, tr("MEN_RESTORE_VIEWPARAMS"), QIcon(),
                 tr("MEN_RESTORE_VIEWPARAMS"), "", 0, aParent, false,
                 this, SLOT(OnRestoreViewParams()));
 
-  //createAction( VISU_DELETE_VIEW_PARAMS, tr("MEN_DELETE_VIEWPARAMS"), QIconSet(),
+  //createAction( VISU_DELETE_VIEW_PARAMS, tr("MEN_DELETE_VIEWPARAMS"), QIcon(),
   //              tr("MEN_DELETE_VIEWPARAMS"), "", 0, aParent, false,
   //              this, SLOT(OnDeleteObjects()));
 
-  createAction( VISU_ARRANGE_ACTORS, tr("MEN_ARRANGE_ACTORS"), QIconSet(),
+  createAction( VISU_ARRANGE_ACTORS, tr("MEN_ARRANGE_ACTORS"), QIcon(),
                 tr("MEN_ARRANGE_ACTORS"), "", 0, aParent, false,
                 this, SLOT(OnArrangeActors()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_POINTS"));
-  createAction( VISU_POINTS, tr("MEN_POINTS"), QIconSet(aPixmap),
+  createAction( VISU_POINTS, tr("MEN_POINTS"), QIcon(aPixmap),
                 tr("MEN_POINTS"), "", 0, aParent, false,
                 this, SLOT(OnMakePoints()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_WIREFRAME"));
-  createAction( VISU_WIREFRAME, tr("MEN_WIREFRAME"), QIconSet(aPixmap),
+  createAction( VISU_WIREFRAME, tr("MEN_WIREFRAME"), QIcon(aPixmap),
                 tr("MEN_WIREFRAME"), "", 0, aParent, false,
                 this, SLOT(OnMakeWireframe()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_SURFACE"));
-  createAction( VISU_SURFACE, tr("MEN_SURFACE"), QIconSet(aPixmap),
+  createAction( VISU_SURFACE, tr("MEN_SURFACE"), QIcon(aPixmap),
                 tr("MEN_SURFACE"), "", 0, aParent, false,
                 this, SLOT(OnMakeSurface()));
 
-  createAction( VISU_INSIDEFRAME, tr("MEN_INSIDEFRAME"), QIconSet(),
+  createAction( VISU_INSIDEFRAME, tr("MEN_INSIDEFRAME"), QIcon(),
                 tr("MEN_INSIDEFRAME"), "", 0, aParent, false,
                 this, SLOT(OnMakeInsideframe()));
 
-  createAction( VISU_SURFACEFRAME, tr("MEN_SURFACEFRAME"), QIconSet(),
+  createAction( VISU_SURFACEFRAME, tr("MEN_SURFACEFRAME"), QIcon(),
                 tr("MEN_SURFACEFRAME"), "", 0, aParent, false,
                 this, SLOT(OnMakeSurfaceframe()));
 
-  createAction( VISU_SHRINK, tr("MEN_SHRINK"), QIconSet(),
+  createAction( VISU_SHRINK, tr("MEN_SHRINK"), QIcon(),
                 tr("MEN_SHRINK"), "", 0, aParent, false,
                 this, SLOT(OnMakeShrink()));
 
-  createAction( VISU_UNSHRINK, tr("MEN_UNSHRINK"), QIconSet(),
+  createAction( VISU_UNSHRINK, tr("MEN_UNSHRINK"), QIcon(),
                 tr("MEN_UNSHRINK"), "", 0, aParent, false,
                 this, SLOT(OnMakeShrink()));
   
-  createAction( VISU_SHADING, tr("MEN_SHADING"), QIconSet(),
+  createAction( VISU_SHADING, tr("MEN_SHADING"), QIcon(),
                 tr("MEN_SHADING"), "", 0, aParent, false,
                 this, SLOT(OnSetShadingOn()));
   
-  createAction( VISU_NOSHADING, tr("MEN_NOSHADING"), QIconSet(),
+  createAction( VISU_NOSHADING, tr("MEN_NOSHADING"), QIcon(),
                 tr("MEN_NOSHADING"), "", 0, aParent, false,
                 this, SLOT(OnSetShadingOff()));
 
-  createAction( VISU_CELL_COLOR, tr("MEN_CELL_COLOR"), QIconSet(),
+  createAction( VISU_CELL_COLOR, tr("MEN_CELL_COLOR"), QIcon(),
                 tr("MEN_CELL_COLOR"), "", 0, aParent, false,
                 this, SLOT(OnChangeColor()));
 
-  createAction( VISU_COLOR, tr("MEN_COLOR"), QIconSet(),
+  createAction( VISU_COLOR, tr("MEN_COLOR"), QIcon(),
                 tr("MEN_COLOR"), "", 0, aParent, false,
                 this, SLOT(OnChangeColor()));
 
-  createAction( VISU_EDGE_COLOR, tr("MEN_EDGE_COLOR"), QIconSet(),
+  createAction( VISU_EDGE_COLOR, tr("MEN_EDGE_COLOR"), QIcon(),
                 tr("MEN_EDGE_COLOR"), "", 0, aParent, false,
                 this, SLOT(OnChangeWireframeColor()));
 
-  createAction( VISU_OPACITY, tr("MEN_OPACITY"), QIconSet(),
+  createAction( VISU_OPACITY, tr("MEN_OPACITY"), QIcon(),
                 tr("MEN_OPACITY"), "", 0, aParent, false,
                 this, SLOT(OnChangeOpacity()));
 
-  createAction( VISU_LINE_WIDTH, tr("MEN_LINE_WIDTH"), QIconSet(),
+  createAction( VISU_LINE_WIDTH, tr("MEN_LINE_WIDTH"), QIcon(),
                 tr("MEN_LINE_WIDTH"), "", 0, aParent, false,
                 this, SLOT(OnChangeLines()));
 
 
-  createAction( VISU_EDIT_SCALARMAP, tr("MEN_EDIT_PRS"), QIconSet(),
+  createAction( VISU_EDIT_SCALARMAP, tr("MEN_EDIT_PRS"), QIcon(),
                 tr("MEN_EDIT_PRS"), "", 0, aParent, false,
                 this, SLOT(OnEditScalarMap()));
 
-  createAction( VISU_EDIT_DEFORMEDSHAPE, tr("MEN_EDIT_PRS"), QIconSet(),
+  createAction( VISU_EDIT_DEFORMEDSHAPE, tr("MEN_EDIT_PRS"), QIcon(),
                 tr("MEN_EDIT_PRS"), "", 0, aParent, false,
                 this, SLOT(OnEditDeformedShape()));
 
-  createAction( VISU_EDIT_CUTPLANES, tr("MEN_EDIT_PRS"), QIconSet(),
+  createAction( VISU_EDIT_CUTPLANES, tr("MEN_EDIT_PRS"), QIcon(),
                 tr("MEN_EDIT_PRS"), "", 0, aParent, false,
                 this, SLOT(OnEditCutPlanes()));
 
-  createAction( VISU_EDIT_CUTLINES, tr("MEN_EDIT_PRS"), QIconSet(),
+  createAction( VISU_EDIT_CUTLINES, tr("MEN_EDIT_PRS"), QIcon(),
                 tr("MEN_EDIT_PRS"), "", 0, aParent, false,
                 this, SLOT(OnEditCutLines()));
 
-  createAction( VISU_EDIT_ISOSURFACE, tr("MEN_EDIT_PRS"), QIconSet(),
+  createAction( VISU_EDIT_ISOSURFACE, tr("MEN_EDIT_PRS"), QIcon(),
                 tr("MEN_EDIT_PRS"), "", 0, aParent, false,
                 this, SLOT(OnEditIsoSurfaces()));
 
-  createAction( VISU_EDIT_VECTORS, tr("MEN_EDIT_PRS"), QIconSet(),
+  createAction( VISU_EDIT_VECTORS, tr("MEN_EDIT_PRS"), QIcon(),
                 tr("MEN_EDIT_PRS"), "", 0, aParent, false,
                 this, SLOT(OnEditVectors()));
 
-  createAction( VISU_EDIT_STREAMLINES, tr("MEN_EDIT_PRS"), QIconSet(),
+  createAction( VISU_EDIT_STREAMLINES, tr("MEN_EDIT_PRS"), QIcon(),
                 tr("MEN_EDIT_PRS"), "", 0, aParent, false,
                 this, SLOT(OnEditStreamLines()));
 
-  createAction( VISU_EDIT_PLOT3D, tr("MEN_EDIT_PRS"), QIconSet(),
+  createAction( VISU_EDIT_PLOT3D, tr("MEN_EDIT_PRS"), QIcon(),
                 tr("MEN_EDIT_PRS"), "", 0, aParent, false,
                 this, SLOT(OnEditPlot3D()));
 
-  createAction( VISU_EDIT_SCALARMAPONDEFORMEDSHAPE, tr("MEN_EDIT_PRS"), QIconSet(),
+  createAction( VISU_EDIT_SCALARMAPONDEFORMEDSHAPE, tr("MEN_EDIT_PRS"), QIcon(),
                 tr("MEN_EDIT_PRS"), "", 0, aParent, false,
                 this, SLOT(OnEditScalarMapOnDeformedShape()));
 
 
-  createAction( VISU_CREATE_TABLE, tr("MEN_CREATE_TABLE"), QIconSet(),
+  createAction( VISU_CREATE_TABLE, tr("MEN_CREATE_TABLE"), QIcon(),
                 tr("MEN_CREATE_TABLE"), "", 0, aParent, false,
                 this, SLOT(OnCreateTable()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_SWEEP"));
-  createAction( VISU_SWEEP, tr("MEN_SWEEP"), QIconSet(aPixmap),
+  createAction( VISU_SWEEP, tr("MEN_SWEEP"), QIcon(aPixmap),
                 tr("MEN_SWEEP"), "", 0, aParent, false,
                 this, SLOT(OnSweep()));
 
-  createAction( VISU_CLIPPING, tr("MEN_CLIPPING"), QIconSet(),
+  createAction( VISU_CLIPPING, tr("MEN_CLIPPING"), QIcon(),
                 tr("MEN_CLIPPING"), "", 0, aParent, false,
                 this, SLOT(OnClippingPlanes()));
 
-  createAction( VISU_SELECTION_INFO, tr("MEN_SELECTION_INFO"), QIconSet(),
+  createAction( VISU_SELECTION_INFO, tr("MEN_SELECTION_INFO"), QIcon(),
                 tr("MEN_SELECTION_INFO"), "", 0, aParent, false,
                 this, SLOT(OnSelectionInfo()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_TIMEANIMATION"));
-  createAction( VISU_PARALLELANIMATION, tr("MEN_PARALLEL_ANIMATION"), QIconSet(aPixmap),
+  createAction( VISU_PARALLELANIMATION, tr("MEN_PARALLEL_ANIMATION"), QIcon(aPixmap),
                 tr("MEN_PARALLEL_ANIMATION"), "", 0, aParent, false,
                 this, SLOT(OnParallelTimeAnimation()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_TIMEANIMATION"));
-  createAction( VISU_SUCCCESSIVEANIMATION, tr("MEN_SUCCCESSIVE_ANIMATION"), QIconSet(aPixmap),
+  createAction( VISU_SUCCCESSIVEANIMATION, tr("MEN_SUCCCESSIVE_ANIMATION"), QIcon(aPixmap),
                 tr("MEN_SUCCCESSIVE_ANIMATION"), "", 0, aParent, false,
                 this, SLOT(OnSucccessiveTimeAnimation()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_ERASE_ALL"));
-  createAction( VISU_ERASE_ALL, tr("MEN_ERASE_ALL"), QIconSet(aPixmap),
+  createAction( VISU_ERASE_ALL, tr("MEN_ERASE_ALL"), QIcon(aPixmap),
                 tr("MEN_ERASE_ALL"), "", 0, aParent, false,
                 this, SLOT(OnEraseAll()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_GLOBAL_SELECTION"));
-  createAction( VISU_GLOBAL_SELECTION, tr("MEN_GLOBAL_SELECTION"), QIconSet(aPixmap),
+  createAction( VISU_GLOBAL_SELECTION, tr("MEN_GLOBAL_SELECTION"), QIcon(aPixmap),
                 tr("MEN_GLOBAL_SELECTION"), "", 0, aParent, false,
                 this);
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PARTIAL_SELECTION"));
-  createAction( VISU_PARTIAL_SELECTION, tr("MEN_PARTIAL_SELECTION"), QIconSet(aPixmap),
+  createAction( VISU_PARTIAL_SELECTION, tr("MEN_PARTIAL_SELECTION"), QIcon(aPixmap),
                 tr("MEN_PARTIAL_SELECTION"), "", 0, aParent, false,
                 this);
 
-  createAction( VISU_SHOW_ANIMATION, tr("MEN_SHOW_ANIMATION"), QIconSet(),
+  createAction( VISU_SHOW_ANIMATION, tr("MEN_SHOW_ANIMATION"), QIcon(),
                 tr("MEN_SHOW_ANIMATION"), "", 0, aParent, false,
                 this, SLOT(OnShowAnimation()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_PLOT_3D"));
-  createAction( VISU_PLOT3D_FROM_CUTPLANE, tr("MEN_PLOT3D_FROM_CUTPLANE"), QIconSet(aPixmap),
+  createAction( VISU_PLOT3D_FROM_CUTPLANE, tr("MEN_PLOT3D_FROM_CUTPLANE"), QIcon(aPixmap),
                 tr("MEN_PLOT3D_FROM_CUTPLANE"), "", 0, aParent, false,
                 this, SLOT(OnPlot3dFromCutPlane()));
 
-  createAction( VISU_CACHE_PROPERTIES, tr("MEN_CACHE_PROPERTIES"), QIconSet(),
+  createAction( VISU_CACHE_PROPERTIES, tr("MEN_CACHE_PROPERTIES"), QIcon(),
                 tr("MEN_CACHE_PROPERTIES"), "", 0, aParent, false,
                 this, SLOT(OnCacheProperties()));
 
 #ifdef ENABLE_MULTIPR
   // MULTIPR
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_MULTIPR_VIEW_FULL"));
-  createAction( VISU_MULTIPR_FULL_RES, tr("MEN_MULTIPR_VIEW_FULL_RES"), QIconSet(aPixmap),
+  createAction( VISU_MULTIPR_FULL_RES, tr("MEN_MULTIPR_VIEW_FULL_RES"), QIcon(aPixmap),
                 tr("MEN_MULTIPR_VIEW_FULL_RES"), "", 0, aParent, false,
                 this, SLOT(OnMultiprViewFullRes()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_MULTIPR_VIEW_MEDIUM"));
-  createAction( VISU_MULTIPR_MED_RES, tr("MEN_MULTIPR_VIEW_MEDIUM_RES"), QIconSet(aPixmap),
+  createAction( VISU_MULTIPR_MED_RES, tr("MEN_MULTIPR_VIEW_MEDIUM_RES"), QIcon(aPixmap),
                 tr("MEN_MULTIPR_VIEW_MEDIUM_RES"), "", 0, aParent, false,
                 this, SLOT(OnMultiprViewMediumRes()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_MULTIPR_VIEW_LOW"));
-  createAction( VISU_MULTIPR_LOW_RES, tr("MEN_MULTIPR_VIEW_LOW_RES"), QIconSet(aPixmap),
+  createAction( VISU_MULTIPR_LOW_RES, tr("MEN_MULTIPR_VIEW_LOW_RES"), QIcon(aPixmap),
                 tr("MEN_MULTIPR_VIEW_LOW_RES"), "", 0, aParent, false,
                 this, SLOT(OnMultiprViewLowRes()));
 
   aPixmap = aResourceMgr->loadPixmap("VISU",tr("ICON_MULTIPR_VIEW_HIDE"));
-  createAction( VISU_MULTIPR_HIDE, tr("MEN_MULTIPR_VIEW_HIDE"), QIconSet(aPixmap),
+  createAction( VISU_MULTIPR_HIDE, tr("MEN_MULTIPR_VIEW_HIDE"), QIcon(aPixmap),
                 tr("MEN_MULTIPR_VIEW_HIDE"), "", 0, aParent, false,
                 this, SLOT(OnMultiprViewHide()));
 #endif
@@ -2505,22 +2509,22 @@ VisuGUI
 
   // VISU root commands
   QString aRule = "client='ObjectBrowser' and selcount=1 and type='VISU::TVISUGEN'";
-  mgr->setRule( action( VISU_IMPORT_FROM_FILE ), aRule, true );
-  mgr->setRule( action( VISU_IMPORT_TABLE ), aRule, true );
-  mgr->setRule( action( VISU_PLOT2D ), aRule, true );
+  mgr->setRule( action( VISU_IMPORT_FROM_FILE ), aRule );
+  mgr->setRule( action( VISU_IMPORT_TABLE ), aRule );
+  mgr->setRule( action( VISU_PLOT2D ), aRule );
 
   // timestamp commands
   aRule = "client='ObjectBrowser' and selcount=1 and type in {'VISU::TTIMESTAMP' 'VISU::TFIELD'}";
-  mgr->setRule( action( VISU_SCALAR_MAP ), aRule, true );
-  mgr->setRule( action( VISU_ISO_SURFACES ), aRule, true );
-  mgr->setRule( action( VISU_CUT_PLANES ), aRule, true );
-  mgr->setRule( action( VISU_CUT_LINES ), aRule, true );
-  mgr->setRule( action( VISU_PLOT_3D ), aRule, true );
+  mgr->setRule( action( VISU_SCALAR_MAP ), aRule );
+  mgr->setRule( action( VISU_ISO_SURFACES ), aRule );
+  mgr->setRule( action( VISU_CUT_PLANES ), aRule );
+  mgr->setRule( action( VISU_CUT_LINES ), aRule );
+  mgr->setRule( action( VISU_PLOT_3D ), aRule );
   aRule += " and nbComponents>1";
-  mgr->setRule( action( VISU_DEFORMED_SHAPE ), aRule, true );
-  mgr->setRule( action( VISU_VECTORS ), aRule, true );
-  mgr->setRule( action( VISU_STREAM_LINES ), aRule, true );
-  mgr->setRule( action( VISU_SCALAR_MAP_ON_DEFORMED_SHAPE ), aRule, true );
+  mgr->setRule( action( VISU_DEFORMED_SHAPE ), aRule );
+  mgr->setRule( action( VISU_VECTORS ), aRule );
+  mgr->setRule( action( VISU_STREAM_LINES ), aRule );
+  mgr->setRule( action( VISU_SCALAR_MAP_ON_DEFORMED_SHAPE ), aRule );
 
   // display/erase commands
   QString andInvisible = " and (((not isVisible) and isActiveView) or (not isActiveView))";
@@ -2541,25 +2545,25 @@ VisuGUI
     " or (client='ObjectBrowser' and ((type='VISU::TTABLE' and nbChildren>0) or"
     " ($type in {'VISU::TCURVE' 'VISU::TCONTAINER'})))) ) or" + aComponent;
 
-  mgr->setRule( action( VISU_ERASE ), anEraseRule, true );
-  mgr->setRule( action( VISU_DISPLAY ), aDisplayRule, true );
-  mgr->setRule( action( VISU_DISPLAY_ONLY ), aDOnlyRule, true );
+  mgr->setRule( action( VISU_ERASE ), anEraseRule );
+  mgr->setRule( action( VISU_DISPLAY ), aDisplayRule );
+  mgr->setRule( action( VISU_DISPLAY_ONLY ), aDOnlyRule );
 
   aRule = "selcount>0 and $type in {'VISU::TMESH' " + aPrsAll + "}";
-  mgr->setRule( action( VISU_TRANSLATE_PRS ), aRule, true );
+  mgr->setRule( action( VISU_TRANSLATE_PRS ), aRule );
 
   aRule = "selcount>1 and $type in {'VISU::TMESH' " + aPrsAll + "}";
-  mgr->setRule( action( VISU_MERGE_SCALAR_BARS ), aRule, true );
-  mgr->setRule( action( VISU_FREE_SCALAR_BARS ), aRule, true );
+  mgr->setRule( action( VISU_MERGE_SCALAR_BARS ), aRule );
+  mgr->setRule( action( VISU_FREE_SCALAR_BARS ), aRule );
 
   // view parameters
   aRule = "selcount=1 and type='VISU::TVIEW3D' and activeView='VTKViewer'";
-  mgr->setRule( action( VISU_SAVE_VIEW_PARAMS_1 ), aRule, true );
-  mgr->setRule( action( VISU_SAVE_VIEW_PARAMS ), "client='VTKViewer' and selcount=0 and activeView='VTKViewer'", true );
-  mgr->setRule( action( VISU_RESTORE_VIEW_PARAMS ), "selcount=1 and type='VISU::TVIEW3D' and activeView='VTKViewer'", true );
+  mgr->setRule( action( VISU_SAVE_VIEW_PARAMS_1 ), aRule );
+  mgr->setRule( action( VISU_SAVE_VIEW_PARAMS ), "client='VTKViewer' and selcount=0 and activeView='VTKViewer'" );
+  mgr->setRule( action( VISU_RESTORE_VIEW_PARAMS ), "selcount=1 and type='VISU::TVIEW3D' and activeView='VTKViewer'" );
   //mgr->setRule( action( VISU_DELETE_VIEW_PARAMS ), "selcount=1 and type='VISU::TVIEW3D'", true );
 
-  mgr->setRule( action( VISU_ARRANGE_ACTORS ), "$client in {'VTKViewer' 'VVTK'} and selcount=0", true );
+  mgr->setRule( action( VISU_ARRANGE_ACTORS ), "$client in {'VTKViewer' 'VVTK'} and selcount=0" );
 
   // 3D presentations commands
   QString aPrsType    = " and $type in {'VISU::TMESH' " + aPrsAll + "}";
@@ -2572,7 +2576,7 @@ VisuGUI
                         "'VISU::TCUTPLANES' 'VISU::TCUTLINES' 'VISU::TSTREAMLINES' 'VISU::TPLOT3D' 'VISU::TSCALARMAPONDEFORMEDSHAPE' }";
 
   aRule = "selcount=1";
-  mgr->setRule( action( VISU_CLIPPING ), aRule + aPrsType, true );
+  mgr->setRule( action( VISU_CLIPPING ), aRule + aPrsType );
 
   // "Representation" submenu
   QString aNotPoints = " and $representation in {'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME'}";
@@ -2581,92 +2585,92 @@ VisuGUI
   QString aNotInside = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::SURFACEFRAME'}";
   QString aNotSurffr = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME'}";
 
-  mgr->setRule( action( VISU_POINTS )      , aRule + aPrsType + aNotPoints, true );
-  mgr->setRule( action( VISU_WIREFRAME )   , aRule + aPrsType + aNotWirefr, true );
-  mgr->setRule( action( VISU_SURFACE )     , aRule + aSurfType + aNotSurfac, true );
-  mgr->setRule( action( VISU_INSIDEFRAME ) , aRule + aInsideType + aNotInside, true );
-  mgr->setRule( action( VISU_SURFACEFRAME ), aRule + aSurfFrameType + aNotSurffr, true );
+  mgr->setRule( action( VISU_POINTS )      , aRule + aPrsType + aNotPoints );
+  mgr->setRule( action( VISU_WIREFRAME )   , aRule + aPrsType + aNotWirefr );
+  mgr->setRule( action( VISU_SURFACE )     , aRule + aSurfType + aNotSurfac );
+  mgr->setRule( action( VISU_INSIDEFRAME ) , aRule + aInsideType + aNotInside );
+  mgr->setRule( action( VISU_SURFACEFRAME ), aRule + aSurfFrameType + aNotSurffr );
 
-  mgr->setRule( action( VISU_SHRINK )  , aRule + aShrinkType + " and isShrunk=0", true );
-  mgr->setRule( action( VISU_UNSHRINK ), aRule + aShrinkType + " and isShrunk=1", true );
+  mgr->setRule( action( VISU_SHRINK )  , aRule + aShrinkType + " and isShrunk=0" );
+  mgr->setRule( action( VISU_UNSHRINK ), aRule + aShrinkType + " and isShrunk=1" );
 
-  mgr->setRule( action( VISU_SHADING )  , aRule + " and isScalarMapAct=1 and isShading=0", true );
-  mgr->setRule( action( VISU_NOSHADING ), aRule + " and isScalarMapAct=1 and isShading=1", true );
+  mgr->setRule( action( VISU_SHADING )  , aRule + " and isScalarMapAct=1 and isShading=0" );
+  mgr->setRule( action( VISU_NOSHADING ), aRule + " and isScalarMapAct=1 and isShading=1" );
 
   // "Properties" submenu
-  mgr->setRule( action( VISU_CELL_COLOR ), aRule + " and type='VISU::TMESH' and representation='VISU::SURFACEFRAME'", true );
-  mgr->setRule( action( VISU_EDGE_COLOR ), aRule + " and type='VISU::TMESH' and representation='VISU::SURFACEFRAME'", true );
+  mgr->setRule( action( VISU_CELL_COLOR ), aRule + " and type='VISU::TMESH' and representation='VISU::SURFACEFRAME'" );
+  mgr->setRule( action( VISU_EDGE_COLOR ), aRule + " and type='VISU::TMESH' and representation='VISU::SURFACEFRAME'" );
   mgr->setRule( action( VISU_COLOR ), aRule + " and ((type='VISU::TMESH'"
                " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME'}) "
-               "or (type='VISU::TDEFORMEDSHAPE' and hasActor=1))", true );
-  mgr->setRule( action( VISU_OPACITY ), aRule + aShrinkType + " and hasActor=1", true );
-  mgr->setRule( action( VISU_LINE_WIDTH ), aRule + aLineType + " and hasActor=1", true );
+               "or (type='VISU::TDEFORMEDSHAPE' and hasActor=1))" );
+  mgr->setRule( action( VISU_OPACITY ), aRule + aShrinkType + " and hasActor=1" );
+  mgr->setRule( action( VISU_LINE_WIDTH ), aRule + aLineType + " and hasActor=1" );
 
   // rename command
   QString aCurveAll = "'VISU::TTABLE' 'VISU::TCURVE' 'VISU::TCONTAINER'";
 
   aRule = "selcount=1 and ($type in {'VISU::TVIEW3D' 'VISU::TMESH' " + aCurveAll + " " + aPrsAll + "})";
-  mgr->setRule( action( VISU_RENAME ), aRule, true );
+  mgr->setRule( action( VISU_RENAME ), aRule );
 
   // copy presentation command
   aRule = "selcount=1 and ($type in {" + aPrsAll + "})";
-  mgr->setRule( action( VISU_COPY_PRS ), aRule, true );
+  mgr->setRule( action( VISU_COPY_PRS ), aRule );
 
   // curve commands
   aRule = "selcount=1 and type='VISU::TCURVE'";
-  mgr->setRule( action( VISU_CURVE_PROPS ), aRule, true );
+  mgr->setRule( action( VISU_CURVE_PROPS ), aRule );
 
   // curve container commands
   aRule = "client='ObjectBrowser' and selcount=1 and type='VISU::TCONTAINER'";
-  mgr->setRule( action( VISU_EDIT_CONTAINER ), aRule, true );
-  mgr->setRule( action( VISU_CLEAR_CONTAINER ), aRule, true );
+  mgr->setRule( action( VISU_EDIT_CONTAINER ), aRule );
+  mgr->setRule( action( VISU_CLEAR_CONTAINER ), aRule );
 
   mgr->setRule( action( VISU_EDIT_SCALARMAP ),
-               "selcount=1 and type='VISU::TSCALARMAP'", true );
+               "selcount=1 and type='VISU::TSCALARMAP'" );
   mgr->setRule( action( VISU_EDIT_DEFORMEDSHAPE ),
-               "selcount=1 and type='VISU::TDEFORMEDSHAPE'", true );
+               "selcount=1 and type='VISU::TDEFORMEDSHAPE'" );
   mgr->setRule( action( VISU_EDIT_SCALARMAPONDEFORMEDSHAPE ),
-               "selcount=1 and type='VISU::TSCALARMAPONDEFORMEDSHAPE'", true );
+               "selcount=1 and type='VISU::TSCALARMAPONDEFORMEDSHAPE'" );
   mgr->setRule( action( VISU_EDIT_CUTPLANES ),
-               "selcount=1 and type='VISU::TCUTPLANES'", true );
+               "selcount=1 and type='VISU::TCUTPLANES'" );
   mgr->setRule( action( VISU_EDIT_CUTLINES ),
-               "selcount=1 and type='VISU::TCUTLINES'", true );
+               "selcount=1 and type='VISU::TCUTLINES'" );
   mgr->setRule( action( VISU_EDIT_ISOSURFACE ),
-               "selcount=1 and type='VISU::TISOSURFACE'", true );
+               "selcount=1 and type='VISU::TISOSURFACE'" );
   mgr->setRule( action( VISU_EDIT_VECTORS ),
-               "selcount=1 and type='VISU::TVECTORS'", true );
+               "selcount=1 and type='VISU::TVECTORS'" );
   mgr->setRule( action( VISU_EDIT_STREAMLINES ),
-               "selcount=1 and type='VISU::TSTREAMLINES'", true );
+               "selcount=1 and type='VISU::TSTREAMLINES'" );
   mgr->setRule( action( VISU_EDIT_PLOT3D ),
-               "selcount=1 and type='VISU::TPLOT3D'", true );
+               "selcount=1 and type='VISU::TPLOT3D'" );
 
   aRule = "selcount=1 and type='VISU::TCUTLINES' and nbNamedChildren=0";
-  mgr->setRule( action( VISU_CREATE_TABLE ), aRule, true );
+  mgr->setRule( action( VISU_CREATE_TABLE ), aRule );
 
   aRule = "selcount=1 and ($type in {" + aPrsAll + "})";
-  mgr->setRule( action( VISU_SWEEP ), aRule, true );
+  mgr->setRule( action( VISU_SWEEP ), aRule );
 
   // "Selection info" popup item
   aRule = "client='VTKViewer' and selcount=1" + aInsideType;
-  mgr->setRule( action( VISU_SELECTION_INFO ), aRule, true );
+  mgr->setRule( action( VISU_SELECTION_INFO ), aRule );
 
   aRule = "client='ObjectBrowser' and selcount>0";
   aRule += " and $type in {'VISU::TFIELD'}";
   aRule += " and nbTimeStamps>1";
   aRule += " and activeView in {'VTKViewer' 'VVTK'}";
-  mgr->setRule( action( VISU_PARALLELANIMATION ), aRule, true );
+  mgr->setRule( action( VISU_PARALLELANIMATION ), aRule );
 
   aRule = "client='ObjectBrowser' and selcount>0";
   aRule += " and $type in {'VISU::TFIELD'}";
   aRule += " and nbTimeStamps>0";
   aRule += " and activeView in {'VTKViewer' 'VVTK'}";
-  mgr->setRule( action( VISU_SUCCCESSIVEANIMATION ), aRule, true );
+  mgr->setRule( action( VISU_SUCCCESSIVEANIMATION ), aRule );
 
   aRule = "client='ObjectBrowser' and $type in {'VISU::TENTITY' 'VISU::TFAMILY' 'VISU::TGROUP'}";
-  mgr->setRule( action( VISU_CREATE_PRS ), aRule + " and selcount=1", true );
-  mgr->setRule( action( VISU_CREATE_MANY_PRS ), aRule + " and selcount>1", true );
+  mgr->setRule( action( VISU_CREATE_PRS ), aRule + " and selcount=1" );
+  mgr->setRule( action( VISU_CREATE_MANY_PRS ), aRule + " and selcount>1" );
   mgr->setRule( action( VISU_EDIT_PLOT3D ),
-               "selcount=1 and type='VISU::TPLOT3D'", true );
+               "selcount=1 and type='VISU::TPLOT3D'" );
 
   //aRule = "client='ObjectBrowser' and type='MEDFIELD'";
   //mgr->setRule( action( VISU_IMPORT_MED ), aRule, true );
@@ -2674,20 +2678,22 @@ VisuGUI
 #ifdef ENABLE_MULTIPR
   // MULTIPR
   aRule = "client='ObjectBrowser' and $type in {'VISU::TPART'}";
-  mgr->setRule( action( VISU_MULTIPR_FULL_RES ), aRule + " and selcount>=1", true );
-  mgr->setRule( action( VISU_MULTIPR_MED_RES ), aRule + " and selcount>=1", true );
-  mgr->setRule( action( VISU_MULTIPR_LOW_RES ), aRule + " and selcount>=1", true );
-  mgr->setRule( action( VISU_MULTIPR_HIDE), aRule + " and selcount>=1", true );
+  mgr->setRule( action( VISU_MULTIPR_FULL_RES ), aRule + " and selcount>=1" );
+  mgr->setRule( action( VISU_MULTIPR_MED_RES ), aRule + " and selcount>=1" );
+  mgr->setRule( action( VISU_MULTIPR_LOW_RES ), aRule + " and selcount>=1" );
+  mgr->setRule( action( VISU_MULTIPR_HIDE), aRule + " and selcount>=1" );
 #endif
 }
 
 //***************************************************************************
-void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, QString& theTitle )
+void VisuGUI::contextMenuPopup( const QString& theClient, QMenu* theMenu, QString& theTitle )
 {
   SalomeApp_Module::contextMenuPopup(theClient, theMenu, theTitle);
 
-  OB_Browser* ob = getApp()->objectBrowser();
-  bool isOBClient = (ob && theClient == ob->popupClientType());
+  //TODO: object Browser
+  //OB_Browser* ob = getApp()->objectBrowser();
+  //bool isOBClient = (ob && theClient == ob->popupClientType());
+  bool isOBClient = false;
 
   LightApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
   SALOME_ListIO aListIO;
@@ -2733,9 +2739,9 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, Q
     }
   }
   if (nbPrs > 1) {
-    theMenu->insertSeparator();
-    action( VISU_MERGE_SCALAR_BARS )->addTo(theMenu);
-    action( VISU_FREE_SCALAR_BARS  )->addTo(theMenu);
+    theMenu->addSeparator();
+    theMenu->addAction( action( VISU_MERGE_SCALAR_BARS ) );
+    theMenu->addAction( action( VISU_FREE_SCALAR_BARS  ) );
   }
 
   // Check if some curves selected (for bug PAL10611)
@@ -2776,7 +2782,7 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, Q
   }
 
   if (isOneCutPlane)
-    action( VISU_PLOT3D_FROM_CUTPLANE )->addTo(theMenu);
+    theMenu->addAction( action( VISU_PLOT3D_FROM_CUTPLANE ) );
 
   VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(this);
   if(aSelectionInfo.empty())
@@ -2790,20 +2796,20 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, Q
 
   if(VISU::Base_i* aBase = aSelectionItem.myObjectInfo.myBase){
     if(aBase->GetType() == VISU::TCOLOREDPRS3DCACHE)
-      action( VISU_CACHE_PROPERTIES )->addTo(theMenu);
+      theMenu->addAction( action( VISU_CACHE_PROPERTIES ) );
   }
 
-  theMenu->insertSeparator();
+  theMenu->addSeparator();
 
   // Check if some (nb > 0) removable objects selected
   if (isOBClient && IsRemovableSelected(this)) {
-    action( VISU_DELETE_OBJS )->addTo(theMenu);
+    theMenu->addAction( action( VISU_DELETE_OBJS ) );
   }
   if (isCurves) {
-    action( myDisplay     )->removeFrom(theMenu);
-    action( myErase       )->removeFrom(theMenu);
-    action( myDisplayOnly )->removeFrom(theMenu);
-    action( myEraseAll    )->removeFrom(theMenu);
+    theMenu->removeAction( action( myDisplay ) );
+    theMenu->removeAction( action( myErase ) );
+    theMenu->removeAction( action( myDisplayOnly ) );
+    theMenu->removeAction( action( myEraseAll ) );
   }
 
   // Check single selection
@@ -2814,24 +2820,24 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, Q
   VISU::VISUType aType = (VISU::VISUType)VISU::Storable::FindValue(aMap,"myType",&isExist).toInt();
 
   if (aType == VISU::TANIMATION) {
-    action( VISU_SHOW_ANIMATION )->addTo(theMenu);
+    theMenu->addAction( action( VISU_SHOW_ANIMATION ) );
 
   } else if (isOBClient) {
     if (IsSObjectTable(aSObject)) {
-      action( VISU_SHOW_TABLE )->addTo(theMenu);
-      action( VISU_CREATE_CURVES )->addTo(theMenu);
-      action( VISU_EXPORT_TABLE )->addTo(theMenu);
-      theMenu->insertSeparator();
+      theMenu->addAction( action( VISU_SHOW_TABLE ) );
+      theMenu->addAction( action( VISU_CREATE_CURVES ) );
+      theMenu->addAction( action( VISU_EXPORT_TABLE ) );
+      theMenu->addSeparator();
     } else {
       if (!CORBA::is_nil(anObject)) {
         SALOME_MED::MED_var aMED = SALOME_MED::MED::_narrow(anObject);
         if (!CORBA::is_nil(aMED.in())) {
-          action( VISU_IMPORT_MED_STRUCTURE )->addTo(theMenu);
+          theMenu->addAction( action( VISU_IMPORT_MED_STRUCTURE ) );
         }
 
         SALOME_MED::FIELD_var aField = SALOME_MED::FIELD::_narrow(anObject); // "Import Structure"
         if (!CORBA::is_nil(aField)) {
-          action( VISU_IMPORT_MED_TIMESTAMP )->addTo(theMenu); // "Import TimeStamp"
+          theMenu->addAction( action( VISU_IMPORT_MED_TIMESTAMP ) ); // "Import TimeStamp"
         }
       } else {
         _PTR(SObject) aSFather = aSObject->GetFather();
@@ -2842,7 +2848,7 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, Q
             _PTR(AttributeName) aName (anAttr);
             std::string aValue = aName->Value();
             if (strcmp(aValue.c_str(), "MEDFIELD") == 0) {
-              action( VISU_IMPORT_MED_FIELD )->addTo(theMenu); // "Import Field"
+              theMenu->addAction( action( VISU_IMPORT_MED_FIELD ) ); // "Import Field"
             }
           }
         }
@@ -2858,8 +2864,8 @@ VisuGUI
 ::windows( QMap<int, int>& theMap ) const
 {
   theMap.clear();
-  theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::DockLeft );
-  theMap.insert( SalomeApp_Application::WT_PyConsole, Qt::DockBottom );
+  theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
+  theMap.insert( SalomeApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
 }
 
 
@@ -2896,7 +2902,9 @@ VisuGUI
   setToolShown( true );
 
   // Reset actions accelerator keys
-  action(VISU_IMPORT_FROM_FILE)->setAccel(QKeySequence(CTRL + Key_I));
+  QList<QKeySequence> shortcuts;
+  shortcuts.append( QKeySequence(Qt::CTRL + Qt::Key_I) );
+  action(VISU_IMPORT_FROM_FILE)->setShortcuts(shortcuts);
 
   return true;
 }
@@ -2910,7 +2918,7 @@ VisuGUI
   setToolShown( false );
 
   // Unset actions accelerator keys
-  action(VISU_IMPORT_FROM_FILE)->setAccel(QKeySequence());
+  action(VISU_IMPORT_FROM_FILE)->setShortcuts(QKeySequence::UnknownKey);
 
   SalomeApp_Module::deactivateModule( theStudy );
   return true;
@@ -2918,9 +2926,9 @@ VisuGUI
 
 LightApp_Selection*
 VisuGUI
-::createSelection() const
+::createSelection( const QString& client, LightApp_SelectionMgr* mgr ) const
 {
-  return new VisuGUI_Selection( (SalomeApp_Module*)this );
+  return new VisuGUI_Selection( (SalomeApp_Module*)this, client, mgr );
 }
 
 //******************************************************************
@@ -2943,9 +2951,15 @@ void VisuGUI::createPreferences()
 {
   // TAB: "MED import"
   int importTab = addPreference( tr( "MED import" ) );
+  //printf( "Tab index %d\n", importTab );
+
+  //int importFrame = addPreference( tr( "MED FRAME" ), importTab );
+  //printf( "Frame index %d\n", importFrame );
+  
   
   // group: "MED files import"
   int importGr = addPreference( tr( "MED files import" ), importTab );
+  //printf( "Group index %d\n", importGr );
   setPreferenceProperty( importGr, "columns", 1 );
   addPreference( tr( "Use build progress" ), importGr, LightApp_Preferences::Bool, "VISU", "use_build_progress" );
   addPreference( tr( "Full MED loading" ), importGr, LightApp_Preferences::Bool, "VISU", "full_med_loading" );
@@ -2967,7 +2981,7 @@ void VisuGUI::createPreferences()
   modes.append( tr( "VISU_COMPONENT" ) + tr("1") );
   modes.append( tr( "VISU_COMPONENT" ) + tr("2") );
   modes.append( tr( "VISU_COMPONENT" ) + tr("3") );
-  QValueList<QVariant> indices;
+  QList<QVariant> indices;
   indices.append( 0 );
   indices.append( 1 );
   indices.append( 2 );
@@ -3009,9 +3023,7 @@ void VisuGUI::createPreferences()
   fam.append( tr( "VISU_FONT_ARIAL" ) );
   fam.append( tr( "VISU_FONT_COURIER" ) );
   fam.append( tr( "VISU_FONT_TIMES" ) );
-  int wflag = ( QtxListResourceEdit::FontItem::All &
-                ( ~( QtxListResourceEdit::FontItem::Size |
-                     QtxListResourceEdit::FontItem::UserSize ) ) );
+  int wflag = ( QtxFontEdit::All & ( ~( QtxFontEdit::Size | QtxFontEdit::UserSize ) ) );
 
   setPreferenceProperty( tfont, "families", fam );
   setPreferenceProperty( tfont, "system", false );
@@ -3172,7 +3184,7 @@ void VisuGUI::createPreferences()
   mesh_modes.append( "Insideframe" );
   mesh_modes.append( "Surfaceframe" );
   mesh_modes.append( "Surface" );
-  QValueList<QVariant> mesh_indices;
+  QList<QVariant> mesh_indices;
   mesh_indices.append( 0 );
   mesh_indices.append( 1 );
   mesh_indices.append( 3 );
@@ -3180,19 +3192,19 @@ void VisuGUI::createPreferences()
   mesh_indices.append( 2 );
   
   QStringList modes1 = mesh_modes;
-  modes1.remove( "Insideframe" );
-  QValueList<QVariant> indices1 = mesh_indices;
-  indices1.remove( 3 );
+  modes1.removeAll( "Insideframe" );
+  QList<QVariant> indices1 = mesh_indices;
+  indices1.removeAll( 3 );
   
   QStringList modes2 = modes1;
-  modes2.remove( "Surfaceframe" );
-  QValueList<QVariant> indices2 = indices1;
-  indices2.remove( 4 );
+  modes2.removeAll( "Surfaceframe" );
+  QList<QVariant> indices2 = indices1;
+  indices2.removeAll( 4 );
 
   QStringList modes3 = modes2;
-  modes3.remove( "Surface" );
-  QValueList<QVariant> indices3 = indices2;
-  indices3.remove( 2 );
+  modes3.removeAll( "Surface" );
+  QList<QVariant> indices3 = indices2;
+  indices3.removeAll( 2 );
   
   
   int mesh_represent = addPreference( tr( "VISU_MESH" ), representGr, LightApp_Preferences::Selector, "VISU", "mesh_represent" );
@@ -3333,10 +3345,9 @@ void VisuGUI::preferencesChanged( const QString& a, const QString& b)
   }
   if (aWarning.size() != 0){
     aWarning += "The default values are applied instead.";
-    SUIT_MessageBox::warn1(GetDesktop(this),
-                          tr("ERR_SCALARBAR_PARAMS"),
-                          tr(aWarning.c_str()),
-                          tr("BUT_OK") );
+    SUIT_MessageBox::warning(GetDesktop(this),
+                             tr("ERR_SCALARBAR_PARAMS"),
+                             tr(aWarning.c_str()) );
   }
 }
 
@@ -3411,10 +3422,10 @@ void VisuGUI::OnPlot3dFromCutPlane()
      if (!isExist || aType.toInt() != TTIMESTAMP )
        return;
      
-     QString aMeshName = Storable::FindValue(aMap,"myMeshName",&isExist).latin1();
-     QString anEntity = Storable::FindValue(aMap,"myEntityId",&isExist).latin1();
-     QString aFieldName = Storable::FindValue(aMap,"myFieldName",&isExist).latin1();
-     QString aTimeStampId = Storable::FindValue(aMap,"myTimeStampId",&isExist).latin1();
+     QString aMeshName = (const char*)Storable::FindValue(aMap,"myMeshName",&isExist).toLatin1();
+     QString anEntity = (const char*)Storable::FindValue(aMap,"myEntityId",&isExist).toLatin1();
+     QString aFieldName = (const char*)Storable::FindValue(aMap,"myFieldName",&isExist).toLatin1();
+     QString aTimeStampId = (const char*)Storable::FindValue(aMap,"myTimeStampId",&isExist).toLatin1();
 
      int aPos;
      SUIT_ViewWindow* aViewWindow = 0;
@@ -3430,9 +3441,9 @@ void VisuGUI::OnPlot3dFromCutPlane()
      VISU::Plot3D_i* aPrs3d = 
        CreatePrs3dFromFactory<VISU::Plot3D_i>(this, 
                                              aTimeStampSObj, 
-                                             aMeshName.latin1(), 
+                                             (const char*)aMeshName.toLatin1(), 
                                              (Entity)anEntity.toInt(),
-                                             aFieldName.latin1(), 
+                                             (const char*)aFieldName.toLatin1(), 
                                              aTimeStampId.toInt(),
                                              ColoredPrs3d_i::EPublishUnderTimeStamp);
      if (aPrs3d) {
index c0c9834d76beede534ddd4d017df30adced1e9a3..faa3c8a34cbbdd12bdf4420391789dc0c540fe6e 100644 (file)
 #ifndef VisuGUI_HeaderFile
 #define VisuGUI_HeaderFile
 
+#include <map>
+#include <set>
+
 #include "SalomeApp_Module.h"
 
 #include "SALOME_ListIO.hxx"
 
-#include <map>
-#include <set>
+
 
 class SUIT_ViewManager;
 class SVTK_ViewWindow;
@@ -65,7 +67,7 @@ public:
 
   virtual void  studyActivated();
 
-  virtual void  contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, QString& theTitle );
+  virtual void  contextMenuPopup( const QString& theClient, QMenu* theMenu, QString& theTitle );
 
   virtual void createPreferences();
   virtual void preferencesChanged( const QString&, const QString& );
@@ -171,7 +173,7 @@ protected slots:
   void OnMultiprChangeRes(char resolution);
 
 protected:
-  virtual LightApp_Selection* createSelection() const;
+  virtual LightApp_Selection* createSelection( const QString&, LightApp_SelectionMgr* ) const;
 
   void OnTimeAnimation(int theMode);
 
index e1dace81abd4b1f2f8a1956f3fe1d8097a0dee97..a251c30bc8e76303df6a85794888697fb9e1a8cc 100644 (file)
 
 #include "LightApp_Application.h"
 
+#include <QtxColorButton.h>
+
 #include <vtkTimerLog.h>
 
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlcdnumber.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
+#include <QCheckBox>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLayout>
+#include <QLCDNumber>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QTimer>
+#include <QKeyEvent>
 
 /*!
  * Constructor
  */
 VisuGUI_BuildProgressDlg::VisuGUI_BuildProgressDlg( QWidget* theParent ):
-  QDialog( theParent, 
-          "VisuGUI_BuildProgressBar", 
-          false,
-          WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+  QDialog( theParent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
   myIsRaiseColor( false )
 {
-  setCaption( tr( "DLG_BUILD_PROGRESS_TITLE" ) );
+  setAttribute( Qt::WA_DeleteOnClose );
+  setWindowTitle( tr( "DLG_BUILD_PROGRESS_TITLE" ) );
 
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
 
   QVBoxLayout* aTopLayout = new QVBoxLayout( this );
   aTopLayout->setSpacing( 6 );
   aTopLayout->setMargin( 6 );
-  aTopLayout->setAutoAdd( true );
+  //aTopLayout->setAutoAdd( true );
 
   // Settings
   mySettingsBox = new QGroupBox( tr( "IMPORT_SETTINGS" ), this );
-  mySettingsBox->setColumnLayout( 0, Qt::Vertical );
-  mySettingsBox->layout()->setSpacing( 0 );
-  mySettingsBox->layout()->setMargin( 0 );
+  aTopLayout->addWidget( mySettingsBox );
+  //mySettingsBox->setColumnLayout( 0, Qt::Vertical );
+  //mySettingsBox->layout()->setSpacing( 0 );
+  //mySettingsBox->layout()->setMargin( 0 );
 
-  QGridLayout* aSettingsLayout = new QGridLayout( mySettingsBox->layout() );
+  QGridLayout* aSettingsLayout = new QGridLayout( mySettingsBox );
   aSettingsLayout->setSpacing( 6 );
   aSettingsLayout->setMargin( 11 );
 
@@ -99,7 +101,7 @@ VisuGUI_BuildProgressDlg::VisuGUI_BuildProgressDlg( QWidget* theParent ):
   myCloseCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "close_at_finish", true ) );
 
   aSettingsLayout->addWidget(  aFileNameLabel,       0, 0 );
-  aSettingsLayout->addMultiCellWidget( myFileNameLineEdit, 1, 1, 0, 1 );
+  aSettingsLayout->addWidget( myFileNameLineEdit,    1, 0, 1, 2 );
   //aSettingsLayout->addWidget(  aFileNameButton,      1, 2 );
   aSettingsLayout->addWidget( myBuildAllCheckBox,    2, 0 );
   aSettingsLayout->addWidget( myBuildAtOnceCheckBox, 3, 0 );
@@ -107,42 +109,58 @@ VisuGUI_BuildProgressDlg::VisuGUI_BuildProgressDlg( QWidget* theParent ):
 
   // Progress
   myProgressBox = new QGroupBox( tr( "IMPORT_PROGRESS" ), this );
-  myProgressBox->setColumnLayout( 0, Qt::Vertical );
-  myProgressBox->layout()->setSpacing( 0 );
-  myProgressBox->layout()->setMargin( 0 );
+  aTopLayout->addWidget( myProgressBox );
+  //myProgressBox->setColumnLayout( 0, Qt::Vertical );
+  //myProgressBox->layout()->setSpacing( 0 );
+  //myProgressBox->layout()->setMargin( 0 );
 
-  QGridLayout* aProgressLayout = new QGridLayout( myProgressBox->layout() );
+  QGridLayout* aProgressLayout = new QGridLayout( myProgressBox );
   aProgressLayout->setSpacing( 6 );
   aProgressLayout->setMargin( 11 );
 
   QLabel* aBuildEntitiesLabel = new QLabel( tr( "BUILD_ENTITIES" ), myProgressBox );
-  myBuildEntitiesButton = new QPushButton( myProgressBox );
+  myBuildEntitiesButton = new QtxColorButton( myProgressBox );
   myBuildEntitiesButton->setEnabled( false );
   myBuildEntitiesButton->setFixedSize( 30, 30 );
-  myBuildEntitiesButton->setPaletteBackgroundColor( Qt::red );
+  //QPalette aPal = myBuildEntitiesButton->palette();
+  //aPal.setColor( myBuildEntitiesButton->backgroundRole(), Qt::red );
+  //myBuildEntitiesButton->setPalette( aPal );
+  myBuildEntitiesButton->setColor( Qt::red );
 
   myBuildFieldsCheckBox = new QCheckBox( tr( "BUILD_FIELDS" ), myProgressBox );
   myBuildFieldsCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "build_fields", true ) );
-  myBuildFieldsButton = new QPushButton( myProgressBox );
+  myBuildFieldsButton = new QtxColorButton( myProgressBox );
   myBuildFieldsButton->setEnabled( false );
   myBuildFieldsButton->setFixedSize( 30, 30 );
-  myBuildFieldsButton->setPaletteBackgroundColor( Qt::red );
+  //aPal = myBuildFieldsButton->palette();
+  //aPal.setColor( myBuildFieldsButton->backgroundRole(), Qt::red );
+  //myBuildFieldsButton->setPalette( aPal );
+  myBuildFieldsButton->setColor( Qt::red );
+
   connect( myBuildFieldsCheckBox, SIGNAL( clicked() ), this, SLOT( onBuildCheckBoxClicked() ) );
 
   myBuildMinMaxCheckBox = new QCheckBox( tr( "BUILD_MINMAX" ), myProgressBox );
   myBuildMinMaxCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "build_min_max", true ) );
-  myBuildMinMaxButton = new QPushButton( myProgressBox );
+  myBuildMinMaxButton = new QtxColorButton( myProgressBox );
   myBuildMinMaxButton->setEnabled( false );
   myBuildMinMaxButton->setFixedSize( 30, 30 );
-  myBuildMinMaxButton->setPaletteBackgroundColor( Qt::red );
+  //aPal = myBuildMinMaxButton->palette();
+  //aPal.setColor( myBuildMinMaxButton->backgroundRole(), Qt::red );
+  //myBuildMinMaxButton->setPalette( aPal );
+  myBuildMinMaxButton->setColor( Qt::red );
+  
   connect( myBuildMinMaxCheckBox, SIGNAL( clicked() ), this, SLOT( onBuildCheckBoxClicked() ) );
 
   myBuildGroupsCheckBox = new QCheckBox( tr( "BUILD_GROUPS" ), myProgressBox );
   myBuildGroupsCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "build_groups", true ) );
-  myBuildGroupsButton = new QPushButton( myProgressBox );
+  myBuildGroupsButton = new QtxColorButton( myProgressBox );
   myBuildGroupsButton->setEnabled( false );
   myBuildGroupsButton->setFixedSize( 30, 30 );
-  myBuildGroupsButton->setPaletteBackgroundColor( Qt::red );
+  //aPal = myBuildGroupsButton->palette();
+  //aPal.setColor( myBuildGroupsButton->backgroundRole(), Qt::red );
+  //myBuildGroupsButton->setPalette( aPal );
+  myBuildGroupsButton->setColor( Qt::red );  
+
   connect( myBuildGroupsCheckBox, SIGNAL( clicked() ), this, SLOT( onBuildCheckBoxClicked() ) );
 
   aProgressLayout->addWidget( aBuildEntitiesLabel, 0, 0 );
@@ -156,11 +174,12 @@ VisuGUI_BuildProgressDlg::VisuGUI_BuildProgressDlg( QWidget* theParent ):
 
   // Time
   myTimeBox = new QGroupBox( tr( "IMPORT_TIME" ), this );
-  myTimeBox->setColumnLayout( 0, Qt::Vertical );
-  myTimeBox->layout()->setSpacing( 0 );
-  myTimeBox->layout()->setMargin( 0 );
+  aTopLayout->addWidget( myTimeBox );
+  //myTimeBox->setColumnLayout( 0, Qt::Vertical );
+  //myTimeBox->layout()->setSpacing( 0 );
+  //myTimeBox->layout()->setMargin( 0 );
 
-  QGridLayout* aTimeLayout = new QGridLayout( myTimeBox->layout() );
+  QGridLayout* aTimeLayout = new QGridLayout( myTimeBox );
   aTimeLayout->setSpacing( 6 );
   aTimeLayout->setMargin( 11 );
 
@@ -168,8 +187,10 @@ VisuGUI_BuildProgressDlg::VisuGUI_BuildProgressDlg( QWidget* theParent ):
 
   myTimeLCDNumber = new QLCDNumber( myTimeBox );
   myTimeLCDNumber->setSegmentStyle( QLCDNumber::Filled );
-  myTimeLCDNumber->setPaletteBackgroundColor( Qt::black );
-  myTimeLCDNumber->setPaletteForegroundColor( Qt::white );
+  QPalette aPal = myTimeLCDNumber->palette();
+  aPal.setColor( myTimeLCDNumber->backgroundRole(), Qt::black );
+  aPal.setColor( myTimeLCDNumber->foregroundRole(), Qt::white );
+  myTimeLCDNumber->setPalette( aPal );
   myTimeLCDNumber->setNumDigits( 8 );
   myTimeLCDNumber->display( myTime.toString( "hh:mm:ss.zzz" ) );
 
@@ -178,10 +199,11 @@ VisuGUI_BuildProgressDlg::VisuGUI_BuildProgressDlg( QWidget* theParent ):
 
   // Start / Close
   QGroupBox* CommonGroup = new QGroupBox( this );
-  CommonGroup->setColumnLayout(0, Qt::Vertical );
-  CommonGroup->layout()->setSpacing( 0 );
-  CommonGroup->layout()->setMargin( 0 );
-  QGridLayout* CommonGroupLayout = new QGridLayout( CommonGroup->layout() );
+  aTopLayout->addWidget( CommonGroup );
+  //CommonGroup->setColumnLayout(0, Qt::Vertical );
+  //CommonGroup->layout()->setSpacing( 0 );
+  //CommonGroup->layout()->setMargin( 0 );
+  QGridLayout* CommonGroupLayout = new QGridLayout( CommonGroup );
   CommonGroupLayout->setAlignment( Qt::AlignTop );
   CommonGroupLayout->setSpacing( 6 );
   CommonGroupLayout->setMargin( 11 );
@@ -223,13 +245,13 @@ void VisuGUI_BuildProgressDlg::onStart()
   if( myFileName.isNull() )
     return;
 
-  myResult = myGenerator->CreateResult( myFileName );
+  myResult = myGenerator->CreateResult( (const char*)myFileName.toLatin1() );
 
   if (CORBA::is_nil(myResult.in())) {
-    SUIT_MessageBox::warn1(this,
-                          tr("WRN_VISU"),
-                          tr("ERR_ERROR_IN_THE_FILE"),
-                          tr("BUT_OK"));
+    SUIT_MessageBox::warning(this,
+                             tr("WRN_VISU"),
+                             tr("ERR_ERROR_IN_THE_FILE"),
+                             tr("BUT_OK"));
     onClose();
   }else{
     myResult->SetBuildFields( myBuildFieldsCheckBox->isChecked(), myBuildMinMaxCheckBox->isChecked() );
@@ -242,7 +264,7 @@ void VisuGUI_BuildProgressDlg::onStart()
     bool aBuildAtOnce = myBuildAtOnceCheckBox->isChecked();
     if( aBuildAtOnce )
     {
-      QApplication::setOverrideCursor( Qt::waitCursor );
+      QApplication::setOverrideCursor( Qt::WaitCursor );
       myCurrentTime = vtkTimerLog::GetCurrentTime();
     }
 
@@ -274,10 +296,10 @@ void VisuGUI_BuildProgressDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, ("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
 
@@ -343,7 +365,10 @@ void VisuGUI_BuildProgressDlg::onTimer()
       if( myCloseCheckBox->isChecked() )
        done( 0 );
       else
-       SUIT_MessageBox::warn1( this, tr( "INF_VISU" ), tr( "IMPORT_DONE" ), tr( "BUT_OK" ) );
+       SUIT_MessageBox::warning( this,
+                                  tr( "INF_VISU" ),
+                                  tr( "IMPORT_DONE" ),
+                                  tr( "BUT_OK" ) );
     }
   }
   catch( ... ) {
@@ -351,9 +376,10 @@ void VisuGUI_BuildProgressDlg::onTimer()
   }
 }
 
-void VisuGUI_BuildProgressDlg::updateButton( QPushButton* theButton, bool theIsDone )
+void VisuGUI_BuildProgressDlg::updateButton( QtxColorButton* theButton, bool theIsDone )
 {
-  QColor aCurrentColor = theButton->paletteBackgroundColor();
+  //QPalette aPal = theButton->palette();
+  QColor aCurrentColor = theButton->color();
   if( aCurrentColor == Qt::gray || aCurrentColor == Qt::green )
     return;
 
@@ -370,10 +396,10 @@ void VisuGUI_BuildProgressDlg::updateButton( QPushButton* theButton, bool theIsD
 
     int gNew = g + ( myIsRaiseColor ? 1 : -1 ) * 51;
 
-    aNewColor.setRgb( 255, gNew, 0 );
+    aNewColor.setRgb( 255, gNew, 0 );    
   }
-
-  theButton->setPaletteBackgroundColor( aNewColor );
+  //aPal.setColor( theButton->backgroundRole(), aNewColor );
+  theButton->setColor( aNewColor );
 }
 
 void VisuGUI_BuildProgressDlg::done( int r )
@@ -405,18 +431,26 @@ void VisuGUI_BuildProgressDlg::onBuildCheckBoxClicked()
   }
   else if( aCheckBox == myBuildFieldsCheckBox )
   {
-    myBuildFieldsButton->setPaletteBackgroundColor( aColor );
+    QPalette aPal = myBuildFieldsButton->palette();
+    aPal.setColor( myBuildFieldsButton->backgroundRole(), aColor );
+    myBuildFieldsButton->setPalette( aPal );
     if( !anIsChecked && myBuildMinMaxCheckBox->isChecked() )
       myBuildMinMaxCheckBox->animateClick();
   }
   else if( aCheckBox == myBuildMinMaxCheckBox )
   {
-    myBuildMinMaxButton->setPaletteBackgroundColor( aColor );
+    QPalette aPal = myBuildMinMaxButton->palette();
+    aPal.setColor( myBuildMinMaxButton->backgroundRole(), aColor );
+    myBuildMinMaxButton->setPalette( aPal );
     if( anIsChecked && !myBuildFieldsCheckBox->isChecked() )
       myBuildFieldsCheckBox->animateClick();
   }
   else if( aCheckBox == myBuildGroupsCheckBox )
-    myBuildGroupsButton->setPaletteBackgroundColor( aColor );
+  {
+    QPalette aPal = myBuildGroupsButton->palette();
+    aPal.setColor( myBuildGroupsButton->backgroundRole(), aColor );
+    myBuildGroupsButton->setPalette( aPal );
+  }
 
 }
 
@@ -435,7 +469,7 @@ void VisuGUI_BuildProgressDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index 8284c52df99f15c9f709c2bc9d5f075b566ac573..b5fc40897a4d0f1da0a54d39979cb308c3f143bb 100644 (file)
@@ -31,8 +31,8 @@
 
 #include "VISU_Gen_i.hh"
 
-#include <qdatetime.h>
-#include <qdialog.h>
+#include <QDateTime>
+#include <QDialog>
 
 class QCheckBox;
 class QGroupBox;
@@ -41,6 +41,8 @@ class QLineEdit;
 class QPushButton;
 class QTimer;
 
+class QtxColorButton;
+
 //! Build Progress Dialog.
 class VisuGUI_BuildProgressDlg : public QDialog
 {
@@ -72,7 +74,7 @@ protected slots:
   void             onBuildCheckBoxClicked();
 
 private:
-  void             updateButton( QPushButton*, bool );
+  void             updateButton( QtxColorButton*, bool );
 
 private:
   VISU::Result_var myResult;
@@ -90,16 +92,16 @@ private:
 
   QGroupBox*       myProgressBox;
 
-  QPushButton*     myBuildEntitiesButton;
+  QtxColorButton*  myBuildEntitiesButton;
 
   QCheckBox*       myBuildFieldsCheckBox;
-  QPushButton*     myBuildFieldsButton;
+  QtxColorButton*  myBuildFieldsButton;
 
   QCheckBox*       myBuildMinMaxCheckBox;
-  QPushButton*     myBuildMinMaxButton;
+  QtxColorButton*  myBuildMinMaxButton;
 
   QCheckBox*       myBuildGroupsCheckBox;
-  QPushButton*     myBuildGroupsButton;
+  QtxColorButton*  myBuildGroupsButton;
 
   QGroupBox*       myTimeBox;
   QLCDNumber*      myTimeLCDNumber;
index 70007bb2dff806fc0a6d877ef81c16a567c63150..2858ae0cbf00b7ba60a742683655a53bab944df4 100644 (file)
 #include "SUIT_Desktop.h"
 #include "SUIT_MessageBox.h"
 #include "SUIT_Session.h"
+#include "SUIT_ResourceMgr.h"
 
 #include "SalomeApp_Module.h"
 
 #include "LightApp_Application.h"
 
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
 
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <QButtonGroup>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QRadioButton>
 
 VisuGUI_CacheDlg::VisuGUI_CacheDlg( VISU::ColoredPrs3dCache_var theCache,
                                    SalomeApp_Module* theModule )
-  : QDialog( VISU::GetDesktop( theModule ), "VisuGUI_CacheDlg", true,
-            WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
+  : QDialog( VISU::GetDesktop( theModule ), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
     myCache( theCache )
 {
-  setCaption( tr( "CACHE_TITLE" ) );
+  setModal( true );
+  setWindowTitle( tr( "CACHE_TITLE" ) );
+  setAttribute( Qt::WA_DeleteOnClose );
 
   QVBoxLayout* aTopLayout = new QVBoxLayout( this );
   aTopLayout->setSpacing( 6 );
   aTopLayout->setMargin( 6 );
-  aTopLayout->setAutoAdd( true );
+  //aTopLayout->setAutoAdd( true );
 
   long aMb = 1024 * 1024;
   bool isLimitedMemory = myCache->GetMemoryMode() == VISU::ColoredPrs3dCache::LIMITED;
@@ -70,29 +72,37 @@ VisuGUI_CacheDlg::VisuGUI_CacheDlg( VISU::ColoredPrs3dCache_var theCache,
   double aLimitedMemoryMax = std::max(anUsedMemory + aFreeMemory, aLimitedMemory);
 
   // Settings
-  QButtonGroup* aMemoryGroup = new QButtonGroup( 2, Qt::Vertical, tr( "MEMORY_MODE" ), this );
-  aMemoryGroup->setRadioButtonExclusive( true );
+  QButtonGroup* aMemoryGroup = new QButtonGroup(  this );
+  QGroupBox* aGB = new QGroupBox( tr( "MEMORY_MODE" ), this );
+  aTopLayout->addWidget( aGB );
+  QGridLayout* aGridLay = new QGridLayout( aGB );
+  //aMemoryGroup->setRadioButtonExclusive( true );
 
-  myLimitedMemoryButton = new QRadioButton( tr( "LIMITED_MEMORY" ), aMemoryGroup );
+  myLimitedMemoryButton = new QRadioButton( tr( "LIMITED_MEMORY" ), aGB );
   myLimitedMemoryButton->setChecked( isLimitedMemory );
+  aGridLay->addWidget( myLimitedMemoryButton, 0, 0 );
 
-  myMimimalMemoryButton = new QRadioButton( tr( "MINIMAL_MEMORY" ), aMemoryGroup );
+  myMimimalMemoryButton = new QRadioButton( tr( "MINIMAL_MEMORY" ), aGB );
   myMimimalMemoryButton->setChecked( !isLimitedMemory );
+  aGridLay->addWidget( myMimimalMemoryButton, 1, 0 );
 
-  myLimitedMemory = new QtxDblSpinBox( 1.0, aLimitedMemoryMax, 10.0, aMemoryGroup );
+  myLimitedMemory = new QtxDoubleSpinBox( 1.0, aLimitedMemoryMax, 10.0, aGB );
   myLimitedMemory->setSuffix( " Mb" );
   myLimitedMemory->setValue( aLimitedMemory );
   myLimitedMemory->setEnabled( isLimitedMemory );
+  aGridLay->addWidget( myLimitedMemory, 0, 1 );
+  
 
   connect( myLimitedMemoryButton, SIGNAL( toggled( bool ) ), myLimitedMemory, SLOT( setEnabled( bool ) ) );
 
   // Current state
   QGroupBox* aStateGroup = new QGroupBox( tr( "MEMORY STATE" ), this );
-  aStateGroup->setColumnLayout( 0, Qt::Vertical );
-  aStateGroup->layout()->setSpacing( 0 );
-  aStateGroup->layout()->setMargin( 0 );
+  aTopLayout->addWidget( aStateGroup );
+  //aStateGroup->setColumnLayout( 0, Qt::Vertical );
+  //aStateGroup->layout()->setSpacing( 0 );
+  //aStateGroup->layout()->setMargin( 0 );
 
-  QGridLayout* aStateLayout = new QGridLayout( aStateGroup->layout(), 2, 2 );
+  QGridLayout* aStateLayout = new QGridLayout( aStateGroup );
   aStateLayout->setSpacing(6);
   aStateLayout->setMargin(6);
 
@@ -101,14 +111,20 @@ VisuGUI_CacheDlg::VisuGUI_CacheDlg( VISU::ColoredPrs3dCache_var theCache,
   myUsedMemory->setText( QString::number( anUsedMemory ) + " Mb" );
   myUsedMemory->setReadOnly( true );
   myUsedMemory->setEnabled( false );
-  myUsedMemory->setPaletteForegroundColor( Qt::black );
+  QPalette aPal = myUsedMemory->palette();
+  aPal.setColor( myUsedMemory->foregroundRole(), Qt::black );
+  myUsedMemory->setPalette( aPal );
+  //myUsedMemory->setPaletteForegroundColor( Qt::black );
 
   QLabel* aFreeMemoryLabel = new QLabel( tr( "FREE" ), aStateGroup );
   myFreeMemory = new QLineEdit( aStateGroup );
   myFreeMemory->setText( QString::number( aFreeMemory ) + " Mb" );
   myFreeMemory->setReadOnly( true );
   myFreeMemory->setEnabled( false );
-  myFreeMemory->setPaletteForegroundColor( Qt::black );
+  aPal = myFreeMemory->palette();
+  aPal.setColor( myFreeMemory->foregroundRole(), Qt::black );
+  myFreeMemory->setPalette( aPal );
+  //myFreeMemory->setPaletteForegroundColor( Qt::black );
 
   aStateLayout->addWidget( aUsedMemoryLabel, 0, 0 );
   aStateLayout->addWidget( myUsedMemory, 0, 1 );
@@ -116,26 +132,26 @@ VisuGUI_CacheDlg::VisuGUI_CacheDlg( VISU::ColoredPrs3dCache_var theCache,
   aStateLayout->addWidget( myFreeMemory, 1, 1 );
 
   // Ok / Cancel
-  QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
-  GroupButtons->setColumnLayout(0, Qt::Vertical );
-  GroupButtons->layout()->setSpacing( 0 );
-  GroupButtons->layout()->setMargin( 0 );
-  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+  QGroupBox* GroupButtons = new QGroupBox( this );
+  //GroupButtons->setColumnLayout(0, Qt::Vertical );
+  //GroupButtons->layout()->setSpacing( 0 );
+  //GroupButtons->layout()->setMargin( 0 );
+  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
   GroupButtonsLayout->setSpacing( 6 );
   GroupButtonsLayout->setMargin( 11 );
 
-  QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+  QPushButton* buttonOk = new QPushButton( tr( "BUT_OK" ), GroupButtons );
   buttonOk->setAutoDefault( TRUE );
   buttonOk->setDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
 
-  QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+  QPushButton* buttonCancel = new QPushButton( tr( "BUT_CANCEL" ) , GroupButtons );
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
 
-  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  QPushButton* buttonHelp = new QPushButton( tr( "BUT_HELP" ) , GroupButtons );
   buttonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
@@ -180,9 +196,9 @@ void VisuGUI_CacheDlg::onHelp()
     app->onHelpContextModule(app->activeModule() ?
                             app->moduleName(app->activeModule()->moduleName()) : QString(""), aHelpFileName);
   else {
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
index 71693e76b8bea213cb52973fdf21af524cf511e6..59fc1d844755d78b1e9fcea249a28baf0ebda413 100644 (file)
 #include "SALOMEconfig.h"
 #include CORBA_SERVER_HEADER(VISU_Gen)
 
-#include <qdialog.h>
+#include <QDialog>
 
 class QLineEdit;
 class QRadioButton;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 
 class SalomeApp_Module;
 
@@ -62,7 +62,7 @@ private:
 
   QRadioButton*   myMimimalMemoryButton;
   QRadioButton*   myLimitedMemoryButton;
-  QtxDblSpinBox*  myLimitedMemory;
+  QtxDoubleSpinBox*  myLimitedMemory;
 
   QLineEdit*      myUsedMemory;
   QLineEdit*      myFreeMemory;
index 35f2c7765e660de4a4d3328423384b95aebf3988..50a5a19be3cde4177e209305f31fbcbc19779801 100644 (file)
 #include "SALOME_Actor.h"
 
 // QT Includes
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qvalidator.h>
-#include <qtabwidget.h>
-#include <qhbuttongroup.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
+#include <QLabel>
+#include <QComboBox>
+#include <QCheckBox>
+#include <QLayout>
+#include <QGroupBox>
+#include <QButtonGroup>
+#include <QValidator>
+#include <QTabWidget>
+#include <QRadioButton>
+#include <QSpinBox>
+#include <QKeyEvent>
+#include <QPushButton>
 
 // VTK Includes
 #include <vtkMath.h>
@@ -90,12 +91,13 @@ namespace VISU {
     }
   }
 
-  void RangeStepAndValidator (QtxDblSpinBox* theSpinBox, double min, double max,
+  void RangeStepAndValidator (QtxDoubleSpinBox* theSpinBox, double min, double max,
                               double step, unsigned short decimals)
   {
     theSpinBox->setRange(min, max);
-    theSpinBox->setLineStep(step);
-    ((QDoubleValidator*)theSpinBox->validator())->setRange(min, max, decimals);
+    theSpinBox->setSingleStep(step);
+    theSpinBox->setRange(min, max );
+    theSpinBox->setDecimals( decimals);
   }
 };
 
@@ -237,58 +239,51 @@ struct TSetVisiblity {
 //
 //=================================================================================
 VisuGUI_ClippingDlg::VisuGUI_ClippingDlg (VisuGUI* theModule,
-                                          const char* name,
-                                          bool modal,
-                                          WFlags fl)
-  : QDialog(VISU::GetDesktop(theModule), name, modal, WStyle_Customize |
-            WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+                                          bool modal )
+  : QDialog(VISU::GetDesktop(theModule), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
     mySelectionMgr(VISU::GetSelectionMgr(theModule)),
     myVisuGUI(theModule),
     myPrs3d(0),
     myIsSelectPlane(false)
 {
-  if (!name)
-    setName("VisuGUI_ClippingDlg");
-  setCaption(tr("TITLE"));
+  setWindowTitle(tr("TITLE"));
   setSizeGripEnabled(TRUE);
   QGridLayout* VisuGUI_ClippingDlgLayout = new QGridLayout(this);
   VisuGUI_ClippingDlgLayout->setSpacing(6);
   VisuGUI_ClippingDlgLayout->setMargin(11);
 
   // Controls for selecting, creating, deleting planes
-  QGroupBox* GroupPlanes = new QGroupBox (this, "GroupPlanes");
-  GroupPlanes->setTitle(tr("GRP_PLANES"));
-  GroupPlanes->setColumnLayout(0, Qt::Vertical);
-  GroupPlanes->layout()->setSpacing(0);
-  GroupPlanes->layout()->setMargin(0);
-  QGridLayout* GroupPlanesLayout = new QGridLayout (GroupPlanes->layout());
+  QGroupBox* GroupPlanes = new QGroupBox (tr("GRP_PLANES"),  this);
+  //GroupPlanes->setColumnLayout(0, Qt::Vertical);
+  //GroupPlanes->layout()->setSpacing(0);
+  //GroupPlanes->layout()->setMargin(0);
+  QGridLayout* GroupPlanesLayout = new QGridLayout (GroupPlanes);
   GroupPlanesLayout->setAlignment(Qt::AlignTop);
   GroupPlanesLayout->setSpacing(6);
   GroupPlanesLayout->setMargin(11);
 
-  ComboBoxPlanes = new QComboBox (GroupPlanes, "ComboBoxPlanes");
+  ComboBoxPlanes = new QComboBox (GroupPlanes);
   GroupPlanesLayout->addWidget(ComboBoxPlanes, 0, 0);
 
   QSpacerItem* spacerGP = new QSpacerItem (20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
   GroupPlanesLayout->addItem(spacerGP, 0, 1);
 
-  buttonNew = new QPushButton (GroupPlanes, "buttonNew");
+  buttonNew = new QPushButton (GroupPlanes );
   buttonNew->setText(tr("BUT_NEW"));
   GroupPlanesLayout->addWidget(buttonNew, 0, 2);
 
-  buttonDelete = new QPushButton(GroupPlanes, "buttonDelete");
+  buttonDelete = new QPushButton(GroupPlanes);
   buttonDelete->setText(tr("BUT_DELETE"));
   GroupPlanesLayout->addWidget(buttonDelete, 0, 3);
 
   // Controls for defining plane parameters
 
   // Tab pane
-  QGroupBox* GroupParameters = new QGroupBox(this, "GroupParameters");
-  GroupParameters->setTitle(tr("GRP_PARAMETERS"));
-  GroupParameters->setColumnLayout(0, Qt::Vertical);
-  GroupParameters->layout()->setSpacing(0);
-  GroupParameters->layout()->setMargin(0);
-  QGridLayout* GroupParametersLayout = new QGridLayout (GroupParameters->layout());
+  QGroupBox* GroupParameters = new QGroupBox(tr("GRP_PARAMETERS"), this);
+  //GroupParameters->setColumnLayout(0, Qt::Vertical);
+  //GroupParameters->layout()->setSpacing(0);
+  //GroupParameters->layout()->setMargin(0);
+  QGridLayout* GroupParametersLayout = new QGridLayout (GroupParameters);
   GroupParametersLayout->setAlignment(Qt::AlignTop);
   GroupParametersLayout->setSpacing(6);
   GroupParametersLayout->setMargin(11);
@@ -307,53 +302,55 @@ VisuGUI_ClippingDlg::VisuGUI_ClippingDlg (VisuGUI* theModule,
   AutoApplyCheckBox->setChecked(false);
 
   // Controls for "Ok", "Apply" and "Close" button
-  QGroupBox* GroupButtons = new QGroupBox (this, "GroupButtons");
-  GroupButtons->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)7,
-                                          (QSizePolicy::SizeType)0, 0, 0,
-                                          GroupButtons->sizePolicy().hasHeightForWidth()));
+  QGroupBox* GroupButtons = new QGroupBox (this);
+  QSizePolicy aSizePolicy(QSizePolicy::Expanding,
+                          QSizePolicy::Fixed );
+  aSizePolicy.setHeightForWidth( GroupButtons->sizePolicy().hasHeightForWidth() );
+  aSizePolicy.setHorizontalStretch( 0 );
+  aSizePolicy.setVerticalStretch( 0 );
+  GroupButtons->setSizePolicy( aSizePolicy );
   GroupButtons->setGeometry(QRect(10, 10, 281, 48));
-  //GroupButtons->setTitle(tr(""));
-  GroupButtons->setColumnLayout(0, Qt::Vertical);
+  //GroupButtons->setColumnLayout(0, Qt::Vertical);
   GroupButtons->layout()->setSpacing(0);
   GroupButtons->layout()->setMargin(0);
-  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6);
   GroupButtonsLayout->setMargin(11);
-  buttonHelp = new QPushButton (GroupButtons, "buttonHelp");
+  buttonHelp = new QPushButton (GroupButtons);
   buttonHelp->setText(tr("BUT_HELP"));
   buttonHelp->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonHelp, 0, 4);
-  buttonCancel = new QPushButton (GroupButtons, "buttonCancel");
+  buttonCancel = new QPushButton (GroupButtons);
   buttonCancel->setText(tr("BUT_CLOSE"));
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 3);
-  buttonApply = new QPushButton (GroupButtons, "buttonApply");
+  buttonApply = new QPushButton (GroupButtons);
   buttonApply->setText(tr("BUT_APPLY"));
   buttonApply->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonApply, 0, 1);
   QSpacerItem* spacer_9 = new QSpacerItem (20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
   GroupButtonsLayout->addItem(spacer_9, 0, 2);
-  buttonOk = new QPushButton (GroupButtons, "buttonOk");
+  buttonOk = new QPushButton (GroupButtons);
   buttonOk->setText(tr("BUT_OK"));
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
 
-  VisuGUI_ClippingDlgLayout->addMultiCellWidget(GroupPlanes,     0, 0, 0, 1);
-  VisuGUI_ClippingDlgLayout->addMultiCellWidget(GroupParameters, 1, 1, 0, 1);
-  VisuGUI_ClippingDlgLayout->addWidget(PreviewCheckBox,          2,    0);
-  VisuGUI_ClippingDlgLayout->addWidget(AutoApplyCheckBox,        2,    1);
-  VisuGUI_ClippingDlgLayout->addMultiCellWidget(GroupButtons,    3, 3, 0, 1);
+  VisuGUI_ClippingDlgLayout->addWidget(GroupPlanes,       0, 0, 1, 2);
+  VisuGUI_ClippingDlgLayout->addWidget(GroupParameters,   1, 0, 1, 2);
+  VisuGUI_ClippingDlgLayout->addWidget(PreviewCheckBox,   2,    0);
+  VisuGUI_ClippingDlgLayout->addWidget(AutoApplyCheckBox, 2,    1);
+  VisuGUI_ClippingDlgLayout->addWidget(GroupButtons,      3, 0, 3, 2);
 
   // Initial state
   VISU::RangeStepAndValidator(SpinBoxDistance, 0.0, 1.0, 0.01, 3);
   VISU::RangeStepAndValidator(SpinBoxRot1, -180.0, 180.0, 1, 3);
   VISU::RangeStepAndValidator(SpinBoxRot2, -180.0, 180.0, 1, 3);
 
-  ComboBoxOrientation->insertItem(tr("PARALLEL_XOY_COMBO_ITEM"));
-  ComboBoxOrientation->insertItem(tr("PARALLEL_YOZ_COMBO_ITEM"));
-  ComboBoxOrientation->insertItem(tr("PARALLEL_ZOX_COMBO_ITEM"));
+  ComboBoxOrientation->addItem(tr("PARALLEL_XOY_COMBO_ITEM"));
+  ComboBoxOrientation->addItem(tr("PARALLEL_YOZ_COMBO_ITEM"));
+  ComboBoxOrientation->addItem(tr("PARALLEL_ZOX_COMBO_ITEM"));
 
   SpinBoxDistance->setValue(0.5);
 
@@ -409,32 +406,32 @@ QWidget* VisuGUI_ClippingDlg::createParamsTab()
   GroupParametersLayout->setSpacing(6);
   GroupParametersLayout->setMargin(11);
 
-  TextLabelOrientation = new QLabel(GroupParameters, "TextLabelOrientation");
+  TextLabelOrientation = new QLabel(GroupParameters);
   TextLabelOrientation->setText(tr("LBL_ORIENTATION"));
   GroupParametersLayout->addWidget(TextLabelOrientation, 0, 0);
 
-  ComboBoxOrientation = new QComboBox(GroupParameters, "ComboBoxOrientation");
+  ComboBoxOrientation = new QComboBox(GroupParameters);
   GroupParametersLayout->addWidget(ComboBoxOrientation, 0, 1);
 
-  TextLabelDistance = new QLabel(GroupParameters, "TextLabelDistance");
+  TextLabelDistance = new QLabel(GroupParameters);
   TextLabelDistance->setText(tr("LBL_DISTANCE"));
   GroupParametersLayout->addWidget(TextLabelDistance, 1, 0);
 
-  SpinBoxDistance = new QtxDblSpinBox(GroupParameters, "SpinBoxDistance");
+  SpinBoxDistance = new QtxDoubleSpinBox(GroupParameters);
   GroupParametersLayout->addWidget(SpinBoxDistance, 1, 1);
 
-  TextLabelRot1 = new QLabel(GroupParameters, "TextLabelRot1");
+  TextLabelRot1 = new QLabel(GroupParameters);
   TextLabelRot1->setText(tr("LBL_ROTATION_YZ"));
   GroupParametersLayout->addWidget(TextLabelRot1, 2, 0);
 
-  SpinBoxRot1 = new QtxDblSpinBox(GroupParameters, "SpinBoxRot1");
+  SpinBoxRot1 = new QtxDoubleSpinBox(GroupParameters);
   GroupParametersLayout->addWidget(SpinBoxRot1, 2, 1);
 
-  TextLabelRot2 = new QLabel(GroupParameters, "TextLabelRot2");
+  TextLabelRot2 = new QLabel(GroupParameters);
   TextLabelRot2->setText(tr("LBL_ROTATION_XZ"));
   GroupParametersLayout->addWidget(TextLabelRot2, 3, 0);
 
-  SpinBoxRot2 = new QtxDblSpinBox(GroupParameters, "SpinBoxRot2");
+  SpinBoxRot2 = new QtxDoubleSpinBox(GroupParameters);
   GroupParametersLayout->addWidget(SpinBoxRot2, 3, 1);
 
   return GroupParameters;
@@ -454,22 +451,27 @@ QWidget* VisuGUI_ClippingDlg::createIJKParamsTab()
   IJKParametersLayout->setMargin(11);
 
   // Axis group
-  ButtonGroupIJKAxis = new QHButtonGroup (tr("GRP_IJK_AXIS"), WidgetIJKTab);
-  new QRadioButton (tr("I_RADIO_BTN"), ButtonGroupIJKAxis);  // 0
-  new QRadioButton (tr("J_RADIO_BTN"), ButtonGroupIJKAxis);  // 1
-  new QRadioButton (tr("K_RADIO_BTN"), ButtonGroupIJKAxis);  // 2
-  ButtonGroupIJKAxis->setButton(0);
+  ButtonGroupIJKAxis = new QButtonGroup ( WidgetIJKTab);
+  QGroupBox* aGBGroupBoxIJKAxis= new QGroupBox(tr("GRP_IJK_AXIS"), WidgetIJKTab );
+  QHBoxLayout* aHBLay = new QHBoxLayout( GroupBoxIJKAxis  );
+  ButtonGroupIJKAxis->addButton( new QRadioButton (tr("I_RADIO_BTN"), GroupBoxIJKAxis) );  // 0
+  ButtonGroupIJKAxis->addButton( new QRadioButton (tr("J_RADIO_BTN"), GroupBoxIJKAxis) );  // 1
+  ButtonGroupIJKAxis->addButton( new QRadioButton (tr("K_RADIO_BTN"), GroupBoxIJKAxis) );  // 2
+  ButtonGroupIJKAxis->button(0)->setChecked(true);
+  aHBLay->addWidget( ButtonGroupIJKAxis->button(0) );
+  aHBLay->addWidget( ButtonGroupIJKAxis->button(1) );
+  aHBLay->addWidget( ButtonGroupIJKAxis->button(2) );  
 
   // Index
-  TextLabelIJKIndex = new QLabel(WidgetIJKTab, "TextLabelIJKIndex");
+  TextLabelIJKIndex = new QLabel(WidgetIJKTab);
   TextLabelIJKIndex->setText(tr("LBL_IJK_INDEX"));
-  SpinBoxIJKIndex = new QSpinBox(WidgetIJKTab, "SpinBoxIJKIndex");
+  SpinBoxIJKIndex = new QSpinBox(WidgetIJKTab);
 
   // Orientation
   CheckBoxIJKPlaneReverse = new QCheckBox (tr("REVERSE_NORMAL_CHK"), WidgetIJKTab);
   CheckBoxIJKPlaneReverse->setChecked(false);
 
-  IJKParametersLayout->addMultiCellWidget(ButtonGroupIJKAxis, 0, 0, 0, 1);
+  IJKParametersLayout->addWidget(aGBGroupBoxIJKAxis, 0, 0, 1, 2);
   IJKParametersLayout->addWidget(TextLabelIJKIndex,          1, 0);
   IJKParametersLayout->addWidget(SpinBoxIJKIndex,            1, 1);
   IJKParametersLayout->addWidget(CheckBoxIJKPlaneReverse, 2, 0);
@@ -538,10 +540,10 @@ void VisuGUI_ClippingDlg::ClickOnApply()
         myPrs3d->AddClippingPlane(anOldIter->GetPointer());
       }
 
-      SUIT_MessageBox::warn1(VISU::GetDesktop(myVisuGUI),
-                             tr("WRN_VISU"),
-                             tr("WRN_EMPTY_RESULTING_PRS"),
-                             tr("BUT_OK") );
+      SUIT_MessageBox::warning(VISU::GetDesktop(myVisuGUI),
+                               tr("WRN_VISU"),
+                               tr("WRN_EMPTY_RESULTING_PRS"),
+                               tr("BUT_OK") );
     }
 
     //VISU::RenderViewWindow(aViewWindow);
@@ -585,10 +587,10 @@ void VisuGUI_ClippingDlg::ClickOnHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             QObject::tr("BUT_OK"));
   }
 }
 
@@ -640,7 +642,7 @@ void VisuGUI_ClippingDlg::onSelectionChanged()
     }
 
     // enable/disable IJK tab
-    TabPane->setTabEnabled(WidgetIJKTab, isStructured());
+    TabPane->setTabEnabled(TabPane->indexOf(WidgetIJKTab), isStructured());
     Sinchronize();
     VISU::RenderViewWindow(aViewWindow);
   }
@@ -673,9 +675,9 @@ void VisuGUI_ClippingDlg::onSelectPlane(int theIndex)
   case VISU::YZ: item = 1; break;
   case VISU::ZX: item = 2; break;
   }
-  ComboBoxOrientation->setCurrentItem(item);
+  ComboBoxOrientation->setCurrentIndex(item);
 
-  bool isIJK = (TabPane->currentPage() == WidgetIJKTab);
+  bool isIJK = (TabPane->currentWidget() == WidgetIJKTab);
   if (isIJK)
     setIJKByNonStructured();
   else
@@ -729,7 +731,7 @@ void VisuGUI_ClippingDlg::ClickOnDelete()
   if (!myPrs3d || myPlanes.empty())
     return;
 
-  int aPlaneIndex = ComboBoxPlanes->currentItem();
+  int aPlaneIndex = ComboBoxPlanes->currentIndex();
 
   VISU::TPlanes::iterator anIter = myPlanes.begin() + aPlaneIndex;
   anIter->GetPointer()->myActor->SetVisibility(false);
@@ -781,17 +783,17 @@ void VisuGUI_ClippingDlg::Sinchronize()
   QString aName;
   for (int i = 1; i<=aNbPlanes; i++) {
     aName = QString(tr("PLANES_COMBO_ITEM_i")).arg(i);
-    ComboBoxPlanes->insertItem(aName);
+    ComboBoxPlanes->addItem(aName);
   }
 
   int aPos = ComboBoxPlanes->count() - 1;
-  ComboBoxPlanes->setCurrentItem(aPos);
+  ComboBoxPlanes->setCurrentIndex(aPos);
 
   bool anIsControlsEnable = (aPos >= 0);
   if (anIsControlsEnable) {
     onSelectPlane(aPos);
   } else {
-    ComboBoxPlanes->insertItem(tr("PLANES_COMBO_ITEM_no"));
+    ComboBoxPlanes->addItem(tr("PLANES_COMBO_ITEM_no"));
     SpinBoxRot1->setValue(0.0);
     SpinBoxRot2->setValue(0.0);
     SpinBoxDistance->setValue(0.5);
@@ -807,7 +809,7 @@ void VisuGUI_ClippingDlg::Sinchronize()
   SpinBoxRot1            ->setEnabled(anIsControlsEnable);
   SpinBoxRot2            ->setEnabled(anIsControlsEnable);
 
-  ButtonGroupIJKAxis     ->setEnabled(anIsControlsEnable);
+  GroupBoxIJKAxis        ->setEnabled(anIsControlsEnable);
   SpinBoxIJKIndex        ->setEnabled(anIsControlsEnable);
   CheckBoxIJKPlaneReverse->setEnabled(anIsControlsEnable);
   //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
@@ -818,19 +820,19 @@ void VisuGUI_ClippingDlg::Sinchronize()
       VISU::TIdTypeVector aVec = anIDMapper->GetStructure();
       switch(aVec.size()){
       case 1:
-       ButtonGroupIJKAxis->find(0)->setEnabled(true);
-       ButtonGroupIJKAxis->find(1)->setEnabled(false);
-       ButtonGroupIJKAxis->find(2)->setEnabled(false);
+       ButtonGroupIJKAxis->button(0)->setEnabled(true);
+       ButtonGroupIJKAxis->button(1)->setEnabled(false);
+       ButtonGroupIJKAxis->button(2)->setEnabled(false);
        break;
       case 2:
-       ButtonGroupIJKAxis->find(0)->setEnabled(true);
-       ButtonGroupIJKAxis->find(1)->setEnabled(true);
-       ButtonGroupIJKAxis->find(2)->setEnabled(false);
+       ButtonGroupIJKAxis->button(0)->setEnabled(true);
+       ButtonGroupIJKAxis->button(1)->setEnabled(true);
+       ButtonGroupIJKAxis->button(2)->setEnabled(false);
        break;
       case 3:
-       ButtonGroupIJKAxis->find(0)->setEnabled(true);
-       ButtonGroupIJKAxis->find(1)->setEnabled(true);
-       ButtonGroupIJKAxis->find(2)->setEnabled(true);
+       ButtonGroupIJKAxis->button(0)->setEnabled(true);
+       ButtonGroupIJKAxis->button(1)->setEnabled(true);
+       ButtonGroupIJKAxis->button(2)->setEnabled(true);
        break;
       }
     }
@@ -857,7 +859,7 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneParam()
   if (myPlanes.empty() || myIsSelectPlane)
     return;
 
-  int aCurPlaneIndex = ComboBoxPlanes->currentItem();
+  int aCurPlaneIndex = ComboBoxPlanes->currentIndex();
 
   OrientedPlane* aPlane = myPlanes[aCurPlaneIndex].GetPointer();
 
@@ -876,7 +878,7 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneParam()
     aV[0] = aRot[0] > 0? aV[0]: -aV[0];
     aV[1] = aRot[1] > 0? aV[1]: -aV[1];
 
-    switch (ComboBoxOrientation->currentItem()) {
+    switch (ComboBoxOrientation->currentIndex()) {
     case 0:
       anOrientation = VISU::XY;
 
@@ -976,7 +978,7 @@ void VisuGUI_ClippingDlg::onTabChanged(QWidget* newTab)
     setIJKByNonStructured();
   else {
     // set correct labels of rotation spin boxes
-    onSelectOrientation(ComboBoxOrientation->currentItem());
+    onSelectOrientation(ComboBoxOrientation->currentIndex());
   }
 }
 
@@ -994,7 +996,7 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneIJKParam()
     return;
 
   // get axis data
-  int i, axId = ButtonGroupIJKAxis->id (ButtonGroupIJKAxis->selected());
+  int i, axId = ButtonGroupIJKAxis->id (ButtonGroupIJKAxis->checkedButton());
   VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axId;
   gp_Dir dir;
   CORBA::String_var aMeshName = myPrs3d->GetMeshName();
@@ -1045,7 +1047,7 @@ void VisuGUI_ClippingDlg::SetCurrentPlaneIJKParam()
 
   // set paramerets
   myIsSelectPlane = true;
-  ComboBoxOrientation->setCurrentItem(axId);
+  ComboBoxOrientation->setCurrentIndex(axId);
   setRotation(-angle[0], -angle[1]);
   setDistance(distance);
   myIsSelectPlane = false;
@@ -1063,7 +1065,7 @@ void VisuGUI_ClippingDlg::setIJKByNonStructured()
     return;
 
   // get plane normal
-  int planeIndex = ComboBoxPlanes->currentItem();
+  int planeIndex = ComboBoxPlanes->currentIndex();
   OrientedPlane* plane = myPlanes[ planeIndex ].GetPointer();
   vtkPlaneSource* planeSource = plane->myPlaneSource;
   vtkFloatingPointType * planeNormal = planeSource->GetNormal();
@@ -1127,7 +1129,7 @@ void VisuGUI_ClippingDlg::setIJKByNonStructured()
   myIsSelectPlane = true;
   CheckBoxIJKPlaneReverse->setChecked(normal * axDir < 0);
   SpinBoxIJKIndex->setValue(i);
-  ButtonGroupIJKAxis->setButton(gridAxId);
+  ButtonGroupIJKAxis->button(gridAxId)->setChecked( true );
   onIJKAxisChanged(gridAxId); // update label and range of index
   myIsSelectPlane = false;
 
@@ -1201,7 +1203,7 @@ void VisuGUI_ClippingDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       ClickOnHelp();
index 4d8c89779745cce68c8248ff34722678ee766f77..f14ac0951007bdc60a397b3df8c1f2f47256d764 100644 (file)
 
 #include "SALOME_InteractiveObject.hxx"
 
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
 
 // QT Includes
-#include <qdialog.h>
-#include <qguardedptr.h>
-#include <qtable.h>
+#include <QDialog>
+#include <QPointer>
 
 // VTK Includes
 #include <vtkSmartPointer.h>
 
 class QLabel;
 class QPushButton;
-class QTable;
 class QCheckBox;
+class QGroupBox;
 class QComboBox;
-class QHButtonGroup;
+class QButtonGroup;
 class QSpinBox;
 class QTabWidget;
 
 class SALOME_Actor;
 
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 
 class SVTK_ViewWindow;
 
@@ -75,7 +74,7 @@ namespace VISU {
 //=================================================================================
 class OrientedPlane: public vtkPlane
 {
-  QGuardedPtr<SVTK_ViewWindow> myViewWindow;
+  QPointer<SVTK_ViewWindow> myViewWindow;
   vtkDataSetMapper* myMapper;
 
 public:
@@ -121,9 +120,7 @@ class VisuGUI_ClippingDlg : public QDialog
 
 public:
     VisuGUI_ClippingDlg( VisuGUI* theModule,
-                        const char* name = 0,
-                        bool modal = false,
-                        WFlags fl = 0 );
+                        bool modal = false );
 
     float  getDistance()  { return (float)SpinBoxDistance->value(); }
     void   setDistance(const float theDistance) { SpinBoxDistance->setValue(theDistance); }
@@ -161,12 +158,13 @@ private:
     QTabWidget*       TabPane;
 
     QComboBox*        ComboBoxOrientation;
-    QtxDblSpinBox*    SpinBoxDistance;
-    QtxDblSpinBox*    SpinBoxRot1;
-    QtxDblSpinBox*    SpinBoxRot2;
+    QtxDoubleSpinBox*    SpinBoxDistance;
+    QtxDoubleSpinBox*    SpinBoxRot1;
+    QtxDoubleSpinBox*    SpinBoxRot2;
 
     QWidget*          WidgetIJKTab;
-    QHButtonGroup*    ButtonGroupIJKAxis;
+    QButtonGroup*     ButtonGroupIJKAxis;
+    QGroupBox*        GroupBoxIJKAxis;
     QLabel*           TextLabelIJKIndex;
     QSpinBox*         SpinBoxIJKIndex;
     QCheckBox*        CheckBoxIJKPlaneReverse;
index 45de30f6c8232b95f1d08812274b609c267fe781..8ce59f0eacc8ada0cecddb898614742f9a860d1a 100644 (file)
@@ -38,41 +38,48 @@ using namespace std;
 
 #include "LightApp_Application.h"
 
-#include <qlayout.h>
+#include <QLayout>
+#include <QLabel>
+#include <QPushButton>
+#include <QSpinBox>
+#include <QGroupBox>
+#include <QKeyEvent>
 
 /*!
   Constructor
 */
-VisuGUI_CursorDlg::VisuGUI_CursorDlg( QWidget* parent,  const char* name, bool modal, WFlags fl )
-    : QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+VisuGUI_CursorDlg::VisuGUI_CursorDlg( QWidget* parent,  const char* name, bool modal )
+    : QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )//WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
 {
-  if ( !name )
-    setName( "VisuGUI_CursorDlg" );
-  setCaption( name );
+  setWindowTitle( name );
+  setModal( modal );
   setSizeGripEnabled( TRUE );
 
   QGridLayout* TopLayout = new QGridLayout( this );
   TopLayout->setSpacing( 6 );
   TopLayout->setMargin( 11 );
 
-  TopGroupBox = new QGroupBox( this, "TopGroupBox" );
-  TopGroupBox->setColumnLayout(0, Qt::Vertical );
-  TopGroupBox->layout()->setSpacing( 0 );
-  TopGroupBox->layout()->setMargin( 0 );
-  QGridLayout* TopGroupBoxLayout = new QGridLayout( TopGroupBox->layout() );
+  TopGroupBox = new QGroupBox( this );
+  //TopGroupBox->setColumnLayout(0, Qt::Vertical );
+  //TopGroupBox->layout()->setSpacing( 0 );
+  //TopGroupBox->layout()->setMargin( 0 );
+  QGridLayout* TopGroupBoxLayout = new QGridLayout( TopGroupBox );
   TopGroupBoxLayout->setAlignment( Qt::AlignTop );
   TopGroupBoxLayout->setSpacing( 6 );
   TopGroupBoxLayout->setMargin( 11 );
 
-  Comment1 = new QLabel( tr( "TextLabel1" ), TopGroupBox, "Comment1" );
-  Comment1->setAlignment( QLabel::AlignCenter );
+  Comment1 = new QLabel( tr( "TextLabel1" ), TopGroupBox );
+  Comment1->setAlignment( Qt::AlignCenter );
   TopGroupBoxLayout->addWidget( Comment1, 0, 0 );
 
-  Comment2 = new QLabel(  tr( "TextLabel2" ), TopGroupBox, "Comment2" );
-  Comment2->setAlignment( QLabel::AlignCenter );
+  Comment2 = new QLabel(  tr( "TextLabel2" ), TopGroupBox );
+  Comment2->setAlignment( Qt::AlignCenter );
   TopGroupBoxLayout->addWidget( Comment2, 1, 0 );
 
-  SpinBox1 = new QSpinBox( 1, 100, 1, TopGroupBox, "SpinBox1" );
+  SpinBox1 = new QSpinBox( TopGroupBox );
+  SpinBox1->setMinimum( 0 );
+  SpinBox1->setMaximum(100 );
+  SpinBox1->setSingleStep( 1 );
   SpinBox1->setValue( 100 );
   SpinBox1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   SpinBox1->setMinimumSize( 70, 0 );
@@ -82,28 +89,28 @@ VisuGUI_CursorDlg::VisuGUI_CursorDlg( QWidget* parent,  const char* name, bool m
   SLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
   TopGroupBoxLayout->addLayout( SLayout, 2, 0 );
 
-  GroupButtons = new QGroupBox (this, "GroupButtons");
+  GroupButtons = new QGroupBox (this);
   GroupButtons->setGeometry(QRect(10, 10, 281, 48));
-  GroupButtons->setColumnLayout(0, Qt::Vertical);
-  GroupButtons->layout()->setSpacing(0);
-  GroupButtons->layout()->setMargin(0);
-  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+  //GroupButtons->setColumnLayout(0, Qt::Vertical);
+  //GroupButtons->layout()->setSpacing(0);
+  //GroupButtons->layout()->setMargin(0);
+  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6);
   GroupButtonsLayout->setMargin(11);
 
-  buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk");
+  buttonOk = new QPushButton (tr("&OK"), GroupButtons);
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
 
   GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
 
-  buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons, "buttonCancel");
+  buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons);
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
 
-  buttonHelp = new QPushButton(tr("&Help") , GroupButtons, "buttonHelp");
+  buttonHelp = new QPushButton(tr("&Help") , GroupButtons);
   buttonHelp->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
 
@@ -142,10 +149,9 @@ void VisuGUI_CursorDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
   }
 }
 
@@ -159,7 +165,7 @@ void VisuGUI_CursorDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index cebb7b6ed518ef078fbd4e1bd1a6a336ded8a11c..2727c2d9a2aa5e70b50b6770ad0c6c7b965dede4 100644 (file)
 #ifndef VISUGUI_CURSORDLG_H
 #define VISUGUI_CURSORDLG_H
 
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qgroupbox.h>
+#include <QDialog>
+class QLabel;
+class QPushButton;
+class QSpinBox;
+class QGroupBox;
 
 class VisuGUI_CursorDlg : public QDialog
 {
     Q_OBJECT
 
 public:
-    VisuGUI_CursorDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    VisuGUI_CursorDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE );
     ~VisuGUI_CursorDlg();
 
     QGroupBox*   TopGroupBox;
index 898b62a3e2dedc8fe4baae894c6e6cae935c69cb..881947d963e295b7a7990066e9715182378f81ee 100644 (file)
 #include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
 
-#include "OB_Browser.h"
-
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qtabwidget.h>
-#include <qhgroupbox.h>
-#include <qlineedit.h>
+//TO DO
+//#include "OB_Browser.h"
+
+#include "VisuGUI_TableDlg.h"
+
+#include <QLayout>
+#include <QTabWidget>
+#include <QLineEdit>
+#include <QValidator>
+#include <QButtonGroup>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QPushButton>
+#include <QHeaderView>
+#include <QRadioButton>
+#include <QTableWidget>
 
 #include <vtkRenderer.h>
 #include <vtkPolyData.h>
@@ -69,63 +78,88 @@ using namespace std;
 
 VisuGUI_CutLinesDlg::VisuGUI_CutLinesDlg (SalomeApp_Module* theModule)
   : VisuGUI_Prs3dDlg(theModule),
-    myPreviewActor(0),myPreviewActorGlyphs(0)
+    myPreviewActor(0),
+    myPreviewActorGlyphs(0)
 {
-  setCaption("Cut Lines Definition");
+  setWindowTitle("Cut Lines Definition");
   setSizeGripEnabled(true);
 
-  QVBoxLayout* aMainLayout = new QVBoxLayout (this, 7, 6);
+  QVBoxLayout* aMainLayout = new QVBoxLayout (this);
+  aMainLayout->setMargin( 7 );
   aMainLayout->setSpacing(5);
 
-  hasInit = false;
+  hasInit = false;  
 
   // Tab pane
   myTabBox = new QTabWidget(this);
 
   // Plane of lines
   QFrame* aPlanePane = new QFrame(this);
-  QVBoxLayout* aPlaneLayout = new QVBoxLayout(aPlanePane, 5, 6);
-
-  mySelPlane = new QHButtonGroup( tr( "TXT_ORIENTATION" ), aPlanePane);
-  mySelPlane->setInsideSpacing( 5 );
-  mySelPlane->setInsideMargin( 5 );
+  QVBoxLayout* aPlaneLayout = new QVBoxLayout(aPlanePane);
+  aPlaneLayout->setMargin( 5 );
+  aPlaneLayout->setSpacing(6);
+
+  mySelPlane = new QButtonGroup( aPlanePane);
+  QGroupBox* aGB = new QGroupBox( tr( "TXT_ORIENTATION" ), aPlanePane );
+  QHBoxLayout* aHBLay = new QHBoxLayout( aGB );
+  //mySelPlane->setInsideSpacing( 5 );
+  //mySelPlane->setInsideMargin( 5 );
+
+  QRadioButton* aBxy = new QRadioButton( tr( "PARALLEL_XOY" ), aGB);  // 0
+  QRadioButton* aByz = new QRadioButton( tr( "PARALLEL_YOZ" ), aGB);  // 1
+  QRadioButton* aBzx = new QRadioButton( tr( "PARALLEL_ZOX" ), aGB);  // 2
+  //aBxy->setChecked(false);
+  //aByz->setChecked(false);
+  aHBLay->addWidget( aBxy );
+  aHBLay->addWidget( aByz );
+  aHBLay->addWidget( aBzx );
+
+  mySelPlane->addButton( aBxy, 0 );
+  mySelPlane->addButton( aByz, 1 );
+  mySelPlane->addButton( aBzx, 2 );
 
-  QRadioButton* aBxy = new QRadioButton( tr( "PARALLEL_XOY" ), mySelPlane);  // 0
-  QRadioButton* aByz = new QRadioButton( tr( "PARALLEL_YOZ" ), mySelPlane);  // 1
-  QRadioButton* aBzx = new QRadioButton( tr( "PARALLEL_ZOX" ), mySelPlane);  // 2
-  aBxy->setChecked(false);
-  aByz->setChecked(false);
   aBzx->setChecked(true);
 
-  aPlaneLayout->addWidget( mySelPlane );
+  aPlaneLayout->addWidget( aGB );
 
   QGroupBox* aRotBox = new QGroupBox( tr( "LBL_ROTATION" ), aPlanePane );
-  aRotBox->setColumnLayout(2, Qt::Horizontal );
+  //aRotBox->setColumnLayout(2, Qt::Horizontal );
+  QGridLayout* aGridLay = new QGridLayout( aRotBox );
 
   myRotXLbl = new QLabel( tr( "LBL_ROT_X" ), aRotBox);
-  myRotXSpn = new QtxDblSpinBox( -45, 45, 5, aRotBox );
+  aGridLay->addWidget( myRotXLbl, 0, 0 );
+  myRotXSpn = new QtxDoubleSpinBox( -45, 45, 5, aRotBox );
+  aGridLay->addWidget( myRotXSpn, 0, 1 );
   myRotXSpn->setValue( 0 );
   myRotYLbl = new QLabel( tr( "LBL_ROT_Y" ), aRotBox );
-  myRotYSpn = new QtxDblSpinBox( -45, 45, 5, aRotBox );
-  myRotYSpn->setValue( 0 );
+  aGridLay->addWidget( myRotYLbl, 1, 0 );
+  myRotYSpn = new QtxDoubleSpinBox( -45, 45, 5, aRotBox );
+  aGridLay->addWidget( myRotXSpn, 1, 1 );
+  myRotYSpn->setValue( 0 );  
 
   aPlaneLayout->addWidget( aRotBox );
 
-  QHGroupBox* aBaseBox = new QHGroupBox (tr("BASE_PLANE_POS"), aPlanePane);
+  QGroupBox* aBaseBox = new QGroupBox (tr("BASE_PLANE_POS"), aPlanePane);
+  aHBLay = new QHBoxLayout( aBaseBox );
   myBasePlanePos = new QLineEdit (aBaseBox);
+  aHBLay->addWidget( myBasePlanePos );
   mydvalidator = new QDoubleValidator(this);
   mydvalidator->setDecimals(32);
   myBasePlanePos->setValidator(mydvalidator);
 
   myCBSetDef = new QCheckBox (tr("SET_DEFAULT"),aBaseBox);
+  aHBLay->addWidget( myCBSetDef );
 
   aPlaneLayout->addWidget(aBaseBox);
 
-  QHBox* aPosBox = new QHBox (aPlanePane);
-  aPosBox->setSpacing(5);
-  new QLabel (tr("LBL_POS"), aPosBox);
-  myPosSpn = new QtxDblSpinBox (0, 1, 0.1, aPosBox);
+  QWidget* aPosBox = new QWidget (aPlanePane);
+  aHBLay = new QHBoxLayout( aPosBox );  
+  aHBLay->setSpacing(5);
+  
+  aHBLay->addWidget( new QLabel (tr("LBL_POS"), aPosBox) );
+  myPosSpn = new QtxDoubleSpinBox (0, 1, 0.1, aPosBox);
   myPosSpn->setValue(0.5);
+  aHBLay->addWidget( myPosSpn );
   aPlaneLayout->addWidget(aPosBox);
 
   myPreviewCheck = new QCheckBox (tr("LBL_SHOW_PREVIEW"), aPlanePane);
@@ -144,80 +178,114 @@ VisuGUI_CutLinesDlg::VisuGUI_CutLinesDlg (SalomeApp_Module* theModule)
   myCreateTable->setChecked(true);
   aPlaneLayout->addWidget( myCreateTable );
 
-  QHBox* aCheckPane = new QHBox(aPlanePane);
+  QWidget* aCheckPane = new QWidget(aPlanePane);
+  aHBLay = new QHBoxLayout( aCheckPane ); 
   QLabel* aLbl = new QLabel("   ", aCheckPane);
-  aCheckPane->setStretchFactor(aLbl, 0);
+  aHBLay->addWidget( aLbl );
+  aHBLay->setStretchFactor(aLbl, 0);
   myCurvesCheck = new QCheckBox(tr("LBL_GENERATE_CURVES"), aCheckPane);
-  aCheckPane->setStretchFactor(aCheckPane, 0);
+  aHBLay->addWidget( myCurvesCheck );
+  aHBLay->setStretchFactor(aCheckPane, 0);
   myCurvesCheck->setChecked(true);
   myCurvesCheck->setEnabled(true);
   QLabel* aLbl2 = new QLabel("   ", aCheckPane);
-  aCheckPane->setStretchFactor(aLbl2, 1);
+  aHBLay->setStretchFactor(aLbl2, 1);
   aPlaneLayout->addWidget( aCheckPane );
 
   aPlaneLayout->addStretch();
 
-
   myTabBox->addTab( aPlanePane, tr("LBL_LINES_PLANE") );
 
   // Number of lines
   QFrame* aLinesPane = new QFrame(this);
-  QVBoxLayout* aLinesLayout = new QVBoxLayout( aLinesPane, 5, 6 );
-
-  mySelPlane2 = new QHButtonGroup( tr( "TXT_ORIENTATION" ), aLinesPane);
-  mySelPlane2->setInsideSpacing( 5 );
-  mySelPlane2->setInsideMargin( 5 );
-
-  QRadioButton* aBxy2 = new QRadioButton( tr( "PARALLEL_XOY" ), mySelPlane2);  // 0
-  QRadioButton* aByz2 = new QRadioButton( tr( "PARALLEL_YOZ" ), mySelPlane2);  // 1
-  QRadioButton* aBzx2 = new QRadioButton( tr( "PARALLEL_ZOX" ), mySelPlane2);  // 2
+  QVBoxLayout* aLinesLayout = new QVBoxLayout( aLinesPane );
+  aLinesLayout->setMargin( 5 );
+  aLinesLayout->setSpacing( 6 );
+
+  mySelPlane2 = new QButtonGroup( aLinesPane);
+  aGB = new QGroupBox( tr( "TXT_ORIENTATION" ), aLinesPane );
+  aHBLay = new QHBoxLayout( aGB );
+  //mySelPlane2->setInsideSpacing( 5 );
+  //mySelPlane2->setInsideMargin( 5 );
+
+  QRadioButton* aBxy2 = new QRadioButton( tr( "PARALLEL_XOY" ), aGB);  // 0
+  QRadioButton* aByz2 = new QRadioButton( tr( "PARALLEL_YOZ" ), aGB);  // 1
+  QRadioButton* aBzx2 = new QRadioButton( tr( "PARALLEL_ZOX" ), aGB);  // 2
+
+  aHBLay->addWidget( aBxy2 );
+  aHBLay->addWidget( aByz2 );
+  aHBLay->addWidget( aBzx2 );
+
+  mySelPlane2->addButton( aBxy2, 0 );
+  mySelPlane2->addButton( aByz2, 1 );
+  mySelPlane2->addButton( aBzx2, 2 );
+  
   aBzx2->setEnabled(false);
   aByz2->setChecked(true);
-  aLinesLayout->addWidget( mySelPlane2 );
+  aLinesLayout->addWidget( aGB );
 
   QGroupBox* aRotBox2 = new QGroupBox( tr( "LBL_ROTATION" ), aLinesPane );
-  aRotBox2->setColumnLayout(2, Qt::Horizontal );
+  //aRotBox2->setColumnLayout(2, Qt::Horizontal );
+  aGridLay = new QGridLayout( aRotBox2 );
 
   myRotXLbl2 = new QLabel( tr( "LBL_ROT_X" ), aRotBox2);
-  myRotXSpn2 = new QtxDblSpinBox( -45, 45, 5, aRotBox2 );
+  aGridLay->addWidget( myRotXLbl2, 0, 0 );
+  myRotXSpn2 = new QtxDoubleSpinBox( -45, 45, 5, aRotBox2 );
+  aGridLay->addWidget( myRotXSpn2, 0, 1 );
   myRotXSpn2->setValue( 0 );
   myRotYLbl2 = new QLabel( tr( "LBL_ROT_Y" ), aRotBox2 );
-  myRotYSpn2 = new QtxDblSpinBox( -45, 45, 5, aRotBox2 );
+  aGridLay->addWidget( myRotYLbl2, 1, 0 );
+  myRotYSpn2 = new QtxDoubleSpinBox( -45, 45, 5, aRotBox2 );
+  aGridLay->addWidget( myRotYSpn2, 1, 1 );
   myRotYSpn2->setValue( 0 );
   aLinesLayout->addWidget( aRotBox2 );
 
-  QHBox* aNbBox = new QHBox(aLinesPane);
-  aNbBox->setSpacing(5);
-  new QLabel( tr( "LBL_NB_PLANS" ), aNbBox );
-  myNbSpn = new QtxDblSpinBox( 1, 100, 1, aNbBox );
+  QWidget* aNbBox = new QWidget(aLinesPane);
+  aHBLay = new QHBoxLayout( aNbBox ); 
+  aHBLay->setSpacing(5);
+  aHBLay->addWidget( new QLabel( tr( "LBL_NB_PLANS" ), aNbBox ) );
+  myNbSpn = new QtxDoubleSpinBox( 1, 100, 1, aNbBox );
   myNbSpn->setValue( 10 );
+  aHBLay->addWidget( myNbSpn );
 
   aLinesLayout->addWidget( aNbBox );
 
-  myPosTable = new QTable(aLinesPane, "Positions of cut planes" );
+  myPosTable = new QTableWidget(aLinesPane );
   myPosTable->setMaximumHeight( 227 );
   myPosTable->setMinimumWidth( 294 );
-  myPosTable->setNumCols(2);
-  myPosTable->setNumRows(0);
+  myPosTable->setColumnCount(2);
+  myPosTable->setRowCount(0);
 
-  QHeader *th = myPosTable->horizontalHeader();
-  th->setLabel( 0, "Position" );
-  th->setLabel( 1, "Set default" );
+  myPosTable->setItemDelegateForColumn( 0,
+         new NumDelegateItem( myPosTable, NumDelegateItem::NV_Real) );
 
+  myPosTable->setEditTriggers( (QAbstractItemView::EditTriggers)(QAbstractItemView::AllEditTriggers &(~QAbstractItemView::CurrentChanged)));
+
+  QStringList aLabels;
+  aLabels.append( "Position" );
+  aLabels.append( "Set default" );
+  myPosTable->setHorizontalHeaderLabels( aLabels );
+  
   aLinesLayout->addWidget( myPosTable );
 
-  QHBox* aPosBox2 = new QHBox(aLinesPane);
-  aPosBox2->setSpacing(5);
-  new QLabel( tr( "LBL_POS" ), aPosBox2 );
-  myPosSpn2 = new QtxDblSpinBox( 0, 1, 0.1, aPosBox2 );
+  QWidget* aPosBox2 = new QWidget(aLinesPane);
+  aHBLay = new QHBoxLayout( aPosBox2 );
+  aHBLay->setSpacing(5);
+  aHBLay->addWidget( new QLabel( tr( "LBL_POS" ), aPosBox2 ) );
+  myPosSpn2 = new QtxDoubleSpinBox( 0, 1, 0.1, aPosBox2 );
   myPosSpn2->setValue( 0.5 );
+  aHBLay->addWidget( myPosSpn2 );
+
+  
   aLinesLayout->addWidget( aPosBox2 );
   aLinesLayout->addStretch();
 
   myTabBox->addTab( aLinesPane, tr("LBL_LINES_CUT") );
 
   myScalarPane = new VisuGUI_ScalarBarPane(this, false);
-  myScalarPane->setMargin( 5 );
+  if ( myScalarPane->layout() )
+    myScalarPane->layout()->setMargin( 5 );
+
   myInputPane = new VisuGUI_InputPane(VISU::TCUTLINES, theModule, this);
   myTabBox->addTab(myScalarPane, "Scalar Bar");
   myTabBox->addTab(myInputPane, "Input");
@@ -225,42 +293,42 @@ VisuGUI_CutLinesDlg::VisuGUI_CutLinesDlg (SalomeApp_Module* theModule)
   aMainLayout->addWidget(myTabBox);
 
   // Dialog buttons
-  QHBox* aBtnBox = new QHBox(this);
+  QFrame* aBtnBox = new QFrame(this);
+  aHBLay = new QHBoxLayout( aBtnBox );
   aBtnBox->setFrameStyle(QFrame::Box | QFrame::Sunken);
   aBtnBox->setLineWidth( 1 );
-  QHBoxLayout* aBtnLayout = (QHBoxLayout*) aBtnBox->layout();
-  aBtnLayout->setAutoAdd( false );
-  aBtnLayout->setSpacing( 5 );
-  aBtnLayout->setMargin( 11 );
+  //aHBLay->setAutoAdd( false );
+  aHBLay->setSpacing( 5 );
+  aHBLay->setMargin( 11 );
 
   QPushButton* aOkBtn = new QPushButton (tr("BUT_OK"), aBtnBox);
   aOkBtn->setAutoDefault( TRUE );
   aOkBtn->setDefault( true );
-  aBtnLayout->addWidget(aOkBtn);
+  aHBLay->addWidget(aOkBtn);
 
-  aBtnLayout->addStretch();
+  aHBLay->addStretch();
 
   QPushButton* aCloseBtn = new QPushButton(tr("BUT_CANCEL"), aBtnBox);
-  aBtnLayout->addWidget(aCloseBtn);
+  aHBLay->addWidget(aCloseBtn);
 
   QPushButton* aHelpBtn = new QPushButton(tr("BUT_HELP"), aBtnBox);
-  aBtnLayout->addWidget(aHelpBtn);
+  aHBLay->addWidget(aHelpBtn);
 
   aMainLayout->addWidget(aBtnBox);
 
   myCutLines = NULL;
 
   // signals and slots connections
-  connect(mySelPlane    , SIGNAL(clicked(int))          , this, SLOT(onPlaneSelect(int)));
+  connect(mySelPlane    , SIGNAL(buttonClicked(int))          , this, SLOT(onPlaneSelect(int)));
   connect(myCBSetDef    , SIGNAL(toggled(bool))         , this, SLOT(setBaseDefault()));
   connect(myPosSpn      , SIGNAL(valueChanged(double))  , this, SLOT(setBaseDefault()));
-  connect(mySelPlane2   , SIGNAL(clicked(int))          , this, SLOT(onCutSelect(int)));
+  connect(mySelPlane2   , SIGNAL(buttonClicked(int))          , this, SLOT(onCutSelect(int)));
   connect(myNbSpn       , SIGNAL(valueChanged(double))  , this, SLOT(DrawTable()));
-  connect(th            , SIGNAL(clicked(int))          , this, SLOT(setDefault(int)));
+  connect(myPosTable->horizontalHeader(), SIGNAL(sectionClicked(int))          , this, SLOT(setDefault(int)));
   connect(myPosSpn2     , SIGNAL(valueChanged(double))  , this, SLOT(DrawTable()));
   connect(myPreviewCheck, SIGNAL(toggled(bool))         , this, SLOT(onPreviewCheck(bool)));
   connect(myAllCurvesInvertedCheck, SIGNAL(toggled(bool)),this, SLOT(onAllCurvesInvertedCheck(bool)));
-  connect(myPosTable    , SIGNAL(valueChanged(int, int)), this, SLOT(onValueChanged(int, int)));
+  connect(myPosTable    , SIGNAL(cellChanged(int, int)), this, SLOT(onValueChanged(int, int)));
   connect(myRotXSpn     , SIGNAL(valueChanged(double))  , this, SLOT(onRotation(double)));
   connect(myRotYSpn     , SIGNAL(valueChanged(double))  , this, SLOT(onRotation(double)));
   connect(myRotXSpn2    , SIGNAL(valueChanged(double))  , this, SLOT(onRotation(double)));
@@ -271,6 +339,7 @@ VisuGUI_CutLinesDlg::VisuGUI_CutLinesDlg (SalomeApp_Module* theModule)
   connect(aOkBtn, SIGNAL(clicked()), this, SLOT(accept()));
   connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(reject()));
   connect(aHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
+  
   //connect(myMgr, SIGNAL(closeAllViews()), this, SLOT(reject()));
   //connect(VisuGUI::application()->desktop(),
   //        SIGNAL(windowActivated(SUIT_ViewWindow*)),
@@ -326,7 +395,7 @@ void VisuGUI_CutLinesDlg::initFromPrsObject (VISU::ColoredPrs3d_i* thePrs, bool
     return;
 
   myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentPage( 0 );
+  myTabBox->setCurrentIndex( 0 );
 }
 
 //------------------------------------------------------------------------------
@@ -353,10 +422,19 @@ int VisuGUI_CutLinesDlg::storeToPrsObject (VISU::ColoredPrs3d_i* thePrs)
     myPrsCopy->SetBasePlanePosition(myBasePlanePos->text().toDouble());
   else myPrsCopy->SetDefault();
 
-  for (int i = 0; i < (int)myNbSpn->value(); ++i) {
-    if (!((QCheckTableItem*)myPosTable->item( i, 1 ))->isChecked())
-      myPrsCopy->SetLinePosition( i, myPosTable->text( i, 0 ).toDouble() );
-    else myPrsCopy->SetDefaultPosition(i);
+  QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+  if ( aModel )
+  {
+    for (int i = 0; i < (int)myNbSpn->value(); ++i)
+    {
+      if ( myPosTable->item( i, 1 )->checkState() != Qt::Checked )
+      {        
+        QVariant aVar = aModel->index( i, 0 ).data();
+        myPrsCopy->SetLinePosition( i, aVar.toDouble() );
+      }      
+      else
+        myPrsCopy->SetDefaultPosition(i);
+    }
   }
   if (myAllCurvesInvertedCheck->isChecked())
     myPrsCopy->SetAllCurvesInverted(true);
@@ -426,27 +504,30 @@ void VisuGUI_CutLinesDlg::deletePlanes()
 //------------------------------------------------------------------------------
 void VisuGUI_CutLinesDlg::onPlaneSelect (int theId)
 {
-  for (int i = 0; i < mySelPlane2->count(); i++)
-    mySelPlane2->find(i)->setEnabled(true);
-  QButton* aBtn = mySelPlane2->find(theId);
+  QList<QAbstractButton*> aBtns = mySelPlane2->buttons();
+  for (QList<QAbstractButton*>::Iterator it = aBtns.begin();
+       it != aBtns.end(); it++ )    
+   (*it)->setEnabled(true);
+  
+  QAbstractButton* aBtn = mySelPlane2->button(theId);
   aBtn->setEnabled(false);
   switch (theId) {
   case 0:
     myRotXLbl->setText( tr("LBL_ROT_X"));
     myRotYLbl->setText( tr("LBL_ROT_Y"));
-    ((QRadioButton*)mySelPlane2->find(1))->setChecked(true);
+    mySelPlane2->button(1)->setChecked(true);
     onCutSelect(1, false);
     break;
   case 1:
     myRotXLbl->setText( tr("LBL_ROT_Y"));
     myRotYLbl->setText( tr("LBL_ROT_Z"));
-    ((QRadioButton*)mySelPlane2->find(2))->setChecked(true);
+    mySelPlane2->button(2)->setChecked(true);
     onCutSelect(2, false);
     break;
   case 2:
     myRotXLbl->setText( tr("LBL_ROT_Z"));
     myRotYLbl->setText( tr("LBL_ROT_X"));
-    ((QRadioButton*)mySelPlane2->find(0))->setChecked(true);
+    mySelPlane2->button(0)->setChecked(true);
     onCutSelect(0, false);
   }
   setBaseDefault(false);
@@ -522,9 +603,13 @@ void VisuGUI_CutLinesDlg::DrawTable()
 {
   if (!hasInit) return;
 
-  int aNbRows = myPosTable->numRows();
+  int aNbRows = myPosTable->rowCount();
   int aNbPlanes = (int)myNbSpn->value();
 
+  QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+  if ( !aModel )
+    return;
+
   myCutLines->SetOrientation(getOrientaion(),
                              myRotXSpn->value()*PI/180.,
                              myRotYSpn->value()*PI/180.);
@@ -536,40 +621,68 @@ void VisuGUI_CutLinesDlg::DrawTable()
                               myRotYSpn2->value()*PI/180.);
 
   if (aNbRows>0)
-    for (int i = 0; i < aNbRows; ++i) {
-      QCheckTableItem* aItem = (QCheckTableItem*)myPosTable->item( i, 1 );
+    for (int i = 0; i < aNbRows; ++i)
+    {
+      QTableWidgetItem* aItem = myPosTable->item( i, 1 );
       if (aItem == 0) break;
-      if (!aItem->isChecked())
-       myCutLines->SetLinePosition(i, myPosTable->text(i, 0).toDouble());
+      if (aItem->checkState() != Qt::Checked )
+      {
+        QVariant aVar = aModel->index( i, 0 ).data();
+       myCutLines->SetLinePosition(i, aVar.toDouble());
+      }
     }
 
+  //if (aNbPlanes > aNbRows)
+    //  myPosTable->addRows(aNbRows, aNbPlanes - aNbRows );
+  //else if (aNbPlanes < aNbRows)
+  //myPosTable->setRowCount(aNbPlanes);
   if (aNbPlanes > aNbRows)
-    myPosTable->insertRows(aNbRows, aNbPlanes - aNbRows );
+    while( aNbPlanes > myPosTable->rowCount() )
+      myPosTable->insertRow( myPosTable->rowCount() );
   else if (aNbPlanes < aNbRows)
-    myPosTable->setNumRows(aNbPlanes);
+    myPosTable->setRowCount(aNbPlanes);
 
   int aMin = (aNbRows < aNbPlanes)? aNbRows : aNbPlanes;
-  for (int i = 0; i<aMin; i++) {
-    myPosTable->setText(i, 0, QString::number(myCutLines->GetLinePosition(i)));
-    ((QCheckTableItem*)myPosTable->item( i, 1 ))->setChecked(myCutLines->IsDefaultPosition(i));
+  for (int i = 0; i<aMin; i++)
+  {
+    QModelIndex anIndex = aModel->index( i, 0 );
+    aModel->setData( anIndex, QVariant( myCutLines->GetLinePosition(i) ), Qt::DisplayRole );
+    //myPosTable->setText(i, 0, QString::number(myCutLines->GetLinePosition(i)));
+    myPosTable->item( i, 1 )->setCheckState(myCutLines->IsDefaultPosition(i) ? Qt::Checked : Qt::Unchecked );
   }
 
-  QHeader *vh = myPosTable->verticalHeader();
+  //QHeader *vh = myPosTable->verticalHeader();
   QString str("Plane# %1");
+  QStringList aLabels;
   for (int i=aMin; i<aNbPlanes; i++) {
-    VisuGUI_NumEditItem* aEditItem = new VisuGUI_NumEditItem
-      (myPosTable, QTableItem::OnTyping, QString::number(myCutLines->GetLinePosition(i)));
-    aEditItem->setReplaceable(false);
-    aEditItem->setEnabled(!myCutLines->IsDefaultPosition(i));
+    /*VisuGUI_NumEditItem* aEditItem = new VisuGUI_NumEditItem
+      (myPosTable, QTableItem::OnTyping, QString::number(myCutLines->GetLinePosition(i)));*/
+    QTableWidgetItem* aEditItem = new QTableWidgetItem();
+    aEditItem->setText( QString::number(myCutLines->GetLinePosition(i)) );
+    //aEditItem->setReplaceable(false);
+    //aEditItem->setEnabled(!myCutLines->IsDefaultPosition(i));
+    Qt::ItemFlags aFlags = aEditItem->flags();
+    if ( myCutLines->IsDefaultPosition(i) )
+      aFlags |= Qt::ItemIsEnabled;
+    else
+      aFlags &= (~Qt::ItemIsEnabled);
+    
     myPosTable->setItem(i, 0, aEditItem);
 
-    QCheckTableItem* aCheck = new QCheckTableItem(myPosTable, 0);
+    /*QCheckTableItem* aCheck = new QCheckTableItem(myPosTable, 0);
     aCheck->setChecked(myCutLines->IsDefaultPosition(i));
     aCheck->setReplaceable(false);
+    myPosTable->setItem(i, 1, aCheck);*/
+
+    QTableWidgetItem* aCheck = new QTableWidgetItem();
+    aCheck->setCheckState( myCutLines->IsDefaultPosition(i) ?
+                           Qt::Checked : Qt::Unchecked );
     myPosTable->setItem(i, 1, aCheck);
 
-    vh->setLabel( i, str.arg(i+1) );
+    //vh->setLabel( i, str.arg(i+1) );
+    aLabels.append( str.arg(i+1) );
   }
+  myPosTable->setVerticalHeaderLabels( aLabels );
   // Update preview
   SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
   if (aView) {
@@ -656,27 +769,38 @@ void VisuGUI_CutLinesDlg::updateGlyphs(bool update){
 //------------------------------------------------------------------------------
 void VisuGUI_CutLinesDlg::setDefault (int all)
 {
-  myPosTable->setCurrentCell(-1, 1);
+  myPosTable->setCurrentCell(0, 0);
   myPosTable->clearSelection();
+
+  QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+  if ( !aModel )
+    return;
+  
   if (all == 0) return;
   if (all == 1)
     for (int i = 0; i < (int)myNbSpn->value(); ++i)
-      ((QCheckTableItem*)myPosTable->item( i, 1 ))->setChecked(true);
+      myPosTable->item( i, 1 )->setCheckState(Qt::Checked);
 
-  for (int i = 0; i < (int)myNbSpn->value(); ++i) {
-    if ( ((QCheckTableItem*)myPosTable->item( i, 1 ))->isChecked() ) {
+  for (int i = 0; i < (int)myNbSpn->value(); ++i)
+  {
+    if ( myPosTable->item( i, 1 )->checkState() == Qt::Checked )
+    {
       myCutLines->SetDefaultPosition(i);
-      myPosTable->setText( i, 0, QString::number(myCutLines->GetLinePosition(i)));
-      myPosTable->item( i, 0 )->setEnabled(false);
-    } else
-      myPosTable->item( i, 0 )->setEnabled(true);
+      QModelIndex anIndex = aModel->index( i, 0 );
+      aModel->setData( anIndex, QVariant( myCutLines->GetLinePosition(i) ), Qt::DisplayRole );
+      //myPosTable->setText( i, 0, QString::number(myCutLines->GetLinePosition(i)));
+      //myPosTable->item( i, 0 )->setEnabled(false);
+      myPosTable->item( i, 0 )->setFlags( myPosTable->item( i, 0 )->flags() &(~Qt::ItemIsEnabled ) );
+    }
+    else
+      myPosTable->item( i, 0 )->setFlags( myPosTable->item( i, 0 )->flags() | Qt::ItemIsEnabled );
   }
 }
 
 //------------------------------------------------------------------------------
 VISU::CutPlanes::Orientation VisuGUI_CutLinesDlg::getOrientaion (bool IsBasePlane)
 {
-  QHButtonGroup* aBG;
+  QButtonGroup* aBG;
 
   if (IsBasePlane)
     aBG = mySelPlane;
@@ -684,7 +808,7 @@ VISU::CutPlanes::Orientation VisuGUI_CutLinesDlg::getOrientaion (bool IsBasePlan
     aBG = mySelPlane2;
 
   VISU::CutPlanes::Orientation orient;
-  switch (aBG->id(aBG->selected())) {
+  switch (aBG->id(aBG->checkedButton())) {
   case 0:
     orient = VISU::CutPlanes::XY;
     break;
@@ -702,15 +826,15 @@ void VisuGUI_CutLinesDlg::setOrientation (const VISU::CutPlanes::Orientation ori
 {
   switch (orient) {
   case VISU::CutPlanes::XY:
-    ((QRadioButton*)mySelPlane->find(0))->setChecked(true);
+    mySelPlane->button(0)->setChecked(true);
     onPlaneSelect(0);
     break;
   case VISU::CutPlanes::YZ:
-    ((QRadioButton*)mySelPlane->find(1))->setChecked(true);
+    mySelPlane->button(1)->setChecked(true);
     onPlaneSelect(1);
     break;
   case VISU::CutPlanes::ZX:
-    ((QRadioButton*)mySelPlane->find(2))->setChecked(true);
+    mySelPlane->button(2)->setChecked(true);
     onPlaneSelect(2);
   }
 }
@@ -720,28 +844,36 @@ void VisuGUI_CutLinesDlg::setOrientation2 (const VISU::CutPlanes::Orientation or
 {
   switch (orient) {
   case VISU::CutPlanes::XY:
-    ((QRadioButton*)mySelPlane2->find(0))->setChecked(true);
+    mySelPlane2->button(0)->setChecked(true);
     onCutSelect(0);
     break;
   case VISU::CutPlanes::YZ:
-    ((QRadioButton*)mySelPlane2->find(1))->setChecked(true);
+    mySelPlane2->button(1)->setChecked(true);
     onCutSelect(1);
     break;
   case VISU::CutPlanes::ZX:
-    ((QRadioButton*)mySelPlane2->find(2))->setChecked(true);
+    mySelPlane2->button(2)->setChecked(true);
     onCutSelect(2);
   }
 }
 
 void VisuGUI_CutLinesDlg::onValueChanged (int theRow, int theCol)
 {
-  if (theCol == 0) {
-    QString aTxt = myPosTable->text(theRow, 0);
-    bool isChanged = !aTxt.isEmpty();
-    ((QCheckTableItem*)myPosTable->item(theRow, 1))->setChecked(!isChanged);
+  /*QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+  if ( !aModel )
+    return;
+
+  QModelIndex anIndex = aModel->index( theRow, theCol );
+  
+  if (theCol == 0)
+  {
+    bool isChanged = !anIndex.data().isNull();
+    myPosTable->item(theRow, 1)->setCheckState(!isChanged ? Qt::Checked : Qt::Unchecked);
     SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
-    if (aView) {
-      if (myPreviewCheck->isChecked()) {
+    if (aView)
+    {
+      if (myPreviewCheck->isChecked())
+      {
        //Update Preview
        //myCutLines->SetLinePosition( theRow, aTxt.toDouble());
        //      myCutLines->GetPipeLine()->Update();
@@ -750,14 +882,19 @@ void VisuGUI_CutLinesDlg::onValueChanged (int theRow, int theCol)
        //aView->Repaint();
       }
     }
-  } else if (theCol == 1){
-    bool isDefault = ((QCheckTableItem*)myPosTable->item(theRow, theCol))->isChecked();
-    if (isDefault) {
+  }
+  else if (theCol == 1)
+  {
+    bool isDefault = myPosTable->item(theRow, 1)->checkState() == Qt::Checked;
+    if (isDefault)
+    {
       //myCutLines->SetDefaultPosition(theRow);
       // myPosTable->setText(theRow, 0, QString::number(myCutLines->GetLinePosition(theRow)));
       SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
-      if (aView) {
-       if (myPreviewCheck->isChecked()) {
+      if (aView)
+      {
+       if (myPreviewCheck->isChecked())
+        {
          //Update Preview
          //      myCutLines->GetPipeLine()->Update();
          deletePlanes();
@@ -765,9 +902,67 @@ void VisuGUI_CutLinesDlg::onValueChanged (int theRow, int theCol)
          //aView->Repaint();
        }
       }
-      myPosTable->setText(theRow, 0, QString::number(myCutLines->GetLinePosition(theRow)));
+      //myPosTable->setText(theRow, 0, QString::number(myCutLines->GetLinePosition(theRow)));
+      aModel->setData( anIndex, myCutLines->GetLinePosition(theRow), Qt::DisplayRole );
+      myPosTable->item( theRow, 0 )->setFlags( myPosTable->item( theRow, 0 )->flags() | Qt::ItemIsEnabled );
+    }
+    else
+      myPosTable->item( theRow, 0 )->setFlags( myPosTable->item( theRow, 0 )->flags() &(~Qt::ItemIsEnabled ) );
+  }*/
+
+  QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+  if ( !aModel )
+    return;
+  
+  if ( !myPosTable->item(theRow, 1) || !myPosTable->item(theRow, 0) )
+    return;
+
+  QModelIndex anIndex;
+
+  QTableWidgetItem* anItem = myPosTable->item(theRow, theCol);
+  if (!anItem )
+    return;
+
+  bool isDefault = myPosTable->item(theRow, 1)->checkState() == Qt::Checked;
+  if (theCol == 0 )
+  {
+    anIndex = aModel->index( theRow, 0 );
+    //if ( !isDefault)
+      //myCutLines->SetLinePosition( theRow, anIndex.data().toDouble());
+          
+            
+    if ( myPreviewCheck->isChecked() )
+    {
+      //Update Preview
+      if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
+      {
+       //myCutLines->GetPipeLine()->Update();
+       deletePlanes();
+       createPlanes();
+       //vf->Repaint();
+      }
     }
-    myPosTable->item(theRow, 0)->setEnabled(!isDefault);
+  }
+  else
+  {
+    anItem = myPosTable->item(theRow, 0);
+    Qt::ItemFlags flags = anItem->flags();
+    if ( isDefault )
+    {
+      myCutLines->SetDefaultPosition(theRow);
+      anIndex = aModel->index( theRow, 0 );
+      aModel->setData( anIndex, myCutLines->GetLinePosition(theRow), Qt::DisplayRole );
+
+      /*if ( myPreviewCheck->isChecked() )
+        {
+        //not needed update presentation, because item->setFlags generates signal cellChanged() again
+        }*/
+      flags &= (~Qt::ItemIsEnabled );
+    }
+    else
+      flags |=  Qt::ItemIsEnabled;
+   
+    anItem->setFlags( flags );
   }
 }
 
@@ -951,10 +1146,10 @@ void VisuGUI_CutLinesDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
 
@@ -970,7 +1165,7 @@ void VisuGUI_CutLinesDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index 9e7405e77d15ffc7cbfbba1fd8059ae6fa9dae83..606eba07526b3ccbbba85a49fe37fd8051b71010 100644 (file)
 
 #include "VisuGUI_CutPlanesDlg.h"
 
-#include <qhbuttongroup.h>
-#include <qvalidator.h>
-#include <qtabwidget.h>
-#include <qcheckbox.h>
+#include <QCheckBox>
 
 class QLineEdit;
+class QTabWidget;
 
 class SUIT_ViewManager;
 class SalomeApp_Module;
@@ -82,25 +80,25 @@ private:
   void deletePlanes();
   void updateGlyphs(bool update);
 
-  QHButtonGroup* mySelPlane;
-  QtxDblSpinBox* myRotXSpn;
-  QtxDblSpinBox* myRotYSpn;
+  QButtonGroup* mySelPlane;
+  QtxDoubleSpinBox* myRotXSpn;
+  QtxDoubleSpinBox* myRotYSpn;
   QLabel* myRotXLbl;
   QLabel* myRotYLbl;
-  QtxDblSpinBox* myPosSpn;
+  QtxDoubleSpinBox* myPosSpn;
   QLineEdit* myBasePlanePos;
   QCheckBox* myCBSetDef;
   QCheckBox* myCreateTable;
   QCheckBox* myCurvesCheck;
 
-  QHButtonGroup* mySelPlane2;
-  QtxDblSpinBox* myNbSpn;
-  QtxDblSpinBox* myRotXSpn2;
-  QtxDblSpinBox* myRotYSpn2;
+  QButtonGroup* mySelPlane2;
+  QtxDoubleSpinBox* myNbSpn;
+  QtxDoubleSpinBox* myRotXSpn2;
+  QtxDoubleSpinBox* myRotYSpn2;
   QLabel* myRotXLbl2;
   QLabel* myRotYLbl2;
-  QtxDblSpinBox* myPosSpn2;
-  QTable* myPosTable;
+  QtxDoubleSpinBox* myPosSpn2;
+  QTableWidget* myPosTable;
   bool hasInit;
 
   QDoubleValidator *mydvalidator;
index d332917b282970cccea7fde6f625eeb092315413..052c3213fb7144c4d2cd28386b79c55848f816df 100644 (file)
@@ -39,7 +39,9 @@
 #include "VISU_CutPlanes_i.hh"
 #include "VISU_CutPlanesPL.hxx"
 
-#include "OB_Browser.h"
+//#include "OB_Browser.h"
+
+#include "VisuGUI_TableDlg.h"
 
 #include "SVTK_ViewWindow.h"
 
 #include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
 
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qstyle.h>
-#include <qstring.h>
-#include <qvalidator.h>
-#include <qlineedit.h>
-#include <qtabwidget.h>
+#include <QLayout>
+#include <QLabel>
+#include <QButtonGroup>
+#include <QCheckBox>
+#include <QStyle>
+#include <QValidator>
+#include <QLineEdit>
+#include <QTabWidget>
+#include <QKeyEvent>
+#include <QSpinBox>
+#include <QRadioButton>
+#include <QTableWidget>
+#include <QGroupBox>
+#include <QPushButton>
+#include <QHeaderView>
 
 #include <vtkRenderer.h>
 #include <vtkPolyData.h>
@@ -78,90 +87,104 @@ VisuGUI_CutPlanesPane::VisuGUI_CutPlanesPane (QWidget* theParent)
   TopLayout->setSpacing( 6 );
   TopLayout->setMargin( 10 );
 
-  QButtonGroup* SelPlane = new QButtonGroup (tr("TXT_ORIENTATION"), this, "SelPlane");
+  QButtonGroup* SelPlane = new QButtonGroup ( this );
+  QGroupBox* aGB = new QGroupBox( tr("TXT_ORIENTATION"), this );
   //SelPlane->setTitle(tr("TXT_ORIENTATION"));
-  SelPlane->setColumnLayout(0, Qt::Vertical);
-  SelPlane->layout()->setSpacing( 0 );
-  SelPlane->layout()->setMargin( 0 );
-  QGridLayout* SelPlaneLayout = new QGridLayout( SelPlane->layout() );
+  //SelPlane->setColumnLayout(0, Qt::Vertical);
+  //SelPlane->layout()->setSpacing( 0 );
+  //SelPlane->layout()->setMargin( 0 );
+  QGridLayout* SelPlaneLayout = new QGridLayout( aGB );
   SelPlaneLayout->setAlignment( Qt::AlignTop );
   SelPlaneLayout->setSpacing( 6 );
   SelPlaneLayout->setMargin( 11 );
 
-  RBxy = new QRadioButton (tr("PARALLEL_XOY"), SelPlane, "RBxy");
-  RByz = new QRadioButton (tr("PARALLEL_YOZ"), SelPlane, "RByz");
-  RBzx = new QRadioButton (tr("PARALLEL_ZOX"), SelPlane, "RBzx");
+  RBxy = new QRadioButton (tr("PARALLEL_XOY"), aGB);
+  RByz = new QRadioButton (tr("PARALLEL_YOZ"), aGB);
+  RBzx = new QRadioButton (tr("PARALLEL_ZOX"), aGB);
   SelPlaneLayout->addWidget( RBxy, 0, 0 );
   SelPlaneLayout->addWidget( RByz, 0, 1 );
   SelPlaneLayout->addWidget( RBzx, 0, 2 );
+  SelPlane->addButton( RBxy );
+  SelPlane->addButton( RByz );
+  SelPlane->addButton( RBzx );
 
-  QLabel* LabelPosi_3 = new QLabel (tr("LBL_NB_PLANS"), this, "LabelPosi_3");
+  QLabel* LabelPosi_3 = new QLabel (tr("LBL_NB_PLANS"), this);
 
-  nbPlan = new QSpinBox( 1, 100, 1, this, "nbPlan" );
+  nbPlan = new QSpinBox( this );
+  nbPlan->setMinimum( 1 );
+  nbPlan->setMaximum(100);
+  nbPlan->setSingleStep( 1 );
   nbPlan->setValue( 1 );
   nbPlan->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
-  myPosTable = new QTable (this, "Positions of planes");
+  myPosTable = new QTableWidget (this);
   myPosTable->setMaximumHeight( 227 );
   myPosTable->setMinimumWidth( 294 );
-  myPosTable->setNumCols(2);
-  myPosTable->setNumRows(0);
-  connect( myPosTable, SIGNAL(valueChanged(int, int)), this, SLOT(onValueChanged(int, int)) );
-
-  QHeader *th = myPosTable->horizontalHeader();
-  th->setLabel( 0, "Position" );
-  th->setLabel( 1, "Set default" );
-  th->setStyle("QStyle::CE_PushButton");
-
-  QGroupBox* GBrot = new QGroupBox (tr("LBL_ROTATION"), this, "GBrot");
-  GBrot->setColumnLayout(0, Qt::Vertical);
-  GBrot->layout()->setSpacing( 0 );
-  GBrot->layout()->setMargin( 0 );
-  QGridLayout* GBrotLayout = new QGridLayout( GBrot->layout() );
+  myPosTable->setColumnCount(2);
+  myPosTable->setRowCount(0);
+  connect( myPosTable, SIGNAL(cellChanged(int, int)), this, SLOT(onValueChanged(int, int)) );
+
+  myPosTable->setItemDelegateForColumn( 0,
+         new NumDelegateItem( myPosTable, NumDelegateItem::NV_Real) );
+
+  myPosTable->setEditTriggers(
+         (QAbstractItemView::EditTriggers)(QAbstractItemView::AllEditTriggers &(~QAbstractItemView::CurrentChanged)));
+
+  QStringList aLabels;
+  aLabels.append( "Position" );
+  aLabels.append( "Set default" );
+  
+  myPosTable->setHorizontalHeaderLabels( aLabels );
+
+  QGroupBox* GBrot = new QGroupBox (tr("LBL_ROTATION"), this);
+  //GBrot->setColumnLayout(0, Qt::Vertical);
+  //GBrot->layout()->setSpacing( 0 );
+  //GBrot->layout()->setMargin( 0 );
+  QGridLayout* GBrotLayout = new QGridLayout( GBrot );
   GBrotLayout->setAlignment( Qt::AlignTop );
   GBrotLayout->setSpacing( 6 );
   GBrotLayout->setMargin( 11 );
 
-  LabelRot1 = new QLabel (tr("LBL_ROT_X"), GBrot, "LabelRot1");
+  LabelRot1 = new QLabel (tr("LBL_ROT_X"), GBrot );
   GBrotLayout->addWidget( LabelRot1, 0, 0 );
 
-  Rot1 = new QtxDblSpinBox( -180, 180, 10, GBrot );
+  Rot1 = new QtxDoubleSpinBox( -180, 180, 10, GBrot );
   Rot1->setValue( 0 );
   Rot1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   connect( Rot1, SIGNAL( valueChanged( double )), this, SLOT( onRotation( double ) ) );
   GBrotLayout->addWidget( Rot1, 0, 1 );
 
-  LabelRot2 = new QLabel (tr("LBL_ROT_Y"), GBrot, "LabelRot2");
+  LabelRot2 = new QLabel (tr("LBL_ROT_Y"), GBrot );
   GBrotLayout->addWidget( LabelRot2, 1, 0 );
 
-  Rot2 = new QtxDblSpinBox( -180, 180, 10, GBrot );
+  Rot2 = new QtxDoubleSpinBox( -180, 180, 10, GBrot );
   Rot2->setValue( 0 );
   Rot2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   connect( Rot2, SIGNAL( valueChanged( double )), this, SLOT( onRotation( double ) ) );
   GBrotLayout->addWidget( Rot2, 1, 1 );
 
   QLabel* aPosLbl = new QLabel(tr( "LBL_POS" ), this);
-  myPosSpn = new QtxDblSpinBox( 0, 1, 0.1, this );
+  myPosSpn = new QtxDoubleSpinBox( 0, 1, 0.1, this );
 
   myPreviewCheck = new QCheckBox(tr("LBL_SHOW_PREVIEW"), this);
   myPreviewCheck->setChecked(false);
   connect( myPreviewCheck, SIGNAL( toggled( bool )), this, SLOT( onPreviewCheck( bool ) ) );
 
-  TopLayout->addMultiCellWidget( SelPlane, 0, 0, 0, 1 );
-  TopLayout->addMultiCellWidget( GBrot, 1, 1, 0, 1 );
+  TopLayout->addWidget( aGB, 0, 0, 1, 2 );
+  TopLayout->addWidget( GBrot, 1, 0, 1, 2 );
   TopLayout->addWidget( LabelPosi_3,   2, 0 );
   TopLayout->addWidget( nbPlan,        2, 1 );
-  TopLayout->addMultiCellWidget( myPosTable, 3, 3, 0, 1 );
+  TopLayout->addWidget( myPosTable, 3, 0, 1, 2 );
   TopLayout->setRowStretch ( 3, 3 );
   TopLayout->addWidget(aPosLbl, 4, 0 );
   TopLayout->addWidget(myPosSpn, 4, 1 );
-  TopLayout->addMultiCellWidget( myPreviewCheck, 5, 5, 0, 1 );
+  TopLayout->addWidget( myPreviewCheck, 5, 0, 1, 2 );
 
   // signals and slots connections
-  connect( SelPlane, SIGNAL( clicked( int )), this, SLOT( orientationChanged( int ) ) );
+  connect( SelPlane, SIGNAL( buttonClicked( int )), this, SLOT( orientationChanged( int ) ) );
   connect( nbPlan, SIGNAL( valueChanged( int )), this, SLOT( DrawTable( ) ) );
   connect( myPosSpn, SIGNAL( valueChanged( double )), this, SLOT( DrawTable( ) ) );
-  connect( th, SIGNAL( clicked(int)), this, SLOT( setDefault(int) ) );
+  connect( myPosTable->horizontalHeader(), SIGNAL( sectionClicked(int)), this, SLOT( setDefault(int) ) );
 
   // default values
   myCutPlanes = NULL;
@@ -228,11 +251,11 @@ int VisuGUI_CutPlanesPane::storeToPrsObject (VISU::CutPlanes_i* thePrs)
   thePrs->SetNbPlanes(getNbPlanes());
   thePrs->SetDisplacement(myPosSpn->value());
   for (int i = 0; i < getNbPlanes(); ++i) {
-    QCheckTableItem* anItem = (QCheckTableItem*)myPosTable->item(i, 1);
+    QTableWidgetItem* anItem = myPosTable->item(i, 1);
     if (!anItem)
       break;
-    if (!anItem->isChecked())
-      thePrs->SetPlanePosition(i, myPosTable->text(i, 0).toDouble());
+    if (anItem->checkState() != Qt::Checked )
+      thePrs->SetPlanePosition(i, myPosTable->item(i, 0)->text().toDouble());
     else
       thePrs->SetDefault(i);
   }
@@ -312,7 +335,7 @@ void VisuGUI_CutPlanesPane::DrawTable()
   if (myCutPlanes == NULL) return;
   if (!hasInit) return;
 
-  int aNbRows = myPosTable->numRows();
+  int aNbRows = myPosTable->rowCount();
   int aNbPlanes = getNbPlanes();
 
   myCutPlanes->SetOrientation(getOrientaion(),getRotation1()*PI/180.,getRotation2()*PI/180.);
@@ -320,40 +343,55 @@ void VisuGUI_CutPlanesPane::DrawTable()
   myCutPlanes->SetDisplacement(myPosSpn->value());
   if (aNbRows>0)
     for (int i = 0; i < aNbRows; ++i) {
-      QCheckTableItem* aItem = (QCheckTableItem*)myPosTable->item( i, 1 );
+      QTableWidgetItem* aItem = myPosTable->item( i, 1 );
       if (aItem == 0) break;
-      if (!aItem->isChecked())
-       myCutPlanes->SetPlanePosition(i, myPosTable->text(i, 0).toDouble());
+      if (aItem->checkState() != Qt::Checked )
+       myCutPlanes->SetPlanePosition(i, myPosTable->item(i, 0)->text().toDouble());
     }
 
   if (aNbPlanes > aNbRows)
-    myPosTable->insertRows(aNbRows, aNbPlanes - aNbRows );
+    while( aNbPlanes > myPosTable->rowCount() )
+      myPosTable->insertRow( myPosTable->rowCount() );
   else if (aNbPlanes < aNbRows)
-    myPosTable->setNumRows(aNbPlanes);
+    myPosTable->setRowCount(aNbPlanes);
 
   int aMin = (aNbRows < aNbPlanes)? aNbRows : aNbPlanes;
   for (int i = 0; i<aMin; i++) {
-    myPosTable->setText(i, 0, QString::number(myCutPlanes->GetPlanePosition(i)));
-    ((QCheckTableItem*)myPosTable->item( i, 1 ))->setChecked(myCutPlanes->IsDefault(i));
+    myPosTable->item( i, 0 )->setText( QString::number(myCutPlanes->GetPlanePosition(i)));
+    myPosTable->item( i, 1 )->setCheckState( myCutPlanes->IsDefault(i) ? Qt::Checked : Qt::Unchecked);
   }
 
-  QHeader *vh = myPosTable->verticalHeader();
+  //QHeader *vh = myPosTable->verticalHeader();
+  QStringList aLabels;
   QString str("Plane# %1");
   for (int i=aMin; i<aNbPlanes; i++) {
-    VisuGUI_NumEditItem* aEditItem = new VisuGUI_NumEditItem(myPosTable,
-                                                            QTableItem::OnTyping,
-                                                            QString::number(myCutPlanes->GetPlanePosition(i)));
-    aEditItem->setReplaceable(false);
-    aEditItem->setEnabled(!myCutPlanes->IsDefault(i));
+    QTableWidgetItem* aEditItem = new QTableWidgetItem();
+    aEditItem->setText( QString::number(myCutPlanes->GetPlanePosition(i)));
+    //aEditItem->setReplaceable(false);
+    //aEditItem->setEnabled(!myCutPlanes->IsDefault(i));
+    Qt::ItemFlags aFlags = aEditItem->flags();
+    if ( myCutPlanes->IsDefault(i) )
+      aFlags |= Qt::ItemIsEnabled;
+    else
+      aFlags &= (~Qt::ItemIsEnabled);
     myPosTable->setItem(i, 0, aEditItem);
 
-    QCheckTableItem* aCheck = new QCheckTableItem(myPosTable, 0);
+    /*QCheckTableItem* aCheck = new QCheckTableItem(myPosTable, 0);
     aCheck->setChecked(myCutPlanes->IsDefault(i));
-    aCheck->setReplaceable(false);
+    aCheck->setReplaceable(false);*/
+    QTableWidgetItem* aCheck = new QTableWidgetItem();
+    aFlags = aCheck->flags();
+    //aFlags |=  Qt::ItemIsUserCheckable;
+    aFlags &=  (~Qt::ItemIsEditable);
+    aCheck->setFlags( aFlags );
+    aCheck->setCheckState( myCutPlanes->IsDefault(i) ?
+                           Qt::Checked : Qt::Unchecked );
     myPosTable->setItem(i, 1, aCheck);
 
-    vh->setLabel( i, str.arg(i+1) );
+    //vh->setLabel( i, str.arg(i+1) );
+    aLabels.append( str.arg(i+1) );
   }
+  myPosTable->setVerticalHeaderLabels( aLabels );
 
   // Update preview
   if (myPreviewCheck->isChecked()) {
@@ -373,29 +411,96 @@ void VisuGUI_CutPlanesPane::setDefault (int all)
   if (all == 0) return;
   if (all == 1)
     for (int i = 0; i < getNbPlanes(); ++i)
-      ((QCheckTableItem*)myPosTable->item( i, 1 ))->setChecked(true);
+      myPosTable->item( i, 1 )->setCheckState(Qt::Checked);
+  //((QCheckTableItem*)myPosTable->item( i, 1 ))->setChecked(true);
 
   for (int i = 0; i < getNbPlanes(); ++i) {
-    if ( ((QCheckTableItem*)myPosTable->item( i, 1 ))->isChecked() ) {
+    if ( myPosTable->item( i, 1 )->checkState() == Qt::Checked )
+    {
       myCutPlanes->SetDefault(i);
-      myPosTable->setText( i, 0, QString::number(myCutPlanes->GetPlanePosition(i)));
-      myPosTable->item( i, 0 )->setEnabled(false);
-    } else
-      myPosTable->item( i, 0 )->setEnabled(true);
+      myPosTable->item( i, 0)->setText( QString::number(myCutPlanes->GetPlanePosition(i)));
+      myPosTable->item( i, 0 )->setFlags( myPosTable->item( i, 0 )->flags() &(~Qt::ItemIsEnabled ) );
+    }
+    else
+      myPosTable->item( i, 0 )->setFlags( myPosTable->item( i, 0 )->flags() | Qt::ItemIsEnabled );
   }
 }
 
 void VisuGUI_CutPlanesPane::onValueChanged (int theRow, int theCol)
 {
-  if (theCol == 0) {
-    QString aTxt = myPosTable->text(theRow, 0);
-    bool isChanged = !aTxt.isEmpty();
-    ((QCheckTableItem*)myPosTable->item(theRow, 1))->setChecked(!isChanged);
+  QAbstractTableModel* aModel = qobject_cast<QAbstractTableModel*>( myPosTable->model() );
+  if ( !aModel )
+    return;
+  
+  if ( !myPosTable->item(theRow, 1) || !myPosTable->item(theRow, 0) )
+    return;
+
+  QModelIndex anIndex;
+
+  QTableWidgetItem* anItem = myPosTable->item(theRow, theCol);
+  if (!anItem )
+    return;
+
+  bool isDefault = myPosTable->item(theRow, 1)->checkState() == Qt::Checked;
+  if (theCol == 0 )
+  {
+    anIndex = aModel->index( theRow, 0 );
+    if ( !isDefault)
+      myCutPlanes->SetPlanePosition( theRow, anIndex.data().toDouble());
+          
+            
+    if ( myPreviewCheck->isChecked() )
+    {
+      //Update Preview
+      if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>())
+      {
+       myCutPlanes->GetPipeLine()->Update();
+       deletePlanes();
+       createPlanes();
+       vf->Repaint();
+      }
+    }
+  }
+  else
+  {
+    anItem = myPosTable->item(theRow, 0);
+    Qt::ItemFlags flags = anItem->flags();
+    if ( isDefault )
+    {
+      myCutPlanes->SetDefault(theRow);
+      anIndex = aModel->index( theRow, 0 );
+      aModel->setData( anIndex, myCutPlanes->GetPlanePosition(theRow), Qt::DisplayRole );
+
+      /*if ( myPreviewCheck->isChecked() )
+        {
+        //not needed update presentation, because item->setFlags generates signal cellChanged() again
+        }*/
+      flags &= (~Qt::ItemIsEnabled );
+    }
+    else
+      flags |=  Qt::ItemIsEnabled;
+   
+    anItem->setFlags( flags );
+  }
+  
+  /*if (theCol == 0) {
+    bool isChanged = !anIndex.data().isNull();
+    QTableWidgetItem* anItem = myPosTable->item(theRow, 1);
+    if ( !anItem  )
+    {
+      anItem = new QTableWidgetItem();
+      myPosTable->setItem( theRow, 1, anItem );
+      Qt::ItemFlags flags = anItem->flags();
+      //flags |=  Qt::ItemIsUserCheckable;
+      flags &=  (~Qt::ItemIsEditable);
+      anItem->setFlags( flags );
+    }
+    anItem->setCheckState(!isChanged ? Qt::Checked : Qt::Unchecked);
 
     if (myPreviewCheck->isChecked()) {
       //Update Preview
       if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
-       myCutPlanes->SetPlanePosition( theRow, aTxt.toDouble());
+       myCutPlanes->SetPlanePosition( theRow, anIndex.data().toDouble());
        myCutPlanes->GetPipeLine()->Update();
        deletePlanes();
        createPlanes();
@@ -403,11 +508,20 @@ void VisuGUI_CutPlanesPane::onValueChanged (int theRow, int theCol)
       }
     }
   } else {
-    bool isDefault = ((QCheckTableItem*)myPosTable->item(theRow, theCol))->isChecked();
+    bool isDefault = myPosTable->item(theRow, 1)->checkState() == Qt::Checked;
+    QTableWidgetItem* anItem = myPosTable->item(theRow, 0);
+    if ( !anItem  )
+    {
+      anItem = new QTableWidgetItem();
+      myPosTable->setItem( theRow, 0, anItem );
+    }
+      
     if (isDefault) {
       myCutPlanes->SetDefault(theRow);
-      myPosTable->setText(theRow, 0, QString::number(myCutPlanes->GetPlanePosition(theRow)));
-
+      //myPosTable->setText(theRow, 0, QString::number(myCutPlanes->GetPlanePosition(theRow)));
+      anIndex = aModel->index( theRow, 0 );
+      aModel->setData( anIndex, myCutPlanes->GetPlanePosition(theRow), Qt::DisplayRole );
+      anItem->setFlags( anItem->flags() | Qt::ItemIsEnabled );
       if (myPreviewCheck->isChecked()) {
        if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
          //Update Preview
@@ -418,8 +532,9 @@ void VisuGUI_CutPlanesPane::onValueChanged (int theRow, int theCol)
        }
       }
     }
-    myPosTable->item(theRow, 0)->setEnabled(!isDefault);
-  }
+    //myPosTable->item(theRow, 0)->setEnabled(!isDefault);
+    anItem->setFlags( anItem->flags() &(~Qt::ItemIsEnabled ) );
+    }*/
 }
 
 void VisuGUI_CutPlanesPane::deletePlanes()
@@ -475,7 +590,7 @@ void VisuGUI_CutPlanesPane::onPreviewCheck (bool thePreview)
 VisuGUI_CutPlanesDlg::VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule)
   : VisuGUI_Prs3dDlg(theModule)
 {
-  setCaption("Cut Planes Definition");
+  setWindowTitle("Cut Planes Definition");
   setSizeGripEnabled(true);
 
   QVBoxLayout* TopLayout = new QVBoxLayout (this);
@@ -487,35 +602,36 @@ VisuGUI_CutPlanesDlg::VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule)
   myCutPane = new VisuGUI_CutPlanesPane(this/*, myMgr*/);
   myTabBox->addTab(myCutPane, "Cut Planes");
   myScalarPane = new VisuGUI_ScalarBarPane(this, false);
-  myScalarPane->setMargin(5);
+  if (myScalarPane->layout())
+    myScalarPane->layout()->setMargin(5);
   myInputPane = new VisuGUI_InputPane(VISU::TCUTPLANES, theModule, this);
   myTabBox->addTab(myScalarPane, "Scalar Bar");
   myTabBox->addTab(myInputPane, "Input");
 
   TopLayout->addWidget(myTabBox);
 
-  QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons");
+  QGroupBox* GroupButtons = new QGroupBox(this);
   GroupButtons->setGeometry(QRect(10, 10, 281, 48));
   GroupButtons->setTitle("");
-  GroupButtons->setColumnLayout(0, Qt::Vertical);
-  GroupButtons->layout()->setSpacing(0);
-  GroupButtons->layout()->setMargin(0);
-  QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
+  //GroupButtons->setColumnLayout(0, Qt::Vertical);
+  //GroupButtons->layout()->setSpacing(0);
+  //GroupButtons->layout()->setMargin(0);
+  QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons);
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6);
   GroupButtonsLayout->setMargin(11);
 
-  QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons, "buttonOk");
+  QPushButton* buttonOk = new QPushButton(tr("BUT_OK"), GroupButtons);
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
   GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
 
-  QPushButton* buttonCancel = new QPushButton(tr("&Cancel"), GroupButtons, "buttonCancel");
+  QPushButton* buttonCancel = new QPushButton(tr("BUT_CANCEL"), GroupButtons);
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
 
-  QPushButton* buttonHelp = new QPushButton(tr("&Help"), GroupButtons, "buttonHelp");
+  QPushButton* buttonHelp = new QPushButton(tr("BUT_HELP"), GroupButtons);
   buttonHelp->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
 
@@ -547,7 +663,7 @@ void VisuGUI_CutPlanesDlg::initFromPrsObject (VISU::ColoredPrs3d_i* thePrs, bool
   myCutPane->initFromPrsObject(myPrsCopy);
 
   myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentPage( 0 );
+  myTabBox->setCurrentIndex( 0 );
 }
 
 int VisuGUI_CutPlanesDlg::storeToPrsObject (VISU::ColoredPrs3d_i* thePrs)
@@ -597,10 +713,10 @@ void VisuGUI_CutPlanesDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
 
@@ -612,14 +728,14 @@ void VisuGUI_CutPlanesDlg::onHelp()
 
 //###################################################################
 
-QWidget* VisuGUI_NumEditItem::createEditor() const
+/*QWidget* VisuGUI_NumEditItem::createEditor() const
 {
   QLineEdit *editline = new QLineEdit(text(), table()->viewport());
   QDoubleValidator *dvalidator = new QDoubleValidator(table()->viewport());
   dvalidator->setDecimals(32);
   editline->setValidator(dvalidator);
   return editline;
-}
+}*/
 
 void VisuGUI_CutPlanesDlg::keyPressEvent( QKeyEvent* e )
 {
@@ -627,7 +743,7 @@ void VisuGUI_CutPlanesDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index e94a7bf61630bff30c629b71a165ef46c4afd279..5ceb79c30192f77a2860a3b3ac7ebebb36bb1cd1 100644 (file)
 
 #include <SALOME_Actor.h>
 
-#include <qspinbox.h>
-#include <qradiobutton.h>
-#include <qtable.h>
-#include <qtabwidget.h>
+#include <QtxDoubleSpinBox.h>
+
+#include <QFrame>
+
+class QSpinBox;
+class QRadioButton;
+class QTabWidget;
+class QTableWidget;
+class QCheckBox;
+
 
-#include <QtxDblSpinBox.h>
 
 #include "SALOMEconfig.h"
 #include CORBA_CLIENT_HEADER(VISU_Gen)
@@ -80,13 +85,13 @@ private:
     QLabel* LabelRot1;
     QLabel* LabelRot2;
     QSpinBox* nbPlan;
-    QtxDblSpinBox* Rot1;
-    QtxDblSpinBox* Rot2;
+    QtxDoubleSpinBox* Rot1;
+    QtxDoubleSpinBox* Rot2;
     QRadioButton* RBzx;
     QRadioButton* RByz;
     QRadioButton* RBxy;
-    QtxDblSpinBox* myPosSpn;
-    QTable* myPosTable;
+    QtxDoubleSpinBox* myPosSpn;
+    QTableWidget* myPosTable;
     VISU::CutPlanes_i* myCutPlanes;
     QCheckBox* myPreviewCheck;
     double          X1, X2;
@@ -137,14 +142,14 @@ private:
 };
 
 
-class VisuGUI_NumEditItem: public QTableItem
+/*class VisuGUI_NumEditItem: public QTableItem
 {
 public:
-    VisuGUI_NumEditItem(QTable* table, EditType et, const QString& text ):
+    VisuGUI_NumEditItem(QTableWidget* table, const QString& text ):
       QTableItem(table, et, text) {};
     ~VisuGUI_NumEditItem() {};
 
     QWidget* createEditor() const;
-};
+};*/
 
 #endif // VISUGUI_CUTPLANESDLG_H
index ad81e44c8aa87ddb1cb877518fba0eaee869b2f3..010030978eea86cba1adaab4e4500303e2866b4f 100644 (file)
 #include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
 
-#include <qlayout.h>
-#include <qtabwidget.h>
+#include <QLayout>
+#include <QDialog>
+#include <QGroupBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QTabWidget>
+#include <QKeyEvent>
 
 using namespace std;
 
@@ -53,7 +58,7 @@ using namespace std;
 VisuGUI_DeformedShapeDlg::VisuGUI_DeformedShapeDlg (SalomeApp_Module* theModule)
   : VisuGUI_Prs3dDlg(theModule)
 {
-  setCaption(tr("DLG_TITLE"));
+  setWindowTitle(tr("DLG_TITLE"));
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout (this);
@@ -63,9 +68,11 @@ VisuGUI_DeformedShapeDlg::VisuGUI_DeformedShapeDlg (SalomeApp_Module* theModule)
   myTabBox = new QTabWidget (this);
 
   // Deformed shape pane
-  QVBox* aBox = new QVBox (this);
-  aBox->setMargin(11);
-  QFrame* TopGroup = new QFrame (aBox, "TopGroup");
+  QWidget* aBox = new QWidget (this);
+  QVBoxLayout* aVBLay = new QVBoxLayout( aBox );
+  aVBLay->setMargin(11);
+  QFrame* TopGroup = new QFrame ( aBox );
+  aVBLay->addWidget( TopGroup );
   TopGroup->setFrameStyle(QFrame::Box | QFrame::Sunken);
   TopGroup->setLineWidth(1);
   QGridLayout* TopGroupLayout = new QGridLayout (TopGroup);
@@ -74,42 +81,43 @@ VisuGUI_DeformedShapeDlg::VisuGUI_DeformedShapeDlg (SalomeApp_Module* theModule)
   TopGroupLayout->setMargin(11);
 
   //   Scale factor
-  QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup, "ScaleLabel");
+  QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup );
   TopGroupLayout->addWidget(ScaleLabel, 0, 0);
 
-  ScalFact = new QtxDblSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
+  ScalFact = new QtxDoubleSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
   ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
-  ScalFact->setPrecision(38);
+  ScalFact->setDecimals(38);
   ScalFact->setValue(0.1);
   TopGroupLayout->addWidget(ScalFact, 0, 1);
 
   //   Magnitude coloring
-  UseMagn = new QCheckBox (tr("MAGNITUDE_COLORING"), TopGroup, "UseMagn");
+  UseMagn = new QCheckBox (tr("MAGNITUDE_COLORING"), TopGroup);
   UseMagn->setChecked(true);
-  TopGroupLayout->addMultiCellWidget(UseMagn, 1, 1, 0, 1);
+  TopGroupLayout->addWidget(UseMagn, 1, 0, 1, 2);
 
   myTabBox->addTab(aBox, tr("DEFORMED_SHAPE_TAB"));
 
   // Scalar bar pane
   myScalarPane = new VisuGUI_ScalarBarPane (this, false);
-  myScalarPane->setMargin(5);
+  if ( myScalarPane->layout() )
+    myScalarPane->layout()->setMargin(5);
   myInputPane = new VisuGUI_InputPane(VISU::TDEFORMEDSHAPE, theModule, this);
 
   myTabBox->addTab(myScalarPane, tr("SCALAR_BAR_TAB"));
   myTabBox->addTab(myInputPane, tr("INPUT_TAB"));
 
   // Buttons
-  QGroupBox* GroupButtons = new QGroupBox (this, "GroupButtons");
+  QGroupBox* GroupButtons = new QGroupBox (this);
   GroupButtons->setGeometry(QRect(10, 10, 281, 48));
-  GroupButtons->setColumnLayout(0, Qt::Vertical);
-  GroupButtons->layout()->setSpacing(0);
-  GroupButtons->layout()->setMargin(0);
-  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+  //oupButtons->setColumnLayout(0, Qt::Vertical);
+  //GroupButtons->layout()->setSpacing(0);
+  //GroupButtons->layout()->setMargin(0);
+  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6);
   GroupButtonsLayout->setMargin(11);
 
-  QPushButton* buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk");
+  QPushButton* buttonOk = new QPushButton (tr("BUT_OK"), GroupButtons);
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
@@ -117,11 +125,11 @@ VisuGUI_DeformedShapeDlg::VisuGUI_DeformedShapeDlg (SalomeApp_Module* theModule)
   GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding,
                                                QSizePolicy::Minimum), 0, 1);
 
-  QPushButton* buttonCancel = new QPushButton (tr("&Cancel") , GroupButtons, "buttonCancel");
+  QPushButton* buttonCancel = new QPushButton (tr("BUT_CANCEL") , GroupButtons);
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
 
-  QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons, "buttonHelp");
+  QPushButton* buttonHelp = new QPushButton (tr("BUT_HELP") , GroupButtons);
   buttonHelp->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
 
@@ -152,7 +160,7 @@ void VisuGUI_DeformedShapeDlg::initFromPrsObject (VISU::ColoredPrs3d_i* thePrs,
     return;
 
   myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentPage( 0 );
+  myTabBox->setCurrentIndex( 0 );
 }
 
 int VisuGUI_DeformedShapeDlg::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs) 
@@ -200,10 +208,10 @@ void VisuGUI_DeformedShapeDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
 
@@ -213,7 +221,7 @@ void VisuGUI_DeformedShapeDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index a832a9db59cc1b3307aa02dc1189fcc3885826af..e2c987252cb3b9765439b465e47d9a0558088746 100644 (file)
 
 #include "VisuGUI_Prs3dDlg.h"
 
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
 
-#include <qdialog.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
+#include <QCheckBox>
 
+
+class QTabWidget;
+
+
+
+class QtxDoubleSpinBox;
 class SalomeApp_Module;
 class VisuGUI_InputPane;
 
@@ -76,7 +77,7 @@ protected slots:
   void onHelp();
 
  private:
-    QtxDblSpinBox* ScalFact;
+    QtxDoubleSpinBox* ScalFact;
     QCheckBox* UseMagn;
     QTabWidget*            myTabBox;
     VisuGUI_ScalarBarPane* myScalarPane;
index 872fd6871d906c1553d70d4671d1a842c8b16056..3de04c6e5424eeb18e3f37867de7b2970470e64e 100644 (file)
 
 #include "VisuGUI_DialogRunner.h"
 
-#include <qdialog.h>
-#include <qapplication.h>
+#include <QDialog>
+#include <QEventLoop>
+#include <QEvent>
 
 VisuGUI_DialogRunner::VisuGUI_DialogRunner( QDialog* dlg )
 : QObject(),
-  myDlg( dlg ),
-  myInLoop( false )
+  myDlg( dlg )
 {
   if( myDlg )
   {
     connect( myDlg, SIGNAL( destroyed() ), this, SLOT( onDialogDelete() ) );
     myDlg->installEventFilter( this );
+    myEventLoop = new QEventLoop( this );
   }
 }
 
@@ -45,36 +46,31 @@ VisuGUI_DialogRunner::~VisuGUI_DialogRunner()
 
 int VisuGUI_DialogRunner::run( const bool modal )
 {
-  if( myInLoop || !myDlg )
+  if( myEventLoop->isRunning() || !myDlg )
     return -1;
 
   if( modal )
     return myDlg->exec();
 
-  myInLoop = true;
   myDlg->show();
-  qApp->enter_loop();
+  myEventLoop->exec();
   return myDlg->result();
 }
 
 void VisuGUI_DialogRunner::onDialogDelete()
 {
-  if( myInLoop )
-    qApp->exit_loop();
+  if( myEventLoop->isRunning() )
+    myEventLoop->quit();
 
   myDlg = 0;
-  myInLoop = false;
 }
 
 bool VisuGUI_DialogRunner::eventFilter( QObject* o, QEvent* e )
 {
   if( o==myDlg && e && ( e->type()==QEvent::Close || e->type()==QEvent::Hide ) )
   {
-    if( myInLoop && !myDlg->isMinimized() )
-    {
-      myInLoop = false;
-      qApp->exit_loop();
-    }
+    if( myEventLoop->isRunning() && !myDlg->isMinimized() )
+      myEventLoop->quit();
     return false;
   }
   else
index 6911fe0ae69171a1cc66a64787f445e61da33fe1..7932eb7e7a38c00dda5cfdc7212bf2b58955e8ca 100644 (file)
 #ifndef DIALOG_RUNNER_HEADER
 #define DIALOG_RUNNER_HEADER
 
-#include <qobject.h>
+#include <QObject>
 
 class QDialog;
+class QEventLoop;
 
 class VisuGUI_DialogRunner : public QObject
 {
@@ -42,8 +43,8 @@ private slots:
   void onDialogDelete();
 
 private:
-  QDialog*   myDlg;
-  bool       myInLoop;
+  QDialog*    myDlg;
+  QEventLoop* myEventLoop;
 };
 
 #endif
index 49df36c63ef334a1bad82cc441a2fc455938a542..0e4aadf4504fbb9d7a515a7d34ccab3e5591cdeb 100644 (file)
@@ -44,7 +44,9 @@
 #include <SalomeApp_Application.h>
 #include <SalomeApp_Study.h>
 
+#include <SUIT_ViewManager.h>
 #include <SUIT_MessageBox.h>
+#include <SUIT_Desktop.h>
 
 VisuGUI_Displayer::VisuGUI_Displayer( SalomeApp_Application* app )
 : LightApp_Displayer(),
@@ -64,7 +66,7 @@ SALOME_Prs* VisuGUI_Displayer::buildPresentation( const QString& theEntry, SALOM
   SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
 
   if(aStudy && aView){
-    _PTR(SObject) aSObject = aStudy->studyDS()->FindObjectID( theEntry.latin1() );
+    _PTR(SObject) aSObject = aStudy->studyDS()->FindObjectID( (const char*)theEntry.toLatin1() );
     CORBA::Object_var anObject = VISU::ClientSObjectToObject( aSObject );
     if( CORBA::is_nil( anObject ) )
       return 0;
@@ -98,7 +100,7 @@ SALOME_Prs* VisuGUI_Displayer::buildPresentation( const QString& theEntry, SALOM
            Handle(SALOME_InteractiveObject) anIO = aPrs3d->GetIO();
            if(anIO->hasEntry()){
              std::string anEntry = anIO->getEntry();
-             aPrs = LightApp_Displayer::buildPresentation( anEntry, aView );
+             aPrs = LightApp_Displayer::buildPresentation( anEntry.c_str(), aView );
            }
          }
        }
@@ -150,7 +152,7 @@ void VisuGUI_Displayer::buildPrs3d( SVTK_ViewWindow* theViewWindow, VISU::Prs3d_
       thePrs3d->RemoveActors();
 
       INFOS(exc.what());
-      SUIT_MessageBox::warn1
+      SUIT_MessageBox::warning
         (myApp->desktop(), QObject::tr("WRN_VISU"),
          QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
          QObject::tr("BUT_OK"));
@@ -173,7 +175,7 @@ bool VisuGUI_Displayer::addCurve( SPlot2d_Prs* prs, Plot2d_ViewWindow* wnd, VISU
   if( !vv )
     return false;
 
-  SPlot2d_Curve* curve = vv->getCurveByIO( vv->FindIObject( entry.latin1() ) );
+  SPlot2d_Curve* curve = vv->getCurveByIO( vv->FindIObject( (const char*)entry.toLatin1() ) );
   if( !curve )
   {
     curve = c->CreatePresentation();
@@ -255,7 +257,7 @@ bool VisuGUI_Displayer::canBeDisplayed( const QString& entry, const QString& vie
   if( !study )
     return false;
 
-  _PTR(SObject) obj = study->studyDS()->FindObjectID( entry.latin1() );
+  _PTR(SObject) obj = study->studyDS()->FindObjectID( (const char*)entry.toLatin1() );
   CORBA::Object_var anObj = VISU::ClientSObjectToObject( obj );
   if( CORBA::is_nil( anObj ) )
     return false;
index 9850d1f4f2f654d67a90f734a046725eb63e3531..aed321a40294c4e648d4010d2650b7d053dc0869 100644 (file)
 #include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
 
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <QLayout>
+#include <QCheckBox>
+#include <QGroupBox>
+#include <QPushButton>
+#include <QLabel>
+#include <QTreeWidget>
+#include <QToolButton>
+#include <QKeyEvent>
+
 
 using namespace std;
 
@@ -210,17 +214,19 @@ static QPixmap MYRightPix(right_xpm);
 
 
 VisuGUI_EditContainerDlg::VisuGUI_EditContainerDlg (VisuGUI* theModule, bool theIsModal)
-     : QDialog(VISU::GetDesktop(theModule), "VisuGUI_EditContainerDlg", theIsModal,
-               WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
+     : QDialog(VISU::GetDesktop(theModule), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
        myVisuGUI(theModule)
 {
+  setModal( theIsModal );
   if (!theIsModal) {
-    setWFlags(getWFlags() | WDestructiveClose);
+    setAttribute( Qt::WA_DeleteOnClose, true );
   }
-  setCaption("Edit Plot 2D Presentation");
+  setWindowTitle("Edit Plot 2D Presentation");
   setSizeGripEnabled(true);
 
-  QVBoxLayout* TopLayout = new QVBoxLayout (this, 6, 11);
+  QVBoxLayout* TopLayout = new QVBoxLayout (this );
+  TopLayout->setMargin( 6 );
+  TopLayout->setSpacing( 11);
 
   /***************************************************************/
   QFrame* aControlFrame = new QFrame (this);
@@ -229,34 +235,45 @@ VisuGUI_EditContainerDlg::VisuGUI_EditContainerDlg (VisuGUI* theModule, bool the
   QGridLayout* aControlLay = new QGridLayout (aControlFrame);
   aControlLay->setSpacing(6);
   aControlLay->setMargin(11);
-  aControlLay->addRowSpacing(1, 30);
-  aControlLay->addRowSpacing(4, 30);
+  //aControlLay->addRowSpacing(1, 30);
+  //aControlLay->addRowSpacing(4, 30);
   aControlLay->setRowStretch(1, 1);
   aControlLay->setRowStretch(4, 1);
-  aControlLay->addColSpacing(0, 180);
-  aControlLay->addColSpacing(2, 180);
+  //aControlLay->addColSpacing(0, 180);
+  //aControlLay->addColSpacing(2, 180);
 
   QLabel* aSelectLbl = new QLabel (tr("LBL_STUDY"), aControlFrame);
   aControlLay->addWidget(aSelectLbl, 0, 0);
 
-  myStudyLst = new QListView (aControlFrame);
-  myStudyLst->setSelectionMode(QListView::Extended);
-  myStudyLst->addColumn(tr("TXT_TABLE"), 80);
-  myStudyLst->addColumn(tr("TXT_CURVE"), 50);
-  myStudyLst->addColumn(tr(""), 0);
+  myStudyLst = new QTreeWidget (aControlFrame);
+  myStudyLst->setSelectionMode(QAbstractItemView::ExtendedSelection);
+  myStudyLst->setColumnCount( 3 );
+  QStringList aLabels;
+  aLabels.append( tr("TXT_TABLE") );
+  aLabels.append( tr("TXT_CURVE") );
+  aLabels.append( "" );
+  myStudyLst->setHeaderLabels( aLabels );
+  myStudyLst->setColumnWidth( 0, 80 );
+  myStudyLst->setColumnWidth( 1, 50 );
+  myStudyLst->setColumnWidth( 2, 0 );
+  
+  //myStudyLst->addColumn(tr("TXT_TABLE"), 80);
+  //myStudyLst->addColumn(tr("TXT_CURVE"), 50);
+  //myStudyLst->addColumn(tr(""), 0);
+  
   myStudyLst->setAllColumnsShowFocus(true);
   myStudyLst->setMinimumHeight(130);
-  connect(myStudyLst, SIGNAL(selectionChanged()), this, SLOT(onLeftSelected()));
-  aControlLay->addMultiCellWidget(myStudyLst, 1, 4, 0, 0);
+  connect(myStudyLst, SIGNAL(itemSelectionChanged()), this, SLOT(onLeftSelected()));
+  aControlLay->addWidget(myStudyLst, 1, 0, 5, 1);
 
   myRightBtn = new QToolButton (aControlFrame);
-  myRightBtn->setIconSet(MYRightPix);
+  myRightBtn->setIcon(MYRightPix);
   myRightBtn->setEnabled(false);
   connect(myRightBtn, SIGNAL(clicked()), this, SLOT(onRightClicked()));
   aControlLay->addWidget(myRightBtn, 2, 1);
 
   myLeftBtn = new QToolButton(aControlFrame);
-  myLeftBtn->setIconSet(MYLeftPix);
+  myLeftBtn->setIcon(MYLeftPix);
   myLeftBtn->setEnabled(false);
   connect(myLeftBtn, SIGNAL(clicked()), this, SLOT(onLeftClicked()));
   aControlLay->addWidget(myLeftBtn, 3, 1);
@@ -264,39 +281,46 @@ VisuGUI_EditContainerDlg::VisuGUI_EditContainerDlg (VisuGUI* theModule, bool the
   QLabel* aForceLbl = new QLabel (tr("LBL_CONTAINER"), aControlFrame);
   aControlLay->addWidget(aForceLbl, 0, 2);
 
-  myContainerLst = new QListView(aControlFrame);
-  myContainerLst->setSelectionMode(QListView::Extended);
-  myContainerLst->addColumn(tr("TXT_TABLE"), 80);
-  myContainerLst->addColumn(tr("TXT_CURVE"), 50);
-  myContainerLst->addColumn(tr(""), 0);
+  myContainerLst = new QTreeWidget(aControlFrame);
+  myContainerLst->setSelectionMode(QAbstractItemView::ExtendedSelection);
+  //myContainerLst->addColumn(tr("TXT_TABLE"), 80);
+  //myContainerLst->addColumn(tr("TXT_CURVE"), 50);
+  //myContainerLst->addColumn(tr(""), 0);
+  myContainerLst->setColumnCount( 3 );
+  myContainerLst->setHeaderLabels( aLabels );
+  myContainerLst->setColumnWidth( 0, 80 );
+  myContainerLst->setColumnWidth( 1, 50 );
+  myContainerLst->setColumnWidth( 2, 0 );
+
+  
   myContainerLst->setMinimumWidth(130);
-  connect(myContainerLst, SIGNAL(selectionChanged()), this, SLOT(onRightSelected()));
-  aControlLay->addMultiCellWidget(myContainerLst, 1, 4, 2, 2);
+  connect(myContainerLst, SIGNAL(itemSelectionChanged()), this, SLOT(onRightSelected()));
+  aControlLay->addWidget(myContainerLst, 1, 2, 3, 1);
 
   TopLayout->addWidget(aControlFrame);
 
   // Common buttons ===========================================================
-  QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons");
-  GroupButtons->setColumnLayout(0, Qt::Vertical);
-  GroupButtons->layout()->setSpacing(0);
-  GroupButtons->layout()->setMargin(0);
-  QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
+  QGroupBox* GroupButtons = new QGroupBox(this);
+  //GroupButtons->setColumnLayout(0, Qt::Vertical);
+  //GroupButtons->layout()->setSpacing(0);
+  //GroupButtons->layout()->setMargin(0);
+  QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons);
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6);
   GroupButtonsLayout->setMargin(11);
 
-  QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons, "buttonOk");
+  QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons);
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
   GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding,
                                               QSizePolicy::Minimum), 0, 1);
 
-  QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons, "buttonCancel");
+  QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons);
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
 
-  QPushButton* buttonHelp = new QPushButton(tr("&Help") , GroupButtons, "buttonHelp");
+  QPushButton* buttonHelp = new QPushButton(tr("&Help") , GroupButtons);
   buttonHelp->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
 
@@ -314,20 +338,24 @@ void VisuGUI_EditContainerDlg::initFromPrsObject (VISU::Container_i* theContaine
   if (!aVisuSO) {
     return;
   }
-  QValueList<CurveStruct> aStudyCurves;
-  QValueList<CurveStruct> aContainerCurves;
+  QList<CurveStruct> aStudyCurves;
+  QList<CurveStruct> aContainerCurves;
   // Find curves in container
   for (int i = 1; i <= theContainer->GetNbCurves(); i++) {
     VISU::Curve_i* aCurve = theContainer->GetCurve(i);
     if (aCurve == NULL) continue;
     CurveStruct aEntry;
     aEntry.CurveName = aCurve->GetTitle();
-    aEntry.CurveEntry = aCurve->GetEntry();
+    aEntry.CurveEntry = aCurve->GetEntry().c_str();
     _PTR(SObject) aTableSO = aStudy->FindObjectID(aCurve->GetTableID());
     if (!aTableSO) continue;
     aEntry.TableName = getSObjectName(aTableSO);
     aContainerCurves.append(aEntry);
-    new QListViewItem(myContainerLst, aEntry.TableName, aEntry.CurveName, aEntry.CurveEntry);
+    QStringList aList;
+    aList.append( aEntry.TableName );
+    aList.append( aEntry.CurveName );
+    aList.append( aEntry.CurveEntry );
+    new QTreeWidgetItem(myContainerLst, aList);
   }
   // Find curves in study
   _PTR(ChildIterator) aIter = aStudy->NewChildIterator(aVisuSO);
@@ -347,8 +375,8 @@ void VisuGUI_EditContainerDlg::initFromPrsObject (VISU::Container_i* theContaine
     }
   }
   //Show Curves which are not in Curve
-  QValueList<CurveStruct>::iterator it;
-  QValueList<CurveStruct>::iterator it2;
+  QList<CurveStruct>::iterator it;
+  QList<CurveStruct>::iterator it2;
   bool isExist = false;
   for (it = aStudyCurves.begin(); it != aStudyCurves.end(); ++it) {
     for (it2 = aContainerCurves.begin(); it2 != aContainerCurves.end(); ++it2) {
@@ -356,7 +384,13 @@ void VisuGUI_EditContainerDlg::initFromPrsObject (VISU::Container_i* theContaine
        break;
     }
     if (!isExist)
-      new QListViewItem(myStudyLst, (*it).TableName, (*it).CurveName, (*it).CurveEntry);
+    {
+      QStringList aList;
+      aList.append( (*it).TableName );
+      aList.append( (*it).CurveName );
+      aList.append( (*it).CurveEntry );
+      new QTreeWidgetItem(myStudyLst, aList );
+    }
   }
 }
 
@@ -365,9 +399,13 @@ void VisuGUI_EditContainerDlg::storeToPrsObject (VISU::Container_i* theContainer
   theContainer->Clear();
 
   _PTR(Study) aStudy = VISU::GetCStudy(VISU::GetAppStudy(myVisuGUI));
-  QListViewItem* anItem = myContainerLst->firstChild();
-  while (anItem) {
-    _PTR(SObject) aCurveSO = aStudy->FindObjectID(anItem->text(2).latin1());
+  QTreeWidgetItem* anItem;
+  for ( int i= 0; i< myContainerLst->topLevelItemCount(); i++  )
+  {
+    anItem = myContainerLst->topLevelItem( i );
+    if ( !anItem )
+      continue;
+    _PTR(SObject) aCurveSO = aStudy->FindObjectID((const char*)anItem->text(2).toLatin1());
     if (aCurveSO) {
       CORBA::Object_var aObject = VISU::ClientSObjectToObject(aCurveSO);
       if (!CORBA::is_nil(aObject)) {
@@ -375,7 +413,6 @@ void VisuGUI_EditContainerDlg::storeToPrsObject (VISU::Container_i* theContainer
        if (aCurve) theContainer->AddCurve(aCurve->_this());
       }
     }
-    anItem = anItem->nextSibling();
   }
 }
 
@@ -393,7 +430,7 @@ QString VisuGUI_EditContainerDlg::getSObjectName (_PTR(SObject) theSObject)
 
 void VisuGUI_EditContainerDlg::onLeftClicked()
 {
-  QListViewItem* anItem = myContainerLst->firstChild();
+  /*QListViewItem* anItem = myContainerLst->firstChild();
   while (anItem) {
     if (anItem->isSelected()) {
       QListViewItem* anTmpItem = anItem;
@@ -403,12 +440,24 @@ void VisuGUI_EditContainerDlg::onLeftClicked()
     } else {
       anItem = anItem->nextSibling();
     }
+    }*/
+  QList<QTreeWidgetItem*> selItem = myContainerLst->selectedItems();
+  QList<QTreeWidgetItem*>::Iterator anIt = selItem.begin();
+
+  QList<QTreeWidgetItem*> topSelectedItems;
+  for ( ; anIt != selItem.end(); anIt++  )
+  {
+    int index = myContainerLst->indexOfTopLevelItem( *anIt );
+    if ( index != -1 )
+      topSelectedItems.append( myContainerLst->takeTopLevelItem( index ) );
   }
+
+  myStudyLst->addTopLevelItems(topSelectedItems);
 }
 
 void VisuGUI_EditContainerDlg::onRightClicked()
 {
-  QListViewItem* anItem = myStudyLst->firstChild();
+  /*QListViewItem* anItem = myStudyLst->firstChild();
   while (anItem) {
     if (anItem->isSelected()) {
       QListViewItem* anTmpItem = anItem;
@@ -418,35 +467,29 @@ void VisuGUI_EditContainerDlg::onRightClicked()
     } else {
       anItem = anItem->nextSibling();
     }
+    }*/
+  QList<QTreeWidgetItem*> selItem = myStudyLst->selectedItems();
+  QList<QTreeWidgetItem*>::Iterator anIt = selItem.begin();
+
+  QList<QTreeWidgetItem*> topSelectedItems;
+  for ( ; anIt != selItem.end(); anIt++  )
+  {
+    int index = myStudyLst->indexOfTopLevelItem( *anIt );
+    if ( index != -1 )
+      topSelectedItems.append( myStudyLst->takeTopLevelItem( index ) );
   }
+
+  myContainerLst->addTopLevelItems(topSelectedItems);
 }
 
 void VisuGUI_EditContainerDlg::onLeftSelected()
 {
-  QListViewItem* anItem = myStudyLst->firstChild();
-  bool isSelected = false;
-  while (anItem) {
-    if (anItem->isSelected()) {
-      isSelected = true;
-      break;
-    }
-    anItem = anItem->nextSibling();
-  }
-  myRightBtn->setEnabled(isSelected);
+  myRightBtn->setEnabled( myStudyLst->selectedItems().count() > 0 );
 }
 
 void VisuGUI_EditContainerDlg::onRightSelected()
 {
-  QListViewItem* anItem = myContainerLst->firstChild();
-  bool isSelected = false;
-  while (anItem) {
-    if (anItem->isSelected()) {
-      isSelected = true;
-      break;
-    }
-    anItem = anItem->nextSibling();
-  }
-  myLeftBtn->setEnabled(isSelected);
+  myRightBtn->setEnabled( myContainerLst->selectedItems().count() > 0 );
 }
 
 void VisuGUI_EditContainerDlg::onHelp()
@@ -462,10 +505,10 @@ void VisuGUI_EditContainerDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             QObject::tr("BUT_OK"));
   }
 }
 
@@ -475,7 +518,7 @@ void VisuGUI_EditContainerDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index 0ff26c94db55c7ceae04329e78f62957af11f246..64e77113777901d7640d8bd2bc6fd2306545de3b 100644 (file)
 #ifndef VISUGUI_EDITCONTAINER_H
 #define VISUGUI_EDITCONTAINER_H
 
-#include <qdialog.h>
-#include <qlistview.h>
-#include <qvaluevector.h>
-#include <qtoolbutton.h>
+#include <QDialog>
+#include <QVector>
+
+class QTreeWidget;
+class QToolButton;
+
 
 #include "SALOMEDSClient_SObject.hxx"
 
@@ -69,8 +71,8 @@ class VisuGUI_EditContainerDlg: public QDialog
  private:
   QString getSObjectName (_PTR(SObject) theSObject);
 
-  QListView*   myStudyLst;
-  QListView*   myContainerLst;
+  QTreeWidget* myStudyLst;
+  QTreeWidget* myContainerLst;
   QToolButton* myLeftBtn;
   QToolButton* myRightBtn;
 
index 50c42cdc7ac8387bc8cf9331a33f14c688c4b006..8a2ac8d6b8abadd7348d9346677b32934ef94e44 100644 (file)
@@ -67,7 +67,7 @@ bool VisuGUI_FieldFilter::isOk( const SUIT_DataOwner* theDataOwner ) const
       return true;
 
     _PTR(Study) aStudy = anAppStudy->studyDS();
-    _PTR(SObject) aSObject = aStudy->FindObjectID( anOwner->entry() );
+    _PTR(SObject) aSObject = aStudy->FindObjectID( (const char*)anOwner->entry().toLatin1() );
     if (!aSObject)
       return false;
 
@@ -100,9 +100,9 @@ bool VisuGUI_FieldFilter::isOk( const SUIT_DataOwner* theDataOwner ) const
 
       VISU::ColoredPrs3dHolder::BasicInput anInput;
       anInput.myResult = aResult;
-      anInput.myMeshName = CORBA::string_dup( aMeshName.latin1() );
+      anInput.myMeshName = CORBA::string_dup( (const char*)aMeshName.toLatin1() );
       anInput.myEntity = (VISU::Entity)anEntity;
-      anInput.myFieldName = CORBA::string_dup( aFieldName.latin1() );
+      anInput.myFieldName = CORBA::string_dup( (const char*)aFieldName.toLatin1() );
       anInput.myTimeStampNumber = 1;
 
       size_t isOk = VISU::CheckIsPossible( myType, anInput, true );
index 5bf734b291c864f8e0788bb143e17fc66fefbea0..81465bbe56cc6f154be0bee673123aa101cebd63 100644 (file)
 //  $Header: /dn05/salome/CVS/SALOME_ROOT/SALOME/src/VISUGUI/Visu_FileDlg.cxx
 
 
-#include <qapplication.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qstring.h>
-#include <qlabel.h>
+#include <QApplication>
+#include <QPushButton>
+#include <QCheckBox>
+#include <QString>
+#include <QLabel>
 
 #include "VISUConfig.hh"
 #include "VisuGUI_FileDlg.h"
@@ -47,11 +47,13 @@ VisuGUI_FileDlg::VisuGUI_FileDlg (QWidget* parent,
   SUIT_FileDlg(parent, open, showQuickDir, modal)
 { 
   myCBuildAll = new QCheckBox (tr("FULL_LOAD"), this);
+
   QLabel* label = new QLabel("", this);
   label->setMaximumWidth(0);
   QPushButton* pb = new QPushButton(this);               
   pb->setMaximumWidth(0);
   addWidgets( label, myCBuildAll, pb );
+  
   bool toBuildAll = VISU::GetResourceMgr()->booleanValue("VISU", "full_med_loading", false);
   if (toBuildAll) myCBuildAll->setChecked(true);
 }
@@ -72,14 +74,17 @@ bool VisuGUI_FileDlg::processPath( const QString& path )
     QFileInfo fi( path );
     if ( fi.exists() ) {
       if ( fi.isFile() )
-       setSelection( path );
+      {
+        setDirectory( fi.absoluteDir().absolutePath() );
+       selectFile( fi.fileName() );
+      }
       else if ( fi.isDir() )
-       setDir( path );
+       setDirectory( path );
       return true;
     }
     else {
-      if ( QFileInfo( fi.dirPath() ).exists() ) {
-       setDir( fi.dirPath() );
+      if ( QFileInfo( fi.absoluteDir().absolutePath() ).exists() ) {
+       setDirectory( fi.absoluteDir().absolutePath() );
        return true;
       }
     }
@@ -100,7 +105,7 @@ QString VisuGUI_FileDlg::getFileName( QWidget*           parent,
 {            
   VisuGUI_FileDlg* fd = new VisuGUI_FileDlg( parent, open, showQuickDir, true );    
   if ( !caption.isEmpty() )
-    fd->setCaption( caption );
+    fd->setWindowTitle( caption );
   if ( !initial.isEmpty() ) { 
     fd->processPath( initial ); // VSR 24/03/03 check for existing of directory has been added to avoid QFileDialog's bug
   }
index 8097d4681dab28a78467551bd5c32505c5f49305..e00c6593dd9569b32efda1508ddbab33d4dd9514 100644 (file)
 #include "SUIT_MessageBox.h"
 #include "SVTK_FontWidget.h"
 
-#include "QtxDblSpinBox.h"
-
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qfiledialog.h>
-#include <qvalidator.h>
-#include <qcolordialog.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qcombobox.h>
-#include <qtoolbutton.h>
-#include <qtabwidget.h>
+#include "QtxDoubleSpinBox.h"
+
+#include <QLayout>
+#include <QTabWidget>
+#include <QButtonGroup>
+#include <QRadioButton>
+#include <QFileDialog>
+#include <QValidator>
+#include <QColorDialog>
+#include <QGroupBox>
+#include <QCheckBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QLineEdit>
+#include <QSpinBox>
+#include <QComboBox>
+#include <QToolButton>
+#include <QTabWidget>
+#include <QKeyEvent>
 
 #include <vtkPolyData.h>
 #include <vtkDataSet.h>
 using namespace std;
 
 VisuGUI_GaussScalarBarPane::VisuGUI_GaussScalarBarPane (QWidget * parent, bool SetPref):
-  QVBox(parent)
+  QWidget(parent)
 {
   myVerX = 0.01;  myVerY = 0.10;  myVerW = 0.10;  myVerH = 0.80;
   myHorX = 0.20;  myHorY = 0.01;  myHorW = 0.60;  myHorH = 0.12;
   Imin = 0.0; Imax = 0.0;
   myRangeMode = -1;
 
-  setSpacing(6);
+  QVBoxLayout* aMainLayout = new QVBoxLayout( this );
+  aMainLayout->setSpacing(6);
   //setMargin(11);
 
   // Active bar ========================================================
-  QGroupBox* ActiveBarGroup = new QGroupBox (tr("ACTIVE_BAR_GRP"), this, "ActiveBarGroup");
-  ActiveBarGroup->setColumnLayout(0, Qt::Vertical );
-  ActiveBarGroup->layout()->setSpacing( 0 );
-  ActiveBarGroup->layout()->setMargin( 0 );
-  QGridLayout* ActiveBarGroupLayout = new QGridLayout( ActiveBarGroup->layout() );
+  QGroupBox* ActiveBarGroup = new QGroupBox (tr("ACTIVE_BAR_GRP"), this );
+  aMainLayout->addWidget(ActiveBarGroup);
+  //ActiveBarGroup->setColumnLayout(0, Qt::Vertical );
+  //ActiveBarGroup->layout()->setSpacing( 0 );
+  //ActiveBarGroup->layout()->setMargin( 0 );
+  QGridLayout* ActiveBarGroupLayout = new QGridLayout( ActiveBarGroup );
   ActiveBarGroupLayout->setAlignment( Qt::AlignTop );
   ActiveBarGroupLayout->setSpacing( 6 );
   ActiveBarGroupLayout->setMargin( 11 );
 
-  QButtonGroup* BarTypeGroup = new QButtonGroup( 2, Qt::Vertical, ActiveBarGroup, "BarTypeGroup" );
-  BarTypeGroup->setRadioButtonExclusive( true );
-  BarTypeGroup->setFrameStyle( QFrame::NoFrame );
-  BarTypeGroup->layout()->setMargin( 0 );
+  QButtonGroup* BarTypeGroup = new QButtonGroup( ActiveBarGroup );
+  QGroupBox* aGB = new QGroupBox( ActiveBarGroup );
+  QVBoxLayout* aVBLay = new QVBoxLayout( aGB );
+  
+  BarTypeGroup->setExclusive( true );
+  //aGB->setFrameStyle( QFrame::NoFrame );
+  aVBLay->setMargin( 0 );
+
+  myRBLocal = new QRadioButton( tr( "LOCAL" ), aGB );
+  myRBGlobal = new QRadioButton( tr( "GLOBAL" ), aGB );
+  aVBLay->addWidget( myRBLocal );
+  aVBLay->addWidget( myRBGlobal );
 
-  myRBLocal = new QRadioButton( tr( "LOCAL" ), BarTypeGroup );
-  myRBGlobal = new QRadioButton( tr( "GLOBAL" ), BarTypeGroup );
+  BarTypeGroup->addButton( myRBLocal );
+  BarTypeGroup->addButton( myRBGlobal );
 
   myCBDisplayed = new QCheckBox( tr( "DISPLAYED" ), ActiveBarGroup );
 
-  ActiveBarGroupLayout->addMultiCellWidget( BarTypeGroup, 0, 1, 0, 0 );
+  ActiveBarGroupLayout->addWidget( aGB, 0, 0, 2, 1 );
   ActiveBarGroupLayout->addWidget( myCBDisplayed, 1, 1 );
 
   // Range ============================================================
-  RangeGroup = new QButtonGroup (tr("SCALAR_RANGE_GRP"), this, "RangeGroup");
-  RangeGroup->setColumnLayout(0, Qt::Vertical );
-  RangeGroup->layout()->setSpacing( 0 );
-  RangeGroup->layout()->setMargin( 0 );
-  QGridLayout* RangeGroupLayout = new QGridLayout( RangeGroup->layout() );
+  RangeGroup = new QButtonGroup ( this );
+  aGB = new QGroupBox( tr("SCALAR_RANGE_GRP"), this );
+  aMainLayout->addWidget(aGB);
+  //RangeGroup->setColumnLayout(0, Qt::Vertical );
+  //RangeGroup->layout()->setSpacing( 0 );
+  //RangeGroup->layout()->setMargin( 0 );
+  QGridLayout* RangeGroupLayout = new QGridLayout( aGB );
   RangeGroupLayout->setAlignment( Qt::AlignTop );
   RangeGroupLayout->setSpacing( 6 );
   RangeGroupLayout->setMargin( 11 );
 
-  myModeLbl = new QLabel("Scalar Mode", RangeGroup);
+  myModeLbl = new QLabel("Scalar Mode", aGB);
 
-  myModeCombo = new QComboBox(RangeGroup);
+  myModeCombo = new QComboBox(aGB);
 
   RangeGroupLayout->addWidget( myModeLbl, 0, 0 );
   RangeGroupLayout->addWidget( myModeCombo, 0, 1 );
@@ -128,36 +141,51 @@ VisuGUI_GaussScalarBarPane::VisuGUI_GaussScalarBarPane (QWidget * parent, bool S
   //TopLayout->addWidget( RangeGroup );
 
   // Colors and Labels ========================================================
-  QGroupBox* ColLabGroup = new QGroupBox (tr("COLORS_LABELS_GRP"), this, "ColLabGroup");
-  ColLabGroup->setColumnLayout(0, Qt::Vertical );
-  ColLabGroup->layout()->setSpacing( 0 );
-  ColLabGroup->layout()->setMargin( 0 );
-  QGridLayout* ColLabGroupLayout = new QGridLayout( ColLabGroup->layout() );
+  QGroupBox* ColLabGroup = new QGroupBox (tr("COLORS_LABELS_GRP"), this );
+  aMainLayout->addWidget(ColLabGroup);
+  //ColLabGroup->setColumnLayout(0, Qt::Vertical );
+  //ColLabGroup->layout()->setSpacing( 0 );
+  //ColLabGroup->layout()->setMargin( 0 );
+  QGridLayout* ColLabGroupLayout = new QGridLayout( ColLabGroup );
   ColLabGroupLayout->setAlignment( Qt::AlignTop );
   ColLabGroupLayout->setSpacing( 6 );
   ColLabGroupLayout->setMargin( 11 );
 
-  QButtonGroup* TypeGroup = new QButtonGroup( 2, Qt::Vertical, ColLabGroup, "TypeGroup" );
-  TypeGroup->setRadioButtonExclusive( true );
-  TypeGroup->setFrameStyle( QFrame::NoFrame );
-  TypeGroup->layout()->setMargin( 0 );
-
-  BicolorButton = new QRadioButton( tr( "BICOLOR" ), TypeGroup );
-  RainbowButton = new QRadioButton( tr( "RAINBOW" ), TypeGroup );
-
-  ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup, "ColorLabel");
-  ColorSpin = new QSpinBox( 2, 256, 1, ColLabGroup );
+  QButtonGroup* TypeGroup = new QButtonGroup( ColLabGroup );
+  aGB = new QGroupBox ( ColLabGroup );
+  aVBLay = new QVBoxLayout( aGB );
+  TypeGroup->setExclusive( true );
+  //aGB->setFrameStyle( QFrame::NoFrame );
+  aVBLay->setMargin( 0 );
+
+  BicolorButton = new QRadioButton( tr( "BICOLOR" ), aGB );
+  aVBLay->addWidget( BicolorButton );
+  TypeGroup->addButton( BicolorButton );
+  RainbowButton = new QRadioButton( tr( "RAINBOW" ), aGB );
+  aVBLay->addWidget( RainbowButton );
+  TypeGroup->addButton( RainbowButton );
+
+  ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup );
+  ColorSpin = new QSpinBox( ColLabGroup );
+  ColorSpin->setMaximum( 2 );
+  ColorSpin->setMinimum( 256 );
+  ColorSpin->setSingleStep( 1 );
+  
+  
   ColorSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   ColorSpin->setMinimumWidth( 70 );
   ColorSpin->setValue( 64 );
 
-  LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup, "LabelLabel");
-  LabelSpin = new QSpinBox( 2, 65, 1, ColLabGroup );
+  LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup);
+  LabelSpin = new QSpinBox( ColLabGroup );
+  LabelSpin->setMaximum( 2 );
+  LabelSpin->setMinimum( 65 );
+  LabelSpin->setSingleStep( 1 );
   LabelSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   LabelSpin->setMinimumWidth( 70 );
   LabelSpin->setValue( 5 );
 
-  ColLabGroupLayout->addMultiCellWidget( TypeGroup, 0, 1, 0, 0);
+  ColLabGroupLayout->addWidget( aGB, 0, 0, 2, 1);
   ColLabGroupLayout->addWidget( ColorLabel, 1, 1);
   ColLabGroupLayout->addWidget( ColorSpin,  1, 2);
   ColLabGroupLayout->addWidget( LabelLabel, 1, 3);
@@ -166,41 +194,47 @@ VisuGUI_GaussScalarBarPane::VisuGUI_GaussScalarBarPane (QWidget * parent, bool S
   //TopLayout->addWidget( ColLabGroup );
 
   // Orientation ==========================================================
-  QButtonGroup* OrientGroup = new QButtonGroup (tr("ORIENTATION_GRP"), this, "OrientGroup");
-  OrientGroup->setColumnLayout(0, Qt::Vertical );
-  OrientGroup->layout()->setSpacing( 0 );
-  OrientGroup->layout()->setMargin( 0 );
-  QGridLayout* OrientGroupLayout = new QGridLayout( OrientGroup->layout() );
+  QButtonGroup* OrientGroup = new QButtonGroup ( this );
+  aGB = new QGroupBox( tr("ORIENTATION_GRP"), this  );
+  aMainLayout->addWidget(aGB);
+  //OrientGroup->setColumnLayout(0, Qt::Vertical );
+  //OrientGroup->layout()->setSpacing( 0 );
+  //OrientGroup->layout()->setMargin( 0 );
+  QGridLayout* OrientGroupLayout = new QGridLayout( aGB );
   OrientGroupLayout->setAlignment( Qt::AlignTop );
   OrientGroupLayout->setSpacing( 6 );
   OrientGroupLayout->setMargin( 11 );
 
-  RBvert = new QRadioButton (tr("VERTICAL_BTN"), OrientGroup, "RBvert");
+  RBvert = new QRadioButton (tr("VERTICAL_BTN"), aGB );
   RBvert->setChecked( true );
-  RBhori = new QRadioButton (tr("HORIZONTAL_BTN"), OrientGroup, "RBhori");
+  OrientGroup->addButton( RBvert );
+  RBhori = new QRadioButton (tr("HORIZONTAL_BTN"), aGB);
+  OrientGroup->addButton( RBhori
+                          );
   OrientGroupLayout->addWidget( RBvert, 0, 0 );
   OrientGroupLayout->addWidget( RBhori, 0, 1 );
 
   //  TopLayout->addWidget( OrientGroup );
 
   // Origin ===============================================================
-  QGroupBox* OriginGroup = new QGroupBox (tr("ORIGIN_GRP"), this, "OriginGroup");
-  OriginGroup->setColumnLayout(0, Qt::Vertical );
-  OriginGroup->layout()->setSpacing( 0 );
-  OriginGroup->layout()->setMargin( 0 );
-  QGridLayout* OriginGroupLayout = new QGridLayout( OriginGroup->layout() );
+  QGroupBox* OriginGroup = new QGroupBox (tr("ORIGIN_GRP"), this );
+  aMainLayout->addWidget( OriginGroup );
+  //OriginGroup->setColumnLayout(0, Qt::Vertical );
+  //OriginGroup->layout()->setSpacing( 0 );
+  //OriginGroup->layout()->setMargin( 0 );
+  QGridLayout* OriginGroupLayout = new QGridLayout( OriginGroup );
   OriginGroupLayout->setAlignment( Qt::AlignTop );
   OriginGroupLayout->setSpacing( 6 );
   OriginGroupLayout->setMargin( 11 );
 
-  QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup, "XLabel");
-  XSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+  QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup );
+  XSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
   XSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   XSpin->setMinimumWidth( 70 );
   XSpin->setValue( 0.01 );
 
-  QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup, "YLabel");
-  YSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+  QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup );
+  YSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
   YSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   YSpin->setMinimumWidth( 70 );
   YSpin->setValue( 0.01 );
@@ -213,29 +247,30 @@ VisuGUI_GaussScalarBarPane::VisuGUI_GaussScalarBarPane (QWidget * parent, bool S
   //TopLayout->addWidget( OriginGroup );
 
   // Dimensions =========================================================
-  QGroupBox* DimGroup = new QGroupBox (tr("DIMENSIONS_GRP"), this, "DimGroup");
-  DimGroup->setColumnLayout(0, Qt::Vertical );
-  DimGroup->layout()->setSpacing( 0 );
-  DimGroup->layout()->setMargin( 0 );
-  QGridLayout* DimGroupLayout = new QGridLayout( DimGroup->layout() );
+  QGroupBox* DimGroup = new QGroupBox (tr("DIMENSIONS_GRP"), this );
+  aMainLayout->addWidget( DimGroup );
+  //DimGroup->setColumnLayout(0, Qt::Vertical );
+  //DimGroup->layout()->setSpacing( 0 );
+  //DimGroup->layout()->setMargin( 0 );
+  QGridLayout* DimGroupLayout = new QGridLayout( DimGroup );
   DimGroupLayout->setAlignment( Qt::AlignTop );
   DimGroupLayout->setSpacing( 6 );
   DimGroupLayout->setMargin( 11 );
 
-  QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup, "WidthLabel");
-  WidthSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, DimGroup );
+  QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup );
+  WidthSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
   WidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   WidthSpin->setMinimumWidth( 70 );
   WidthSpin->setValue( 0.1 );
 
-  QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup, "HeightLabel");
-  HeightSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, DimGroup );
+  QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup );
+  HeightSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
   HeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   HeightSpin->setMinimumWidth( 70 );
   HeightSpin->setValue( 0.8 );
 
-  QLabel* SpacingLabel = new QLabel (tr("LBL_SPACING"), DimGroup, "SpacingLabel");
-  SpacingSpin = new QtxDblSpinBox( 0.0, 1.0, 0.01, DimGroup );
+  QLabel* SpacingLabel = new QLabel (tr("LBL_SPACING"), DimGroup );
+  SpacingSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.01, DimGroup );
   SpacingSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   SpacingSpin->setMinimumWidth( 70 );
   SpacingSpin->setValue( 0.01 );
@@ -250,16 +285,23 @@ VisuGUI_GaussScalarBarPane::VisuGUI_GaussScalarBarPane (QWidget * parent, bool S
   //TopLayout->addWidget( DimGroup );
 
   // Save check box ===========================================================
-  QHBox* aSaveBox = new QHBox(this);
+  QWidget* aSaveBox = new QWidget(this);
+  aMainLayout->addWidget( aSaveBox );
+
+  QHBoxLayout* aHBoxLay = new QHBoxLayout( aSaveBox );
+  
   if (!SetPref) {
-    CBSave = new QCheckBox (tr("SAVE_DEFAULT_CHK"), aSaveBox, "CBSave");
-    //TopLayout->addWidget(CBSave);
+    CBSave = new QCheckBox (tr("SAVE_DEFAULT_CHK"), aSaveBox);
+    aHBoxLay->addWidget(CBSave);
   }
   else {
     CBSave = 0;
   }
   myTextBtn = new QPushButton("Text properties...", aSaveBox);
+  aHBoxLay->addWidget( myTextBtn );
+  
   myTextDlg = new VisuGUI_TextPrefDlg(this);
+  aMainLayout->addWidget( myTextDlg );
   myTextDlg->setTitleVisible(!SetPref);
 
   // signals and slots connections ===========================================
@@ -288,7 +330,7 @@ void VisuGUI_GaussScalarBarPane::onSetDisplayGlobal()
  * Initialise dialog box from presentation object
  */
 void VisuGUI_GaussScalarBarPane::initFromPrsObject(VISU::GaussPoints_i* thePrs) {
-  myModeCombo->setCurrentItem(thePrs->GetScalarMode());
+  myModeCombo->setCurrentIndex(thePrs->GetScalarMode());
   setPosAndSize( thePrs->GetPosX(),
                 thePrs->GetPosY(),
                 thePrs->GetWidth(),
@@ -322,29 +364,29 @@ void VisuGUI_GaussScalarBarPane::initFromPrsObject(VISU::GaussPoints_i* thePrs)
   int aNbComp = thePrs->GetField()->myNbComp;
   bool isScalarMode = (aNbComp > 1);
   myModeCombo->clear();
-  myModeCombo->insertItem("<Modulus>");
+  myModeCombo->addItem("<Modulus>");
   const VISU::PField& aField = thePrs->GetField();
   const VISU::TNames& aCompNames = aField->myCompNames;
   const VISU::TNames& aUnitNames = aField->myUnitNames;
   for(int i = 0; i < aNbComp; i++){
-    QString aComponent = QString(aCompNames[i].c_str()).simplifyWhiteSpace();
+    QString aComponent = QString(aCompNames[i].c_str()).simplified();
     if(aComponent.isNull() || aComponent == "")
       aComponent = "Component " + QString::number(i+1);
     else
       aComponent = "[" + QString::number(i+1) + "] " + aComponent;
 
-    QString anUnit = QString(aUnitNames[i].c_str()).simplifyWhiteSpace();
+    QString anUnit = QString(aUnitNames[i].c_str()).simplified();
     if(anUnit.isNull() || anUnit == "")
       anUnit = "-";
     
     aComponent = aComponent + ", " + anUnit;
 
-    myModeCombo->insertItem(aComponent);
+    myModeCombo->addItem(aComponent);
   }
   //
-  myModeCombo->setCurrentItem(thePrs->GetScalarMode());
+  myModeCombo->setCurrentIndex(thePrs->GetScalarMode());
   if (aNbComp==1){
-    myModeCombo->setCurrentItem(1);
+    myModeCombo->setCurrentIndex(1);
   }
   //
   myModeLbl->setEnabled(isScalarMode);
@@ -376,7 +418,7 @@ void VisuGUI_GaussScalarBarPane::initFromPrsObject(VISU::GaussPoints_i* thePrs)
  * Store values to presentation object
  */
 int VisuGUI_GaussScalarBarPane::storeToPrsObject(VISU::GaussPoints_i* thePrs) {
-  thePrs->SetScalarMode(myModeCombo->currentItem());
+  thePrs->SetScalarMode(myModeCombo->currentIndex());
   thePrs->SetPosition(XSpin->value(), YSpin->value());
   thePrs->SetSize(WidthSpin->value(), HeightSpin->value());
   thePrs->SetSpacing(SpacingSpin->value());
@@ -392,7 +434,7 @@ int VisuGUI_GaussScalarBarPane::storeToPrsObject(VISU::GaussPoints_i* thePrs) {
 
   if (myIsStoreTextProp) {
     // "Title"
-    thePrs->SetTitle(myTextDlg->getTitleText().latin1());
+    thePrs->SetTitle((const char*)myTextDlg->getTitleText().toLatin1());
 
     QColor aTitColor (255, 255, 255);
     int aTitleFontFamily = VTK_ARIAL;
@@ -457,12 +499,12 @@ void VisuGUI_GaussScalarBarPane::changeDefaults( int )
 */
 void VisuGUI_GaussScalarBarPane::XYChanged( double )
 {
-  QtxDblSpinBox* snd = (QtxDblSpinBox*)sender();
+  QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
   if ( snd == XSpin ) {
-    WidthSpin->setMaxValue( 1.0 - XSpin->value() );
+    WidthSpin->setMaximum( 1.0 - XSpin->value() );
   }
   if ( snd == YSpin ) {
-    HeightSpin->setMaxValue( 1.0 - YSpin->value() );
+    HeightSpin->setMaximum( 1.0 - YSpin->value() );
   }
 }
 
@@ -551,8 +593,8 @@ void VisuGUI_GaussScalarBarPane::onTextPref()
 VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule, bool SetPref):
   VisuGUI_Prs3dDlg(theModule)
 {
-  setName("VisuGUI_ScalarBarDlg");
-  setCaption(SetPref ? tr("DLG_PREF_TITLE") : tr("DLG_PROP_TITLE"));
+  //setName("VisuGUI_ScalarBarDlg");
+  setWindowTitle(SetPref ? tr("DLG_PREF_TITLE") : tr("DLG_PROP_TITLE"));
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout(this);
@@ -561,48 +603,63 @@ VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule, bool
 
 
   // Presentation
-  QButtonGroup* PrsGroup = new QButtonGroup( 3, Qt::Horizontal, tr( "PRS_TITLE" ), this, "PrimitiveTypeGroup" );
-  PrsGroup->setRadioButtonExclusive( true );
-  PrsGroup->layout()->setMargin( 11 );
-  PrsGroup->layout()->setSpacing(6);
-
-  myResultsButton = new QRadioButton( tr( "RESULTS" ), PrsGroup );
-  myGeometryButton = new QRadioButton( tr( "GEOMETRY" ), PrsGroup );
-  myDefShapeButton = new QRadioButton( tr( "DEFORMED_SHAPE" ), PrsGroup );
+  QButtonGroup* PrsGroup = new QButtonGroup( this );
+  QGroupBox* aGB = new QGroupBox( tr( "PRS_TITLE" ), this );
+  QHBoxLayout* aHBLay = new QHBoxLayout( aGB );
+  PrsGroup->setExclusive( true );
+  aHBLay->setMargin( 11 );
+  aHBLay->setSpacing(6);
+
+  myResultsButton = new QRadioButton( tr( "RESULTS" ), aGB );
+  myGeometryButton = new QRadioButton( tr( "GEOMETRY" ), aGB );
+  myDefShapeButton = new QRadioButton( tr( "DEFORMED_SHAPE" ), aGB );
+  aHBLay->addWidget( myResultsButton );
+  aHBLay->addWidget( myGeometryButton );
+  aHBLay->addWidget( myDefShapeButton );
+
+  PrsGroup->addButton( myResultsButton );
+  PrsGroup->addButton( myGeometryButton );
+  PrsGroup->addButton( myDefShapeButton );
+  
 
   myTabBox = new QTabWidget (this);
 
   // Gauss points pane
-  QVBox* aBox = new QVBox (this);
-  aBox->setMargin(11);
-  aBox->setSpacing(6);
+  QWidget* aBox = new QWidget (this);
+  QVBoxLayout* aVBLay = new QVBoxLayout( aBox );
+  aVBLay->setMargin(11);
+  aVBLay->setSpacing(6);
 
   // Primitive
   myPrimitiveBox = new VVTK_PrimitiveBox( aBox );
+  aVBLay->addWidget( myPrimitiveBox );
 
   // Size
   mySizeBox = new VVTK_SizeBox( aBox );
+  aVBLay->addWidget( mySizeBox );
 
   // Deformed Shape
   myDefShapeBox = new QGroupBox( tr( "DEFORMED_SHAPE_TITLE" ), aBox );
-  myDefShapeBox->setColumnLayout(0, Qt::Vertical );
-  myDefShapeBox->layout()->setSpacing( 0 );
-  myDefShapeBox->layout()->setMargin( 0 );
+  aVBLay->addWidget( myDefShapeBox );
+  //myDefShapeBox->setColumnLayout(0, Qt::Vertical );
+  //myDefShapeBox->layout()->setSpacing( 0 );
+  //myDefShapeBox->layout()->setMargin( 0 );
 
-  QGridLayout* aDefShapeLayout = new QGridLayout( myDefShapeBox->layout() );
+  QGridLayout* aDefShapeLayout = new QGridLayout( myDefShapeBox );
   aDefShapeLayout->setAlignment(Qt::AlignTop);
   aDefShapeLayout->setSpacing(6);
   aDefShapeLayout->setMargin(11);
 
   QLabel* aScaleLabel = new QLabel( tr( "SCALE_FACTOR" ), myDefShapeBox );
-  myScaleSpinBox = new QtxDblSpinBox( 0.0, 10.0, 0.1, myDefShapeBox );
+  myScaleSpinBox = new QtxDoubleSpinBox( 0.0, 10.0, 0.1, myDefShapeBox );
 
   aDefShapeLayout->addWidget( aScaleLabel, 0, 0 );
   aDefShapeLayout->addWidget( myScaleSpinBox, 0, 1 );
 
   // Scalar Bar pane
   myScalarPane = new VisuGUI_GaussScalarBarPane(this, SetPref);
-  myScalarPane->setMargin(5);
+  if ( myScalarPane->layout() )
+    myScalarPane->layout()->setMargin(5);
 
   // Input pane
   myInputPane = new VisuGUI_InputPane(VISU::TGAUSSPOINTS, theModule, this);
@@ -618,30 +675,30 @@ VisuGUI_GaussPointsDlg::VisuGUI_GaussPointsDlg(SalomeApp_Module* theModule, bool
   myTabBox->addTab(myInputPane, tr("INPUT_TAB"));
 
   // Common buttons ===========================================================
-  QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
-  GroupButtons->setColumnLayout(0, Qt::Vertical );
-  GroupButtons->layout()->setSpacing( 0 );
-  GroupButtons->layout()->setMargin( 0 );
-  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+  QGroupBox* GroupButtons = new QGroupBox( this );
+  //GroupButtons->setColumnLayout(0, Qt::Vertical );
+  //GroupButtons->layout()->setSpacing( 0 );
+  //GroupButtons->layout()->setMargin( 0 );
+  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
   GroupButtonsLayout->setSpacing( 6 );
   GroupButtonsLayout->setMargin( 11 );
 
-  QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+  QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons );
   buttonOk->setAutoDefault( TRUE );
   buttonOk->setDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
 
-  QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+  QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons );
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
 
-  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons );
   buttonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
-  TopLayout->addWidget( PrsGroup );
+  TopLayout->addWidget( aGB );
   TopLayout->addWidget( myTabBox );
   TopLayout->addWidget( GroupButtons );
 
@@ -691,7 +748,7 @@ void VisuGUI_GaussPointsDlg::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs, boo
     return;
 
   myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentPage( 0 );
+  myTabBox->setCurrentIndex( 0 );
 }
 
 int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::ColoredPrs3d_i* thePrs )
@@ -767,7 +824,7 @@ void VisuGUI_GaussPointsDlg::accept()
       QString aWarning = "The number of faces needed to perform the 'Geometrical Sphere' primitive\n";
       aWarning.append( "presentation might be too important to ensure an acceptable frame rate.\n\n" );
       aWarning.append( "Can you please confirm that you want to continue anyway?" );
-      if( SUIT_MessageBox::warn2( this, tr( "Warning" ), aWarning, tr( "&OK" ), tr( "&Cancel" ), 0, 1, 1 ) == 1 )
+      if( SUIT_MessageBox::warning( this, tr( "Warning" ), aWarning, tr( "&OK" ), tr( "&Cancel" ), 0, 1, 1 ) == 1 )
        return;
     }
 
@@ -811,10 +868,10 @@ void VisuGUI_GaussPointsDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
 
@@ -824,7 +881,7 @@ void VisuGUI_GaussPointsDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index bf117d7c75c7df3fcdf528ffcd2d1a83b70b7493..41cb4ac690d4a3cbaed0b22c6cc453b58e1eb23e 100644 (file)
@@ -30,9 +30,7 @@
 
 #include "VisuGUI_Prs3dDlg.h"
 
-#include <qvbox.h>
-
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 
 class SalomeApp_Module;
 class VVTK_PrimitiveBox;
@@ -47,7 +45,7 @@ namespace VISU
 
 //! Specific Scalar Bar tab.
 /*! Uses for set up Gauss Points Scalar Bars preferenses. */
-class VisuGUI_GaussScalarBarPane : public QVBox
+class VisuGUI_GaussScalarBarPane : public QWidget//QVBox
 {
   Q_OBJECT
 
@@ -75,12 +73,12 @@ class VisuGUI_GaussScalarBarPane : public QVBox
   QRadioButton*   RBhori;
   QRadioButton*   RBvert;
 
-  QtxDblSpinBox*  XSpin;
-  QtxDblSpinBox*  YSpin;
+  QtxDoubleSpinBox*  XSpin;
+  QtxDoubleSpinBox*  YSpin;
 
-  QtxDblSpinBox*  WidthSpin;
-  QtxDblSpinBox*  HeightSpin;
-  QtxDblSpinBox*  SpacingSpin;
+  QtxDoubleSpinBox*  WidthSpin;
+  QtxDoubleSpinBox*  HeightSpin;
+  QtxDoubleSpinBox*  SpacingSpin;
 
   QRadioButton*   BicolorButton;
   QRadioButton*   RainbowButton;
@@ -153,7 +151,7 @@ private:
   VVTK_SizeBox*            mySizeBox;
 
   QGroupBox*               myDefShapeBox;
-  QtxDblSpinBox*           myScaleSpinBox;
+  QtxDoubleSpinBox*           myScaleSpinBox;
 
   SALOME::GenericObjPtr<VISU::GaussPoints_i> myPrsCopy;
 };
index 1ee34f36e8466fb2303c953bbb1acdec1d3989e0..dbb530e52ef4d4d3c5703a3f4675adcff2ed506c 100644 (file)
 #include "SALOMEDSClient_AttributeString.hxx"
 #include "SALOMEDSClient_AttributeName.hxx"
 
-#include "QtxListBox.h"
+//#include "QtxListBox.h"
 
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QToolButton>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QKeyEvent>
+#include <QListWidget>
 
 
 //---------------------------------------------------------------
-class VisuGUI_ListBox: public QtxListBox
+class VisuGUI_ListWidget: public QListWidget
 {
  public:
-  VisuGUI_ListBox( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ):
-    QtxListBox(parent, name, f
+  VisuGUI_ListWidget( QWidget * parent = 0 ):
+    QListWidget(parent 
   {};
 
   virtual QSize sizeHint() const 
@@ -82,13 +84,15 @@ VisuGUI_InputPane::VisuGUI_InputPane( VISU::VISUType theType,
   myDialog( theDialog ),
   myPrs( NULL )
 {
-  setFrameStyle( QFrame::NoFrame );
+  //setFrameStyle( QFrame::NoFrame );
 
   LightApp_SelectionMgr* aSelectionMgr = VISU::GetSelectionMgr(theModule);
 
   connect( aSelectionMgr, SIGNAL( selectionChanged() ), SLOT( onSelectionChanged() ) );
 
-  QGridLayout* aMainLayout = new QGridLayout( this, 1, 1, 11, 6 ); 
+  QGridLayout* aMainLayout = new QGridLayout( this );
+  aMainLayout->setMargin( 11 );
+  aMainLayout->setSpacing( 6 );
 
   // Definition of data source
   myDataSourceGroupBox = new QGroupBox( this );
@@ -96,11 +100,11 @@ VisuGUI_InputPane::VisuGUI_InputPane( VISU::VISUType theType,
   myDataSourceGroupBox->setTitle( tr( "PRS_DATA_SOUIRCE" ) );
   {
     QGroupBox* aGroupBox = myDataSourceGroupBox;
-    aGroupBox->setColumnLayout(0, Qt::Vertical );
-    aGroupBox->layout()->setSpacing( 6 );
-    aGroupBox->layout()->setMargin( 11 );
+    //aGroupBox->setColumnLayout(0, Qt::Vertical );
+    //aGroupBox->layout()->setSpacing( 6 );
+    //aGroupBox->layout()->setMargin( 11 );
 
-    QGridLayout* aGroupBoxLayout = new QGridLayout( aGroupBox->layout() );
+    QGridLayout* aGroupBoxLayout = new QGridLayout( aGroupBox );
     aGroupBoxLayout->setAlignment( Qt::AlignTop );
     {
       QLabel* aLabel = new QLabel( tr( "MED_FILE" ), aGroupBox );
@@ -109,7 +113,10 @@ VisuGUI_InputPane::VisuGUI_InputPane( VISU::VISUType theType,
       myMedFile = new QLineEdit( aGroupBox );
       myMedFile->setReadOnly( true );
       myMedFile->setEnabled( false );
-      myMedFile->setPaletteForegroundColor( Qt::black );
+      QPalette aPal = myMedFile->palette();
+      aPal.setColor( myMedFile->backgroundRole(), Qt::black );
+      myMedFile->setPalette( aPal );
+      //myMedFile->setPaletteForegroundColor( Qt::black );
       aGroupBoxLayout->addWidget( myMedFile, 0, 1 );
     }
     {
@@ -119,7 +126,10 @@ VisuGUI_InputPane::VisuGUI_InputPane( VISU::VISUType theType,
       myMeshName = new QLineEdit( aGroupBox );
       myMeshName->setReadOnly( true );
       myMeshName->setEnabled( false );
-      myMeshName->setPaletteForegroundColor( Qt::black );
+      QPalette aPal = myMeshName->palette();
+      aPal.setColor( myMeshName->backgroundRole(), Qt::black );
+      myMeshName->setPalette( aPal );
+      //myMeshName->setPaletteForegroundColor( Qt::black );
       aGroupBoxLayout->addWidget( myMeshName, 1, 1 );
     }
     {
@@ -129,7 +139,10 @@ VisuGUI_InputPane::VisuGUI_InputPane( VISU::VISUType theType,
       myEntityName = new QLineEdit( aGroupBox );
       myEntityName->setReadOnly( true );
       myEntityName->setEnabled( false );
-      myEntityName->setPaletteForegroundColor( Qt::black );
+      QPalette aPal = myEntityName->palette();
+      aPal.setColor( myEntityName->backgroundRole(), Qt::black );
+      myEntityName->setPalette( aPal );
+      //myEntityName->setPaletteForegroundColor( Qt::black );
       aGroupBoxLayout->addWidget( myEntityName, 2, 1 );
     }
     {
@@ -160,31 +173,31 @@ VisuGUI_InputPane::VisuGUI_InputPane( VISU::VISUType theType,
   myUseGroupsGroupBox->setCheckable( TRUE );
   {
     QGroupBox* aGroupBox = myUseGroupsGroupBox;
-    aGroupBox->setColumnLayout(0, Qt::Vertical );
-    aGroupBox->layout()->setSpacing( 6 );
-    aGroupBox->layout()->setMargin( 11 );
+    //aGroupBox->setColumnLayout(0, Qt::Vertical );
+    //aGroupBox->layout()->setSpacing( 6 );
+    //aGroupBox->layout()->setMargin( 11 );
 
-    QGridLayout* aGroupBoxLayout = new QGridLayout( aGroupBox->layout() );
+    QGridLayout* aGroupBoxLayout = new QGridLayout( aGroupBox );
     aGroupBoxLayout->setAlignment( Qt::AlignTop );
     {
-      myAllGroups = new VisuGUI_ListBox(aGroupBox, "myAllGroups");
-      myAllGroups->setSelectionMode(QListBox::Extended);
-      aGroupBoxLayout->addMultiCellWidget( myAllGroups, 0, 3, 0, 0 );
+      myAllGroups = new VisuGUI_ListWidget(aGroupBox);
+      myAllGroups->setSelectionMode(QAbstractItemView::ExtendedSelection);
+      aGroupBoxLayout->addWidget( myAllGroups, 0, 0, 4, 1 );
     }
     {
-      mySelectedGroups = new VisuGUI_ListBox(aGroupBox, "mySelectedGroups");
-      mySelectedGroups->setSelectionMode(QListBox::Extended);
+      mySelectedGroups = new VisuGUI_ListWidget(aGroupBox );
+      mySelectedGroups->setSelectionMode(QAbstractItemView::ExtendedSelection);
       mySelectedGroups->installEventFilter(this);
-      aGroupBoxLayout->addMultiCellWidget( mySelectedGroups, 0, 3, 2, 2 );
+      aGroupBoxLayout->addWidget( mySelectedGroups, 0, 2, 4, 1 );
     }
     {
       myAddButton = new QToolButton(aGroupBox);
-      myAddButton->setPixmap( VISU::GetResourceMgr()->loadPixmap("VISU", tr("ICON_ADD")) );
+      myAddButton->setIcon( VISU::GetResourceMgr()->loadPixmap("VISU", tr("ICON_ADD")) );
       aGroupBoxLayout->addWidget( myAddButton, 1, 1 );
     }
     {
       myRemoveButton = new QToolButton(aGroupBox);
-      myRemoveButton->setPixmap( VISU::GetResourceMgr()->loadPixmap("VISU", tr("ICON_REMOVE")) );
+      myRemoveButton->setIcon( VISU::GetResourceMgr()->loadPixmap("VISU", tr("ICON_REMOVE")) );
       aGroupBoxLayout->addWidget( myRemoveButton, 2, 1 );
     }
     {
@@ -199,8 +212,8 @@ VisuGUI_InputPane::VisuGUI_InputPane( VISU::VISUType theType,
 
   connect( myReInit, SIGNAL( toggled( bool ) ), SLOT( onReInitialize( bool ) ) );
   connect( myUseGroupsGroupBox, SIGNAL( toggled( bool ) ), this, SLOT( onTypeChanged() ) );
-  connect( myAllGroups,  SIGNAL( doubleClicked( QListBoxItem* ) ), this, SLOT( onListDoubleClicked( QListBoxItem* ) ) );
-  connect( mySelectedGroups,  SIGNAL( doubleClicked( QListBoxItem* ) ), this, SLOT( onListDoubleClicked( QListBoxItem* ) ) );
+  connect( myAllGroups,  SIGNAL( itemDoubleClicked( QListWidgetItem* ) ), this, SLOT( onListDoubleClicked( QListWidgetItem* ) ) );
+  connect( mySelectedGroups,  SIGNAL( itemDoubleClicked( QListWidgetItem* ) ), this, SLOT( onListDoubleClicked( QListWidgetItem* ) ) );
   connect( myAddButton, SIGNAL(clicked()), this, SLOT(onAdd()));
   connect( myRemoveButton, SIGNAL(clicked()), this, SLOT(onRemove()));
 
@@ -240,7 +253,7 @@ bool VisuGUI_InputPane::eventFilter (QObject* object, QEvent* event)
 {
   if (event->type() == QEvent::KeyPress) {
     QKeyEvent* aKeyEvent = (QKeyEvent*)event;
-    if (object == mySelectedGroups && aKeyEvent->key() == Key_Delete)
+    if (object == mySelectedGroups && aKeyEvent->key() == Qt::Key_Delete)
       onRemove();
   }
   return QObject::eventFilter(object, event);
@@ -274,14 +287,18 @@ void VisuGUI_InputPane::onAdd()
 {
   QStringList aList;
   
-  for (int i = 0; i < myAllGroups->count(); i++)
-    if (myAllGroups->isSelected(i))
-      aList.append(myAllGroups->text(i));
-
+  //for (int i = 0; i < myAllGroups->count(); i++)
+  //  if (myAllGroups->isSelected(i))
+  //    aList.append(myAllGroups->text(i));
+  QList<QListWidgetItem*> aItemList = myAllGroups->selectedItems();
+  QList<QListWidgetItem*>::Iterator it = aItemList.begin();
+  for ( ; it != aItemList.end(); it++ )
+    aList.append( (*it)->text() );  
+  
   for (int i = 0; i < mySelectedGroups->count(); i++)
-    aList.remove(mySelectedGroups->text(i));
+    aList.removeAll(mySelectedGroups->item(i)->text());
     
-  mySelectedGroups->insertStringList(aList);
+  mySelectedGroups->insertItems( mySelectedGroups->count(), aList);
 }
 
 
@@ -291,11 +308,12 @@ void VisuGUI_InputPane::onAdd()
 */
 void VisuGUI_InputPane::onRemove()
 {
-  QPtrList<QListBoxItem> aList;
-  aList.setAutoDelete(false);
-  for (int i = 0; i < mySelectedGroups->count(); i++)
-    if (mySelectedGroups->isSelected(i))
-      aList.append(mySelectedGroups->item(i));
+  QList<QListWidgetItem*> aList = mySelectedGroups->selectedItems();
+  
+  //aList.setAutoDelete(false);
+  //for (int i = 0; i < mySelectedGroups->count(); i++)
+  //  if (mySelectedGroups->isSelected(i))
+  //    aList.append(mySelectedGroups->item(i));
   
   for (int i = 0; i < aList.count(); i++)
     delete aList.at(i);
@@ -306,16 +324,17 @@ void VisuGUI_InputPane::onRemove()
 /*!
   Called when an item of listbox is double-clicked
 */
-void VisuGUI_InputPane::onListDoubleClicked( QListBoxItem* theItem )
+void VisuGUI_InputPane::onListDoubleClicked( QListWidgetItem* theItem )
 {
-  QListBox* aListBox = theItem->listBox();
+  QListWidget* aListWidget = theItem->listWidget();
 
-  if (aListBox == myAllGroups)
+  if (aListWidget == myAllGroups)
     {
-      if (!mySelectedGroups->findItem( theItem->text(), Qt::ExactMatch ))
-       mySelectedGroups->insertItem(theItem->text());
+      QList<QListWidgetItem*> aList = mySelectedGroups->findItems( theItem->text(), Qt::MatchExactly );
+      if ( aList.isEmpty() )
+       mySelectedGroups->insertItem( mySelectedGroups->count(), theItem->text()  );
     }
-  else if (aListBox == mySelectedGroups)
+  else if (aListWidget == mySelectedGroups)
     delete theItem;
 }
 
@@ -395,7 +414,7 @@ void VisuGUI_InputPane::onSelectionChanged()
       if( VISU::getValue(aChildObj, "myComment") == "TIMESTAMP" )
       {
        aTimeStampName = aChildObj->GetName().c_str();
-       myTimeStamps->insertItem( aTimeStampName );
+       myTimeStamps->addItem( aTimeStampName );
       }
     }
 
@@ -411,14 +430,14 @@ void VisuGUI_InputPane::onSelectionChanged()
     myMeshName->setText( aMeshName );
     myEntityName->setText( anEntityName );
     myFieldName->setText( aFieldName );
-    myTimeStamps->setCurrentItem( 0 );
+    myTimeStamps->setCurrentIndex( 0 );
 
     if( myReInit->isChecked() && myPrs )
     {
       myPrs->SetResultObject( myResult );
-      myPrs->SetMeshName( aMeshName.latin1() );
+      myPrs->SetMeshName( (const char*)aMeshName.toLatin1() );
       myPrs->SetEntity( VISU::Entity( myEntity ) );
-      myPrs->SetFieldName( aFieldName.latin1() );
+      myPrs->SetFieldName( (const char*)aFieldName.toLatin1() );
       myPrs->SetTimeStampNumber( myPrs->GetTimeStampNumberByIndex( 0 ) );
       myPrs->Apply( true );
 
@@ -454,7 +473,7 @@ void VisuGUI_InputPane::initFromPrsObject( VISU::ColoredPrs3d_i* thePrs )
   {
     VISU::ColoredPrs3d::TimeStampInfo anInfo = aTimeStampsRange[ index ];
     QString aTime = anInfo.myTime.in();
-    myTimeStamps->insertItem( aTime );
+    myTimeStamps->addItem( aTime );
   }
 
   myResult = thePrs->GetResultObject();
@@ -484,9 +503,9 @@ void VisuGUI_InputPane::initFromPrsObject( VISU::ColoredPrs3d_i* thePrs )
 
   myMeshName->setText( thePrs->GetMeshName() );
   myFieldName->setText( thePrs->GetFieldName() );
-  myTimeStamps->setCurrentItem( thePrs->GetTimeStampIndexByNumber( aTimeStampNumber ) );
+  myTimeStamps->setCurrentIndex( thePrs->GetTimeStampIndexByNumber( aTimeStampNumber ) );
 
-  myFieldFilter->setPrs3dEntry( thePrs->GetHolderEntry() );
+  myFieldFilter->setPrs3dEntry( thePrs->GetHolderEntry().c_str() );
   bool anIsTimeStampFixed = myPrs->IsTimeStampFixed();
   myDataSourceGroupBox->setEnabled(!anIsTimeStampFixed);
   if(!anIsTimeStampFixed)
@@ -503,19 +522,19 @@ void VisuGUI_InputPane::initFromPrsObject( VISU::ColoredPrs3d_i* thePrs )
     VISU::TGroupMap::const_iterator aGroupIter = aGroupMap.begin();
     for(; aGroupIter != aGroupMap.end(); aGroupIter++){
       const std::string& aGroupName = aGroupIter->first;
-      myAllGroups->insertItem(QString(aGroupName));
+      myAllGroups->insertItem( myAllGroups->count(), aGroupName.c_str());
     }
   }
 
   if(myAllGroups->count() < 1){
-    myAllGroups->insertItem( tr("NO_GROUPS") );
+    myAllGroups->insertItem( myAllGroups->count(), tr("NO_GROUPS") );
     myUseGroupsGroupBox->setEnabled(false);
   }else if(VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(thePrs)){
     const VISU::ScalarMap_i::TGroupNames& aGroupNames = aPrs->GetGroupNames();
     VISU::ScalarMap_i::TGroupNames::const_iterator anIter = aGroupNames.begin();
     for(; anIter != aGroupNames.end(); anIter++){
       const std::string aGroupName = *anIter;
-      mySelectedGroups->insertItem(QString(aGroupName));
+      mySelectedGroups->insertItem(mySelectedGroups->count(), aGroupName.c_str());
     }      
   }
   myUseGroupsGroupBox->setChecked(mySelectedGroups->count() > 0);
@@ -530,17 +549,17 @@ int VisuGUI_InputPane::storeToPrsObject( VISU::ColoredPrs3d_i* thePrs )
     if(myUseGroupsGroupBox->isChecked()){
       aPrs->RemoveAllGeom();
       for(int i = 0; i < mySelectedGroups->count(); i++)
-       aPrs->AddMeshOnGroup(mySelectedGroups->text(i) );
+       aPrs->AddMeshOnGroup( (const char*)mySelectedGroups->item(i)->text().toLatin1() );
     }else
       aPrs->SetSourceGeometry();
   }
 
   thePrs->SetResultObject( myResult );
 
-  thePrs->SetMeshName( myMeshName->text().latin1() );
+  thePrs->SetMeshName( (const char*)myMeshName->text().toLatin1() );
   thePrs->SetEntity( VISU::Entity( myEntity ) );
-  thePrs->SetFieldName( myFieldName->text().latin1() );
-  thePrs->SetTimeStampNumber( thePrs->GetTimeStampNumberByIndex( myTimeStamps->currentItem() ) );
+  thePrs->SetFieldName( (const char*)myFieldName->text().toLatin1() );
+  thePrs->SetTimeStampNumber( thePrs->GetTimeStampNumberByIndex( myTimeStamps->currentIndex() ) );
   return ( int )thePrs->Apply( false );
 }
 
index 47a0cf8c6f6301e771b8c065b9cb56ccd49f670c..57c66bbdbb32d8e50eba26d6439c83bbd9a28eef 100644 (file)
 
 #include "SALOME_ListIO.hxx"
 
-#include <qgroupbox.h>
+#include <QGroupBox>
 
 class QCheckBox;
 class QComboBox;
 class QLineEdit;
-class QListBoxItem;
+class QListWidgetItem;
 class QToolButton;
 
 class SalomeApp_Module;
 class LightApp_SelectionMgr;
 
-class VisuGUI_ListBox;
+class VisuGUI_ListWidget;
 class VisuGUI_Prs3dDlg;
 class VisuGUI_FieldFilter;
 
@@ -78,7 +78,7 @@ public slots:
 
 private slots:
   void               onTypeChanged();
-  void               onListDoubleClicked( QListBoxItem* theItem );
+  void               onListDoubleClicked( QListWidgetItem* theItem );
   void               onAdd();
   void               onRemove();
 
@@ -88,8 +88,8 @@ private:
   VISU::ColoredPrs3d_i* myPrs;
 
   QGroupBox*         myUseGroupsGroupBox;
-  VisuGUI_ListBox*   myAllGroups;
-  VisuGUI_ListBox*   mySelectedGroups;
+  VisuGUI_ListWidget* myAllGroups;
+  VisuGUI_ListWidget* mySelectedGroups;
   QToolButton*       myAddButton;
   QToolButton*       myRemoveButton;
 
index 9b629c450ebb80c190d15d88782071aeb301884e..98e42fba4930d64316f7d2b53ac16b0295a90a3c 100644 (file)
 
 #include <limits.h>
 
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qtabwidget.h>
+#include <QLayout>
+#include <QValidator>
+#include <QLabel>
+#include <QGroupBox>
+#include <QSpinBox>
+#include <QPushButton>
+#include <QCheckBox>
+#include <QLineEdit>
+#include <QTabWidget>
+#include <QKeyEvent>
+
+
 
 using namespace std;
 
 
 VisuGUI_IsoSurfPane::VisuGUI_IsoSurfPane (QWidget* parent)
-     : QVBox(parent)
+     : QWidget(parent)
 {
-  QFrame* TopGroup = new QFrame( this, "TopGroup" );
+  QVBoxLayout* aMainLayout = new QVBoxLayout( this );
+  QFrame* TopGroup = new QFrame( this );
+  aMainLayout->addWidget( TopGroup );
+  
   TopGroup->setFrameStyle(QFrame::Box | QFrame::Sunken);
   TopGroup->setLineWidth(1);
 
@@ -62,15 +74,18 @@ VisuGUI_IsoSurfPane::VisuGUI_IsoSurfPane (QWidget* parent)
   TopGroupLayout->setSpacing( 6 );
   TopGroupLayout->setMargin( 11 );
 
-  QLabel* LabelNbr = new QLabel (tr("NB_SURFACES"), TopGroup, "LabelNbr");
+  QLabel* LabelNbr = new QLabel (tr("NB_SURFACES"), TopGroup);
   TopGroupLayout->addWidget( LabelNbr, 0, 0 );
-  NbrIso = new QSpinBox( 1, 100, 1, TopGroup, "NbrIso" );
+  NbrIso = new QSpinBox( TopGroup );
+  NbrIso->setMaximum( 100 );
+  NbrIso->setMinimum( 1 );
+  NbrIso->setSingleStep( 1 );
   NbrIso->setValue( 1 );
   TopGroupLayout->addWidget( NbrIso, 0, 1 );
 
-  QLabel* LabelMin = new QLabel (tr("MIN_VALUE"), TopGroup, "LabelMin");
+  QLabel* LabelMin = new QLabel (tr("MIN_VALUE"), TopGroup );
   TopGroupLayout->addWidget(LabelMin, 1, 0);
-  //MinIso = new QtxDblSpinBox( -DBL_MAX, DBL_MAX, 0.1, TopGroup );
+  //MinIso = new QtxDoubleSpinBox( -DBL_MAX, DBL_MAX, 0.1, TopGroup );
   MinIso = new QLineEdit( TopGroup );
   MinIso->setValidator( new QDoubleValidator(TopGroup) );
   MinIso->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
@@ -78,7 +93,7 @@ VisuGUI_IsoSurfPane::VisuGUI_IsoSurfPane (QWidget* parent)
   LabelMin->setBuddy(MinIso);
   TopGroupLayout->addWidget( MinIso, 1, 1 );
 
-  QLabel* LabelMax = new QLabel (tr("MAX_VALUE"), TopGroup, "LabelMax");
+  QLabel* LabelMax = new QLabel (tr("MAX_VALUE"), TopGroup );
   TopGroupLayout->addWidget( LabelMax, 2, 0 );
   //MaxIso = new QtxSpinBoxDbl( -DBL_MAX, DBL_MAX, 0.1, TopGroup );
   MaxIso = new QLineEdit( TopGroup );
@@ -94,7 +109,7 @@ VisuGUI_IsoSurfPane::VisuGUI_IsoSurfPane (QWidget* parent)
 //   TopGroupLayout->addMultiCellWidget( CBUpdate, 4, 4, 0, 1);
 //   CBUpdate->setChecked(false);
   QPushButton* aUpdateBtn = new QPushButton( "Update scalar bar range with these values", TopGroup);
-  TopGroupLayout->addMultiCellWidget( aUpdateBtn, 3, 3, 0, 1);
+  TopGroupLayout->addWidget( aUpdateBtn, 3, 0, 1, 2);
   connect( aUpdateBtn, SIGNAL( clicked() ), this, SLOT(onCBUpdate() ) );
 
 //   CBLog = new QCheckBox ( tr( "Logarithmic scaling" ), TopGroup);
@@ -143,10 +158,10 @@ void VisuGUI_IsoSurfPane::onCBUpdate()
 bool VisuGUI_IsoSurfPane::check()
 {
   if (MinIso->text().toDouble() >= MaxIso->text().toDouble()) {
-    MESSAGE(tr("MSG_MINMAX_VALUES"));
-    SUIT_MessageBox::warn1( this,tr("WRN_VISU"),
-                           tr("MSG_MINMAX_VALUES"),
-                           tr("BUT_OK"));
+    MESSAGE((const char*)tr("MSG_MINMAX_VALUES").toLatin1());
+    SUIT_MessageBox::warning( this,tr("WRN_VISU"),
+                              tr("MSG_MINMAX_VALUES"),
+                              tr("BUT_OK"));
     return false;
   } // else if (/* CBUpdate->isChecked() && CBLog->isChecked() && */
 //           (MinIso->text().toDouble() <=0 || MaxIso->text().toDouble() <=0) ) {
@@ -169,7 +184,7 @@ bool VisuGUI_IsoSurfPane::check()
 VisuGUI_IsoSurfacesDlg::VisuGUI_IsoSurfacesDlg (SalomeApp_Module* theModule)
   : VisuGUI_Prs3dDlg(theModule)
 {
-  setCaption(tr("DEFINE_ISOSURFACES"));
+  setWindowTitle(tr("DEFINE_ISOSURFACES"));
   setSizeGripEnabled( TRUE );
 
   QVBoxLayout* TopLayout = new QVBoxLayout(this);
@@ -178,36 +193,38 @@ VisuGUI_IsoSurfacesDlg::VisuGUI_IsoSurfacesDlg (SalomeApp_Module* theModule)
 
   myTabBox = new QTabWidget(this);
   myIsoPane = new  VisuGUI_IsoSurfPane(this);
-  myIsoPane->setMargin( 5 );
+  if ( myIsoPane->layout() )
+    myIsoPane->layout()->setMargin( 5 );
   myTabBox->addTab(myIsoPane, "Iso Surface");
   myScalarPane = new VisuGUI_ScalarBarPane(this, false);
   myIsoPane->setScalarBarPane(myScalarPane);
-  myScalarPane->setMargin( 5 );
+  if ( myScalarPane->layout() )
+    myScalarPane->layout()->setMargin( 5 );
   myInputPane = new VisuGUI_InputPane(VISU::TISOSURFACE, theModule, this);
   myTabBox->addTab(myScalarPane, "Scalar Bar");
   myTabBox->addTab(myInputPane, "Input");
 
   TopLayout->addWidget(myTabBox);
 
-  QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
+  QGroupBox* GroupButtons = new QGroupBox( this );
   GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
-  GroupButtons->setColumnLayout(0, Qt::Vertical );
-  GroupButtons->layout()->setSpacing( 0 );
-  GroupButtons->layout()->setMargin( 0 );
-  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+  //GroupButtons->setColumnLayout(0, Qt::Vertical );
+  //GroupButtons->layout()->setSpacing( 0 );
+  //GroupButtons->layout()->setMargin( 0 );
+  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
   GroupButtonsLayout->setSpacing( 6 );
   GroupButtonsLayout->setMargin( 11 );
 
-  QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+  QPushButton* buttonOk = new QPushButton( tr( "BUT_OK" ), GroupButtons );
   buttonOk->setAutoDefault( TRUE );
   buttonOk->setDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
-  QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+  QPushButton* buttonCancel = new QPushButton( tr( "BUT_CANCEL" ) , GroupButtons );
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
-  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  QPushButton* buttonHelp = new QPushButton( tr( "BUT_HELP" ) , GroupButtons );
   buttonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
@@ -249,7 +266,7 @@ void VisuGUI_IsoSurfacesDlg::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs, boo
     return;
 
   myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentPage( 0 );
+  myTabBox->setCurrentIndex( 0 );
 }
 
 int VisuGUI_IsoSurfacesDlg::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs)
@@ -281,10 +298,10 @@ void VisuGUI_IsoSurfacesDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
 
@@ -294,7 +311,7 @@ void VisuGUI_IsoSurfacesDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index efea4c1e9785b56b0904eb6f829d51bb0691b87e..be9cab27bf3659f1ed1eb878919e30f07db3f399 100644 (file)
 
 #include "VisuGUI_Prs3dDlg.h"
 
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qtabwidget.h>
+class QTabWidget;
+class QLineEdit;
+class QSpinBox;
 
 namespace VISU 
 {
@@ -48,7 +43,7 @@ namespace VISU
 class SalomeApp_Module;
 class VisuGUI_InputPane;
 
-class VisuGUI_IsoSurfPane : public QVBox
+class VisuGUI_IsoSurfPane : public QWidget
 {
   Q_OBJECT;
 
index af5fea406718e8df011c45b5f65b64ef330585f4..4bbc45b9f39cd6aeb05904a7da6957846f011c85 100644 (file)
@@ -38,7 +38,7 @@
 
 #include "CAM_Module.h"
 
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 #include "SalomeApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 #include "LightApp_VTKSelector.h"
 #endif
 #endif
 
-#include <qaction.h>
+#include <QAction>
 
 #include <vtkRenderer.h>
 #include <vtkCamera.h>
@@ -169,7 +169,7 @@ namespace VISU
     for( ; anIt!=aLast; anIt++ )
       if( SUIT_ViewManager* aViewManager = *anIt )
       {
-       QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+       QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
        int aSize = aViews.size();
        for(int anId = 0; anId < aSize; anId++)
        {
@@ -205,7 +205,7 @@ initialize( CAM_Application* theApp )
   SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
 
   // "Save VISU State" command is moved from SalomeApp_Applicaiton
-  createAction( SAVE_VISU_STATE, tr( "TOT_DESK_FILE_SAVE_GUI_STATE" ), QIconSet(),
+  createAction( SAVE_VISU_STATE, tr( "TOT_DESK_FILE_SAVE_GUI_STATE" ), QIcon(),
                tr( "MEN_DESK_FILE_SAVE_GUI_STATE" ), tr( "PRP_DESK_FILE_SAVE_GUI_STATE" ),
                0, getApp()->desktop(), false, getApp(), SLOT( onSaveGUIState() ) );
   int fileMenu = createMenu( tr( "MEN_DESK_FILE" ), -1 );
@@ -218,7 +218,7 @@ initialize( CAM_Application* theApp )
                aPixmap,
                 tr("MEN_GAUSS_NEW_VIEWER"), 
                tr("MEN_GAUSS_NEW_VIEWER"),
-               ALT+Key_S, 
+               Qt::ALT+Qt::Key_S, 
                this, 
                false,
                 this, 
@@ -233,18 +233,18 @@ initialize( CAM_Application* theApp )
 
   QString aViewerType = VVTK_Viewer::Type();
   SUIT_Accel* accel = getApp()->accel();
-  accel->setActionKey( SUIT_Accel::PanLeft, Key_Left, aViewerType );
-  accel->setActionKey( SUIT_Accel::PanRight, Key_Right, aViewerType );
-  accel->setActionKey( SUIT_Accel::PanUp, Key_Up, aViewerType );
-  accel->setActionKey( SUIT_Accel::PanDown, Key_Down, aViewerType );
-  accel->setActionKey( SUIT_Accel::ZoomIn, Key_PageUp, aViewerType );
-  accel->setActionKey( SUIT_Accel::ZoomOut, Key_PageDown, aViewerType );
-  accel->setActionKey( SUIT_Accel::RotateLeft, CTRL+Key_Left, aViewerType );
-  accel->setActionKey( SUIT_Accel::RotateRight, CTRL+Key_Right, aViewerType );
-  accel->setActionKey( SUIT_Accel::RotateUp, CTRL+Key_Up, aViewerType );
-  accel->setActionKey( SUIT_Accel::RotateDown, CTRL+Key_Down, aViewerType );
-  accel->setActionKey( SVTK::PlusSpeedIncrementEvent, Key_Plus, aViewerType );
-  accel->setActionKey( SVTK::MinusSpeedIncrementEvent, Key_Minus, aViewerType );
+  accel->setActionKey( SUIT_Accel::PanLeft, Qt::Key_Left, aViewerType );
+  accel->setActionKey( SUIT_Accel::PanRight, Qt::Key_Right, aViewerType );
+  accel->setActionKey( SUIT_Accel::PanUp, Qt::Key_Up, aViewerType );
+  accel->setActionKey( SUIT_Accel::PanDown, Qt::Key_Down, aViewerType );
+  accel->setActionKey( SUIT_Accel::ZoomIn, Qt::Key_PageUp, aViewerType );
+  accel->setActionKey( SUIT_Accel::ZoomOut, Qt::Key_PageDown, aViewerType );
+  accel->setActionKey( SUIT_Accel::RotateLeft, Qt::CTRL+Qt::Key_Left, aViewerType );
+  accel->setActionKey( SUIT_Accel::RotateRight, Qt::CTRL+Qt::Key_Right, aViewerType );
+  accel->setActionKey( SUIT_Accel::RotateUp, Qt::CTRL+Qt::Key_Up, aViewerType );
+  accel->setActionKey( SUIT_Accel::RotateDown, Qt::CTRL+Qt::Key_Down, aViewerType );
+  accel->setActionKey( SVTK::PlusSpeedIncrementEvent, Qt::Key_Plus, aViewerType );
+  accel->setActionKey( SVTK::MinusSpeedIncrementEvent, Qt::Key_Minus, aViewerType );
 
   connect( getApp(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ),
            this, SLOT( OnViewManagerAdded (SUIT_ViewManager*) ) );
@@ -262,35 +262,32 @@ initialize( CAM_Application* theApp )
                "client='ObjectBrowser' and selcount=1 "
                "and type in {'VISU::TTIMESTAMP' 'VISU::TFIELD'} "
                "and $medEntity in {'EDGE_ENTITY' 'FACE_ENTITY' 'CELL_ENTITY'} "
-               "and $medSource in {'eImportFile' 'eCopyAndImportFile'} ",
-               true );
+               "and $medSource in {'eImportFile' 'eCopyAndImportFile'}" );
 
   createMenu( action( GAUSS_CREATE_PRS ), createMenu( tr( "MEN_VISUALISATION" ), -1 ), -1 );
   createTool( GAUSS_CREATE_PRS, createTool( tr( "TOOL_VISUALISATION" ) ), -1 );
 
-  createAction( GAUSS_RENAME, VisuGUI::tr("MEN_RENAME"), QIconSet(),
+  createAction( GAUSS_RENAME, VisuGUI::tr("MEN_RENAME"), QIcon(),
                 VisuGUI::tr("MEN_RENAME"), "", 0, this, false,
                 this, SLOT(OnRename()));
   mgr->insert( action( GAUSS_RENAME ), -1, 0, -1 );
   mgr->setRule( action( GAUSS_RENAME ), 
-               "selcount=1 and type='VISU::TGAUSSPOINTS'", 
-               true );
+    "selcount=1 and type='VISU::TGAUSSPOINTS'" );
 
-  createAction( GAUSS_EDIT_PRS, VisuGUI::tr("MEN_EDIT_PRS"), QIconSet(),
+  createAction( GAUSS_EDIT_PRS, VisuGUI::tr("MEN_EDIT_PRS"), QIcon(),
                 VisuGUI::tr("MEN_EDIT_PRS"), "", 0, this, false,
                 this, SLOT(OnEditGaussPoints()));
   mgr->insert( action( GAUSS_EDIT_PRS ), -1, 0, -1 );
   mgr->setRule( action( GAUSS_EDIT_PRS ), 
-               "selcount=1 and type='VISU::TGAUSSPOINTS'", 
-               true );
+    "selcount=1 and type='VISU::TGAUSSPOINTS'" );
 
-  createAction( GAUSS_COPY_PRS, VisuGUI::tr("MEN_COPY_PRS"), QIconSet(),
+  createAction( GAUSS_COPY_PRS, VisuGUI::tr("MEN_COPY_PRS"), QIcon(),
                 VisuGUI::tr("MEN_COPY_PRS"), "", 0, this, false,
                 this, SLOT(OnCopyPresentation()));
   mgr->insert( action( GAUSS_COPY_PRS ), -1, 0, -1 );
   mgr->setRule( action( GAUSS_COPY_PRS ), 
-               "selcount=1 and type='VISU::TGAUSSPOINTS'", 
-               true );
+    "selcount=1 and type='VISU::TGAUSSPOINTS'" );
+  
   action( GAUSS_COPY_PRS )->setEnabled(false);
 
   QStringList viewers;
@@ -325,58 +322,58 @@ initialize( CAM_Application* theApp )
       for( ; anIt!=aLast; anIt++ )
         strViewers+=temp.arg( *anIt );
       strViewers+="}";
-      mgr->setRule( action(myEraseAll), QString( "client in %1" ).arg( strViewers ), true );
+      mgr->setRule( action(myEraseAll), QString( "client in %1" ).arg( strViewers ) );
     }
 
   aRule = "(selcount>0 and type='VISU::TGAUSSPOINTS')";
 
-  createAction( GAUSS_ERASE_PRS, VisuGUI::tr("MEN_ERASE"), QIconSet(),
+  createAction( GAUSS_ERASE_PRS, VisuGUI::tr("MEN_ERASE"), QIcon(),
                 VisuGUI::tr("MEN_ERASE"), "", 0, this, false,
                 this, SLOT(OnErasePrs()));
   mgr->insert( action( GAUSS_ERASE_PRS ), -1, -1, -1 ); // erase
   mgr->setRule( action( GAUSS_ERASE_PRS ), 
-               aRule + " and ({true} in $canBeDisplayed) and (isVisible=true)", true );
+    aRule + " and ({true} in $canBeDisplayed) and (isVisible=true)" );
 
-  createAction( GAUSS_DISPLAY_PRS, VisuGUI::tr("MEN_DISPLAY"), QIconSet(),
+  createAction( GAUSS_DISPLAY_PRS, VisuGUI::tr("MEN_DISPLAY"), QIcon(),
                 VisuGUI::tr("MEN_DISPLAY"), "", 0, this, false,
                 this, SLOT(OnDisplayPrs()));
   mgr->insert( action( GAUSS_DISPLAY_PRS ), -1, -1, -1 ); // display
   mgr->setRule( action( GAUSS_DISPLAY_PRS ), 
-               aRule + " and ({true} in $canBeDisplayed) and (isVisible=false)", true );
+    aRule + " and ({true} in $canBeDisplayed) and (isVisible=false)" );
 
-  createAction( GAUSS_DISPLAY_ONLY_PRS, VisuGUI::tr("MEN_DISPLAY_ONLY"), QIconSet(),
+  createAction( GAUSS_DISPLAY_ONLY_PRS, VisuGUI::tr("MEN_DISPLAY_ONLY"), QIcon(),
                 VisuGUI::tr("MEN_DISPLAY_ONLY"), "", 0, this, false,
                 this, SLOT(OnDisplayOnlyPrs()));
   mgr->insert( action( GAUSS_DISPLAY_ONLY_PRS ), -1, -1, -1 ); // display only
   mgr->setRule( action( GAUSS_DISPLAY_ONLY_PRS ), 
-               aRule + " and ({true} in $canBeDisplayed)", true );
+    aRule + " and ({true} in $canBeDisplayed)" );
 
-  createAction( GAUSS_RENAME_CONFIGURATION, VisuGUI::tr("MEN_RENAME"), QIconSet(), 
+  createAction( GAUSS_RENAME_CONFIGURATION, VisuGUI::tr("MEN_RENAME"), QIcon(), 
                VisuGUI::tr("MEN_RENAME"), "", 0, this, false,
                 this, SLOT(OnRename()));
   mgr->insert( action( GAUSS_RENAME_CONFIGURATION ), -1, -1, -1 );
-  mgr->setRule( action( GAUSS_RENAME_CONFIGURATION ), "selcount=1 and type='VISU::TGAUSSVIEW'", true );
+  mgr->setRule( action( GAUSS_RENAME_CONFIGURATION ), "selcount=1 and type='VISU::TGAUSSVIEW'" );
 
-  createAction( GAUSS_SAVE_CONFIGURATION, tr("MEN_SAVE_CONFIGURATION"), QIconSet(),
+  createAction( GAUSS_SAVE_CONFIGURATION, tr("MEN_SAVE_CONFIGURATION"), QIcon(),
                 tr("MEN_SAVE_CONFIGURATION"), "", 0, this, false,
                 this, SLOT(OnSaveConfiguration()));
   mgr->insert( action( GAUSS_SAVE_CONFIGURATION ), -1, -1, -1 );
   mgr->setRule( action( GAUSS_SAVE_CONFIGURATION ),
-                "selcount>=0 and client='VVTK' and activeView='VVTK'", true );
+    "selcount>=0 and client='VVTK' and activeView='VVTK'" );
 
-  createAction( GAUSS_OVERWRITE_CONFIGURATION, tr("MEN_OVERWRITE_CONFIGURATION"), QIconSet(),
+  createAction( GAUSS_OVERWRITE_CONFIGURATION, tr("MEN_OVERWRITE_CONFIGURATION"), QIcon(),
                 tr("MEN_OVERWRITE_CONFIGURATION"), "", 0, this, false,
                 this, SLOT(OnOverwriteConfiguration()));
   mgr->insert( action( GAUSS_OVERWRITE_CONFIGURATION ), -1, -1, -1 );
   mgr->setRule( action( GAUSS_OVERWRITE_CONFIGURATION ),
-               "selcount>0 and type='VISU::TGAUSSVIEW' and activeView='VVTK'", true );
+    "selcount>0 and type='VISU::TGAUSSVIEW' and activeView='VVTK'" );
 
-  createAction( GAUSS_RESTORE_CONFIGURATION, tr("MEN_RESTORE_CONFIGURATION"), QIconSet(),
+  createAction( GAUSS_RESTORE_CONFIGURATION, tr("MEN_RESTORE_CONFIGURATION"), QIcon(),
                 tr("MEN_RESTORE_CONFIGURATION"), "", 0, this, false,
                 this, SLOT(OnRestoreConfiguration()));
   mgr->insert( action( GAUSS_RESTORE_CONFIGURATION ), -1, -1, -1 );
   mgr->setRule( action( GAUSS_RESTORE_CONFIGURATION ),
-               "selcount=1 and type='VISU::TGAUSSVIEW'", true );
+  "selcount=1 and type='VISU::TGAUSSVIEW'" );
 }
 
 //---------------------------------------------------------------
@@ -463,7 +460,7 @@ createGaussPointsPreferences()
   values.append( tr( "VISU_GAUSS_PREF_POINTSPRITE" ) );
   values.append( tr( "VISU_GAUSS_PREF_OPENGLPOINT" ) );
   values.append( tr( "VISU_GAUSS_PREF_GEOMSPHERE" ) );
-  QValueList<QVariant> indices;
+  QList<QVariant> indices;
   indices.append( 0 );
   indices.append( 1 );
   indices.append( 2 );
@@ -591,7 +588,7 @@ createInsideCursorPreferences()
   values.append( tr( "VISU_GAUSS_PREF_POINTSPRITE" ) );
   values.append( tr( "VISU_GAUSS_PREF_OPENGLPOINT" ) );
   values.append( tr( "VISU_GAUSS_PREF_GEOMSPHERE" ) );
-  QValueList<QVariant> indices;
+  QList<QVariant> indices;
   indices.append( 0 );
   indices.append( 1 );
   indices.append( 2 );
@@ -679,7 +676,7 @@ createOutsideCursorPreferences()
   values.append( tr( "VISU_GAUSS_PREF_POINTSPRITE" ) );
   values.append( tr( "VISU_GAUSS_PREF_OPENGLPOINT" ) );
   values.append( tr( "VISU_GAUSS_PREF_GEOMSPHERE" ) );
-  QValueList<QVariant> indices;
+  QList<QVariant> indices;
   indices.append( 0 );
   indices.append( 1 );
   indices.append( 2 );
@@ -784,7 +781,7 @@ createPickingPreferences()
   QStringList values;
   values.append( tr( "VISU_PICKING_PREF_BELOW_POINT" ) );
   values.append( tr( "VISU_PICKING_PREF_TOP_LEFT_CORNER" ) );
-  QValueList<QVariant> indices;
+  QList<QVariant> indices;
   indices.append( 0 );
   indices.append( 1 );
   setPreferenceProperty( positionPref, "strings", values );
@@ -827,7 +824,7 @@ createSpaceMousePreferences()
   QStringList values;
   values.append( tr( "VISU_MOUSE_PREF_STANDARD" ) );
   values.append( tr( "VISU_MOUSE_PREF_KEYBOARD_FREE" ) );
-  QValueList<QVariant> indices;
+  QList<QVariant> indices;
   indices.append( 0 );
   indices.append( 1 );
   setPreferenceProperty( mousePref, "strings", values );
@@ -907,7 +904,7 @@ createRecorderPreferences()
   QStringList values;
   values.append( tr( "VISU_RECORDER_PREF_SKIPPED_FRAMES" ) );
   values.append( tr( "VISU_RECORDER_PREF_ALL_DISLPAYED_FRAMES" ) );
-  QValueList<QVariant> indices;
+  QList<QVariant> indices;
   indices.append( 0 );
   indices.append( 1 );
   setPreferenceProperty( modePref, "strings", values );
@@ -1007,7 +1004,7 @@ setProperty( SVTK_ViewManager* vm, const QString& prop )
   if ( !vm )
     return;
 
-  QPtrVector<SUIT_ViewWindow> windows = vm->getViews();
+  QVector<SUIT_ViewWindow*> windows = vm->getViews();
   for ( int n = windows.count(), i = 0; i < n; i++ )
     setProperty( dynamic_cast<SVTK_ViewWindow*>( windows[i] ), prop );
 }
@@ -1413,7 +1410,7 @@ namespace
        _PTR(SComponent) aSComponent = ClientFindOrCreateVisuComponent(aCStudy);
        
        static int myNbConfigs = 0;
-       std::string aName = VISU::GenerateName("Config.", ++myNbConfigs).latin1();
+       std::string aName = (const char*)VISU::GenerateName("Config.", ++myNbConfigs).toLatin1();
       
        std::string aSComponentEntry = aSComponent->GetID();
        anEntry = CreateAttributes(aCStudy, 
@@ -1552,7 +1549,7 @@ OnRestoreConfiguration()
        aMainWindow->SetPlanesSegementation(false);
        aMainWindow->SetSphereSegementation(false);
        VISU_WidgetCtrl* aWidgetCtrl = aMainWindow->GetWidgetCtrl();
-       aSegmentationMode = Storable::FindValue(aMap,"mySegmentationMode").latin1();
+       aSegmentationMode = (const char*)Storable::FindValue(aMap,"mySegmentationMode").toLatin1();
        
        if(aSegmentationMode == "Planes"){
          VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
@@ -1655,7 +1652,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
   if( !study || !study->studyDS() )
     return;
   _PTR(Study) studyDS = study->studyDS();
-  _PTR(AttributeParameter) ap = studyDS->GetModuleParameters("Interface Applicative", moduleName().latin1(), savePoint);
+  _PTR(AttributeParameter) ap = studyDS->GetModuleParameters("Interface Applicative", (const char*)moduleName().toLatin1(), savePoint);
   _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
 
   // viewers counters are used for storing view_numbers in IParameters
@@ -1665,24 +1662,26 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
   _PTR(SComponent) visuEng = ClientFindOrCreateVisuComponent( studyDS );
   std::string componentName = visuEng->ComponentDataType();
 
-  QPtrList<SUIT_ViewManager> lst;
+  QList<SUIT_ViewManager*> lst;
+  QList<SUIT_ViewManager*>::Iterator it;
 
   // saving VVTK viewer parameters.  VVTK (Gauss Viewers) are NOT created by SalomeApp since
   // VVTK is declared in VISU, so here we store VVTK view window parameters.
   // VisuGUI_Module::restoreVisualParameters() creates VVTK_Views and restores its parameters.
   ip->setProperty( "ActiveGaussViewer", "-1" ); 
   getApp()->viewManagers( VVTK_Viewer::Type(), lst );
-  for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it ) {
-    SUIT_ViewManager* vman = it.current();
-    if ( SUIT_ViewWindow* vwin = vman->getActiveView() ) { 
+  for ( it = lst.begin(); it != lst.end(); it++ ) {
+    if ( SUIT_ViewWindow* vwin = (*it)->getActiveView() ) { 
       // using predefined string "GaussViewer" as "entry"..  it's a hardcoded "workaround".  
       // gauss viewer parameters are retrieved using this "entry" string.
       // name of parameter  = caption of gauss ViewWindow 
       // value of parameter = ViewWindow's visual parameters
-      ip->setParameter( "GaussViewer", vwin->caption().latin1(), vwin->getVisualParameters().latin1() );
+      ip->setParameter( "GaussViewer",
+                        (const char*)vwin->windowTitle().toLatin1(),
+                        (const char*)vwin->getVisualParameters().toLatin1() );
 
       if ( application()->desktop()->activeWindow() == vwin )
-       ip->setProperty( "ActiveGaussViewer", QString::number( vvtkViewers ).latin1() );
+       ip->setProperty( "ActiveGaussViewer", (const char*)QString::number( vvtkViewers ).toLatin1() );
       vvtkViewers++;
     }
   }
@@ -1699,8 +1698,8 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
   lst.clear();
   getApp()->viewManagers( lst );
   vvtkViewers = svtkViewers = plotViewers = 0;
-  for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it ) {
-    SUIT_ViewManager* vman = it.current();
+  for ( it = lst.begin(); it != lst.end(); it++ ) {
+    SUIT_ViewManager* vman = *it;
     QString vType = vman->getType();
     int* viewsCounter = vType == SVTK_Viewer::Type()    ? &svtkViewers :
                         vType == VVTK_Viewer::Type()    ? &vvtkViewers :
@@ -1710,7 +1709,7 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
     if ( vType == SVTK_Viewer::Type() ||  // processing SVTK and VVTK viewers in the same
         vType == VVTK_Viewer::Type() ) { // way (VVTK_ViewWindow inherits SVTK_ViewWindow)       
 
-      QPtrVector<SUIT_ViewWindow> views = vman->getViews();
+      QVector<SUIT_ViewWindow*> views = vman->getViews();
       for ( int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++ ) {
        if ( SVTK_ViewWindow* vtkView = dynamic_cast<SVTK_ViewWindow*>( views[i] ) ) {
          vtkActorCollection* allActors = vtkView->getRenderer()->GetActors();
@@ -1725,31 +1724,33 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
                  // subject to change on next component loading
                  std::string entry = ip->encodeEntry( io->getEntry(), componentName ); 
 
-                 std::string param, vtkParam = vType.latin1(); vtkParam += gSeparator; 
-                 vtkParam += QString::number( *viewsCounter ).latin1();       vtkParam += gSeparator; 
+                 std::string param, vtkParam = (const char*)vType.toLatin1();
+                  vtkParam += gSeparator; 
+                 vtkParam += (const char*)QString::number( *viewsCounter ).toLatin1();
+                  vtkParam += gSeparator; 
 
                  param = vtkParam + "Visibility";     
                  ip->setParameter( entry, param, "On" );
                  param = vtkParam + "Name";
                  ip->setParameter( entry, param, vActor->getName() );
                  param = vtkParam + "RepresentationMode";
-                 ip->setParameter( entry, param, QString::number( vActor->GetRepresentation() ).latin1() );
+                 ip->setParameter( entry, param, (const char*)QString::number( vActor->GetRepresentation() ).toLatin1() );
                  param = vtkParam + "Opacity";  
-                 ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).latin1() );
+                 ip->setParameter( entry, param, (const char*)QString::number( vActor->GetOpacity() ).toLatin1() );
                  vtkFloatingPointType r, g, b;
                  vActor->GetColor(r, g, b);
                  QString colorStr  = QString::number( r ); colorStr += gDigitsSep;
                          colorStr += QString::number( g ); colorStr += gDigitsSep; 
                           colorStr += QString::number( b ); 
                  param = vtkParam + "Color"; 
-                 ip->setParameter( entry, param, colorStr.latin1() );
+                 ip->setParameter( entry, param, (const char*)colorStr.toLatin1() );
                  param = vtkParam + "LineWidth";
-                 ip->setParameter( entry, param, QString::number( vActor->GetLineWidth() ).latin1() );
+                 ip->setParameter( entry, param, (const char*)QString::number( vActor->GetLineWidth() ).toLatin1() );
                  if ( vActor->IsShrunkable() && vActor->IsShrunk() ) {
                    param = vtkParam + "ShrinkMode";
                    ip->setParameter( entry, param, "On" );
                    param = vtkParam + "ShrinkFactor";
-                   ip->setParameter( entry, param, QString::number( vActor->GetShrinkFactor() ).latin1() );
+                   ip->setParameter( entry, param, (const char*)QString::number( vActor->GetShrinkFactor() ).toLatin1() );
                  }
                  VISU_ScalarMapAct* scalarMapActor = dynamic_cast<VISU_ScalarMapAct*>( vActor );
                  if ( scalarMapActor && scalarMapActor->IsShading() ) {
@@ -1766,13 +1767,13 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
                      vtkFloatingPointType normal[3], origin[3];
                      plane->GetNormal( normal );
                      plane->GetOrigin( origin );
-                     std::string planeValue  = QString::number( normal[0] ).latin1(); planeValue += gDigitsSep;
-                                 planeValue += QString::number( normal[1] ).latin1(); planeValue += gDigitsSep;
-                                 planeValue += QString::number( normal[2] ).latin1(); planeValue += gDigitsSep;
-                                 planeValue += QString::number( origin[0] ).latin1(); planeValue += gDigitsSep;
-                                 planeValue += QString::number( origin[1] ).latin1(); planeValue += gDigitsSep;
-                                 planeValue += QString::number( origin[2] ).latin1(); 
-                     param = QString( "%1ClippingPlane_%2" ).arg( vtkParam.c_str() ).arg( p+1 ).latin1();
+                     std::string planeValue  = (const char*)QString::number( normal[0] ).toLatin1(); planeValue += gDigitsSep;
+                                 planeValue += (const char*)QString::number( normal[1] ).toLatin1(); planeValue += gDigitsSep;
+                                 planeValue += (const char*)QString::number( normal[2] ).toLatin1(); planeValue += gDigitsSep;
+                                 planeValue += (const char*)QString::number( origin[0] ).toLatin1(); planeValue += gDigitsSep;
+                                 planeValue += (const char*)QString::number( origin[1] ).toLatin1(); planeValue += gDigitsSep;
+                                 planeValue += (const char*)QString::number( origin[2] ).toLatin1(); 
+                     param = (const char*)QString( "%1ClippingPlane_%2" ).arg( vtkParam.c_str() ).arg( p+1 ).toLatin1();
                      ip->setParameter( entry, param, planeValue );
                    }
                  }
@@ -1786,16 +1787,17 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
       (*viewsCounter)++;   
     } // if ( SVTK view model )
     else if ( vType == SPlot2d_Viewer::Type() ) {  // processing Plot2d viewers
-      QPtrVector<SUIT_ViewWindow> views = vman->getViews();
+      QVector<SUIT_ViewWindow*> views = vman->getViews();
       for ( int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++ ) {
        if ( Plot2d_ViewWindow* plotView = dynamic_cast<Plot2d_ViewWindow*>( views[i] ) ) {
          Plot2d_ViewFrame* plotVF = plotView->getViewFrame();
-         QPtrList<Plot2d_Curve> curves;
+         QList<Plot2d_Curve*> curves;
+          QList<Plot2d_Curve*>::Iterator itCurve;
          plotVF->getCurves( curves );
          
          Plot2d_Curve* curve;
-         for ( curve = curves.first(); curve; curve = curves.next() ) {
-           if ( SPlot2d_Curve* sCurve = dynamic_cast<SPlot2d_Curve*>( curve ) ) {
+         for ( itCurve = curves.begin(); itCurve != curves.end(); itCurve++ ) {
+           if ( SPlot2d_Curve* sCurve = dynamic_cast<SPlot2d_Curve*>( *itCurve ) ) {
              if ( sCurve->hasIO() ) {
                
                Handle(SALOME_InteractiveObject) io = sCurve->getIO();
@@ -1803,8 +1805,8 @@ void VisuGUI_Module::storeVisualParameters(int savePoint)
                // subject to change on next component loading
                std::string entry = ip->encodeEntry( io->getEntry(), componentName ); 
 
-               std::string param, plotParam = vType.latin1(); plotParam += gSeparator; 
-               plotParam += QString::number( *viewsCounter ).latin1();      plotParam += gSeparator; 
+               std::string param, plotParam = (const char*)vType.toLatin1(); plotParam += gSeparator; 
+               plotParam += (const char*)QString::number( *viewsCounter ).toLatin1();      plotParam += gSeparator; 
 
                param = plotParam + "Visibility";     
                ip->setParameter( entry, param, "On" );
@@ -1828,9 +1830,9 @@ const int ParamName = 2;
 // return viewer type substring from parameter name
 std::string getParam( const std::string& paramName, const int index )
 {
-  QStringList lst = QStringList::split( gSeparator, QString( paramName.c_str() ) );
+  QStringList lst = QString( paramName.c_str() ).split( gSeparator, QString::SkipEmptyParts );
   if ( !lst.isEmpty() && index < lst.size() )
-    return lst[index].latin1();
+    return (const char*)lst[index].toLatin1();
   return "";
 }
 
@@ -1847,7 +1849,8 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
   if( !study || !study->studyDS() )
     return;
   _PTR(Study) studyDS = study->studyDS();
-  _PTR(AttributeParameter) ap = studyDS->GetModuleParameters("Interface Applicative", moduleName().latin1(), savePoint);
+  _PTR(AttributeParameter) ap =
+    studyDS->GetModuleParameters("Interface Applicative", (const char*)moduleName().toLatin1(), savePoint);
   _PTR(IParameters) ip = ClientFactory::getIParameters(ap);
 
   // actors are stored in a map after displaying of them for quicker access in future  
@@ -1867,7 +1870,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
       for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) {
        SUIT_ViewManager* vman = onCreateViewManager();
        SUIT_ViewWindow* vwin = vman->getActiveView(); 
-       vwin->setCaption( (*namesIt).c_str() );
+       vwin->setWindowTitle( (*namesIt).c_str() );
 
        // wait untill the window is really shown.  This step fixes MANY bugs..
        while ( !vwin->isVisible() )
@@ -1883,7 +1886,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
 
     //SRN: Added a check that the entry corresponds to Standard_Real object in the Study
     //     as the object may be deleted or modified after the visual state is saved.
-    _PTR(SObject) so = studyDS->FindObjectID(entry.latin1());
+    _PTR(SObject) so = studyDS->FindObjectID((const char*)entry.toLatin1());
     if(!so) continue;  //Skip the not existent entry
 
     for ( ; namesIt != paramNames.end(); ++namesIt, ++valuesIt ) {
@@ -1898,8 +1901,8 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
 
       //      cout << " -- " << viewerType << ": entry = " << entry.latin1() << ", paramName = " << paramName << endl;
 
-      if ( viewerType == SVTK_Viewer::Type().latin1() ||
-          viewerType == VVTK_Viewer::Type().latin1() ) {
+      if ( viewerType == (const char*)SVTK_Viewer::Type().toLatin1() ||
+          viewerType == (const char*)VVTK_Viewer::Type().toLatin1() ) {
 
        // used as inner map key for locating the actor.
        QString viewerTypeIndex = QString( viewerType.c_str() ) + QString::number( viewIndex );
@@ -1907,7 +1910,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
        if ( paramName == "Visibility" && displayer() ) {
          // if VVTK, then we must create viewer first, because 
 
-         QPtrList<SUIT_ViewManager> lst;
+         QList<SUIT_ViewManager*> lst;
          getApp()->viewManagers( viewerType.c_str(), lst );
 
          // SVTK/VVTK ViewManager always has 1 ViewWindow, so view index is index of view manager
@@ -1939,7 +1942,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
          QString val( (*valuesIt).c_str() );
          
          if ( paramName == "Name" )
-           vActor->setName( val.latin1() );
+           vActor->setName( (const char*)val.toLatin1() );
 
          else if ( paramName == "RepresentationMode" ) 
            vActor->SetRepresentation( val.toInt() );
@@ -1948,7 +1951,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
            vActor->SetOpacity( val.toFloat() );
 
          else if ( paramName == "Color" ) {
-           QStringList colors = QStringList::split( gDigitsSep, val );
+           QStringList colors = val.split( gDigitsSep, QString::SkipEmptyParts );
            if ( colors.count() == 3 )
              vActor->SetColor( colors[0].toFloat(), colors[1].toFloat(), colors[2].toFloat() );
          }
@@ -1976,7 +1979,7 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
 
            prs->RemoveAllClippingPlanes();
            if ( val != "Off" ) {
-             QStringList vals = QStringList::split( gDigitsSep, val );
+             QStringList vals = val.split( gDigitsSep, QString::SkipEmptyParts );
              if ( vals.count() == 6 ) { // format check: 6 float values
                vtkFloatingPointType normal[3], origin[3];
                for (int x = 0; x < 3; x++ ) {
@@ -1994,10 +1997,10 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
        } // else ..
       } // if SVTK
 
-      else if ( viewerType == SPlot2d_Viewer::Type().latin1() ) {
+      else if ( viewerType == (const char*)SPlot2d_Viewer::Type().toLatin1() ) {
 
        if ( paramName == "Visibility" && displayer() ) {
-         QPtrList<SUIT_ViewManager> lst;
+         QList<SUIT_ViewManager*> lst;
          getApp()->viewManagers( viewerType.c_str(), lst );
 
          if ( viewIndex >= 0 && viewIndex < lst.count() ) {
@@ -2014,21 +2017,20 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
   } // for entries iterator
 
   // [ update all SVTK/VVTK/Plot2D views
-  QPtrList<SUIT_ViewManager> lst;
+  QList<SUIT_ViewManager*> lst;
   getApp()->viewManagers( lst );
-  for ( QPtrListIterator<SUIT_ViewManager> it( lst ); it.current(); ++it ) {
-    SUIT_ViewManager* vman = it.current();
-    SUIT_ViewModel* vmodel = vman->getViewModel();
+  for ( QList<SUIT_ViewManager*>::Iterator it = lst.begin(); it != lst.end(); it++ ) {
+    SUIT_ViewModel* vmodel = (*it)->getViewModel();
     if ( !vmodel )
       continue;
     if ( vmodel->getType() == SVTK_Viewer::Type() ||  // processing SVTK and VVTK viewers
         vmodel->getType() == VVTK_Viewer::Type() ) { // in the same way 
-      SVTK_ViewWindow* vtkView = (SVTK_ViewWindow*) vman->getActiveView();
+      SVTK_ViewWindow* vtkView = (SVTK_ViewWindow*) (*it)->getActiveView();
       vtkView->getRenderer()->ResetCameraClippingRange();
       vtkView->Repaint();
     }
-    else if ( vmodel->getType() == SPlot2d_Viewer::Type().latin1() ) {
-      Plot2d_ViewWindow* plotView = (Plot2d_ViewWindow*) vman->getActiveView();
+    else if ( vmodel->getType() == (const char*)SPlot2d_Viewer::Type().toLatin1() ) {
+      Plot2d_ViewWindow* plotView = (Plot2d_ViewWindow*) (*it)->getActiveView();
       plotView->getViewFrame()->Repaint();
     }
   } // ] end of update views
@@ -2057,8 +2059,8 @@ void VisuGUI_Module::restoreVisualParameters(int savePoint)
     if ( activeGaussViewer >= 0 && activeGaussViewer < lst.count() ) {
       SUIT_ViewWindow* activeView = lst.at( activeGaussViewer )->getActiveView();
       if ( activeView ) {
-       activeView->setActiveWindow();
-       activeView->setFocus();
+       activeView->activateWindow();
+       //activeView->setFocus();
       }          
     }
   }
index 60b252af81abfb7b302ed1930e2f739b1b961ea4..be6f3e07eff8a52cad4977e12d4125ef168f83e6 100644 (file)
 
 #include <LightApp_Application.h>
 
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QLayout>
+#include <QKeyEvent>
 using namespace std;
 
 /*!
@@ -46,53 +47,50 @@ using namespace std;
 */
 VisuGUI_NameDlg::VisuGUI_NameDlg( QWidget* parent )
     : QDialog( parent ? parent : SUIT_Session::session()->activeApplication()->desktop(), 
-              "VisuGUI_NameDlg", 
-              true, 
-              WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+              Qt::WindowTitleHint | Qt::WindowSystemMenuHint )//,WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
 {
-  setCaption( tr("TLT_RENAME") );
+  setWindowTitle( tr("TLT_RENAME") );
   setSizeGripEnabled( TRUE );
   
   QVBoxLayout* topLayout = new QVBoxLayout( this );
   topLayout->setMargin( 11 ); topLayout->setSpacing( 6 );
 
   /***************************************************************/
-  QGroupBox* GroupC1 = new QGroupBox( this, "GroupC1" );
-  GroupC1->setColumnLayout(0, Qt::Vertical );
-  GroupC1->layout()->setMargin( 0 ); GroupC1->layout()->setSpacing( 0 );
-  QHBoxLayout* GroupC1Layout = new QHBoxLayout( GroupC1->layout() );
+  QGroupBox* GroupC1 = new QGroupBox( this );  
+  //GroupC1->setColumnLayout(0, Qt::Vertical );
+  //GroupC1->layout()->setMargin( 0 ); GroupC1->layout()->setSpacing( 0 );
+  QHBoxLayout* GroupC1Layout = new QHBoxLayout( GroupC1 );
   GroupC1Layout->setAlignment( Qt::AlignTop );
   GroupC1Layout->setMargin( 11 ); GroupC1Layout->setSpacing( 6 );
   
-  QLabel* TextLabel = new QLabel( GroupC1, "TextLabel1" );
-  TextLabel->setText( tr( "NAME_LBL" ) );
+  QLabel* TextLabel = new QLabel( tr( "NAME_LBL" ), GroupC1 );
   GroupC1Layout->addWidget( TextLabel );
   
-  myLineEdit = new QLineEdit( GroupC1, "LineEdit1" );
+  myLineEdit = new QLineEdit( GroupC1 );
   myLineEdit->setMinimumSize( 250, 0 );
   GroupC1Layout->addWidget( myLineEdit );
   
   /***************************************************************/
-  QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
-  GroupButtons->setColumnLayout(0, Qt::Vertical );
-  GroupButtons->layout()->setMargin( 0 ); GroupButtons->layout()->setSpacing( 0 ); 
-  QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons->layout() );
+  QGroupBox* GroupButtons = new QGroupBox( this );
+  //GroupButtons->setColumnLayout(0, Qt::Vertical );
+  //GroupButtons->layout()->setMargin( 0 ); GroupButtons->layout()->setSpacing( 0 ); 
+  QHBoxLayout* GroupButtonsLayout = new QHBoxLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
   GroupButtonsLayout->setMargin( 11 ); GroupButtonsLayout->setSpacing( 6 );
   
-  myButtonOk = new QPushButton( GroupButtons, "buttonOk" );
+  myButtonOk = new QPushButton( GroupButtons );
   myButtonOk->setText( tr( "BUT_OK"  ) );
   myButtonOk->setAutoDefault( TRUE ); myButtonOk->setDefault( TRUE );
   GroupButtonsLayout->addWidget( myButtonOk );
 
   GroupButtonsLayout->addStretch();
   
-  myButtonCancel = new QPushButton( GroupButtons, "buttonCancel" );
+  myButtonCancel = new QPushButton( GroupButtons );
   myButtonCancel->setText( tr( "BUT_CANCEL"  ) );
   myButtonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( myButtonCancel );
 
-  myButtonHelp = new QPushButton( GroupButtons, "buttonHelp" );
+  myButtonHelp = new QPushButton( GroupButtons );
   myButtonHelp->setText( tr( "BUT_HELP"  ) );
   myButtonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( myButtonHelp );
@@ -137,7 +135,7 @@ QString VisuGUI_NameDlg::name()
 
 void VisuGUI_NameDlg::accept()
 {
-  if ( name().stripWhiteSpace().isEmpty() )
+  if ( name().trimmed().isEmpty() )
     return;
   QDialog::accept();
 }
@@ -157,10 +155,9 @@ void VisuGUI_NameDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
   }
 }
 
@@ -185,7 +182,7 @@ void VisuGUI_NameDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index 5198a631e52e0e5486b811a4eb875a9533e6581e..4c4c8c7e641d657b337d18a838a7fde8d5998f71 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef VisuGUI_NAMEDLG_H
 #define VisuGUI_NAMEDLG_H
 
-#include <qdialog.h>
+#include <QDialog>
 
 class QLineEdit;
 class QPushButton;
index eca719e7272cda58a8a3476ba66101c06f261a4f..440496704f07d8fdfd8afc4728d176f0f7e78b93 100644 (file)
 #include "SalomeApp_Application.h"
 #include "SVTK_ViewWindow.h"
 #include "SVTK_ViewModel.h"
+#include "SUIT_ViewManager.h"
 #include "SUIT_Desktop.h"
 #include "SUIT_Session.h"
 #include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
 
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
 
 // VTK Includes
 #include "vtkRenderer.h"
 
 // QT Includes
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
+#include <QLabel>
+#include <QLayout>
+#include <QCheckBox>
+#include <QGroupBox>
+#include <QPushButton>
+#include <QKeyEvent>
 
 
 #define  MAXVAL 1e10
 
 
 VisuGUI_OffsetDlg::VisuGUI_OffsetDlg (VisuGUI* theModule)
-: QDialog(VISU::GetDesktop(theModule), 0, false, WStyle_Customize |
-          WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
-myModule(theModule)
+: QDialog(VISU::GetDesktop(theModule), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
+  myModule(theModule)
 {
-  myPrsList.setAutoDelete(false);
+  //myPrsList.setAutoDelete(false);
 
-  setName("VisuGUI_OffsetDlg");
-  setCaption(tr("TIT_OFFSETDLG"));
+  setWindowTitle(tr("TIT_OFFSETDLG"));
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout (this);
   TopLayout->setSpacing(6);
   TopLayout->setMargin(11);
 
-  QHBox* anOffsetsPane = new QHBox (this);
-  anOffsetsPane->setSpacing(6);
+  QWidget* anOffsetsPane = new QWidget (this);
+  QHBoxLayout* aHBLay = new QHBoxLayout( anOffsetsPane );
+  aHBLay->setSpacing(6);
 
-  new QLabel ("dX:", anOffsetsPane);
-  myDxEdt = new QtxDblSpinBox (anOffsetsPane, "myDxEdt");
+  aHBLay->addWidget( new QLabel ("dX:", anOffsetsPane) );
+  aHBLay->addWidget( myDxEdt = new QtxDoubleSpinBox (anOffsetsPane) );
   myDxEdt->setRange(-MAXVAL, MAXVAL);
 
-  new QLabel("dY:", anOffsetsPane);
-  myDyEdt = new QtxDblSpinBox (anOffsetsPane, "myDyEdt");
+  aHBLay->addWidget( new QLabel("dY:", anOffsetsPane) );;
+  aHBLay->addWidget( myDyEdt = new QtxDoubleSpinBox (anOffsetsPane) );
   myDyEdt->setRange(-MAXVAL, MAXVAL);
 
-  new QLabel("dZ:", anOffsetsPane);
-  myDzEdt = new QtxDblSpinBox (anOffsetsPane, "myDzEdt");
+  aHBLay->addWidget( new QLabel("dZ:", anOffsetsPane) );
+  aHBLay->addWidget( myDzEdt = new QtxDoubleSpinBox (anOffsetsPane) );
   myDzEdt->setRange(-MAXVAL, MAXVAL);
 
   QPushButton* aResetBtn = new QPushButton(tr("BTN_RESET"), anOffsetsPane);
+  aHBLay->addWidget( aResetBtn );
   connect(aResetBtn, SIGNAL(clicked()), this, SLOT(onReset()));
 
   TopLayout->addWidget(anOffsetsPane);
@@ -96,32 +97,32 @@ myModule(theModule)
   }
 
   // Common buttons ===========================================================
-  QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons");
-  GroupButtons->setColumnLayout(0, Qt::Vertical);
-  GroupButtons->layout()->setSpacing(0);
-  GroupButtons->layout()->setMargin(0);
-  QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
+  QGroupBox* GroupButtons = new QGroupBox(this);
+  //GroupButtons->setColumnLayout(0, Qt::Vertical);
+  //GroupButtons->layout()->setSpacing(0);
+  //GroupButtons->layout()->setMargin(0);
+  QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons);
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6);
   GroupButtonsLayout->setMargin(11);
 
-  QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons, "buttonOk");
+  QPushButton* buttonOk = new QPushButton(tr("&OK"), GroupButtons);
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
   GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
 
-  QPushButton* buttonApply = new QPushButton(tr("&Apply"), GroupButtons, "buttonApply");
+  QPushButton* buttonApply = new QPushButton(tr("&Apply"), GroupButtons);
   buttonOk->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonApply, 0, 2);
   GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 3);
 
-  QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons, "buttonCancel");
+  QPushButton* buttonCancel = new QPushButton(tr("&Cancel") , GroupButtons);
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 4);
   GroupButtonsLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 5);  
 
-  QPushButton* buttonHelp = new QPushButton(tr("&Help") , GroupButtons, "buttonHelp");
+  QPushButton* buttonHelp = new QPushButton(tr("&Help") , GroupButtons );
   buttonHelp->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonHelp, 0, 6);
 
@@ -182,21 +183,19 @@ void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, vtkFloatingPointTyp
   if (myPrsList.count() == 0) 
     return;
 
-  if (isToSave()) 
+  if (isToSave())
     thePrs->SetOffset(theOffset[0],theOffset[1],theOffset[2]);
 
   ViewManagerList aViewManagerList;
   SalomeApp_Application* anApp = myModule->getApp();
   anApp->viewManagers(aViewManagerList);
-  QPtrListIterator<SUIT_ViewManager> anVMIter (aViewManagerList);
-  for (; anVMIter.current(); ++anVMIter) {
-    SUIT_ViewManager* aViewManager = anVMIter.current();
-    QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+  QList<SUIT_ViewManager*>::Iterator anVMIter = aViewManagerList.begin();
+  for (; anVMIter !=  aViewManagerList.end(); anVMIter++ ) {
+    QVector<SUIT_ViewWindow*> aViews = (*anVMIter)->getViews();
     for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
       if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
         if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
          vw->onAdjustTrihedron();
-
           if (VISU_Actor* anActor = VISU::FindActor(vw, thePrs)) {
             anActor->SetPosition(theOffset);
            vw->highlight(thePrs->GetIO(), 1);
@@ -249,10 +248,10 @@ void VisuGUI_OffsetDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             QObject::tr("BUT_OK"));
   }
 }
 
@@ -262,7 +261,7 @@ void VisuGUI_OffsetDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index a1d67a511616a9d8a01aa9f15141434c4fabdc3a..217c83994d71ca32ad98b345d34214cff6058c70 100644 (file)
 #include "VISU_Prs3d_i.hh"
 
 // QT Includes
-#include <qdialog.h>
-#include <qptrlist.h>
+#include <QDialog>
+#include <QList>
 
 class QCheckBox;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 class VisuGUI;
 
 struct OffsetStruct
@@ -82,13 +82,13 @@ class VisuGUI_OffsetDlg: public QDialog
 
   VisuGUI * myModule;
 
-  QtxDblSpinBox * myDxEdt;
-  QtxDblSpinBox * myDyEdt;
-  QtxDblSpinBox * myDzEdt;
+  QtxDoubleSpinBox * myDxEdt;
+  QtxDoubleSpinBox * myDyEdt;
+  QtxDoubleSpinBox * myDzEdt;
   QCheckBox     * mySaveChk;
 
-  QPtrList<VISU::Prs3d_i>  myPrsList;
-  QValueList<OffsetStruct> myOldOffsets;
+  QList<VISU::Prs3d_i*>  myPrsList;
+  QList<OffsetStruct> myOldOffsets;
 };
 
 #endif // DIALOGBOX_OFFSET_H
index a7d454c821f1db10cc15b45fc841dd306bf211de..f84910aebb4a2086c94b061bc8895adc6d9f1c65 100644 (file)
 #include "SUIT_ResourceMgr.h"
 #include "LightApp_Application.h"
 
-#include "QtxDblSpinBox.h"
-
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qtabwidget.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
+#include "QtxDoubleSpinBox.h"
+
+#include <QLayout>
+#include <QValidator>
+#include <QTabWidget>
+#include <QRadioButton>
+#include <QSpinBox>
+#include <QCheckBox>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QKeyEvent>
+#include <QButtonGroup>
+#include <QGroupBox>
+#include <QLabel>
+#include <QPushButton>
 
 #include <vtkUnstructuredGrid.h>
 #include <vtkDataSetMapper.h>
@@ -140,102 +147,123 @@ class TPlane : public SALOME_Actor
 //purpose  :
 //=======================================================================
 VisuGUI_Plot3DPane::VisuGUI_Plot3DPane (QWidget* parent)
-     : QVBox(parent), myInitFromPrs(false), myPreviewActor(NULL),
+     : QWidget(parent), myInitFromPrs(false), myPreviewActor(NULL),
        myViewWindow(VISU::GetActiveViewWindow<SVTK_ViewWindow>()), myPrs(NULL), myPipeCopy(NULL)
 {
-  layout()->setAlignment(Qt::AlignTop);
-  setSpacing(6);
+  QVBoxLayout* aMainLay = new QVBoxLayout( this );
+  aMainLay->setAlignment(Qt::AlignTop);
+  aMainLay->setSpacing(6);
 
   // Orientation
 
-  GBOrientation = new QButtonGroup (tr("Orientation"), this, "GBOrientation");
-  GBOrientation->setTitle(tr("ORIENTATION"));
-  GBOrientation->setColumnLayout(0, Qt::Vertical);
-  GBOrientation->layout()->setSpacing(0);
-  GBOrientation->layout()->setMargin(0);
-  QGridLayout* BGOrientationLayout = new QGridLayout (GBOrientation->layout());
+  GBOrientation = new QButtonGroup ( this );
+  GBoxOrient = new QGroupBox(tr("ORIENTATION"),this);
+  aMainLay->addWidget(GBoxOrient);
+  
+  //GBOrientation->setColumnLayout(0, Qt::Vertical);
+  //GBOrientation->layout()->setSpacing(0);
+  //GBOrientation->layout()->setMargin(0);
+  QGridLayout* BGOrientationLayout = new QGridLayout (GBoxOrient);
   BGOrientationLayout->setAlignment(Qt::AlignTop);
   BGOrientationLayout->setSpacing(6);
   BGOrientationLayout->setMargin(11);
 
   QRadioButton *RBxy, *RByz, *RBzx;
-  RBxy = new QRadioButton (tr("// X-Y"), GBOrientation, "RBxy");
-  RByz = new QRadioButton (tr("// Y-Z"), GBOrientation, "RByz");
-  RBzx = new QRadioButton (tr("// Z-X"), GBOrientation, "RBzx");
+  RBxy = new QRadioButton (tr("// X-Y"), GBoxOrient );
+  RByz = new QRadioButton (tr("// Y-Z"), GBoxOrient );
+  RBzx = new QRadioButton (tr("// Z-X"), GBoxOrient );
   BGOrientationLayout->addWidget(RBxy, 0, 0);
   BGOrientationLayout->addWidget(RByz, 0, 1);
   BGOrientationLayout->addWidget(RBzx, 0, 2);
 
+  GBOrientation->addButton( RBxy, 0 );
+  GBOrientation->addButton( RByz, 1 );
+  GBOrientation->addButton( RBzx, 2 );
+
   // Rotation
 
-  QGroupBox* GBrot = new QGroupBox (tr("ROTATIONS"), this, "GBrot");
-  GBrot->setColumnLayout(0, Qt::Vertical);
-  GBrot->layout()->setSpacing(0);
-  GBrot->layout()->setMargin(0);
-  QGridLayout* GBrotLayout = new QGridLayout (GBrot->layout());
+  QGroupBox* GBrot = new QGroupBox (tr("ROTATIONS"), this);
+  aMainLay->addWidget( GBrot );
+  //GBrot->setColumnLayout(0, Qt::Vertical);
+  //GBrot->layout()->setSpacing(0);
+  //GBrot->layout()->setMargin(0);
+  QGridLayout* GBrotLayout = new QGridLayout (GBrot);
   GBrotLayout->setAlignment(Qt::AlignTop);
   GBrotLayout->setSpacing(6);
   GBrotLayout->setMargin(11);
   // label 1
-  LabelRot1 = new QLabel (tr("ROTATION_X"), GBrot, "LabelRot1");
+  LabelRot1 = new QLabel (tr("ROTATION_X"), GBrot );
   GBrotLayout->addWidget(LabelRot1, 0, 0);
   // spin 1
-  Rot1 = new QtxDblSpinBox (-180, 180, 5, GBrot);
+  Rot1 = new QtxDoubleSpinBox (-180, 180, 5, GBrot);
   Rot1->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
   GBrotLayout->addWidget(Rot1, 0, 1);
   // label 2
-  LabelRot2 = new QLabel (tr("ROTATION_Y"), GBrot, "LabelRot2");
+  LabelRot2 = new QLabel (tr("ROTATION_Y"), GBrot);
   GBrotLayout->addWidget(LabelRot2, 1, 0);
   // spin 2
-  Rot2 = new QtxDblSpinBox (-180, 180, 5, GBrot);
+  Rot2 = new QtxDoubleSpinBox (-180, 180, 5, GBrot);
   Rot2->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
   GBrotLayout->addWidget(Rot2, 1, 1);
 
   // Position
 
-  QGroupBox* GBpos = new QGroupBox (tr("POSITION"), this, "GBpos");
-  GBpos->setColumnLayout(0, Qt::Horizontal);
-  GBpos->layout()->setSpacing(0);
-  GBpos->layout()->setMargin(0);
-  QGridLayout* GBposLayout = new QGridLayout (GBpos->layout());
+  QGroupBox* GBpos = new QGroupBox (tr("POSITION"), this);
+  aMainLay->addWidget( GBpos );
+  //GBpos->setColumnLayout(0, Qt::Horizontal);
+  //GBpos->layout()->setSpacing(0);
+  //GBpos->layout()->setMargin(0);
+  QGridLayout* GBposLayout = new QGridLayout (GBpos);
   GBposLayout->setAlignment(Qt::AlignTop);
   GBposLayout->setSpacing(6);
   GBposLayout->setMargin(11);
   // value label
-  QLabel * valueLabel = new QLabel (tr("POSITION_VALUE"), GBpos, "LabelRot1");
+  QLabel * valueLabel = new QLabel (tr("POSITION_VALUE"), GBpos);
   GBposLayout->addWidget(valueLabel, 0, 0);
   // value spin
-  PositionSpn = new QtxDblSpinBox (0, 1, 0.1, GBpos);
+  PositionSpn = new QtxDoubleSpinBox (0, 1, 0.1, GBpos);
   GBposLayout->addWidget(PositionSpn, 0, 1);
   // Relative CheckBox
-  RelativeChkB = new QCheckBox (tr("RELATIVE"), GBpos, "RelativeChkB");
+  RelativeChkB = new QCheckBox (tr("RELATIVE"), GBpos);
   RelativeChkB->setChecked(true);
   GBposLayout->addWidget(RelativeChkB, 0, 2);
 
   // Scale, Presentation type, Nb Contours, Preview
 
   QFrame* bottomFrame = new QFrame (this);
+  aMainLay->addWidget( bottomFrame );
   QGridLayout* bottomLayout = new QGridLayout (bottomFrame);
   bottomLayout->setAlignment(Qt::AlignTop);
   bottomLayout->setSpacing(11);
   bottomLayout->setMargin(0);
   // scale
   QLabel* scaleLabel = new QLabel (tr("SCALE"), bottomFrame);
-  ScaleSpn = new QtxDblSpinBox (-1.e6, 1.e6, 0.1, bottomFrame);
+  ScaleSpn = new QtxDoubleSpinBox (-1.e6, 1.e6, 0.1, bottomFrame);
   // Presentation type
-  GBPrsType = new QHButtonGroup (tr("PRESENTATION_TYPE"), bottomFrame);
-  new QRadioButton (tr("SURFACE"), GBPrsType);
-  new QRadioButton (tr("CONTOUR"), GBPrsType);
+  GBPrsType = new QButtonGroup ( bottomFrame);
+  QGroupBox* aGB = new QGroupBox (tr("PRESENTATION_TYPE"), bottomFrame);
+  QHBoxLayout* aHBoxLay = new QHBoxLayout( aGB );
+  
+  QRadioButton* aRB = new QRadioButton (tr("SURFACE"), aGB);
+  aHBoxLay->addWidget( aRB );
+  GBPrsType->addButton( aRB, 0 );
+  aRB = new QRadioButton (tr("CONTOUR"), aGB);
+  aHBoxLay->addWidget( aRB );
+  GBPrsType->addButton( aRB, 1 );
   // nb Contours
   QLabel* nbContLabel = new QLabel (tr("NUMBER_CONTOURS"), bottomFrame);
-  NbContoursSpn = new QSpinBox (1, 999, 1, bottomFrame, "NbContoursSpn");
+  NbContoursSpn = new QSpinBox ( bottomFrame );
+  NbContoursSpn->setMinimum( 1 );
+  NbContoursSpn->setMaximum( 999 );
+  NbContoursSpn->setSingleStep( 1 );
+  
   // Preview
   PreviewChkB = new QCheckBox (tr("PREVIEW"), bottomFrame);
   PreviewChkB->setChecked(false);
 
   bottomLayout->addWidget(scaleLabel,    0, 0);
   bottomLayout->addWidget(ScaleSpn,      0, 1);
-  bottomLayout->addMultiCellWidget(GBPrsType, 1, 1, 0, 1);
+  bottomLayout->addWidget(aGB, 1, 0, 1, 2);
   bottomLayout->addWidget(nbContLabel,   2, 0);
   bottomLayout->addWidget(NbContoursSpn, 2, 1);
   bottomLayout->addWidget(PreviewChkB,   3, 0);
@@ -347,9 +375,9 @@ void VisuGUI_Plot3DPane::onRelativePos(bool isRelativePos)
     minPos = 0.;
     maxPos = 1.;
   }
-  PositionSpn->setMinValue(minPos);
-  PositionSpn->setMaxValue(maxPos);
-  PositionSpn->setLineStep((maxPos - minPos) / 10.);
+  PositionSpn->setMinimum(minPos);
+  PositionSpn->setMaximum(maxPos);
+  PositionSpn->setSingleStep((maxPos - minPos) / 10.);
   PositionSpn->setValue(pos);
 }
 
@@ -420,8 +448,8 @@ void VisuGUI_Plot3DPane::initFromPrsObject(VISU::Plot3D_i* thePrs)
   case VISU::Plot3D::YZ: id = 1; break;
   default: id = 2;
   }
-  GBOrientation->setButton(id);
-  orientationChanged(id);
+  GBOrientation->button(id)->setChecked( true );
+  //? orientationChanged(id);
 
   // rotation
   Rot1->setValue(thePrs->GetRotateX() * 180./PI);
@@ -437,8 +465,9 @@ void VisuGUI_Plot3DPane::initFromPrsObject(VISU::Plot3D_i* thePrs)
 
   // prs type
   id = thePrs->GetIsContourPrs() ? CONTOUR_PRS_ID : SURFACE_PRS_ID;
-  GBPrsType->setButton(id);
-  onPrsType(id);
+  //GBPrsType->setButton(id);
+  GBOrientation->button(id)->setChecked( true );
+  //onPrsType(id);
 
   // nb contours
   NbContoursSpn->setValue(thePrs->GetNbOfContours());
@@ -447,7 +476,8 @@ void VisuGUI_Plot3DPane::initFromPrsObject(VISU::Plot3D_i* thePrs)
 
   if (thePrs->GetPipeLine()->IsPlanarInput())
   {
-    GBOrientation->setEnabled(false);
+    //GBOrientation->setEnabled(false);
+    GBoxOrient->setEnabled(false);
     Rot1         ->setEnabled(false);
     Rot2         ->setEnabled(false);
     PositionSpn  ->setEnabled(false);
@@ -468,7 +498,7 @@ int VisuGUI_Plot3DPane::storeToPrsObject(VISU::Plot3D_i* thePrs)
   if (myInitFromPrs)
     return 0;
   // orientation
-  int id = GBOrientation->id (GBOrientation->selected());
+  int id = GBOrientation->id (GBOrientation->checkedButton());
   VISU::Plot3D::Orientation ori;
   switch (id) {
   case 0 : ori = VISU::Plot3D::XY; break;
@@ -485,7 +515,7 @@ int VisuGUI_Plot3DPane::storeToPrsObject(VISU::Plot3D_i* thePrs)
   thePrs->SetScaleFactor(ScaleSpn->value());
 
   // prs type
-  id = GBPrsType->id (GBPrsType->selected());
+  id = GBPrsType->id (GBPrsType->checkedButton());
   thePrs->SetContourPrs(id == CONTOUR_PRS_ID);
 
   // nb contours
@@ -523,9 +553,9 @@ void VisuGUI_Plot3DPane::setPlane(int theOrientation, double theXRotation, doubl
   case VISU::Plot3D::YZ: id = 1; break;
   default: id = 2;
   }
-  GBOrientation->setButton(id);
-  orientationChanged(id);
-  GBOrientation->setEnabled(false);
+  GBOrientation->button(id)->setChecked(true);
+  //orientationChanged(id);
+  GBoxOrient->setEnabled(false);
 
 
   // Set rotation
@@ -550,7 +580,7 @@ void VisuGUI_Plot3DPane::setPlane(int theOrientation, double theXRotation, doubl
 VisuGUI_Plot3DDlg::VisuGUI_Plot3DDlg (SalomeApp_Module* theModule)
   : VisuGUI_Prs3dDlg(theModule)
 {
-  setCaption(tr("TITLE"));
+  setWindowTitle(tr("TITLE"));
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout(this);
@@ -559,35 +589,37 @@ VisuGUI_Plot3DDlg::VisuGUI_Plot3DDlg (SalomeApp_Module* theModule)
 
   myTabBox = new QTabWidget (this);
   myIsoPane = new VisuGUI_Plot3DPane (this);
-  myIsoPane->setMargin(5);
+  if ( myIsoPane->layout()  )
+    myIsoPane->layout()->setMargin(5);
   myTabBox->addTab(myIsoPane, tr("PLOT3D_TAB_TITLE"));
   myScalarPane = new VisuGUI_ScalarBarPane (this, false);
-  myScalarPane->setMargin(5);
+  if ( myScalarPane->layout() )
+    myScalarPane->layout()->setMargin(5);
   myInputPane = new VisuGUI_InputPane(VISU::TPLOT3D, theModule, this);
   myTabBox->addTab(myScalarPane, tr("SCALAR_BAR_TAB_TITLE"));
   myTabBox->addTab(myInputPane, tr("INPUT_TAB_TITLE"));
 
   TopLayout->addWidget(myTabBox);
 
-  QGroupBox* GroupButtons = new QGroupBox (this, "GroupButtons");
+  QGroupBox* GroupButtons = new QGroupBox (this );
   GroupButtons->setGeometry(QRect(10, 10, 281, 48));
-  GroupButtons->setColumnLayout(0, Qt::Vertical);
-  GroupButtons->layout()->setSpacing(0);
-  GroupButtons->layout()->setMargin(0);
-  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+  //GroupButtons->setColumnLayout(0, Qt::Vertical);
+  //GroupButtons->layout()->setSpacing(0);
+  //GroupButtons->layout()->setMargin(0);
+  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6);
   GroupButtonsLayout->setMargin(11);
 
-  QPushButton* buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk");
+  QPushButton* buttonOk = new QPushButton (tr("BUT_OK"), GroupButtons);
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
   GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
-  QPushButton* buttonCancel = new QPushButton (tr("&Cancel") , GroupButtons, "buttonCancel");
+  QPushButton* buttonCancel = new QPushButton (tr("BUT_CANCEL") , GroupButtons);
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
-  QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons, "buttonHelp");
+  QPushButton* buttonHelp = new QPushButton (tr("BUT_HELP") , GroupButtons);
   buttonHelp->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
 
@@ -643,7 +675,7 @@ void VisuGUI_Plot3DDlg::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs, bool the
     return;
 
   myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentPage( 0 );
+  myTabBox->setCurrentIndex( 0 );
 }
 
 //=======================================================================
@@ -683,10 +715,10 @@ void VisuGUI_Plot3DDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
 
@@ -709,7 +741,7 @@ void VisuGUI_Plot3DDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index baee658903e65d2ac6d4ca8a4064707c56ce6843..4167b4343b2406079ca9aec15b4daf0b62035240 100644 (file)
 
 #include "VisuGUI_Prs3dDlg.h"
 
-#include <qhbuttongroup.h>
-#include <qtabwidget.h>
+
+class QButtonGroup;
+class QTabWidget;
+class QGroupBox;
 
 class SalomeApp_Module;
 class VisuGUI_InputPane;
@@ -45,9 +47,9 @@ namespace VISU
 class VISU_Plot3DPL;
 class SVTK_ViewWindow;
 class SALOME_Actor;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 
-class VisuGUI_Plot3DPane : public QVBox
+class VisuGUI_Plot3DPane : public QWidget//QVBox
 {
   Q_OBJECT
 
@@ -75,14 +77,15 @@ class VisuGUI_Plot3DPane : public QVBox
   void restorePrsParams();
 
   QButtonGroup  * GBOrientation;
+  QGroupBox     * GBoxOrient;
   QLabel        * LabelRot1;
   QLabel        * LabelRot2;
-  QtxDblSpinBox * Rot1;
-  QtxDblSpinBox * Rot2;
-  QtxDblSpinBox * PositionSpn;
+  QtxDoubleSpinBox * Rot1;
+  QtxDoubleSpinBox * Rot2;
+  QtxDoubleSpinBox * PositionSpn;
   QCheckBox     * RelativeChkB;
-  QtxDblSpinBox * ScaleSpn;
-  QHButtonGroup * GBPrsType;
+  QtxDoubleSpinBox * ScaleSpn;
+  QButtonGroup  * GBPrsType;
   QSpinBox      * NbContoursSpn;
   QCheckBox     * PreviewChkB;
 
index 2ce90f0c8f361ee72ae0a53f55681d282fbf68e8..1fc4799178878999995093e094e3a91404fda414 100644 (file)
@@ -45,24 +45,24 @@ using namespace VISU;
 // Class: VisuGUI_Selection
 //////////////////////////////////////////////////
 
-QtxValue VisuGUI_Selection::param( const int ind, const QString& p ) const
+QVariant VisuGUI_Selection::parameter( const int ind, const QString& p ) const
 {
-  QtxValue val( LightApp_Selection::param( ind, p ) );
+  QVariant val( LightApp_Selection::parameter( ind, p ) );
   if ( !val.isValid() ) {
-    if      ( p == "type"           ) val = QtxValue( type( ind ) );
-    else if ( p == "nbComponents"   ) val = QtxValue( nbComponents( ind ) );
-    else if ( p == "medEntity"   ) val = QtxValue( medEntity( ind ) );
-    else if ( p == "medSource"   ) val = QtxValue( medSource( ind ) );
-    else if ( p == "representation" ) val = QtxValue( representation( ind ) );
-    else if ( p == "nbTimeStamps"   ) val = QtxValue( nbTimeStamps( ind ) );
-    else if ( p == "nbChildren"     ) val = QtxValue( nbChildren( ind ) );
-    else if ( p == "nbNamedChildren") val = QtxValue( nbNamedChildren( ind ) );
-    else if ( p == "isVisible"      ) val = QtxValue( isVisible( ind ) );
-    else if ( p == "isShrunk"       ) val = QtxValue( isShrunk( ind ) );
-    else if ( p == "hasActor"       ) val = QtxValue( hasActor( ind ) );
-    else if ( p == "isShading"      ) val = QtxValue( isShading( ind ) );
-    else if ( p == "isScalarMapAct" ) val = QtxValue( isScalarMapAct( ind ) );
-    else if ( p == "isVisuComponent") val = QtxValue( isVisuComponent( ind ) );
+    if      ( p == "type"           ) val = QVariant( type( ind ) );
+    else if ( p == "nbComponents"   ) val = QVariant( nbComponents( ind ) );
+    else if ( p == "medEntity"   ) val = QVariant( medEntity( ind ) );
+    else if ( p == "medSource"   ) val = QVariant( medSource( ind ) );
+    else if ( p == "representation" ) val = QVariant( representation( ind ) );
+    else if ( p == "nbTimeStamps"   ) val = QVariant( nbTimeStamps( ind ) );
+    else if ( p == "nbChildren"     ) val = QVariant( nbChildren( ind ) );
+    else if ( p == "nbNamedChildren") val = QVariant( nbNamedChildren( ind ) );
+    else if ( p == "isVisible"      ) val = QVariant( isVisible( ind ) );
+    else if ( p == "isShrunk"       ) val = QVariant( isShrunk( ind ) );
+    else if ( p == "hasActor"       ) val = QVariant( hasActor( ind ) );
+    else if ( p == "isShading"      ) val = QVariant( isShading( ind ) );
+    else if ( p == "isScalarMapAct" ) val = QVariant( isScalarMapAct( ind ) );
+    else if ( p == "isVisuComponent") val = QVariant( isVisuComponent( ind ) );
   }
 
   return val;
@@ -81,7 +81,7 @@ QString VisuGUI_Selection::type( const int ind ) const
   if ( !aStudy )
     return aResStr;
 
-  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ));
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
   VISU::Storable::TRestoringMap aMap = VISU::GetStorableMap(anObjectInfo.mySObject);
 
   VISU::Base_i* aBase = anObjectInfo.myBase;
@@ -144,7 +144,7 @@ QString VisuGUI_Selection::nbComponents( const int ind ) const
   if ( !aStudy )
     return aResStr;
 
-  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ));
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
   VISU::Storable::TRestoringMap aMap = VISU::GetStorableMap(anObjectInfo.mySObject);
 
   bool isExist;
@@ -160,7 +160,7 @@ QString VisuGUI_Selection::medEntity( const int ind ) const
   if ( !aStudy )
     return QString();
 
-  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ));
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
   VISU::Storable::TRestoringMap aMap = VISU::GetStorableMap(anObjectInfo.mySObject);
 
   bool isExist;
@@ -187,7 +187,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).latin1())){
+  if(_PTR(SObject) aSObject = aStudyDS->FindObjectID((const char*)entry(ind).toLatin1())){
     VISU::Result_var aRes;
     if(VISU::Result_i* aResult = CheckResult(myModule,aSObject,aRes)){
       using namespace VISU;
@@ -216,7 +216,7 @@ QString VisuGUI_Selection::nbTimeStamps( const int ind ) const
   if ( !aStudy )
     return aResStr;
 
-  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, entry( ind ));
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(aStudy, (const char*)entry( ind ).toLatin1());
   VISU::Storable::TRestoringMap aMap = VISU::GetStorableMap(anObjectInfo.mySObject);
 
   bool isExist;
@@ -257,7 +257,7 @@ GetPrs3dSelectionInfo(const SalomeApp_Module* theModule,
                      SVTK_ViewWindow*& theViewWindow,
                      VISU_Actor*& thenActor)
 {
-  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(GetAppStudy(theModule), theEntry);
+  VISU::TObjectInfo anObjectInfo = VISU::GetObjectByEntry(GetAppStudy(theModule), (const char*)theEntry.toLatin1());
   thePrs3d = GetPrs3dFromBase(anObjectInfo.myBase);
   if(!thePrs3d)
     return false;
@@ -346,7 +346,7 @@ int VisuGUI_Selection::nbChild( const int ind, const bool named ) const
     return cnt;
   _PTR(Study) aStudy =  GetCStudy( aSStudy );
   if ( aStudy ){
-    _PTR(SObject) SO = aStudy->FindObjectID( entry( ind ).latin1() );
+    _PTR(SObject) SO = aStudy->FindObjectID( (const char*)entry( ind ).toLatin1() );
     if ( SO ){
       for ( _PTR(ChildIterator) Iter = aStudy->NewChildIterator( SO ); Iter->More(); Iter->Next() ) {
        _PTR(SObject) refSO;
@@ -467,7 +467,7 @@ bool VisuGUI_Selection::isVisuComponent( const int ind ) const
   if ( !study )
     return false;
   
-  _PTR(SObject) obj = study->studyDS()->FindObjectID( entry( ind ).latin1() );
+  _PTR(SObject) obj = study->studyDS()->FindObjectID( (const char*)entry( ind ).toLatin1() );
   if ( !obj )
     return false;
   CORBA::Object_var anObj = VISU::ClientSObjectToObject( obj );
index 536ef59a94745cea92a066fa2a127a69e49b992a..bd2ae055d7c716c8c986c1fb775a209aed1c71f3 100644 (file)
@@ -40,10 +40,11 @@ class SalomeApp_Study;
 class VisuGUI_Selection : public LightApp_Selection
 {
 public:
-  VisuGUI_Selection( SalomeApp_Module* theModule ) : myModule( theModule ) {};
+  VisuGUI_Selection( SalomeApp_Module* theModule, const QString& client, LightApp_SelectionMgr* mgr)
+    : LightApp_Selection( client, mgr ), myModule( theModule ) {};
   virtual ~VisuGUI_Selection() {};
 
-  virtual QtxValue param( const int, const QString& ) const;
+  virtual QVariant parameter( const int, const QString& ) const;
 
 private:
   QString          type( const int ) const;
index 892c3051171a033a1b2797e524f52796ec98ebd6..658c335d917f4c4e1fd5547595104cf31d3c65c5 100644 (file)
 #include "SUIT_Session.h"
 #include "SUIT_MessageBox.h"
 #include "SUIT_ResourceMgr.h"
-
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qvbox.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qcolordialog.h>
-#include <qtabwidget.h>
-
-#include "QtxDblSpinBox.h"
+#include "SUIT_Desktop.h"
+
+#include <QCheckBox>
+#include <QLineEdit>
+#include <QRadioButton>
+#include <QButtonGroup>
+#include <QGroupBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QComboBox>
+#include <QToolButton>
+#include <QLayout>
+#include <QValidator>
+#include <QColorDialog>
+#include <QTabWidget>
+#include <QKeyEvent>
+#include <QGridLayout>
+
+#include "QtxDoubleSpinBox.h"
 
 #include <vtkTextProperty.h>
 
@@ -80,10 +82,10 @@ using namespace std;
   Constructor
 */
 VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent)
-  : QDialog(parent, 0, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+  : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
 {
-  setName("VisuGUI_TextPrefDlg");
-  setCaption(tr("TIT_TEXT_PREF"));
+  setModal( true );
+  setWindowTitle(tr("TIT_TEXT_PREF"));
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout(this);
@@ -91,49 +93,62 @@ VisuGUI_TextPrefDlg::VisuGUI_TextPrefDlg (QWidget* parent)
   TopLayout->setMargin(11);
 
   // "Title" grp
-  QGroupBox* aTitleGrp = new QGroupBox (2, Qt::Vertical, tr("LBL_TITLE"), this);
+  QGroupBox* aTitleGrp = new QGroupBox ( tr("LBL_TITLE"), this);
+  QVBoxLayout* aVBLay = new QVBoxLayout( aTitleGrp );
 
-  //   edit line
+  //   edit line  
   myTitleEdt = new QLineEdit (aTitleGrp);
+  aVBLay->addWidget( myTitleEdt);
 
   //   font
-  QHBox* aHBox = new QHBox (aTitleGrp);
-  aHBox->setSpacing(5);
+  QWidget* aHBox = new QWidget (aTitleGrp);
+  aVBLay->addWidget( aHBox );
+
+  QHBoxLayout* aHBLay = new QHBoxLayout( aHBox );
+  aHBLay->setSpacing(5);
+
   myTitleFont = new SVTK_FontWidget (aHBox);
+  aHBLay->addWidget( myTitleFont );
 
   TopLayout->addWidget(aTitleGrp);
 
   // "Labels" grp
-  QGroupBox* aLabelsGrp = new QGroupBox (1, Qt::Vertical, tr("LBL_LABELS"), this);
+  QGroupBox* aLabelsGrp = new QGroupBox (tr("LBL_LABELS"), this);
+  aVBLay = new QVBoxLayout( aLabelsGrp );
 
   //   font
-  aHBox = new QHBox (aLabelsGrp);
-  aHBox->setSpacing(5);
+  aHBox = new QWidget (aLabelsGrp);
+  aVBLay->addWidget( aHBox );
+
+  aHBLay = new QHBoxLayout( aHBox );
+  aHBLay->setSpacing(5);
+  
   myLabelFont = new SVTK_FontWidget (aHBox);
+  aHBLay->addWidget( myLabelFont );
 
   TopLayout->addWidget(aLabelsGrp);
 
   // Common buttons ===========================================================
-  QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
-  GroupButtons->setColumnLayout(0, Qt::Vertical );
-  GroupButtons->layout()->setSpacing( 0 );
-  GroupButtons->layout()->setMargin( 0 );
-  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+  QGroupBox* GroupButtons = new QGroupBox( this );
+  //GroupButtons->setColumnLayout(0, Qt::Vertical );
+  //GroupButtons->layout()->setSpacing( 0 );
+  //GroupButtons->layout()->setMargin( 0 );
+  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
   GroupButtonsLayout->setSpacing( 6 );
   GroupButtonsLayout->setMargin( 11 );
 
-  QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+  QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons );
   buttonOk->setAutoDefault( TRUE );
   buttonOk->setDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
 
-  QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+  QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons );
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
 
-  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons );
   buttonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
@@ -171,10 +186,10 @@ void VisuGUI_TextPrefDlg::onHelp()
     app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
   }
   else {
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                             QObject::tr("BUT_OK"));
   }
 }
 
@@ -215,7 +230,7 @@ void VisuGUI_TextPrefDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
@@ -230,8 +245,9 @@ void VisuGUI_TextPrefDlg::keyPressEvent( QKeyEvent* e )
   Constructor
 */
 VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref):
-  QVBox(parent), myPreviewActor(0)
+  QWidget(parent), myPreviewActor(0)
 {
+  QVBoxLayout* aMainLayout = new QVBoxLayout( this );
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   QString propertyName;
   propertyName = QString("scalar_bar_vertical_");
@@ -249,51 +265,53 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref):
   Imin = 0.0; Imax = 0.0; /*Fmin = 0.0; Fmax = 0.0;*/ Rmin = 0.0; Rmax = 0.0;
   myRangeMode = -1;
 
-  setSpacing(6);
+  aMainLayout->setSpacing(6);
   //setMargin(11);
 
   // Range ============================================================
-  RangeGroup = new QButtonGroup (tr("SCALAR_RANGE_GRP"), this, "RangeGroup");
-  RangeGroup->setColumnLayout(0, Qt::Vertical );
-  RangeGroup->layout()->setSpacing( 0 );
-  RangeGroup->layout()->setMargin( 0 );
-  QGridLayout* RangeGroupLayout = new QGridLayout( RangeGroup->layout() );
+  RangeGroup = new QButtonGroup ( this );
+  QGroupBox* aGB = new QGroupBox( tr("SCALAR_RANGE_GRP"),this  );
+  aMainLayout->addWidget( aGB );
+  //RangeGroup->setColumnLayout(0, Qt::Vertical );
+  //RangeGroup->layout()->setSpacing( 0 );
+  //RangeGroup->layout()->setMargin( 0 );
+  QGridLayout* RangeGroupLayout = new QGridLayout( aGB );
   RangeGroupLayout->setAlignment( Qt::AlignTop );
   RangeGroupLayout->setSpacing( 6 );
   RangeGroupLayout->setMargin( 11 );
 
-  myModeLbl = new QLabel("Scalar Mode", RangeGroup);
+  myModeLbl = new QLabel("Scalar Mode", aGB);
 
-  myModeCombo = new QComboBox(RangeGroup);
+  myModeCombo = new QComboBox(aGB);
 
-  CBLog = new QCheckBox (tr("LOGARITHMIC_SCALING"), RangeGroup);
+  CBLog = new QCheckBox (tr("LOGARITHMIC_SCALING"), aGB);
   CBLog->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
-  RBFrange = new QRadioButton (tr("FIELD_RANGE_BTN"), RangeGroup, "RBFrange");
-  RBIrange = new QRadioButton (tr("IMPOSED_RANGE_BTN"), RangeGroup, "RBIrange");
+  RBFrange = new QRadioButton (tr("FIELD_RANGE_BTN"), aGB);
+  RBIrange = new QRadioButton (tr("IMPOSED_RANGE_BTN"), aGB);
   RBFrange->setChecked( true );
 
-  MinEdit = new QLineEdit( RangeGroup, "MinEdit" );
+  MinEdit = new QLineEdit( aGB );
   MinEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   MinEdit->setMinimumWidth( 70 );
   MinEdit->setValidator( new QDoubleValidator(this) );
   MinEdit->setText( "0.0" );
-  QLabel* MinLabel = new QLabel (tr("LBL_MIN"), RangeGroup, "MinLabel");
+  QLabel* MinLabel = new QLabel (tr("LBL_MIN"), aGB);
   MinLabel->setBuddy(MinEdit);
 
-  MaxEdit = new QLineEdit( RangeGroup, "MaxEdit" );
+  MaxEdit = new QLineEdit( aGB );
   MaxEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   MaxEdit->setMinimumWidth( 70 );
   MaxEdit->setValidator( new QDoubleValidator(this) );
   MaxEdit->setText( "0.0" );
-  QLabel* MaxLabel = new QLabel (tr("LBL_MAX"), RangeGroup, "MaxLabel");
+  QLabel* MaxLabel = new QLabel (tr("LBL_MAX"), aGB);
   MaxLabel->setBuddy(MaxEdit);
 
   RangeGroupLayout->addWidget( myModeLbl, 0, 0 );
-  RangeGroupLayout->addMultiCellWidget( myModeCombo, 0, 0, 1, 3);
-  RangeGroupLayout->addMultiCellWidget( CBLog, 1, 1, 0, 3);
-  RangeGroupLayout->addMultiCellWidget( RBFrange, 2, 2, 0, 1);
-  RangeGroupLayout->addMultiCellWidget( RBIrange, 2, 2, 2, 3);
+  RangeGroupLayout->addWidget( myModeCombo, 0, 1, 1, 4);
+  RangeGroupLayout->addWidget( CBLog, 1, 0, 1, 4);
+  RangeGroupLayout->addWidget( RBFrange, 2, 0, 1, 2);
+  RangeGroupLayout->addWidget( RBIrange, 2, 2, 1, 2);
   RangeGroupLayout->addWidget( MinLabel, 3, 0 );
   RangeGroupLayout->addWidget( MinEdit,  3, 1 );
   RangeGroupLayout->addWidget( MaxLabel, 3, 2 );
@@ -302,23 +320,31 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref):
   //TopLayout->addWidget( RangeGroup );
 
   // Colors and Labels ========================================================
-  QGroupBox* ColLabGroup = new QGroupBox (tr("COLORS_LABELS_GRP"), this, "ColLabGroup");
-  ColLabGroup->setColumnLayout(0, Qt::Vertical );
-  ColLabGroup->layout()->setSpacing( 0 );
-  ColLabGroup->layout()->setMargin( 0 );
-  QGridLayout* ColLabGroupLayout = new QGridLayout( ColLabGroup->layout() );
+  QGroupBox* ColLabGroup = new QGroupBox (tr("COLORS_LABELS_GRP"), this);
+  aMainLayout->addWidget( ColLabGroup );
+  //ColLabGroup->setColumnLayout(0, Qt::Vertical );
+  //ColLabGroup->layout()->setSpacing( 0 );
+  //ColLabGroup->layout()->setMargin( 0 );
+  QGridLayout* ColLabGroupLayout = new QGridLayout( ColLabGroup );
   ColLabGroupLayout->setAlignment( Qt::AlignTop );
   ColLabGroupLayout->setSpacing( 6 );
   ColLabGroupLayout->setMargin( 11 );
 
-  QLabel* ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup, "ColorLabel");
-  ColorSpin = new QSpinBox( 2, 256, 1, ColLabGroup );
+  QLabel* ColorLabel = new QLabel (tr("LBL_NB_COLORS"), ColLabGroup);
+  ColorSpin = new QSpinBox( ColLabGroup );
+  ColorSpin->setMinimum( 2 );
+  ColorSpin->setMaximum( 256 );
+  ColorSpin->setSingleStep( 1 );
   ColorSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   ColorSpin->setMinimumWidth( 70 );
   ColorSpin->setValue( 64 );
 
-  QLabel* LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup, "LabelLabel");
-  LabelSpin = new QSpinBox( 2, 65, 1, ColLabGroup );
+  QLabel* LabelLabel = new QLabel (tr("LBL_NB_LABELS"), ColLabGroup);
+  LabelSpin = new QSpinBox( ColLabGroup );
+  LabelSpin->setMinimum( 2 );
+  LabelSpin->setMaximum( 65 );
+  LabelSpin->setSingleStep( 1 );
+  
   LabelSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   LabelSpin->setMinimumWidth( 70 );
   LabelSpin->setValue( 5 );
@@ -331,41 +357,46 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref):
   //TopLayout->addWidget( ColLabGroup );
 
   // Orientation ==========================================================
-  QButtonGroup* OrientGroup = new QButtonGroup (tr("ORIENTATION_GRP"), this, "OrientGroup");
-  OrientGroup->setColumnLayout(0, Qt::Vertical );
-  OrientGroup->layout()->setSpacing( 0 );
-  OrientGroup->layout()->setMargin( 0 );
-  QGridLayout* OrientGroupLayout = new QGridLayout( OrientGroup->layout() );
+  QButtonGroup* OrientGroup = new QButtonGroup ( this );
+  QGroupBox* OrientGB = new QGroupBox( tr("ORIENTATION_GRP"),this );
+  aMainLayout->addWidget( OrientGB );
+  //OrientGroup->setColumnLayout(0, Qt::Vertical );
+  //OrientGroup->layout()->setSpacing( 0 );
+  //OrientGroup->layout()->setMargin( 0 );
+  QGridLayout* OrientGroupLayout = new QGridLayout( OrientGB );
   OrientGroupLayout->setAlignment( Qt::AlignTop );
   OrientGroupLayout->setSpacing( 6 );
   OrientGroupLayout->setMargin( 11 );
 
-  RBvert = new QRadioButton (tr("VERTICAL_BTN"), OrientGroup, "RBvert");
+  RBvert = new QRadioButton (tr("VERTICAL_BTN"), OrientGB);
   RBvert->setChecked( true );
-  RBhori = new QRadioButton (tr("HORIZONTAL_BTN"), OrientGroup, "RBhori");
+  RBhori = new QRadioButton (tr("HORIZONTAL_BTN"), OrientGB);
+  OrientGroup->addButton( RBvert );
+  OrientGroup->addButton( RBhori );
   OrientGroupLayout->addWidget( RBvert, 0, 0 );
   OrientGroupLayout->addWidget( RBhori, 0, 1 );
 
   //  TopLayout->addWidget( OrientGroup );
 
   // Origin ===============================================================
-  QGroupBox* OriginGroup = new QGroupBox (tr("ORIGIN_GRP"), this, "OriginGroup");
-  OriginGroup->setColumnLayout(0, Qt::Vertical );
-  OriginGroup->layout()->setSpacing( 0 );
-  OriginGroup->layout()->setMargin( 0 );
-  QGridLayout* OriginGroupLayout = new QGridLayout( OriginGroup->layout() );
+  QGroupBox* OriginGroup = new QGroupBox (tr("ORIGIN_GRP"), this);
+  aMainLayout->addWidget( OriginGroup );
+  //OriginGroup->setColumnLayout(0, Qt::Vertical );
+  //OriginGroup->layout()->setSpacing( 0 );
+  // OriginGroup->layout()->setMargin( 0 );
+  QGridLayout* OriginGroupLayout = new QGridLayout( OriginGroup );
   OriginGroupLayout->setAlignment( Qt::AlignTop );
   OriginGroupLayout->setSpacing( 6 );
   OriginGroupLayout->setMargin( 11 );
 
-  QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup, "XLabel");
-  XSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+  QLabel* XLabel = new QLabel (tr("LBL_X"), OriginGroup);
+  XSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
   XSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   XSpin->setMinimumWidth( 70 );
   XSpin->setValue( 0.01 );
 
-  QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup, "YLabel");
-  YSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, OriginGroup );
+  QLabel* YLabel = new QLabel (tr("LBL_Y"), OriginGroup);
+  YSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, OriginGroup );
   YSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   YSpin->setMinimumWidth( 70 );
   YSpin->setValue( 0.01 );
@@ -378,23 +409,24 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref):
   //TopLayout->addWidget( OriginGroup );
 
   // Dimensions =========================================================
-  QGroupBox* DimGroup = new QGroupBox (tr("DIMENSIONS_GRP"), this, "DimGroup");
-  DimGroup->setColumnLayout(0, Qt::Vertical );
-  DimGroup->layout()->setSpacing( 0 );
-  DimGroup->layout()->setMargin( 0 );
-  QGridLayout* DimGroupLayout = new QGridLayout( DimGroup->layout() );
+  QGroupBox* DimGroup = new QGroupBox (tr("DIMENSIONS_GRP"), this );
+  aMainLayout->addWidget( DimGroup );
+  //DimGroup->setColumnLayout(0, Qt::Vertical );
+  //DimGroup->layout()->setSpacing( 0 );
+  //DimGroup->layout()->setMargin( 0 );
+  QGridLayout* DimGroupLayout = new QGridLayout( DimGroup );
   DimGroupLayout->setAlignment( Qt::AlignTop );
   DimGroupLayout->setSpacing( 6 );
   DimGroupLayout->setMargin( 11 );
 
-  QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup, "WidthLabel");
-  WidthSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, DimGroup );
+  QLabel* WidthLabel = new QLabel (tr("LBL_WIDTH"), DimGroup);
+  WidthSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
   WidthSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   WidthSpin->setMinimumWidth( 70 );
   WidthSpin->setValue( 0.1 );
 
-  QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup, "HeightLabel");
-  HeightSpin = new QtxDblSpinBox( 0.0, 1.0, 0.1, DimGroup );
+  QLabel* HeightLabel = new QLabel (tr("LBL_HEIGHT"), DimGroup);
+  HeightSpin = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, DimGroup );
   HeightSpin->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   HeightSpin->setMinimumWidth( 70 );
   HeightSpin->setValue( 0.8 );
@@ -407,32 +439,37 @@ VisuGUI_ScalarBarPane::VisuGUI_ScalarBarPane (QWidget * parent, bool SetPref):
   //TopLayout->addWidget( DimGroup );
 
   // Save check box ===========================================================
-  QHBox* aSaveBox = new QHBox(this);
+  QWidget* aSaveBox = new QWidget(this);
+  aMainLayout->addWidget( aSaveBox );
+  QVBoxLayout* aVBLay = new QVBoxLayout( aSaveBox );
   if (!SetPref) {
-    CBSave = new QCheckBox (tr("SAVE_DEFAULT_CHK"), aSaveBox, "CBSave");
+    CBSave = new QCheckBox (tr("SAVE_DEFAULT_CHK"), aSaveBox);
+    aVBLay->addWidget( CBSave );
     //TopLayout->addWidget(CBSave);
   }
   else {
     CBSave = 0;
   }
-  myTextBtn = new QPushButton("Text properties...", aSaveBox);
-  myTextDlg = new VisuGUI_TextPrefDlg(this);
+  aVBLay->addWidget( myTextBtn = new QPushButton("Text properties...", aSaveBox) );
+  
+  aMainLayout->addWidget( myTextDlg = new VisuGUI_TextPrefDlg(this) );
   myTextDlg->setTitleVisible(!SetPref);
 
-  QGroupBox* CheckGroup = new QGroupBox("", this, "CheckGroup");
-  CheckGroup->setColumnLayout(0, Qt::Vertical );
-  CheckGroup->layout()->setSpacing( 0 );
-  CheckGroup->layout()->setMargin( 0 );
-  QGridLayout* CheckGroupLayout = new QGridLayout( CheckGroup->layout() );
+  QGroupBox* CheckGroup = new QGroupBox("", this );
+  aMainLayout->addWidget( CheckGroup );
+  //CheckGroup->setColumnLayout(0, Qt::Vertical );
+  //CheckGroup->layout()->setSpacing( 0 );
+  //CheckGroup->layout()->setMargin( 0 );
+  QGridLayout* CheckGroupLayout = new QGridLayout( CheckGroup );
   
   myPreviewCheck = new QCheckBox(tr("LBL_SHOW_PREVIEW"), CheckGroup);
   myPreviewCheck->setChecked(false);
   CheckGroupLayout->addWidget(myPreviewCheck , 0, 0 );
 
   // signals and slots connections ===========================================
-  connect( RangeGroup,   SIGNAL( clicked( int ) ), this, SLOT( changeRange( int ) ) );
+  connect( RangeGroup,   SIGNAL( buttonClicked( int ) ), this, SLOT( changeRange( int ) ) );
   connect( myModeCombo,   SIGNAL( activated( int ) ), this, SLOT( changeScalarMode( int ) ) );
-  connect( OrientGroup,  SIGNAL( clicked( int ) ), this, SLOT( changeDefaults( int ) ) );
+  connect( OrientGroup,  SIGNAL( buttonClicked( int ) ), this, SLOT( changeDefaults( int ) ) );
   connect( XSpin,        SIGNAL( valueChanged( double ) ), this, SLOT( XYChanged( double ) ) );
   connect( YSpin,        SIGNAL( valueChanged( double ) ), this, SLOT( XYChanged( double ) ) );
   connect( myTextBtn,    SIGNAL( clicked() ), this, SLOT( onTextPref() ) );
@@ -467,7 +504,7 @@ void VisuGUI_ScalarBarPane::initFromResources() {
   }
 
   int aScalarMode = aResourceMgr->integerValue("VISU", "scalar_bar_mode", 0);
-  myModeCombo->setCurrentItem(aScalarMode);
+  myModeCombo->setCurrentIndex(aScalarMode);
 
   orient = aResourceMgr->integerValue("VISU", "scalar_bar_orientation", orient);
   if(orient != 0){
@@ -750,26 +787,26 @@ void VisuGUI_ScalarBarPane::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs)
   int aNbComp = aField->myNbComp;
   bool isScalarMode = (aNbComp > 1);
   myModeCombo->clear();
-  myModeCombo->insertItem("<Modulus>");
+  myModeCombo->addItem("<Modulus>");
   for(int i = 0; i < aNbComp; i++){
-    QString aComponent = QString(aCompNames[i].c_str()).simplifyWhiteSpace();
+    QString aComponent = QString(aCompNames[i].c_str()).simplified();
     if(aComponent.isNull() || aComponent == "")
       aComponent = "Component " + QString::number(i+1);
     else
       aComponent = "[" + QString::number(i+1) + "] " + aComponent;
 
-    QString anUnit = QString(aUnitNames[i].c_str()).simplifyWhiteSpace();
+    QString anUnit = QString(aUnitNames[i].c_str()).simplified();
     if(anUnit.isNull() || anUnit == "")
       anUnit = "-";
     
     aComponent = aComponent + ", " + anUnit;
 
-    myModeCombo->insertItem(aComponent);
+    myModeCombo->addItem(aComponent);
   }
   //
-  myModeCombo->setCurrentItem(myScalarMap->GetScalarMode());
+  myModeCombo->setCurrentIndex(myScalarMap->GetScalarMode());
   if (aNbComp==1){
-    myModeCombo->setCurrentItem(1);
+    myModeCombo->setCurrentIndex(1);
   }
   //
   myModeLbl->setEnabled(isScalarMode);
@@ -845,7 +882,7 @@ void VisuGUI_ScalarBarPane::createScalarBar()
   myPreviewActor->GetScalarBar()->VisibilityOn();
   myPreviewActor->PickableOff();
   
-  myScalarMapPL->SetScalarMode(myModeCombo->currentItem());
+  myScalarMapPL->SetScalarMode(myModeCombo->currentIndex());
   if(isLogarithmic())
     myScalarMapPL->SetScaling(VISU::LOGARITHMIC);
   else
@@ -860,8 +897,8 @@ void VisuGUI_ScalarBarPane::createScalarBar()
   
   aScalarBarActor->SetLookupTable(myScalarMapPL->GetBarTable());
   
-  if (myTextDlg->getTitleText().latin1() != ""
-    aScalarBarActor->SetTitle(myTextDlg->getTitleText().latin1());
+  if ( !myTextDlg->getTitleText().isEmpty() 
+    aScalarBarActor->SetTitle((const char*)myTextDlg->getTitleText().toLatin1());
   else
     aScalarBarActor->SetTitle(myTitle.c_str());
   aScalarBarActor->SetOrientation(getOrientation());
@@ -947,7 +984,7 @@ int VisuGUI_ScalarBarPane::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs) {
   if( !myScalarMap )
     return 0;
 
-  myScalarMap->SetScalarMode(myModeCombo->currentItem());
+  myScalarMap->SetScalarMode(myModeCombo->currentIndex());
   myScalarMap->SetPosition(XSpin->value(), YSpin->value());
   myScalarMap->SetSize(WidthSpin->value(), HeightSpin->value());
   myScalarMap->SetBarOrientation((RBvert->isChecked())? VISU::ScalarMap::VERTICAL : VISU::ScalarMap::HORIZONTAL);
@@ -968,7 +1005,7 @@ int VisuGUI_ScalarBarPane::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs) {
 
   if (myIsStoreTextProp) {
     // "Title"
-    myScalarMap->SetTitle(myTextDlg->getTitleText().latin1());
+    myScalarMap->SetTitle((const char*)myTextDlg->getTitleText().toLatin1());
 
     QColor aTitColor (255, 255, 255);
     int aTitleFontFamily = VTK_ARIAL;
@@ -1073,12 +1110,12 @@ void VisuGUI_ScalarBarPane::changeRange( int )
 */
 void VisuGUI_ScalarBarPane::XYChanged( double )
 {
-  QtxDblSpinBox* snd = (QtxDblSpinBox*)sender();
+  QtxDoubleSpinBox* snd = (QtxDoubleSpinBox*)sender();
   if ( snd == XSpin ) {
-    WidthSpin->setMaxValue( 1.0 - XSpin->value() );
+    WidthSpin->setMaximum( 1.0 - XSpin->value() );
   }
   if ( snd == YSpin ) {
-    HeightSpin->setMaxValue( 1.0 - YSpin->value() );
+    HeightSpin->setMaximum( 1.0 - YSpin->value() );
   }
   updatePreview();
 }
@@ -1233,7 +1270,7 @@ bool VisuGUI_ScalarBarPane::check()
   double maxVal = MaxEdit->text().toDouble();
   if ( RBIrange->isChecked() ) {
     if (minVal >= maxVal) {
-      SUIT_MessageBox::warn1( this,tr("WRN_VISU"),
+      SUIT_MessageBox::warning( this,tr("WRN_VISU"),
                             tr("MSG_MINMAX_VALUES"),
                             tr("BUT_OK"));
       return false;
@@ -1246,10 +1283,10 @@ bool VisuGUI_ScalarBarPane::check()
        // nothing to do
       }
       else {
-       SUIT_MessageBox::warn1( this,
-                               tr("WRN_VISU"),
-                               tr("WRN_LOGARITHMIC_RANGE"),
-                               tr("BUT_OK"));
+       SUIT_MessageBox::warning( this,
+                                  tr("WRN_VISU"),
+                                  tr("WRN_LOGARITHMIC_RANGE"),
+                                  tr("BUT_OK"));
        return false;
       }
     }
@@ -1258,10 +1295,10 @@ bool VisuGUI_ScalarBarPane::check()
        // nothing to do
       }
       else {
-       SUIT_MessageBox::warn1( this,
-                               tr("WRN_VISU"),
-                               tr("WRN_LOGARITHMIC_FIELD_RANGE"),
-                               tr("BUT_OK"));
+       SUIT_MessageBox::warning( this,
+                                  tr("WRN_VISU"),
+                                  tr("WRN_LOGARITHMIC_FIELD_RANGE"),
+                                  tr("BUT_OK"));
        RBIrange->setChecked(1);
        changeRange(1);
        //MinEdit->setText( QString::number( Rmin ) );
@@ -1293,8 +1330,7 @@ void VisuGUI_ScalarBarPane::onPreviewCheck (bool thePreview)
 }
 
 VisuGUI_Prs3dDlg::VisuGUI_Prs3dDlg( SalomeApp_Module* theModule )
-  : QDialog( VISU::GetDesktop( theModule ), 0, false,
-            WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+  : QDialog( VISU::GetDesktop( theModule ), Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
 {
 }
 
index 5f6541f78f2e5c839e0e5bd40dd81ddd8233d4eb..7add01823c4872582efa29d883308bc554073468 100644 (file)
@@ -28,8 +28,7 @@
 #ifndef VISUGUI_PRS3DDLG_H
 #define VISUGUI_PRS3DDLG_H
 
-#include <qdialog.h>
-#include <qvbox.h>
+#include <QDialog>
 
 #include "SALOME_GenericObjPointer.hh"
 
@@ -45,7 +44,7 @@ class QComboBox;
 class QToolButton;
 class QTabWidget;
 
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 
 class SalomeApp_Module;
 class SVTK_FontWidget;
@@ -94,7 +93,7 @@ class VisuGUI_TextPrefDlg: public QDialog
 };
 
 
-class VisuGUI_ScalarBarPane : public QVBox
+class VisuGUI_ScalarBarPane : public QWidget//QVBox
 {
   Q_OBJECT;
 
@@ -139,11 +138,11 @@ class VisuGUI_ScalarBarPane : public QVBox
   QRadioButton*   RBhori;
   QRadioButton*   RBvert;
 
-  QtxDblSpinBox*  XSpin;
-  QtxDblSpinBox*  YSpin;
+  QtxDoubleSpinBox*  XSpin;
+  QtxDoubleSpinBox*  YSpin;
 
-  QtxDblSpinBox*  WidthSpin;
-  QtxDblSpinBox*  HeightSpin;
+  QtxDoubleSpinBox*  WidthSpin;
+  QtxDoubleSpinBox*  HeightSpin;
 
   QSpinBox*       ColorSpin;
   QSpinBox*       LabelSpin;
index a9285458b808dce5e432e2d87a58011ca69511a8..9ff1926171ab1d34a2313a4fd20d7f625d968c28 100644 (file)
@@ -34,6 +34,9 @@
 #include "VISU_ColoredPrs3dFactory.hh"
 #include "VISU_PipeLine.hxx"
 
+#include <SUIT_Desktop.h>
+#include <SUIT_ResourceMgr.h>
+
 #include <SPlot2d_ViewWindow.h>
 
 #include <vtkRenderer.h>
@@ -67,17 +70,16 @@ namespace VISU
          aPrs3d->RemoveActors();
 
          INFOS(exc.what());
-         SUIT_MessageBox::warn1
+         SUIT_MessageBox::warning
            (GetDesktop(theModule), QObject::tr("WRN_VISU"),
-            QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
-            QObject::tr("BUT_OK"));
+            QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()) );
        }
        if (theViewWindow) {
          theViewWindow->getRenderer()->ResetCameraClippingRange();
          theViewWindow->Repaint();
        }
        // Optionally, create table and curves for cut lines
-       QApplication::setOverrideCursor(Qt::waitCursor);
+       QApplication::setOverrideCursor(Qt::WaitCursor);
        CreateCurves( theModule,
                      dynamic_cast<VISU::CutLines_i*>( aPrs3d ),
                      aDlg,
@@ -120,7 +122,7 @@ namespace VISU
   {
     VISU::Result_var aResult;
     if (CheckResult(theModule, theTimeStamp, aResult)){
-      QApplication::setOverrideCursor(Qt::waitCursor);
+      QApplication::setOverrideCursor(Qt::WaitCursor);
       TPrs3d_i* aPrs3d = NULL;
       if(thePublishInStudyMode == VISU::ColoredPrs3d_i::EPublishUnderTimeStamp)
        aPrs3d = VISU::CreatePrs3d<TPrs3d_i>(aResult,
@@ -147,10 +149,9 @@ namespace VISU
          double aFreeMemory = double(VISU_PipeLine::GetAvailableMemory(2048*aMb)) / double(aMb);
 
          CORBA::Float aNecessaryMemory = aRequiredMemory - aFreeMemory - anUsedMemory;
-         SUIT_MessageBox::warn1(GetDesktop(theModule),
-                                QObject::tr("WRN_VISU"),
-                                QObject::tr("ERR_NO_MEMORY_TO_BUILD").arg(aNecessaryMemory),
-                                QObject::tr("&OK") );
+         SUIT_MessageBox::warning(GetDesktop(theModule),
+                                  QObject::tr("WRN_VISU"),
+                                  QObject::tr("ERR_NO_MEMORY_TO_BUILD").arg(aNecessaryMemory) );
          QApplication::restoreOverrideCursor();
          return NULL;
        }
@@ -158,7 +159,7 @@ namespace VISU
        {
          if( anEnlargeType == VISU::ColoredPrs3dCache::ENLARGE )
          {
-           if(SUIT_MessageBox::info2(GetDesktop(theModule),
+           if(SUIT_MessageBox::information(GetDesktop(theModule),
                                      QObject::tr("WRN_VISU"),
                                      QObject::tr("WRN_EXTRA_MEMORY_REQUIRED").arg(aRequiredMemory),
                                      QObject::tr("&OK"), QObject::tr("&Cancel"),
@@ -182,10 +183,10 @@ namespace VISU
       if(aPrs3d)
        return aPrs3d;
     }
-    SUIT_MessageBox::warn1(GetDesktop(theModule),
-                          QObject::tr("WRN_VISU"),
-                          QObject::tr("ERR_CANT_BUILD_PRESENTATION"),
-                          QObject::tr("BUT_OK") );
+    SUIT_MessageBox::warning(GetDesktop(theModule),
+                            QObject::tr("WRN_VISU"),
+                            QObject::tr("ERR_CANT_BUILD_PRESENTATION") );
+
     return NULL;
   }
 
@@ -204,10 +205,10 @@ namespace VISU
     if (!isExist || aType.toInt() != TTIMESTAMP )
       return NULL;
 
-    QString aMeshName = Storable::FindValue(aMap,"myMeshName",&isExist).latin1();
-    QString anEntity = Storable::FindValue(aMap,"myEntityId",&isExist).latin1();
-    QString aFieldName = Storable::FindValue(aMap,"myFieldName",&isExist).latin1();
-    QString aTimeStampId = Storable::FindValue(aMap,"myTimeStampId",&isExist).latin1();
+    QString aMeshName = (const char*)Storable::FindValue(aMap,"myMeshName",&isExist).toLatin1();
+    QString anEntity = (const char*)Storable::FindValue(aMap,"myEntityId",&isExist).toLatin1();
+    QString aFieldName = (const char*)Storable::FindValue(aMap,"myFieldName",&isExist).toLatin1();
+    QString aTimeStampId = (const char*)Storable::FindValue(aMap,"myTimeStampId",&isExist).toLatin1();
 
     // Create new TViewWindow instance, if it does not exist.
     typedef typename TViewer::TViewWindow TViewWindow;
@@ -217,14 +218,14 @@ namespace VISU
     int aPos = GetFreePositionOfDefaultScalarBar(theModule, aViewWindow);
     GetResourceMgr()->setValue("VISU", "scalar_bar_position_num", aPos);
 
-    QApplication::setOverrideCursor(Qt::waitCursor);
+    QApplication::setOverrideCursor(Qt::WaitCursor);
 
     TPrs3d_i* aPrs3d =
       CreatePrs3dFromFactory<TPrs3d_i>(theModule,
                                       theTimeStamp,
-                                      aMeshName.latin1(),
+                                      (const char*)aMeshName.toLatin1(),
                                       (Entity)anEntity.toInt(),
-                                      aFieldName.latin1(),
+                                      (const char*)aFieldName.toLatin1(),
                                       aTimeStampId.toInt(),
                                       thePublishInStudyMode);
     
@@ -244,7 +245,7 @@ namespace VISU
              if(SPlot2d_Viewer* aPlot2d = GetPlot2dViewer(theModule, false)) aPlot2d->EraseAll();
            } 
            // Optionally, create table and curves for cut lines
-           QApplication::setOverrideCursor(Qt::waitCursor);
+           QApplication::setOverrideCursor(Qt::WaitCursor);
            CreateCurves( theModule,
                          dynamic_cast<VISU::CutLines_i*>( aPrs3d ),
                          aDlg,
index 76e5dcaf4b1ebe17d76dbba37693f49fbec4339e..0f82b6428a6cd9c931a40f32e90cc328603dc561 100644 (file)
 #include "SUIT_ResourceMgr.h"
 
 #include <limits.h>
-#include <qlayout.h>
-#include <qvalidator.h>
-#include <qcolordialog.h>
-#include <qtabwidget.h>
+
+#include <QLayout>
+#include <QValidator>
+#include <QColorDialog>
+#include <QTabWidget>
+#include <QPushButton>
+#include <QGridLayout>
+#include <QKeyEvent>
+
 #include <vtkTextProperty.h>
 
 using namespace std;
@@ -67,8 +72,7 @@ using namespace std;
 VisuGUI_ScalarBarDlg::VisuGUI_ScalarBarDlg (SalomeApp_Module* theModule, bool SetPref)
   : VisuGUI_Prs3dDlg(theModule)
 {
-  setName("VisuGUI_ScalarBarDlg");
-  setCaption(SetPref ? tr("DLG_PREF_TITLE") : tr("DLG_PROP_TITLE"));
+  setWindowTitle(SetPref ? tr("DLG_PREF_TITLE") : tr("DLG_PROP_TITLE"));
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout(this);
@@ -77,7 +81,8 @@ VisuGUI_ScalarBarDlg::VisuGUI_ScalarBarDlg (SalomeApp_Module* theModule, bool Se
 
   myTabBox = new QTabWidget(this);
   myScalarPane = new VisuGUI_ScalarBarPane(this, SetPref);
-  myScalarPane->setMargin( 5 );
+  if ( myScalarPane->layout() )
+    myScalarPane->layout()->setMargin( 5 );
   myInputPane = new VisuGUI_InputPane(VISU::TSCALARMAP, theModule, this);
   myTabBox->addTab(myScalarPane, "Scalar Bar");
   myTabBox->addTab(myInputPane, "Input");
@@ -85,26 +90,26 @@ VisuGUI_ScalarBarDlg::VisuGUI_ScalarBarDlg (SalomeApp_Module* theModule, bool Se
   TopLayout->addWidget(myTabBox);
 
   // Common buttons ===========================================================
-  QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
-  GroupButtons->setColumnLayout(0, Qt::Vertical );
-  GroupButtons->layout()->setSpacing( 0 );
-  GroupButtons->layout()->setMargin( 0 );
-  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+  QGroupBox* GroupButtons = new QGroupBox( this );
+  //GroupButtons->setColumnLayout(0, Qt::Vertical );
+  //GroupButtons->layout()->setSpacing( 0 );
+  //GroupButtons->layout()->setMargin( 0 );
+  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
   GroupButtonsLayout->setSpacing( 6 );
   GroupButtonsLayout->setMargin( 11 );
 
-  QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+  QPushButton* buttonOk = new QPushButton( tr("BUT_OK"), GroupButtons );
   buttonOk->setAutoDefault( TRUE );
   buttonOk->setDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
 
-  QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+  QPushButton* buttonCancel = new QPushButton( tr("BUT_CANCEL") , GroupButtons );
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
 
-  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  QPushButton* buttonHelp = new QPushButton( tr("BUT_HELP") , GroupButtons );
   buttonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
@@ -151,10 +156,10 @@ void VisuGUI_ScalarBarDlg::onHelp()
     app->onHelpContextModule(aVisuGUI ? app->moduleName(aVisuGUI->moduleName()) : QString(""), aHelpFileName);
   }
   else {
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                             QObject::tr("BUT_OK"));
   }
 }
 
@@ -172,7 +177,7 @@ void VisuGUI_ScalarBarDlg::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs, bool
     return;
 
   myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentPage( 0 );
+  myTabBox->setCurrentIndex( 0 );
 }
 
 /*!
@@ -200,7 +205,7 @@ void VisuGUI_ScalarBarDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index 761f3d3dbc8eb986dd6451f79bc0cd11bef0228f..1b6a99363fcf0c0da1ee5881b3128397bfa1a191 100644 (file)
 
 #include "VisuGUI_Prs3dDlg.h"
 
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qvbox.h>
-
-#include "QtxDblSpinBox.h"
-#include "QtxListBox.h"
+class QTabWidget;
+
 
 class VisuGUI_InputPane;
 
index 9d8d0fe77d1b3af7f58c60f7acdb796e9848553c..7c7ab045f10920597307d07c430bd4dab77a35ad 100644 (file)
 #include "SALOMEDSClient_AttributeString.hxx"
 #include "SALOMEDSClient_AttributeName.hxx"
 
-#include <qlayout.h>
-#include <qtabwidget.h>
+#include <QLayout>
+#include <QTabWidget>
+#include <QGroupBox>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QLabel>
+#include <QPushButton>
+#include <QFrame>
+#include <QKeyEvent>
+
 
 using namespace std;
 
@@ -68,7 +76,7 @@ VisuGUI_ScalarMapOnDeformedShapeDlg::VisuGUI_ScalarMapOnDeformedShapeDlg (Salome
     myUpdateScalars(true),
     myVisuGUI(theModule)
 {
-  setCaption(tr("DLG_TITLE"));
+  setWindowTitle(tr("DLG_TITLE"));
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout (this);
@@ -78,9 +86,11 @@ VisuGUI_ScalarMapOnDeformedShapeDlg::VisuGUI_ScalarMapOnDeformedShapeDlg (Salome
   myTabBox = new QTabWidget (this);
 
   // Scalar Map on Deformed shape pane
-  QVBox* aBox = new QVBox (this);
-  aBox->setMargin(11);
-  QFrame* TopGroup = new QFrame (aBox, "TopGroup");
+  QWidget* aBox = new QWidget (this);
+  QVBoxLayout* aVBLay = new QVBoxLayout( aBox );
+  aVBLay->setMargin(11);
+  QFrame* TopGroup = new QFrame (aBox);
+  aVBLay->addWidget( TopGroup );
   TopGroup->setFrameStyle(QFrame::Box | QFrame::Sunken);
   TopGroup->setLineWidth(1);
   QGridLayout* TopGroupLayout = new QGridLayout (TopGroup);
@@ -89,25 +99,25 @@ VisuGUI_ScalarMapOnDeformedShapeDlg::VisuGUI_ScalarMapOnDeformedShapeDlg (Salome
   TopGroupLayout->setMargin(11);
 
   //   Scale factor
-  QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup, "ScaleLabel");
+  QLabel* ScaleLabel = new QLabel (tr("SCALE_FACTOR"), TopGroup);
   TopGroupLayout->addWidget(ScaleLabel, 0, 0);
 
-  ScalFact = new QtxDblSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
+  ScalFact = new QtxDoubleSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
   ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
-  ScalFact->setPrecision(38);
+  ScalFact->setDecimals(38);
   ScalFact->setValue(0.1);
   TopGroupLayout->addWidget(ScalFact, 0, 1);
 
   // Fields combo box
-  QLabel* FieldLabel = new QLabel (tr("FIELD_ITEM"), TopGroup, "FieldLabel");
-  myFieldsCombo = new QComboBox (TopGroup,"Fields");
+  QLabel* FieldLabel = new QLabel (tr("FIELD_ITEM"), TopGroup);
+  myFieldsCombo = new QComboBox (TopGroup );
 
   TopGroupLayout->addWidget(FieldLabel, 1, 0);
   TopGroupLayout->addWidget(myFieldsCombo,1,1);
 
   // TimeStamps combo box
-  QLabel* TimeStampLabel = new QLabel (tr("TIMESTAMP_ITEM"), TopGroup, "TimeStampLabel");
-  myTimeStampsCombo = new QComboBox (TopGroup,"TimeStamp");
+  QLabel* TimeStampLabel = new QLabel (tr("TIMESTAMP_ITEM"), TopGroup);
+  myTimeStampsCombo = new QComboBox (TopGroup);
 
   TopGroupLayout->addWidget(TimeStampLabel, 2, 0);
   TopGroupLayout->addWidget(myTimeStampsCombo,2,1);
@@ -117,24 +127,25 @@ VisuGUI_ScalarMapOnDeformedShapeDlg::VisuGUI_ScalarMapOnDeformedShapeDlg (Salome
 
   // Scalar bar pane
   myScalarPane = new VisuGUI_ScalarBarPane (this, false);
-  myScalarPane->setMargin(5);
+  if ( myScalarPane->layout() )
+    myScalarPane->layout()->setMargin(5);
   myInputPane = new VisuGUI_InputPane(VISU::TSCALARMAPONDEFORMEDSHAPE, theModule, this);
 
   myTabBox->addTab(myScalarPane, tr("SCALAR_BAR_TAB"));
   myTabBox->addTab(myInputPane, tr("INPUT_TAB"));
 
   // Buttons
-  QGroupBox* GroupButtons = new QGroupBox (this, "GroupButtons");
+  QGroupBox* GroupButtons = new QGroupBox (this);
   GroupButtons->setGeometry(QRect(10, 10, 281, 48));
-  GroupButtons->setColumnLayout(0, Qt::Vertical);
-  GroupButtons->layout()->setSpacing(0);
-  GroupButtons->layout()->setMargin(0);
-  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons->layout());
+  //GroupButtons->setColumnLayout(0, Qt::Vertical);
+  //GroupButtons->layout()->setSpacing(0);
+  //GroupButtons->layout()->setMargin(0);
+  QGridLayout* GroupButtonsLayout = new QGridLayout (GroupButtons);
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6);
   GroupButtonsLayout->setMargin(11);
 
-  QPushButton* buttonOk = new QPushButton (tr("&OK"), GroupButtons, "buttonOk");
+  QPushButton* buttonOk = new QPushButton (tr("BUT_OK"), GroupButtons);
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonOk, 0, 0);
@@ -142,11 +153,11 @@ VisuGUI_ScalarMapOnDeformedShapeDlg::VisuGUI_ScalarMapOnDeformedShapeDlg (Salome
   GroupButtonsLayout->addItem(new QSpacerItem (5, 5, QSizePolicy::Expanding,
                                                QSizePolicy::Minimum), 0, 1);
 
-  QPushButton* buttonCancel = new QPushButton (tr("&Cancel") , GroupButtons, "buttonCancel");
+  QPushButton* buttonCancel = new QPushButton (tr("BUT_CANCEL") , GroupButtons);
   buttonCancel->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonCancel, 0, 2);
 
-  QPushButton* buttonHelp = new QPushButton (tr("&Help") , GroupButtons, "buttonHelp");
+  QPushButton* buttonHelp = new QPushButton (tr("BUT_HELP") , GroupButtons);
   buttonHelp->setAutoDefault(TRUE);
   GroupButtonsLayout->addWidget(buttonHelp, 0, 3);
 
@@ -173,7 +184,7 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject(VISU::ColoredPrs3d_i
 
   setFactor(myPrsCopy->GetScale());
   myTimeStampsCombo->setDisabled(myIsAnimation);
-  myCurrMeshName = myPrsCopy->GetCMeshName();
+  myCurrMeshName = myPrsCopy->GetCMeshName().c_str();
 
   
   CORBA::String_var aMeshName = myPrsCopy->GetMeshName();
@@ -282,11 +293,11 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject(VISU::ColoredPrs3d_i
                 case 2: anEntity = VISU::FACE; break;
                 case 3: anEntity = VISU::CELL; break;
                 }
-                TFT &aFieldsMap = myMeshFieldsTimes[aMeshName.latin1()];
-                TFE aKey (aFieldName.latin1(), anEntity);
+                TFT &aFieldsMap = myMeshFieldsTimes[(const char*)aMeshName.toLatin1()];
+                TFE aKey ((const char*)aFieldName.toLatin1(), anEntity);
                 aFieldsMap[aKey][aTimeIter.toInt()] = 
-                  GetFloatValueOfTimeStamp(aMeshName.latin1(),
-                                           aFieldName.latin1(),
+                  GetFloatValueOfTimeStamp((const char*)aMeshName.toLatin1(),
+                                           (const char*)aFieldName.toLatin1(),
                                            aTimeIter.toInt(),
                                            anEntity);
               }
@@ -298,9 +309,9 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject(VISU::ColoredPrs3d_i
 
     AddAllFieldNames();
   }
-  myFieldsCombo->setCurrentText(aFieldName.in());
+  myFieldsCombo->setCurrentIndex(myFieldsCombo->findText(aFieldName.in()));
   AddAllTimes(myFieldsCombo->currentText());
-  myTimeStampsCombo->setCurrentText(aIteration);
+  myTimeStampsCombo->setCurrentIndex(myTimeStampsCombo->findText(aIteration));
   SetScalarField( false );
 
   myScalarPane->initFromPrsObject(myPrsCopy);
@@ -309,7 +320,7 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::initFromPrsObject(VISU::ColoredPrs3d_i
     return;
 
   myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentPage( 0 );
+  myTabBox->setCurrentIndex( 0 );
 }
 
 int
@@ -326,8 +337,8 @@ VisuGUI_ScalarMapOnDeformedShapeDlg
 
   CORBA::String_var aMeshName = myPrsCopy->GetMeshName();
   myPrsCopy->SetScalarField(aMeshName.in(),
-                           getCurrentScalarFieldName().latin1(),
-                           myTimeStampID[ myTimeStampsCombo->currentItem() ],
+                           (const char*)getCurrentScalarFieldName().toLatin1(),
+                           myTimeStampID[ myTimeStampsCombo->currentIndex() ],
                            myPrsCopy->GetScalarEEntity());
 
   if(myUpdateScalars) 
@@ -339,7 +350,7 @@ VisuGUI_ScalarMapOnDeformedShapeDlg
 }
 
 int VisuGUI_ScalarMapOnDeformedShapeDlg::getCurrentScalarFieldNamePos(){
-  return myFieldsCombo->currentItem();
+  return myFieldsCombo->currentIndex();
 }
 
 QString VisuGUI_ScalarMapOnDeformedShapeDlg::getCurrentScalarFieldName(){
@@ -366,7 +377,7 @@ VisuGUI_ScalarMapOnDeformedShapeDlg
 }
 
 void VisuGUI_ScalarMapOnDeformedShapeDlg::SetScalarField( const bool save_scalar_pane ){
-  SetScalarField( myTimeStampID[ myTimeStampsCombo->currentItem() ], "", save_scalar_pane );
+  SetScalarField( myTimeStampID[ myTimeStampsCombo->currentIndex() ], "", save_scalar_pane );
 }
 
 void
@@ -387,8 +398,8 @@ VisuGUI_ScalarMapOnDeformedShapeDlg
 
   VISU::Entity anEntity = getCurrentScalarEntity();
   
-  myPrsCopy->SetScalarField(myCurrMeshName.latin1(),
-                           aFieldName.latin1(),
+  myPrsCopy->SetScalarField((const char*)myCurrMeshName.toLatin1(),
+                           (const char*)aFieldName.toLatin1(),
                            theIter,
                            anEntity);
   
@@ -423,10 +434,10 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
 
@@ -437,7 +448,7 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::AddAllFieldNames(){
     TFT::const_iterator aIterField = (aIterMesh->second).begin();
     for(;aIterField != (aIterMesh->second).end(); aIterField++){
       QString aFieldName = aIterField->first.first;
-      myFieldsCombo->insertItem(aFieldName);
+      myFieldsCombo->addItem(aFieldName);
     }
   }
 }
@@ -455,7 +466,7 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::AddAllTimes(const QString& theFieldNam
       myTimeStampID.reserve( (aIterField->second).size() );
       TTL::const_iterator aTimeIter = (aIterField->second).begin();
       for(;aTimeIter != (aIterField->second).end(); aTimeIter++) {
-       myTimeStampsCombo->insertItem(QString("%1").arg(aTimeIter->second));
+       myTimeStampsCombo->addItem(QString("%1").arg(aTimeIter->second));
         myTimeStampID.push_back(aTimeIter->first);
       }
       return;
@@ -518,7 +529,7 @@ void VisuGUI_ScalarMapOnDeformedShapeDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index e6178bcd6cf4acbd3831de02ddbb51b46929133d..92e12878fa4890ab1c7d8b614e96e7132e56f322 100644 (file)
 
 #include "VISUConfig.hh"
 
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
 
-#include <qdialog.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
+class QComboBox;
+class QTabWidget;
 
 #include <set>
 #include <vector>
@@ -88,7 +83,7 @@ private slots:
   void onTimeStampChanged(int i=0);
 
 private:
- QtxDblSpinBox* ScalFact;
+ QtxDoubleSpinBox* ScalFact;
  QTabWidget* myTabBox;
  VisuGUI_ScalarBarPane* myScalarPane;
  VisuGUI_InputPane*     myInputPane;
index 7d2b00919df6aa86830181424036c67f6b4153c2..db48f0243de821e11cf69549c8f37804313f96b1 100644 (file)
@@ -43,6 +43,7 @@
 #include "LightApp_SelectionMgr.h"
 #include "LightApp_VTKSelector.h"
 
+#include "SUIT_Desktop.h"
 #include "SUIT_MessageBox.h"
 #include "SUIT_ViewWindow.h"
 #include "SUIT_Session.h"
 #include <TColStd_MapOfInteger.hxx>
 
 // QT Includes
-#include <qstring.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qlistbox.h>
-#include <qlayout.h>
-#include <qhbuttongroup.h>
-#include <qradiobutton.h>
-#include <qvalidator.h>
-#include <qpushbutton.h>
-#include <qwidgetstack.h>
-#include <qvbox.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qvalidator.h>
-#include <qtable.h>
+#include <QLabel>
+#include <QSpinBox>
+#include <QListWidget>
+#include <QLayout>
+#include <QButtonGroup>
+#include <QRadioButton>
+#include <QValidator>
+#include <QPushButton>
+#include <QStackedWidget>
+#include <QGroupBox>
+#include <QLineEdit>
+#include <QValidator>
+#include <QTableWidget>
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QKeyEvent>
+#include <QHeaderView>
 
 // VTK Includes
 #include <vtkDataSetMapper.h>
@@ -93,16 +96,17 @@ static VisuGUI_SelectionDlg* mySelectionDlg = NULL;
 
 VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule):
   QDialog(VISU::GetDesktop(theModule), 
-         0, 
-         false, 
-         WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+         Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),//WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
   mySelectionMgr(NULL),
   myModule(theModule)
 {
   if (mySelectionDlg)
-    mySelectionDlg->close(true);
+  {
+    mySelectionDlg->close();
+    delete mySelectionDlg;
+  }
 
-  setCaption( "Data on elements" );
+  setWindowTitle( tr("WINDOW_TITLE" ) );
   setSizeGripEnabled(TRUE);
 
   QGridLayout* TopLayout = new QGridLayout (this);
@@ -113,25 +117,35 @@ VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule):
   TopLayout->setRowStretch(2, 1);
   TopLayout->setRowStretch(3, 0);
 
-  QHButtonGroup* aTypeBox = new QHButtonGroup ("Selection", this);
+  QGroupBox* aTypeBox = new QGroupBox (tr("MODE_TITLE"), this);
+  QHBoxLayout* aHBox = new QHBoxLayout();
+  QButtonGroup* aBtnGroup = new QButtonGroup();
+
+  QRadioButton* aBtn = new QRadioButton (tr("MODE_POINT"), aTypeBox);
+  aHBox->addWidget( aBtn );
+  aBtnGroup->addButton( aBtn );
+
+  aBtn = new QRadioButton (tr("MODE_CELL"), aTypeBox);
+  aHBox->addWidget( aBtn );
+  aBtnGroup->addButton( aBtn );
 
-  QRadioButton* aPointBtn =
-  new QRadioButton ("Point", aTypeBox);
-  new QRadioButton ("Cell" , aTypeBox);
-  new QRadioButton ("Actor", aTypeBox);
-  aPointBtn->setChecked(true);
+  aBtn = new QRadioButton (tr("MODE_ACTOR"), aTypeBox);
+  aHBox->addWidget( aBtn );
+  aBtnGroup->addButton( aBtn );
+  
+  aBtnGroup->button(0)->setChecked(true);
 
-  connect(aTypeBox, SIGNAL(clicked(int)), this, SLOT(onSelectionChange(int)));
+  connect(aBtnGroup, SIGNAL(buttonClicked(int)), this, SLOT(onSelectionChange(int)));
 
   TopLayout->addWidget(aTypeBox, 0, 0);
 
   QWidget* aNamePane = new QWidget (this);
   QGridLayout* aNameLay = new QGridLayout (aNamePane);
 
-  QLabel* aMeshLbl = new QLabel ("Mesh name: ", aNamePane);
+  QLabel* aMeshLbl = new QLabel (tr("MESH_NAME_LBL"), aNamePane);
   myMeshName = new QLabel (aNamePane);
 
-  QLabel* aFieldLbl = new QLabel ("Field name: ", aNamePane);
+  QLabel* aFieldLbl = new QLabel (tr("FIELD_NAME_LBL"), aNamePane);
   myFieldName = new QLabel (aNamePane);
 
   aNameLay->addWidget(aMeshLbl, 0, 0);
@@ -141,51 +155,68 @@ VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule):
 
   TopLayout->addWidget(aNamePane, 1, 0);
 
-  myWidgetStack = new QWidgetStack (this);
+  myWidgetStack = new QStackedWidget (this);
 
   // Create Points pane
-  myPointsPane = new QVBox (myWidgetStack);
-  myPointsPane->layout()->setSpacing(6);
+  myPointsPane = new QWidget (myWidgetStack);
+  QVBoxLayout* aVBoxLayout = new QVBoxLayout(myPointsPane);
 
-  QGroupBox* aDataGrp = new QGroupBox (2, Qt::Horizontal, "Data of Point", myPointsPane);
-  aDataGrp->layout()->setSpacing(6);
+  QGroupBox* aDataGrp = new QGroupBox ( tr("POINT_DATA_TITLE"), myPointsPane);
+  QGridLayout* aGridLay = new QGridLayout (aDataGrp);
+  aGridLay->setSpacing(6);
 
-  new QLabel ("ID:", aDataGrp);
+  aGridLay->addWidget( new QLabel (tr("DATA_ID_LBL"), aDataGrp) , 0, 0 );
+  aGridLay->addWidget( new QLabel (tr("DATA_SCALAR_LBL"), aDataGrp), 1, 0 );
+  aGridLay->addWidget( new QLabel (tr("DATA_VECTOR_LBL"), aDataGrp), 2, 0 );
+  
   myIDValLbl = new QLineEdit ("", aDataGrp);
+  aGridLay->addWidget( myIDValLbl, 0, 1 );
   QIntValidator* aIntValidator = new QIntValidator (myIDValLbl);
   aIntValidator->setBottom(0);
   myIDValLbl->setValidator(aIntValidator);
   connect(myIDValLbl, SIGNAL(textChanged(const QString&)), this, SLOT(onPointIdEdit(const QString&)));
 
-  new QLabel ("Scalar Value:", aDataGrp);
   myScalarValLbl = new QLabel ("", aDataGrp);
-  new QLabel ("Vector Value:", aDataGrp);
+  aGridLay->addWidget( myScalarValLbl, 1, 1 );  
+  
   myVectorValLbl = new QLabel ("", aDataGrp);
   myVectorValLbl->setMinimumWidth(150);
+  aGridLay->addWidget( myVectorValLbl, 2, 1 );  
 
-  QGroupBox* aCoordGrp = new QGroupBox (4, Qt::Horizontal, "Coordinates", myPointsPane);
-  aCoordGrp->layout()->setSpacing(6);
-  new QLabel ("X:", aCoordGrp);
+  aVBoxLayout->addWidget( aDataGrp );
+
+  QGroupBox* aCoordGrp = new QGroupBox ( tr("POINT_COORD_TITLE"), myPointsPane);
+  aGridLay = new QGridLayout (aCoordGrp);
+  aGridLay->setSpacing(6);
+
+  aGridLay->addWidget( new QLabel ("X:", aCoordGrp), 0, 0 );
   myXValLbl = new QLabel ("", aCoordGrp);
+  aGridLay->addWidget( myXValLbl, 0, 1 );
   //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  new QLabel ("I:", aCoordGrp);
+  aGridLay->addWidget( new QLabel ("I:", aCoordGrp), 0, 2 );
   myIValLbl = new QLabel ("-", aCoordGrp);
+  aGridLay->addWidget( myIValLbl, 0, 3 );
   //ENK: 23.11.2006
-  new QLabel ("Y:", aCoordGrp);
+  aGridLay->addWidget( new QLabel ("Y:", aCoordGrp), 1, 0 );
   myYValLbl = new QLabel ("", aCoordGrp);
+  aGridLay->addWidget( myYValLbl, 1, 1 );
   //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  new QLabel ("J:", aCoordGrp);
+  aGridLay->addWidget( new QLabel ("J:", aCoordGrp), 1, 2 );
   myJValLbl = new QLabel ("-", aCoordGrp);
+  aGridLay->addWidget( myJValLbl, 1, 3 );
   //ENK: 23.11.2006
-  new QLabel ("Z:",aCoordGrp );
+  aGridLay->addWidget( new QLabel ("Z:",aCoordGrp ), 2, 0 );
   myZValLbl = new QLabel ("", aCoordGrp);
+  aGridLay->addWidget( myZValLbl, 2, 1 );
   //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  new QLabel ("K:", aCoordGrp);
+  aGridLay->addWidget( new QLabel ("K:", aCoordGrp), 2, 1 );
   myKValLbl = new QLabel ("-", aCoordGrp);
+  aGridLay->addWidget( myKValLbl, 2, 3 );
   //ENK: 23.11.2006
 
+  aVBoxLayout->addWidget( aCoordGrp );
 
-  myWidgetStack->addWidget(myPointsPane, 0);
+  myWidgetStack->addWidget(myPointsPane);
 
   // Create Cells pane
   myCellsPane = new QWidget (myWidgetStack);
@@ -194,24 +225,28 @@ VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule):
   aCellLayout->setRowStretch(0, 0);
   aCellLayout->setRowStretch(1, 1);
 
-  QGroupBox* aCellGrp = new QGroupBox(2, Qt::Horizontal, "Data of Cell", myCellsPane);
+  QGroupBox* aCellGrp = new QGroupBox( tr("CELL_DATA_TITLE"), myCellsPane);
+  aGridLay = new QGridLayout (aCellGrp);
 
-  new QLabel ("ID:", aCellGrp);
+  aGridLay->addWidget( new QLabel (tr("DATA_ID_LBL"), aCellGrp), 0, 0);
   myCellIDValLbl = new QLineEdit ("", aCellGrp);
   myCellIDValLbl->setValidator(aIntValidator);
+  aGridLay->addWidget( myCellIDValLbl, 0, 1);
   connect(myCellIDValLbl, SIGNAL(textChanged(const QString&)), this, SLOT(onCellIdEdit(const QString&)));
 
-  new QLabel ("Scalar Value:", aCellGrp);
+  aGridLay->addWidget( new QLabel (tr("DATA_SCALAR_LBL"), aCellGrp), 1, 0);
   myCellScalarValLbl = new QLabel ("", aCellGrp);
-  new QLabel ("Vector Value:", aCellGrp);
+  aGridLay->addWidget( myCellScalarValLbl, 1, 1);
+  aGridLay->addWidget( new QLabel (tr("DATA_VECTOR_LBL"), aCellGrp), 2, 0);
   myCellVectorValLbl = new QLabel ("", aCellGrp);
+  aGridLay->addWidget(myCellVectorValLbl , 2, 1);
 
   aCellLayout->addWidget(aCellGrp, 0, 0);
 
-  myListPoints = new QTable (myCellsPane);
-  myListPoints->setReadOnly(true);
-  myListPoints->setNumCols(9);
-  myListPoints->setNumRows(0);
+  myListPoints = new QTableWidget (myCellsPane);
+  myListPoints->setEditTriggers( QAbstractItemView::NoEditTriggers );
+  myListPoints->setColumnCount(9);
+  myListPoints->setRowCount(0);
   myListPoints->setColumnWidth(0, 40);
   myListPoints->setColumnWidth(1, 40);
   myListPoints->setColumnWidth(2, 40);
@@ -219,52 +254,67 @@ VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule):
   myListPoints->setColumnWidth(4, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
   myListPoints->setColumnWidth(5, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
   myListPoints->setColumnWidth(6, 40);//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  myListPoints->setSelectionMode(QTable::NoSelection);
-  QHeader* aHeader = myListPoints->horizontalHeader();
-  aHeader->setLabel( 0, "ID" );
-  aHeader->setLabel( 1, "X" );
-  aHeader->setLabel( 2, "Y" );
-  aHeader->setLabel( 3, "Z" );
-  aHeader->setLabel( 4, "I" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  aHeader->setLabel( 5, "J" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  aHeader->setLabel( 6, "K" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
-  aHeader->setLabel( 7, "Scalar" );
-  aHeader->setLabel( 8, "Vector" );
+  myListPoints->setSelectionMode(QAbstractItemView::NoSelection);
+
+  QStringList aLabels;
+  aLabels.append( "ID" );
+  aLabels.append( "X" );
+  aLabels.append( "Y" );
+  aLabels.append( "Z" );
+  aLabels.append( "I" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+  aLabels.append( "J" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+  aLabels.append( "K" );//ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+  aLabels.append( tr("CELL_DATA_SCALAR_HDR") );
+  aLabels.append( tr("CELL_DATA_VECTOR_HDR") );
+  myListPoints->setHorizontalHeaderLabels( aLabels );
 
   aCellLayout->addWidget(myListPoints, 1, 0);
 
-  myWidgetStack->addWidget(myCellsPane, 1);
+  myWidgetStack->addWidget(myCellsPane);
 
   // Actor Pane
-  myActorsPane = new QVBox (myWidgetStack);
-  myActorsPane->layout()->setSpacing(6);
-
-  QGroupBox* aPosGrp = new QGroupBox (2, Qt::Horizontal, "Position", myActorsPane);
-  aPosGrp->layout()->setSpacing(6);
-  new QLabel ("X:", aPosGrp);
+  myActorsPane = new QWidget (myWidgetStack);
+  aVBoxLayout = new QVBoxLayout(myActorsPane);  
+  aVBoxLayout->setSpacing(6);
+
+  QGroupBox* aPosGrp = new QGroupBox (tr("ACTOR_DATA_POSITION_TITLE"), myActorsPane);
+  aGridLay = new QGridLayout (aPosGrp);
+  aGridLay->setSpacing(6);
+  aGridLay->addWidget( new QLabel ("X:", aPosGrp), 0, 0);
   myXPosLbl = new QLabel ("0", aPosGrp);
-  new QLabel ("Y:", aPosGrp);
+  aGridLay->addWidget( myXPosLbl, 0, 1);
+  aGridLay->addWidget( new QLabel ("Y:", aPosGrp), 1, 0);
   myYPosLbl = new QLabel ("0", aPosGrp);
-  new QLabel ("Z:", aPosGrp);
+  aGridLay->addWidget( myYPosLbl, 2, 1);
+  aGridLay->addWidget( new QLabel ("Z:", aPosGrp), 2, 0);
   myZPosLbl = new QLabel ("0", aPosGrp);
+  aGridLay->addWidget( myZPosLbl, 3, 1);
 
-  QGroupBox* aSizeGrp = new QGroupBox (2, Qt::Horizontal, "Size", myActorsPane);
-  aSizeGrp->layout()->setSpacing(6);
-  new QLabel ("dX:", aSizeGrp);
+  aVBoxLayout->addWidget( aPosGrp );
+
+  QGroupBox* aSizeGrp = new QGroupBox ( tr("ACTOR_DATA_SIZE_TITLE"), myActorsPane);
+  aGridLay = new QGridLayout (aPosGrp);
+  aGridLay->setSpacing(6);
+  aGridLay->addWidget( new QLabel ("dX:", aSizeGrp ), 0, 0);
   myDXLbl = new QLabel ("0", aSizeGrp);
-  new QLabel ("dY:", aSizeGrp);
+  aGridLay->addWidget( myDXLbl, 0, 1);
+  aGridLay->addWidget( new QLabel ("dY:", aSizeGrp ), 0, 0);
   myDYLbl = new QLabel ("0", aSizeGrp);
-  new QLabel ("dZ:",aSizeGrp );
+  aGridLay->addWidget( myDYLbl, 1, 1);
+  aGridLay->addWidget( new QLabel ("dZ:", aSizeGrp ), 0, 0);
   myDZLbl = new QLabel ("0", aSizeGrp);
+  aGridLay->addWidget( myDZLbl, 2, 1);
+
+  aVBoxLayout->addWidget( aSizeGrp );
 
-  myWidgetStack->addWidget(myActorsPane, 2);
+  myWidgetStack->addWidget(myActorsPane);
 
 
   TopLayout->addWidget(myWidgetStack, 2, 0);
 
   // Create buttons group
-  QHBox* aBtnBox = new QHBox (this);
-  QHBoxLayout* aBtnLayout = (QHBoxLayout*)aBtnBox->layout();
+  QWidget* aBtnBox = new QWidget (this);  
+  QHBoxLayout* aBtnLayout = new QHBoxLayout( aBtnBox);
   aBtnLayout->addStretch();
 
   QPushButton* aCloseBtn = new QPushButton (tr("BUT_CLOSE"), aBtnBox);
@@ -285,7 +335,7 @@ VisuGUI_SelectionDlg::VisuGUI_SelectionDlg (const SalomeApp_Module* theModule):
   myFl = false;
 
   // Activate Points pane
-  myWidgetStack->raiseWidget(myPointsPane);
+  myWidgetStack->setCurrentWidget(myPointsPane);
   if (SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule))
     aViewWindow->SetSelectionMode(NodeSelection);
   onSelectionEvent();
@@ -304,17 +354,17 @@ void VisuGUI_SelectionDlg::onSelectionChange (int theId)
 
   switch (theId) {
   case 0: // Points
-    myWidgetStack->raiseWidget(myPointsPane);
+    myWidgetStack->setCurrentWidget(myPointsPane);
     aViewWindow->SetSelectionMode(NodeSelection);
     onPointIdEdit(myIDValLbl->text());
     break;
   case 1: // Cells
-    myWidgetStack->raiseWidget(myCellsPane);
+    myWidgetStack->setCurrentWidget(myCellsPane);
     aViewWindow->SetSelectionMode(CellSelection);
     onCellIdEdit(myCellIDValLbl->text());
     break;
   case 2: // Actor
-    myWidgetStack->raiseWidget(myActorsPane);
+    myWidgetStack->setCurrentWidget(myActorsPane);
     aViewWindow->SetSelectionMode(ActorSelection);
     onSelectionEvent();
   }
@@ -369,7 +419,8 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
   case ActorSelection:
     break;
   default:
-    close( TRUE );
+    close();
+    delete this;
     return;
   }
 
@@ -377,7 +428,7 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
     return;
   myFl = true;
 
-  int aType = myWidgetStack->id(myWidgetStack->visibleWidget());
+  int aType = myWidgetStack->indexOf(myWidgetStack->currentWidget());
 
   SVTK_Selector* aSelector = aViewWindow->GetSelector();
 
@@ -502,12 +553,12 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
         }
       }
 
-      myListPoints->setNumRows(aPointCoordsMap.size());
+      myListPoints->setRowCount(aPointCoordsMap.size());
       TPointCoordsMap::const_iterator anIter = aPointCoordsMap.begin();
 
       const VISU::PIDMapper& aMapper = aPrs3d->GetPipeLine()->GetIDMapper();
-      for (int i = 0; anIter != aPointCoordsMap.end() && i < myListPoints->numRows(); anIter++, i++) {
-        myListPoints->verticalHeader()->setLabel(i, QString::number( i ));
+      for (int i = 0; anIter != aPointCoordsMap.end() && i < myListPoints->rowCount(); anIter++, i++) {
+        myListPoints->verticalHeaderItem(i)->setText( QString::number( i ));
         vtkIdType aNodeObjId = anIter->first;
        //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
        VISU::TIdTypeVector aVec = aMapper->GetIndexesOfNode(aNodeObjId);
@@ -526,21 +577,21 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
        }
        //ENK: 23.11.2006
 
-        myListPoints->setText(i, 0, QString::number( aNodeObjId ));
+        myListPoints->item(i,0)->setText( QString::number( aNodeObjId ));
         const TCoordArray& aCoordArray = anIter->second;
-        myListPoints->setText(i, 1, QString::number( aCoordArray[0] ));
-        myListPoints->setText(i, 2, QString::number( aCoordArray[1] ));
-        myListPoints->setText(i, 3, QString::number( aCoordArray[2] ));
-        myListPoints->setText(i, 4, aI);//ENK: 23.11.2006 - PAL13176
-        myListPoints->setText(i, 5, aJ);//ENK: 23.11.2006 - PAL13176
-        myListPoints->setText(i, 6, aK);//ENK: 23.11.2006 - PAL13176
+        myListPoints->item(i,1)->setText( QString::number( aCoordArray[0] ));
+        myListPoints->item(i,2)->setText( QString::number( aCoordArray[1] ));
+        myListPoints->item(i,3)->setText( QString::number( aCoordArray[2] ));
+        myListPoints->item(i,4)->setText( aI);//ENK: 23.11.2006 - PAL13176
+        myListPoints->item(i,5)->setText( aJ);//ENK: 23.11.2006 - PAL13176
+        myListPoints->item(i,6)->setText( aK);//ENK: 23.11.2006 - PAL13176
 
        vtkIdType aNodeVTKId = anVISUActor->GetNodeVTKID(aNodeObjId);
-        myListPoints->setText(i, 7, getValue(aPntData, aNodeVTKId));
-        myListPoints->setText(i, 8, getVector(aPntData, aNodeVTKId));
+        myListPoints->item(i,7)->setText( getValue(aPntData, aNodeVTKId));
+        myListPoints->item(i,8)->setText( getVector(aPntData, aNodeVTKId));
       }
-      for(int aColumnId = 0; aColumnId < 9; aColumnId++)
-       myListPoints->adjustColumn(aColumnId);
+      //for(int aColumnId = 0; aColumnId < 9; aColumnId++)
+      myListPoints->resizeColumnsToContents();
     }
   } else {
     clearFields();
@@ -551,7 +602,7 @@ void VisuGUI_SelectionDlg::onSelectionEvent() {
 
 
 void VisuGUI_SelectionDlg::clearFields() {
-  int aType = myWidgetStack->id(myWidgetStack->visibleWidget());
+  int aType = myWidgetStack->indexOf(myWidgetStack->currentWidget());
   switch (aType) {
   case 0:
     myXValLbl->setText( "" );
@@ -566,7 +617,7 @@ void VisuGUI_SelectionDlg::clearFields() {
   case 1:
     myCellScalarValLbl->setText("");
     myCellVectorValLbl->setText("");
-    myListPoints->setNumRows(0);
+    myListPoints->setRowCount(0);
     break;
   case 2:
     myXPosLbl->setText("");
@@ -678,10 +729,9 @@ void VisuGUI_SelectionDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
   }
 }
 
@@ -691,7 +741,7 @@ void VisuGUI_SelectionDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index ef118b82bbd301f900f2c205d47a2de22c5f86de..0e6d2de1ee8be013a8d0be274b818b01b6e583be 100644 (file)
 #ifndef VisuGUI_Selection_HeaderFile
 #define VisuGUI_Selection_HeaderFile
 
-#include <qdialog.h>
+#include <QDialog>
 
 class QLabel;
-class QWidgetStack;
-class QVBox;
+class QStackedWidget;
+//class QVBox;
 class QLineEdit;
-class QTable;
+class QTableWidget;
 class LightApp_SelectionMgr;
 class SalomeApp_Application;
 class SalomeApp_Module;
@@ -66,8 +66,8 @@ private slots:
   QLabel* myMeshName;
   QLabel* myFieldName;
 
-  QWidgetStack* myWidgetStack;
-  QVBox* myPointsPane;
+  QStackedWidget* myWidgetStack;
+  QWidget* myPointsPane;
   QWidget* myCellsPane;
   QLabel* myXValLbl;
   QLabel* myYValLbl;
@@ -82,12 +82,12 @@ private slots:
   QLabel* myScalarValLbl;
   QLabel* myVectorValLbl;
 
-  QTable* myListPoints;
+  QTableWidget* myListPoints;
   QLineEdit* myCellIDValLbl;
   QLabel* myCellScalarValLbl;
   QLabel* myCellVectorValLbl;
 
-  QVBox* myActorsPane;
+  QWidget* myActorsPane;
   QLabel* myXPosLbl;
   QLabel* myYPosLbl;
   QLabel* myZPosLbl;
index 5c46ede447368f42d31c411f5a6cce2d6f218451..be1d090331756bb283c792989b4a39d011b8fe0b 100644 (file)
 
 #include "LightApp_Application.h"
 
+#include <QtxColorButton.h>
+
 #include <SALOMEDSClient_AttributeTableOfInteger.hxx>
 #include <SALOMEDSClient_AttributeTableOfReal.hxx>
 
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qtoolbutton.h>
-#include <qcombobox.h>
-#include <qscrollview.h>
-#include <qlayout.h>
-#include <qcolordialog.h>
-#include <qspinbox.h>
+#include <QLabel>
+#include <QPushButton>
+#include <QCheckBox>
+#include <QToolButton>
+#include <QComboBox>
+#include <QScrollArea>
+#include <QLayout>
+#include <QColorDialog>
+#include <QSpinBox>
+#include <QKeyEvent>
+#include <QFrame>
 
 #include <vector>
 #include <string>
@@ -63,26 +67,24 @@ using namespace std;
   Constructor
 */
 VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* parent )
-    : QDialog( parent, 
-              "VisuGUI_SetupPlot2dDlg", 
-              true, 
-              WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+    : QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
 {
-  setCaption( tr("TLT_SETUP_PLOT2D") );
+  setModal( true );
+  setWindowTitle( tr("TLT_SETUP_PLOT2D") );
   setSizeGripEnabled( TRUE );
   QGridLayout* topLayout = new QGridLayout( this ); 
   topLayout->setSpacing( SPACING_SIZE );
   topLayout->setMargin( MARGIN_SIZE );
 
-  myItems.setAutoDelete( false );
+  //myItems.setAutoDelete( false );
 
   myObject = object;
 
   /* Top scroll view */
-  myView = new QScrollView( this );
+  myView = new QScrollArea( this );
   QFrame* frame  = new QFrame( myView );
   frame->setFrameStyle( QFrame::Plain | QFrame::NoFrame );
-  QGridLayout* frameLayout = new QGridLayout( frame, 1, 12 );
+  QGridLayout* frameLayout = new QGridLayout( frame );
   frameLayout->setMargin( MARGIN_SIZE ); frameLayout->setSpacing( SPACING_SIZE );
   
   QFrame* lin;
@@ -92,11 +94,11 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
   QLabel* labData = new QLabel( tr( "DATA_LBL" ),       frame );
   QLabel* labUnit = new QLabel( tr( "UNITS_LBL" ),      frame );
   QLabel* labAttr = new QLabel( tr( "ATTRIBUTES_LBL" ), frame );
-  labAxis->setAlignment( AlignCenter );
-  labAssigned->setAlignment( AlignCenter );
-  labData->setAlignment( AlignCenter );
-  labUnit->setAlignment( AlignCenter );
-  labAttr->setAlignment( AlignCenter );
+  labAxis->setAlignment( Qt::AlignCenter );
+  labAssigned->setAlignment( Qt::AlignCenter );
+  labData->setAlignment( Qt::AlignCenter );
+  labUnit->setAlignment( Qt::AlignCenter );
+  labAttr->setAlignment( Qt::AlignCenter );
   QFont font = labAxis->font(); font.setBold( true );
   labAxis->setFont( font );
   labAssigned->setFont( font );
@@ -104,7 +106,7 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
   labUnit->setFont( font );
   labAttr->setFont( font );
 
-  frameLayout->addMultiCellWidget( labAxis, 0,  0, 0, 1 );
+  frameLayout->addWidget( labAxis, 0, 0, 1, 2 );
       lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
       frameLayout->addWidget( lin,          0,     2 );
 
@@ -118,10 +120,10 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
   frameLayout->addWidget( labUnit,          0,     7 );
       lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
       frameLayout->addWidget( lin,          0,     8 );
-  frameLayout->addMultiCellWidget( labAttr, 0,  0, 9, 13 );
-  frameLayout->setColStretch(               14, 5 );
+  frameLayout->addWidget( labAttr, 0,  9, 1, 5 );
+  //frameLayout->setColStretch(               14, 5 );
   lin = new QFrame( frame ); lin->setFrameStyle( QFrame::HLine | QFrame::Sunken );
-  frameLayout->addMultiCellWidget( lin, 1, 1, 0, 14 );
+  frameLayout->addWidget( lin, 1, 0, 1, 15 );
 
   int row = 2;
   _PTR(GenericAttribute)        anAttr;
@@ -138,7 +140,7 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
        vector<string> rowUnits  = tblIntAttr->GetRowUnits();
        QStringList rows;
        for ( int i = 0; i < nbRows; i++ )
-         rows.append( rowTitles[i] );
+         rows.append( rowTitles[i].c_str() );
 
        for ( int i = 0; i < nbRows; i++ ) {
          VisuGUI_ItemContainer* item = new VisuGUI_ItemContainer( this );
@@ -179,7 +181,7 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
        vector<string> rowUnits  = tblRealAttr->GetRowUnits();
        QStringList rows;
        for ( int i = 0; i < nbRows; i++ )
-         rows.append( rowTitles[i] );
+         rows.append( rowTitles[i].c_str() );
 
        for ( int i = 0; i < nbRows; i++ ) {
          VisuGUI_ItemContainer* item = new VisuGUI_ItemContainer( this );
@@ -211,30 +213,31 @@ VisuGUI_SetupPlot2dDlg::VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* p
     }
   }
   lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
-  frameLayout->addMultiCellWidget( lin, 2, row+1, 2, 2 );
+  frameLayout->addWidget( lin, 2, 2, row, 1 );
   lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
-  frameLayout->addMultiCellWidget( lin, 2, row+1, 4, 4 );
+  frameLayout->addWidget( lin, 2, 4, row, 1 );
   lin = new QFrame( frame ); lin->setFrameStyle( QFrame::VLine | QFrame::Sunken );
-  frameLayout->addMultiCellWidget( lin, 2, row+1, 6, 6 );
-  frameLayout->setRowStretch( row+1, 5 );
+  frameLayout->addWidget( lin, 2, 6, row, 1 );
+  //frameLayout->setRowStretch( row+1, 5 );
 
-  myView->addChild( frame, 0, 0 );
-  myView->setResizePolicy( QScrollView::AutoOneFit );
+  myView->setWidget( frame );
+  myView->setAlignment( Qt::AlignCenter );
+  myView->setWidgetResizable( true );
   
   myView->setMinimumWidth( frame->sizeHint().width() + MARGIN_SIZE * 2 );
 
   /* OK/Cancel/Help buttons */
-  myOkBtn = new QPushButton( tr( "BUT_OK" ), this, "buttonOk" );
+  myOkBtn = new QPushButton( tr( "BUT_OK" ), this );
   myOkBtn->setAutoDefault( TRUE );
   myOkBtn->setDefault( TRUE );
-  myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this, "buttonCancel" );
+  myCancelBtn = new QPushButton( tr( "BUT_CANCEL" ), this );
   myCancelBtn->setAutoDefault( TRUE );
-  myHelpBtn = new QPushButton( tr( "BUT_HELP" ), this, "buttonHelp" );
+  myHelpBtn = new QPushButton( tr( "BUT_HELP" ), this );
   myHelpBtn->setAutoDefault( TRUE );
 
-  topLayout->addMultiCellWidget( myView, 0, 0, 0, 3 );
+  topLayout->addWidget( myView, 0, 0, 1, 4 );
   topLayout->addWidget( myOkBtn, 1, 0 );
-  topLayout->setColStretch( 1, 5 );
+  //topLayout->setColStretch( 1, 5 );
   topLayout->addWidget( myCancelBtn, 1, 2 );
   topLayout->addWidget( myHelpBtn, 1, 3 );
 
@@ -257,8 +260,8 @@ VisuGUI_SetupPlot2dDlg::~VisuGUI_SetupPlot2dDlg()
 /*!
   Gets curves info ( indexes of row data in the table for horizontal and verical axes )
 */
-void VisuGUI_SetupPlot2dDlg::getCurvesSource( int& horIndex, QValueList<int>& verIndexes,
-                                             QValueList<int>& zIndices )
+void VisuGUI_SetupPlot2dDlg::getCurvesSource( int& horIndex, QList<int>& verIndexes,
+                                             QList<int>& zIndices )
 {
   /* collecting horizontal and vertical axis items */
   horIndex = -1;
@@ -297,7 +300,7 @@ bool VisuGUI_SetupPlot2dDlg::getCurveAttributes( const int vIndex,
 /*!
   Creates and returns curves presentations
 */
-void VisuGUI_SetupPlot2dDlg::getCurves( QPtrList<Plot2d_Curve>& container )
+void VisuGUI_SetupPlot2dDlg::getCurves( QList<Plot2d_Curve*>& container )
 {
   _PTR(GenericAttribute)        anAttr;
   _PTR(AttributeTableOfInteger) tblIntAttr;
@@ -309,7 +312,7 @@ void VisuGUI_SetupPlot2dDlg::getCurves( QPtrList<Plot2d_Curve>& container )
   /* collecting horizontal and vertical axis items */
   int horIndex;
   int i, j;
-  QValueList<int> verIndex, zIndices;
+  QList<int> verIndex, zIndices;
   getCurvesSource( horIndex, verIndex, zIndices );
   if ( horIndex < 0 || verIndex.isEmpty() ) /* no curves can be created */
     return;
@@ -355,8 +358,8 @@ void VisuGUI_SetupPlot2dDlg::getCurves( QPtrList<Plot2d_Curve>& container )
            curve->setData( xList, yList, nbPoints, zList );
          }
          // curve attributes
-         curve->setLine( (Plot2d_Curve::LineType)myItems.at( verIndex[i] )->getLine(), myItems.at( verIndex[i] )->getLineWidth() );
-         curve->setMarker( (Plot2d_Curve::MarkerType)myItems.at( verIndex[i] )->getMarker() );
+         curve->setLine( (Plot2d::LineType)myItems.at( verIndex[i] )->getLine(), myItems.at( verIndex[i] )->getLineWidth() );
+         curve->setMarker( (Plot2d::MarkerType)myItems.at( verIndex[i] )->getMarker() );
          curve->setColor( myItems.at( verIndex[i] )->getColor() );
          curve->setAutoAssign( myItems.at( verIndex[i] )->isAutoAssign() );
          // add curve into container
@@ -409,8 +412,8 @@ void VisuGUI_SetupPlot2dDlg::getCurves( QPtrList<Plot2d_Curve>& container )
            curve->setData( xList, yList, nbPoints, zList );
          }
          // curve attributes
-         curve->setLine( (Plot2d_Curve::LineType)myItems.at( verIndex[i] )->getLine(), myItems.at( verIndex[i] )->getLineWidth() );
-         curve->setMarker( (Plot2d_Curve::MarkerType)myItems.at( verIndex[i] )->getMarker() );
+         curve->setLine( (Plot2d::LineType)myItems.at( verIndex[i] )->getLine(), myItems.at( verIndex[i] )->getLineWidth() );
+         curve->setMarker( (Plot2d::MarkerType)myItems.at( verIndex[i] )->getMarker() );
          curve->setColor( myItems.at( verIndex[i] )->getColor() );
          curve->setAutoAssign( myItems.at( verIndex[i] )->isAutoAssign() );
          // add curve into container
@@ -443,8 +446,8 @@ void VisuGUI_SetupPlot2dDlg::onHBtnToggled( bool on )
 void VisuGUI_SetupPlot2dDlg::onVBtnToggled( bool on )
 {
   VisuGUI_ItemContainer* item = ( VisuGUI_ItemContainer* )sender();
-  QPtrList<VisuGUI_ItemContainer> itemList;
-  itemList.setAutoDelete( false );
+  QList<VisuGUI_ItemContainer*> itemList;
+  //itemList.setAutoDelete( false );
   item->myAssigned->setEnabled( on );
   int i;
   if ( on ) {
@@ -463,12 +466,13 @@ void VisuGUI_SetupPlot2dDlg::onVBtnToggled( bool on )
       }
     }
     if ( totalOn == 0 && !itemList.isEmpty() && 
-        SUIT_MessageBox::info2( this, 
-                               this->caption(), 
-                               tr( "QUE_WANT_SAME_UNITS" ),
-                               tr( "BUT_YES" ), 
-                               tr( "BUT_NO" ), 
-                               0, 1, 1 ) == 0 ) {
+        SUIT_MessageBox::information( this, 
+                                       this->windowTitle(), 
+                                       tr( "QUE_WANT_SAME_UNITS" ),
+                                       tr( "BUT_YES" ), 
+                                       tr( "BUT_NO" ), 
+                                       0, 1, 1 ) == 0 )
+    {
       for ( i = 0; i < itemList.count(); i++ ) {
        itemList.at( i )->blockSignals( true );
        itemList.at( i )->setVerticalOn( true );
@@ -496,10 +500,10 @@ void VisuGUI_SetupPlot2dDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
 /*!
@@ -536,7 +540,7 @@ void VisuGUI_SetupPlot2dDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
@@ -547,8 +551,8 @@ void VisuGUI_SetupPlot2dDlg::keyPressEvent( QKeyEvent* e )
 /*!
   Constructor
 */
-VisuGUI_ItemContainer::VisuGUI_ItemContainer( QObject* parent, const char* name )
-     : QObject( parent, name ), 
+VisuGUI_ItemContainer::VisuGUI_ItemContainer( QObject* parent )
+     : QObject( parent ), 
        myEnabled( true )
 {
 }
@@ -559,58 +563,61 @@ void VisuGUI_ItemContainer::createWidgets( QWidget* parentWidget, const QStringL
 {
   myHBtn = new QToolButton( parentWidget );
   myHBtn->setText( tr( "H" ) );
-  myHBtn->setToggleButton( true );
-  myHBtn->setOn( false );
+  myHBtn->setCheckable( true );
+  myHBtn->setChecked( false );
 
   myVBtn = new QToolButton( parentWidget );
   myVBtn->setText( tr( "V" ) );
-  myVBtn->setToggleButton( true );
-  myVBtn->setOn( false );
+  myVBtn->setCheckable( true );
+  myVBtn->setChecked( false );
   
   myTitleLab = new QLabel( parentWidget );
   myUnitLab  = new QLabel( parentWidget );
-  myUnitLab->setAlignment( AlignCenter);
+  myUnitLab->setAlignment( Qt::AlignCenter);
   
   myAutoCheck = new QCheckBox( tr( "AUTO_CHECK_LBL" ), parentWidget );
   myAutoCheck->setChecked( true );
 
-  myLineCombo = new QComboBox( false, parentWidget );
-  myLineCombo->insertItem( tr( "NONE_LINE_LBL" ) );
-  myLineCombo->insertItem( tr( "SOLID_LINE_LBL" ) );
-  myLineCombo->insertItem( tr( "DASH_LINE_LBL" ) );
-  myLineCombo->insertItem( tr( "DOT_LINE_LBL" ) );
-  myLineCombo->insertItem( tr( "DASHDOT_LINE_LBL" ) );
-  myLineCombo->insertItem( tr( "DAHSDOTDOT_LINE_LBL" ) );
-  myLineCombo->setCurrentItem( 1 ); // SOLID by default
-
-  myLineSpin = new QSpinBox( 0, MAX_LINE_WIDTH, 1, parentWidget );
+  myLineCombo = new QComboBox( parentWidget );
+  myLineCombo->addItem( tr( "NONE_LINE_LBL" ) );
+  myLineCombo->addItem( tr( "SOLID_LINE_LBL" ) );
+  myLineCombo->addItem( tr( "DASH_LINE_LBL" ) );
+  myLineCombo->addItem( tr( "DOT_LINE_LBL" ) );
+  myLineCombo->addItem( tr( "DASHDOT_LINE_LBL" ) );
+  myLineCombo->addItem( tr( "DAHSDOTDOT_LINE_LBL" ) );
+  myLineCombo->setCurrentIndex( 1 ); // SOLID by default
+
+  myLineSpin = new QSpinBox( parentWidget );
+  myLineSpin->setMinimum( 0 );
+  myLineSpin->setMaximum( MAX_LINE_WIDTH );
+  myLineSpin->setSingleStep( 1 );
   myLineSpin->setValue( 0 );        // width = 0 by default
 
-  myMarkerCombo = new QComboBox( false, parentWidget );
-  myMarkerCombo->insertItem( tr( "NONE_MARKER_LBL" ) );
-  myMarkerCombo->insertItem( tr( "CIRCLE_MARKER_LBL" ) );
-  myMarkerCombo->insertItem( tr( "RECTANGLE_MARKER_LBL" ) );
-  myMarkerCombo->insertItem( tr( "DIAMOND_MARKER_LBL" ) );
-  myMarkerCombo->insertItem( tr( "DTRIANGLE_MARKER_LBL" ) );
-  myMarkerCombo->insertItem( tr( "UTRIANGLE_MARKER_LBL" ) );
-  myMarkerCombo->insertItem( tr( "LTRIANGLE_MARKER_LBL" ) );
-  myMarkerCombo->insertItem( tr( "RTRIANGLE_MARKER_LBL" ) );
-  myMarkerCombo->insertItem( tr( "CROSS_MARKER_LBL" ) );
-  myMarkerCombo->insertItem( tr( "XCROSS_MARKER_LBL" ) );
-  myMarkerCombo->setCurrentItem( 1 ); // CIRCLE by default
-
-  myColorBtn = new QToolButton( parentWidget );
+  myMarkerCombo = new QComboBox( parentWidget );
+  myMarkerCombo->addItem( tr( "NONE_MARKER_LBL" ) );
+  myMarkerCombo->addItem( tr( "CIRCLE_MARKER_LBL" ) );
+  myMarkerCombo->addItem( tr( "RECTANGLE_MARKER_LBL" ) );
+  myMarkerCombo->addItem( tr( "DIAMOND_MARKER_LBL" ) );
+  myMarkerCombo->addItem( tr( "DTRIANGLE_MARKER_LBL" ) );
+  myMarkerCombo->addItem( tr( "UTRIANGLE_MARKER_LBL" ) );
+  myMarkerCombo->addItem( tr( "LTRIANGLE_MARKER_LBL" ) );
+  myMarkerCombo->addItem( tr( "RTRIANGLE_MARKER_LBL" ) );
+  myMarkerCombo->addItem( tr( "CROSS_MARKER_LBL" ) );
+  myMarkerCombo->addItem( tr( "XCROSS_MARKER_LBL" ) );
+  myMarkerCombo->setCurrentIndex( 1 ); // CIRCLE by default
+
+  myColorBtn = new QtxColorButton( parentWidget );
   myColorBtn->setMinimumWidth( 20 );
 
-  myAssigned = new QComboBox( false, parentWidget );
-  myAssigned->insertItem( "" );
+  myAssigned = new QComboBox( parentWidget );
+  myAssigned->addItem( "" );
   QStringList::const_iterator anIt = lst.begin(), aLast = lst.end();
   for( ; anIt!=aLast; anIt++ )
-    myAssigned->insertItem( *anIt );
+    myAssigned->addItem( *anIt );
   myAssigned->setEnabled( false );
  
   connect( myAutoCheck, SIGNAL( clicked() ),       this, SLOT( onAutoChanged() ) );
-  connect( myColorBtn,  SIGNAL( clicked() ),       this, SLOT( onColorChanged() ) );
+  //connect( myColorBtn,  SIGNAL( clicked() ),       this, SLOT( onColorChanged() ) );
   connect( myHBtn,      SIGNAL( toggled( bool ) ), this, SLOT( onHVToggled( bool ) ) );
   connect( myVBtn,      SIGNAL( toggled( bool ) ), this, SLOT( onHVToggled( bool ) ) );
   setColor( QColor( 0, 0, 0 ) );
@@ -629,28 +636,28 @@ void VisuGUI_ItemContainer::enableWidgets( bool enable )
 */
 void VisuGUI_ItemContainer::setHorizontalOn( bool on )
 {
-  myHBtn->setOn( on );
+  myHBtn->setChecked( on );
 }
 /*!
   Gets horizontal button's state
 */
 bool VisuGUI_ItemContainer::isHorizontalOn() const
 {
-  return myHBtn->isOn();
+  return myHBtn->isChecked();
 }
 /*!
   Sets vertical button's state on
 */
 void VisuGUI_ItemContainer::setVerticalOn( bool on )
 {
-  myVBtn->setOn( on );
+  myVBtn->setChecked( on );
 }
 /*!
   Gets vertical button's state
 */
 bool VisuGUI_ItemContainer::isVerticalOn() const
 {
-  return myVBtn->isOn();
+  return myVBtn->isChecked();
 }
 /*!
   Sets item AutoAssign flag state
@@ -672,14 +679,14 @@ bool VisuGUI_ItemContainer::isAutoAssign() const
 */
 void VisuGUI_ItemContainer::setLine( const int line, const int width )
 {
-  myLineCombo->setCurrentItem( line );
+  myLineCombo->setCurrentIndex( line );
 }
 /*!
   Gets item line type
 */
 int VisuGUI_ItemContainer::getLine() const
 {
-  return myLineCombo->currentItem();
+  return myLineCombo->currentIndex();
 }
 /*!
   Gets item line width
@@ -693,35 +700,31 @@ int VisuGUI_ItemContainer::getLineWidth() const
 */
 void VisuGUI_ItemContainer::setMarker( const int marker )
 {
-  myMarkerCombo->setCurrentItem( marker );
+  myMarkerCombo->setCurrentIndex( marker );
 }
 /*!
   Gets item marker type
 */
 int VisuGUI_ItemContainer::getMarker() const
 {
-  return myMarkerCombo->currentItem();
+  return myMarkerCombo->currentIndex();
 }
 /*!
   Sets item color
 */
+
 void VisuGUI_ItemContainer::setColor( const QColor& color )
 {
-  QPalette pal = myColorBtn->palette();
-  QColorGroup ca = pal.active();
-  ca.setColor( QColorGroup::Button, color );
-  QColorGroup ci = pal.inactive();
-  ci.setColor( QColorGroup::Button, color );
-  pal.setActive( ca );
-  pal.setInactive( ci );
-  myColorBtn->setPalette( pal );
+  //QPalette pal = myColorBtn->palette();
+  //pal.setColor( myColorBtn->backgroundRole(), color );
+  myColorBtn->setColor( color );
 }
 /*!
   Gets item color
 */
 QColor VisuGUI_ItemContainer::getColor() const
 {
-  return myColorBtn->palette().active().button();
+  return myColorBtn->color();//palette().color( myColorBtn->backgroundRole() );
 }
 /*!
   Enables/disables widgets
@@ -745,13 +748,13 @@ void VisuGUI_ItemContainer::onAutoChanged()
 /*!
   <Color> button slot, invokes color selection dialog box
 */
-void VisuGUI_ItemContainer::onColorChanged()
+/*void VisuGUI_ItemContainer::onColorChanged()
 {
   QColor color = QColorDialog::getColor( getColor() );
   if ( color.isValid() ) {
     setColor( color );
   }
-}
+}*/
 /*!
   <H> and <V> buttons slot
 */
@@ -760,9 +763,9 @@ void VisuGUI_ItemContainer::onHVToggled( bool on )
   const QObject* snd = sender();
   if ( snd == myHBtn ) {
     if ( on ) {
-      if ( myVBtn->isOn() ) {
+      if ( myVBtn->isChecked() ) {
 //     blockSignals( true );
-       myVBtn->setOn( false );
+       myVBtn->setChecked( false );
 //     blockSignals( false );
       }
     }
@@ -770,9 +773,9 @@ void VisuGUI_ItemContainer::onHVToggled( bool on )
   }
   else {
     if ( on ) {
-      if ( myHBtn->isOn() ) {
+      if ( myHBtn->isChecked() ) {
 //     blockSignals( true );
-       myHBtn->setOn( false );
+       myHBtn->setChecked( false );
 //     blockSignals( false );
       }
     }
@@ -786,7 +789,7 @@ void VisuGUI_ItemContainer::onHVToggled( bool on )
 int VisuGUI_ItemContainer::assigned() const
 {
   if( isVerticalOn() )
-    return myAssigned->currentItem()-1;
+    return myAssigned->currentIndex()-1;
   else
     return -1;
 }
index 234a28704cdf406af6e00aa7dfa69e76c0244e4d..f4616b3e18adb55a507f1c720045b090c0506967 100644 (file)
 
 #include <SALOMEDSClient_SObject.hxx>
 
-#include <qdialog.h>
-#include <qptrlist.h>
+#include <QDialog>
+#include <QList>
 
 //=================================================================================
 // class    : VisuGUI_SetupPlot2dDlg
 // purpose  : Dialog box for setup Plot2d view
 //=================================================================================
 
-class QScrollView;
+class QScrollArea;
 class QPushButton;
 class QLabel;
 class QCheckBox;
@@ -44,6 +44,7 @@ class QComboBox;
 class QSpinBox;
 class QToolButton;
 class VisuGUI_ItemContainer;
+class QtxColorButton;
 
 class VisuGUI_SetupPlot2dDlg : public QDialog
 { 
@@ -53,8 +54,8 @@ public:
   VisuGUI_SetupPlot2dDlg( _PTR(SObject) object, QWidget* parent = 0 );
   ~VisuGUI_SetupPlot2dDlg();
 
-  void getCurves( QPtrList<Plot2d_Curve>& container );
-  void getCurvesSource( int& horIndex, QValueList<int>& verIndexes, QValueList<int>& zIndexes );
+  void getCurves( QList<Plot2d_Curve*>& container );
+  void getCurvesSource( int& horIndex, QList<int>& verIndexes, QList<int>& zIndexes );
   bool getCurveAttributes( const int vIndex, bool& isAuto, int& marker, int& line, int& lineWidth, QColor& color);
 
 private:
@@ -67,11 +68,11 @@ private slots:
   void enableControls();
 
 private:
-  QScrollView*                myView;
+  QScrollArea*                myView;
   QPushButton*                myOkBtn;
   QPushButton*                myCancelBtn;
   QPushButton*                myHelpBtn;
-  QPtrList<VisuGUI_ItemContainer> myItems;
+  QList<VisuGUI_ItemContainer*> myItems;
 
   _PTR(SObject)               myObject;
 };
@@ -81,7 +82,7 @@ class VisuGUI_ItemContainer : public QObject
   Q_OBJECT
 
 public:
-  VisuGUI_ItemContainer( QObject* parent = 0, const char* name = 0 );
+  VisuGUI_ItemContainer( QObject* parent = 0 );
   
   void   createWidgets( QWidget* parentWidget, const QStringList& );
   void   enableWidgets( bool enable );
@@ -111,7 +112,7 @@ signals:
 
 public slots:
   void   onAutoChanged();
-  void   onColorChanged();
+//void   onColorChanged();
   void   onHVToggled( bool );
 
 public:
@@ -124,7 +125,7 @@ public:
   QComboBox*            myLineCombo;
   QSpinBox*             myLineSpin;
   QComboBox*            myMarkerCombo, *myAssigned;
-  QToolButton*          myColorBtn;
+  QtxColorButton*       myColorBtn;
 };
 
 #endif // VISUGUI_SetupPlot2dDlg_H
index fbc6cc0088c1957e7fc41d3a2c34f15cedd9103e..800772b4d5fd6c545cf148b61ce28fd3d6800300 100644 (file)
 #include <vtkActorCollection.h>
 #include <vtkRenderer.h>
 
-#include <qcombobox.h>
-#include <qfont.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qtimer.h>
+#include <QComboBox>
+#include <QFont>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QToolButton>
+#include <QToolTip>
+#include <QSlider>
+#include <QSpinBox>
+#include <QTimer>
 
 /*!
   Constructor
 VisuGUI_Slider::VisuGUI_Slider( VisuGUI_Module* theModule, 
                                VVTK_ViewWindow* theViewWindow,
                                LightApp_SelectionMgr* theSelectionMgr )
-  : QtxToolBar( InDock, theViewWindow->getMainWindow1() ),
+  : QtxToolBar( tr("TOOLBAR_TITLE"), theViewWindow->getMainWindow1() ),
     myModule( theModule ),
     myMainWindow( theViewWindow->getMainWindow1() ),
     mySelectionMgr( theSelectionMgr )
 {
-  setLabel(tr("TOOLBAR_TITLE"));
-  setCloseMode(QDockWindow::Undocked);
+  //setLabel();
+  //setCloseMode(QDockWindow::Undocked);
+  setMovable( true );
 
   VISU::ViewManager_var aViewManager = VISU::GetVisuGen( myModule )->GetViewManager();
   VISU::View_var aView = aViewManager->GetCurrentView();
@@ -87,13 +88,15 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI_Module* theModule,
 
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
 
-  setHorizontallyStretchable( true );
+  //setHorizontallyStretchable( true );
 
   QWidget* aWidget = new QWidget( this );
-  aWidget->setFocusPolicy(StrongFocus);
-  setWidget( aWidget );
+  aWidget->setFocusPolicy(Qt::StrongFocus);
+  myWidgetAction = addWidget( aWidget );
 
-  QGridLayout* aLayout = new QGridLayout( aWidget, 2, 13, 11, 6 );
+  QGridLayout* aLayout = new QGridLayout( aWidget );
+  aLayout->setMargin( 11 );
+  aLayout->setSpacing( 6 );
 
   // Slider and time stamps
   myFirstTimeStamp = new QLabel( aWidget );
@@ -101,12 +104,12 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI_Module* theModule,
   aLayout->addWidget( myFirstTimeStamp, 0, 0, Qt::AlignHCenter );
 
   mySlider = new QSlider( aWidget );
-  mySlider->setMinValue( 0 );
+  mySlider->setMinimum( 0 );
   mySlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-  mySlider->setOrientation( QSlider::Horizontal );
+  mySlider->setOrientation( Qt::Horizontal );
   mySlider->setTracking( false );
-  mySlider->setFocusPolicy(StrongFocus);
-  aLayout->addMultiCellWidget( mySlider, 0, 0, 1, 8 );
+  mySlider->setFocusPolicy(Qt::StrongFocus);
+  aLayout->addWidget( mySlider, 0, 1, 1, 9 );
 
   myLastTimeStamp = new QLabel( aWidget );
   myLastTimeStamp->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
@@ -132,15 +135,15 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI_Module* theModule,
   myMoreButton = new QToolButton( aWidget );
   myMoreButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
   myMoreButton->setEnabled( false );
-  myMoreButton->setToggleButton( true );
-  myMoreButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_MORE" ) ) );
+  myMoreButton->setCheckble( true );
+  myMoreButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_MORE" ) ) );
   QToolTip::add( myMoreButton, tr( "MORE" ) );
   aLayout->addWidget( myMoreButton, 1, 0 );
 
   myAVIButton = new QToolButton( aWidget );
   myAVIButton->setEnabled( false );
-  myAVIButton->setToggleButton( true );
-  myAVIButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_AVI" ) ) );
+  myAVIButton->setCheckble( true );
+  myAVIButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_AVI" ) ) );
   QToolTip::add( myAVIButton, tr( "AVI" ) );
   aLayout->addWidget( myAVIButton, 1, 1 );
 #endif
@@ -148,36 +151,36 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI_Module* theModule,
   aLayout->addItem( new QSpacerItem( 24, 24, QSizePolicy::Expanding, QSizePolicy::Minimum ), 1, 2 );
 
   myFirstButton = new QToolButton( aWidget );
-  myFirstButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_FIRST" ) ) );
+  myFirstButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_FIRST" ) ) );
   aLayout->addWidget( myFirstButton, 1, 3 );
 
   myPreviousButton = new QToolButton( aWidget );
-  myPreviousButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PREVIOUS" ) ) );
+  myPreviousButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PREVIOUS" ) ) );
   aLayout->addWidget( myPreviousButton, 1, 4 );
 
   myPlayButton = new QToolButton( aWidget );
-  myPlayButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
-  myPlayButton->setToggleButton( true );
+  myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
+  myPlayButton->setCheckable( true );
   aLayout->addWidget( myPlayButton, 1, 5 );
 
   myNextButton = new QToolButton( aWidget );
-  myNextButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_NEXT" ) ) );
+  myNextButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_NEXT" ) ) );
   aLayout->addWidget( myNextButton, 1, 6 );
 
   myLastButton = new QToolButton( aWidget );
-  myLastButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_LAST" ) ) );
+  myLastButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_LAST" ) ) );
   aLayout->addWidget( myLastButton, 1, 7 );
 
   aLayout->addItem( new QSpacerItem( 24, 24, QSizePolicy::Expanding, QSizePolicy::Minimum ), 1, 8 );
 
   myTimeStampStrings = new QComboBox( aWidget );
   myTimeStampStrings->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  myTimeStampStrings->setFocusPolicy(StrongFocus);
+  myTimeStampStrings->setFocusPolicy(Qt::StrongFocus);
   aLayout->addWidget( myTimeStampStrings, 1, 9 );
 
   myTimeStampIndices = new QComboBox( aWidget );
   myTimeStampIndices->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  myTimeStampIndices->setFocusPolicy(StrongFocus);
+  myTimeStampIndices->setFocusPolicy(Qt::StrongFocus);
   aLayout->addWidget( myTimeStampIndices, 1, 10 );
 
   // Speed
@@ -185,9 +188,12 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI_Module* theModule,
   aSpeedLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
   aLayout->addWidget( aSpeedLabel, 1, 11 );
 
-  mySpeedBox = new QSpinBox( 1, 100, 1, aWidget );
+  mySpeedBox = new QSpinBox( aWidget );
+  mySpeedBox->setMinimum( 1 );
+  mySpeedBox->setMaximum( 100 );
+  mySpeedBox->setSingleStep( 1 );
   mySpeedBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-  mySpeedBox->setFocusPolicy(StrongFocus);
+  mySpeedBox->setFocusPolicy(Qt::StrongFocus);
   mySpeedBox->setValue( 50 );
   aLayout->addWidget( mySpeedBox, 1, 12 );
 
@@ -213,7 +219,7 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI_Module* theModule,
 
   enableControls( false );
 
-  myMainWindow->addDockWindow( this, Qt::DockBottom );
+  myMainWindow->addToolBar( Qt::BottomToolBarArea, this );
 }
 
 /*!
@@ -239,7 +245,7 @@ bool VisuGUI_Slider::checkHolderList()
 
 void VisuGUI_Slider::enableControls( bool on )
 {
-  widget()->setEnabled( on );
+  widgetForAction( myWidgetAction  )->setEnabled( on );
   if( on )
   {
     if( checkHolderList() )
@@ -271,8 +277,8 @@ void VisuGUI_Slider::enableControls( bool on )
       CORBA::Long aNumber = anInfo.myNumber;
       QString aTime = anInfo.myTime.in();
 
-      myTimeStampStrings->insertItem( aTime );
-      myTimeStampIndices->insertItem( QString::number( aNumber ) );
+      myTimeStampStrings->addItem( aTime );
+      myTimeStampIndices->addItem( QString::number( aNumber ) );
 
       if( aNumber == aTimeStampNumber )
        a_current_index = an_index;
@@ -284,19 +290,19 @@ void VisuGUI_Slider::enableControls( bool on )
     myTimeStampIndices->setFont(myTimeStampStrings->font());
     myTimeStampIndices->updateGeometry();
 
-    if( a_current_index > mySlider->maxValue() )
-      mySlider->setMaxValue( aLength-1 );
+    if( a_current_index > mySlider->maximum() )
+      mySlider->setMaximum( aLength-1 );
 
-    myTimeStampStrings->setCurrentItem( a_current_index );
-    myTimeStampIndices->setCurrentItem( a_current_index );
+    myTimeStampStrings->setCurrentIndex( a_current_index );
+    myTimeStampIndices->setCurrentIndex( a_current_index );
     mySlider->setValue( a_current_index );
 
-    if( a_current_index <= mySlider->maxValue() )
-      mySlider->setMaxValue( aLength-1 );
+    if( a_current_index <= mySlider->maximum() )
+      mySlider->setMaximum( aLength-1 );
   }
   else
   {
-    myPlayButton->setOn( false );
+    myPlayButton->setChecked( false );
   }
 
 }
@@ -360,14 +366,14 @@ void VisuGUI_Slider::onTimeStampActivated( int value )
 
 void VisuGUI_Slider::onFirst()
 {
-  int value = mySlider->minValue();
+  int value = mySlider->minimum();
   mySlider->setValue( value );
 }
 
 void VisuGUI_Slider::onPrevious()
 {
   int value = mySlider->value() - 1;
-  if( value >= mySlider->minValue() )
+  if( value >= mySlider->minimum() )
     mySlider->setValue( value );
 }
 
@@ -376,7 +382,7 @@ void VisuGUI_Slider::onPlay( bool on )
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   if( on )
   {
-    myPlayButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PAUSE" ) ) );
+    myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PAUSE" ) ) );
 
     int delay = int(5000.0 / double(mySpeedBox->value()));
     myTimer->start( delay );
@@ -384,20 +390,20 @@ void VisuGUI_Slider::onPlay( bool on )
   else
   {
     myTimer->stop();
-    myPlayButton->setIconSet( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
+    myPlayButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_SLIDER_PLAY" ) ) );
   }
 }
 
 void VisuGUI_Slider::onNext()
 {
   int value = mySlider->value() + 1;
-  if( value <= mySlider->maxValue() )
+  if( value <= mySlider->maximum() )
     mySlider->setValue( value );
 }
 
 void VisuGUI_Slider::onLast()
 {
-  int value = mySlider->maxValue();
+  int value = mySlider->maximum();
   mySlider->setValue( value );
 }
 
@@ -408,8 +414,8 @@ void VisuGUI_Slider::onValueChanged( int value )
     return;
   }
 
-  myTimeStampStrings->setCurrentItem( value );
-  myTimeStampIndices->setCurrentItem( value );
+  myTimeStampStrings->setCurrentIndex( value );
+  myTimeStampIndices->setCurrentIndex( value );
 
   VISU::ColoredPrs3dHolder_var aHolder = myHolderList.front();
 
@@ -444,7 +450,7 @@ void VisuGUI_Slider::onValueChanged( int value )
 
 void VisuGUI_Slider::onSpeedChanged( int value )
 {
-  if(myPlayButton->isOn()){
+  if(myPlayButton->isChecked()){
     int delay = int(5000.0 / double(mySpeedBox->value()));
     myTimer->start( delay );
   }
@@ -453,8 +459,8 @@ void VisuGUI_Slider::onSpeedChanged( int value )
 void VisuGUI_Slider::onTimeout()
 {
   int value = mySlider->value();
-  if( value < mySlider->maxValue() )
+  if( value < mySlider->maximum() )
     onNext();
   else
-    myPlayButton->setOn( false );
+    myPlayButton->setChecked( false );
 }
index 74b1deccf79bd8cda2d159a2826d3aad9c861546..1347b6503022db9dac9eb4fb27c19cede443c7d1 100644 (file)
@@ -46,6 +46,7 @@ class QToolButton;
 class QSlider;
 class QSpinBox;
 class QTimer;
+class QAction;
 
 class VVTK_ViewWindow;
 class VVTK_MainWindow;
@@ -118,6 +119,8 @@ private:
 
   typedef std::vector<VISU::ColoredPrs3dHolder_var> THolderList;
   THolderList      myHolderList;
+  
+  QAction*         myWidgetAction;
 };
 
 #endif
index ed02c77b445cea3d4ea9e43d0ecaab1a043bb5f1..3704caa49aee64a498d4791e801c7570fb2009c2 100644 (file)
 
 #include <SALOMEDSClient_SObject.hxx>
 
-#include "QtxDblSpinBox.h"
+#include <QtxDoubleSpinBox.h>
+#include <QtxColorButton.h>
 
 #include <limits.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qcolordialog.h>
-#include <qtabwidget.h>
-#include <qpushbutton.h>
+
+#include <QLayout>
+#include <QLabel>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QGroupBox>
+#include <QColorDialog>
+#include <QTabWidget>
+#include <QPushButton>
+#include <QLabel>
+#include <QStringList>
+#include <QKeyEvent>
+#include <QFrame>
+
 
 using namespace std;
 
@@ -65,7 +74,7 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
   : VisuGUI_Prs3dDlg(theModule),
     myVisuGUI(theModule)
 {
-  setCaption(tr("DLG_TITLE"));
+  setWindowTitle(tr("DLG_TITLE"));
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* aBoxLayout = new QVBoxLayout(this);
@@ -75,7 +84,7 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
   myTabBox = new QTabWidget(this);
 
   QFrame* aTopBox = new QFrame(this);
-  aTopBox->setMargin( 11 );
+  //aTopBox->setMargin( 11 );
   QGridLayout* TopLayout = new QGridLayout( aTopBox );
   TopLayout->setAlignment( Qt::AlignTop );
   TopLayout->setSpacing( 8 );
@@ -83,8 +92,8 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
 
   // Source box
   QGroupBox* aSourceBox = new QGroupBox (tr("SOURCE_GRP"), aTopBox);
-  aSourceBox->setColumnLayout(0, Qt::Vertical);
-  QGridLayout* aSrcLayout = new QGridLayout( aSourceBox->layout() );
+  //aSourceBox->setColumnLayout(0, Qt::Vertical);
+  QGridLayout* aSrcLayout = new QGridLayout( aSourceBox );
   aSrcLayout->setSpacing( 6 );
   aSrcLayout->setMargin( 0 );
 
@@ -92,12 +101,17 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
   aSrcLayout->addWidget(aTypeLbl, 0, 0);
 
   myUseSrcCombo = new QComboBox(aSourceBox);
-  const char* aChoise[] = { "None", "Entity", "Family", "Group", "Presentation", 0 };
-  myUseSrcCombo->insertStrList(aChoise);
+  QStringList aChoise;
+  aChoise.append( "None" );
+  aChoise.append( "Entity" );
+  aChoise.append( "Family" );
+  aChoise.append( "Group" );
+  aChoise.append( "Presentation" );
+  myUseSrcCombo->addItems(aChoise);
   aSrcLayout->addWidget(myUseSrcCombo, 0, 1);
 
   mySrcCombo = new QComboBox(aSourceBox);
-  mySrcCombo->setEnabled((myUseSrcCombo->currentItem() == 0));
+  mySrcCombo->setEnabled((myUseSrcCombo->currentIndex() == 0));
 
   connect(myUseSrcCombo, SIGNAL(activated(int)), this, SLOT(onSourceTypeChange(int)));
 
@@ -223,33 +237,33 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
   }
 
   //  connect(myUseSrcChk, SIGNAL(toggled(bool)), mySrcCombo, SLOT(setEnabled(bool)));
-  aSrcLayout->addMultiCellWidget(mySrcCombo, 1, 1, 0, 1);
+  aSrcLayout->addWidget(mySrcCombo, 1, 0, 1, 2);
 
   QLabel* aPercentLbl = new QLabel (tr("LBL_USED_POINTS"), aSourceBox);
   aSrcLayout->addWidget(aPercentLbl, 2, 0);
 
-  myPntPercent = new QtxDblSpinBox( 0, 1, 0.1, aSourceBox );
+  myPntPercent = new QtxDoubleSpinBox( 0, 1, 0.1, aSourceBox );
   aSrcLayout->addWidget(myPntPercent, 2, 1);
 
-  TopLayout->addMultiCellWidget(aSourceBox, 0, 0, 0, 1);
+  TopLayout->addWidget(aSourceBox, 0, 0, 1, 2);
 
   QLabel* aStepLenLbl = new QLabel (tr("LBL_STEP_LENGTH"), aTopBox);
   TopLayout->addWidget(aStepLenLbl, 1, 0);
-  myStepLen = new QtxDblSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );
+  myStepLen = new QtxDoubleSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );
   myStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   TopLayout->addWidget(myStepLen, 1, 1);
   connect(myStepLen, SIGNAL(valueChanged(double)), this, SLOT(StepLengthChanged(double)));
 
   QLabel* aIntegStepLenLbl = new QLabel (tr("LBL_INTEGRATION_STEP"), aTopBox);
   TopLayout->addWidget(aIntegStepLenLbl, 2, 0);
-  myIntegStepLen = new QtxDblSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );
+  myIntegStepLen = new QtxDoubleSpinBox( DBL_MIN, DBL_MAX, 0.1, aTopBox );
   myIntegStepLen->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   TopLayout->addWidget(myIntegStepLen, 2, 1);
   connect(myIntegStepLen, SIGNAL(valueChanged(double)), this, SLOT(IntegrationStepChanged(double)));
 
   QLabel* aPropagationLbl = new QLabel (tr("LBL_PROPAGATION_TIME"), aTopBox);
   TopLayout->addWidget(aPropagationLbl, 3, 0);
-  myPropTime = new QtxDblSpinBox( DBL_MIN, DBL_MAX, 1, aTopBox );
+  myPropTime = new QtxDoubleSpinBox( DBL_MIN, DBL_MAX, 1, aTopBox );
   myPropTime->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   TopLayout->addWidget(myPropTime, 3, 1);
   connect(myPropTime, SIGNAL(valueChanged(double)), this, SLOT(PropagationTimeChanged(double)));
@@ -257,49 +271,51 @@ VisuGUI_StreamLinesDlg::VisuGUI_StreamLinesDlg (SalomeApp_Module* theModule)
   QLabel* aDirLbl = new QLabel (tr("LBL_DIRECTION"),aTopBox);
   TopLayout->addWidget(aDirLbl, 4, 0);
   myDirCombo = new QComboBox(aTopBox);
-  myDirCombo->insertItem("Forward");
-  myDirCombo->insertItem("Backward");
-  myDirCombo->insertItem("Both");
+  myDirCombo->addItem("Forward");
+  myDirCombo->addItem("Backward");
+  myDirCombo->addItem("Both");
   TopLayout->addWidget(myDirCombo, 4, 1);
 
-  myUseScalar = new QCheckBox (tr("MAGNITUDE_COLORING_CHK"), aTopBox, "UseMagn");
+  myUseScalar = new QCheckBox (tr("MAGNITUDE_COLORING_CHK"), aTopBox);
   connect( myUseScalar, SIGNAL( clicked() ), this, SLOT( enableSetColor() ) );
   TopLayout->addWidget(myUseScalar, 5, 0);
 
-  SelColor = new QPushButton (tr("USE_COLOR_BTN"), aTopBox, "SelColor");
-  connect( SelColor,     SIGNAL( clicked() ), this, SLOT( setVColor() ) );
+  SelColor = new QtxColorButton( aTopBox );
+  SelColor->setText( tr("USE_COLOR_BTN") );
+  //connect( SelColor,     SIGNAL( clicked() ), this, SLOT( setVColor() ) );
   TopLayout->addWidget( SelColor, 5, 1);
 
   myTabBox->addTab(aTopBox, "Stream Lines");
   myScalarPane = new VisuGUI_ScalarBarPane(this, false);
-  myScalarPane->setMargin( 5 );
+  if (myScalarPane->layout() )
+    myScalarPane->layout()->setMargin( 5 );
   myInputPane = new VisuGUI_InputPane(VISU::TSTREAMLINES, theModule, this);
   myTabBox->addTab(myScalarPane, "Scalar Bar");
   myTabBox->addTab(myInputPane, "Input");
 
   aBoxLayout->addWidget(myTabBox);
 
-  QGroupBox* aGroupButtons = new QGroupBox( this, "GroupButtons" );
-  aGroupButtons->setColumnLayout(0, Qt::Vertical );
-  aGroupButtons->layout()->setSpacing( 0 );
-  aGroupButtons->layout()->setMargin( 0 );
+  QGroupBox* aGroupButtons = new QGroupBox( this );
+  //aGroupButtons->setColumnLayout(0, Qt::Vertical );
+  //aGroupButtons->layout()->setSpacing( 0 );
+  //aGroupButtons->layout()->setMargin( 0 );
 
-  QGridLayout* aGroupButtonsLayout = new QGridLayout( aGroupButtons->layout() );
+  QGridLayout* aGroupButtonsLayout = new QGridLayout( aGroupButtons );
   aGroupButtonsLayout->setAlignment( Qt::AlignTop );
   aGroupButtonsLayout->setSpacing( 6 );
   aGroupButtonsLayout->setMargin( 11 );
 
-  QPushButton* aOkBtn = new QPushButton( tr( "&OK" ), aGroupButtons, "buttonOk" );
+  QPushButton* aOkBtn = new QPushButton( tr( "BUT_OK" ), aGroupButtons );
   aOkBtn->setAutoDefault( TRUE );
   aOkBtn->setDefault( TRUE );
   aGroupButtonsLayout->addWidget( aOkBtn, 0, 0 );
   aGroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
 
-  QPushButton* aCancelBtn = new QPushButton( tr( "&Cancel" ) , aGroupButtons, "buttonCancel" );
+  QPushButton* aCancelBtn = new QPushButton( tr( "BUT_CANCEL" ) , aGroupButtons );
   aCancelBtn->setAutoDefault( TRUE );
   aGroupButtonsLayout->addWidget( aCancelBtn, 0, 2 );
 
-  QPushButton* aHelpBtn = new QPushButton( tr( "&Help" ) , aGroupButtons, "buttonHelp" );
+  QPushButton* aHelpBtn = new QPushButton( tr( "BUT_HELP" ) , aGroupButtons );
   aHelpBtn->setAutoDefault( TRUE );
   aGroupButtonsLayout->addWidget( aHelpBtn, 0, 3 );
 
@@ -329,29 +345,29 @@ void VisuGUI_StreamLinesDlg::initFromPrsObject (VISU::ColoredPrs3d_i* thePrs, bo
   aMax = aStreamLinesPL->GetMaxPropagationTime();
   myPropTime->setRange(aMin,aMax);
   myPropTime->setValue(aStreamLinesPL->GetPropagationTime());
-  myPropTime->setLineStep((aMax-aMin)/aNbOfSteps);
+  myPropTime->setSingleStep((aMax-aMin)/aNbOfSteps);
 
   aMin = aStreamLinesPL->GetMinStepLength();
   aMax = aStreamLinesPL->GetMaxStepLength();
   myStepLen->setRange(aMin,aMax);
   myStepLen->setValue(aStreamLinesPL->GetStepLength());
-  myStepLen->setLineStep((aMax-aMin)/aNbOfSteps);
+  myStepLen->setSingleStep((aMax-aMin)/aNbOfSteps);
 
   aMin = aStreamLinesPL->GetMinIntegrationStep();
   aMax = aStreamLinesPL->GetMaxIntegrationStep();
   myIntegStepLen->setRange(aMin,aMax);
   myIntegStepLen->setValue(aStreamLinesPL->GetIntegrationStep());
-  myIntegStepLen->setLineStep((aMax-aMin)/aNbOfSteps);
+  myIntegStepLen->setSingleStep((aMax-aMin)/aNbOfSteps);
 
   switch (myPrsCopy->GetDirection()) {
   case VISU::StreamLines::FORWARD:
-    myDirCombo->setCurrentItem(0);
+    myDirCombo->setCurrentIndex(0);
     break;
   case VISU::StreamLines::BACKWARD:
-    myDirCombo->setCurrentItem(1);
+    myDirCombo->setCurrentIndex(1);
     break;
   case VISU::StreamLines::BOTH:
-    myDirCombo->setCurrentItem(2);
+    myDirCombo->setCurrentIndex(2);
   }
   myUseScalar->setChecked(myPrsCopy->IsColored());
   myPntPercent->setValue(myPrsCopy->GetUsedPoints());
@@ -368,11 +384,11 @@ void VisuGUI_StreamLinesDlg::initFromPrsObject (VISU::ColoredPrs3d_i* thePrs, bo
     for (int i = 0; i < PRSLIST.count(); i++) { \
       VISU::Prs3d_i* aPrs = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(PRSLIST[i]).in()); \
       if (aPrs == NULL) continue; \
-      if (aSrcEntry == aPrs->GetEntry()) { \
+      if (aSrcEntry == aPrs->GetEntry().c_str()) { \
         onSourceTypeChange(PRSNUM); \
-       myUseSrcCombo->setCurrentItem(PRSNUM); \
+       myUseSrcCombo->setCurrentIndex(PRSNUM); \
        mySrcCombo->setEnabled(true); \
-       mySrcCombo->setCurrentItem(i); \
+       mySrcCombo->setCurrentIndex(i); \
        return; \
       } \
     }
@@ -389,7 +405,7 @@ void VisuGUI_StreamLinesDlg::initFromPrsObject (VISU::ColoredPrs3d_i* thePrs, bo
     return;
 
   myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentPage( 0 );
+  myTabBox->setCurrentIndex( 0 );
 
 }
 
@@ -405,14 +421,14 @@ int VisuGUI_StreamLinesDlg::storeToPrsObject (VISU::ColoredPrs3d_i* thePrs)
     myPrsCopy->ShowColored(myUseScalar->isChecked());
     if (!myPrsCopy->IsColored()) {
       SALOMEDS::Color aColor;
-      aColor.R = myColor.red()/255.;
-      aColor.G = myColor.green()/255.;
-      aColor.B = myColor.blue()/255.;
+      aColor.R = SelColor->color().red()/255.;
+      aColor.G = SelColor->color().green()/255.;
+      aColor.B = SelColor->color().blue()/255.;
       myPrsCopy->SetColor(aColor);
     }
 
     VISU::StreamLines::Direction aDirection = VISU::StreamLines::BOTH;
-    switch (myDirCombo->currentItem()) {
+    switch (myDirCombo->currentIndex()) {
     case 0:
       aDirection = VISU::StreamLines::FORWARD;
       break;
@@ -424,8 +440,8 @@ int VisuGUI_StreamLinesDlg::storeToPrsObject (VISU::ColoredPrs3d_i* thePrs)
     }
 
     VISU::Prs3d_var aPrs;
-    int aSrcSelection = myUseSrcCombo->currentItem();
-    int aSrcItem = (mySrcCombo->count() > 0)? mySrcCombo->currentItem() : -1;
+    int aSrcSelection = myUseSrcCombo->currentIndex();
+    int aSrcItem = (mySrcCombo->count() > 0)? mySrcCombo->currentIndex() : -1;
     if ((aSrcSelection > 0) && (aSrcItem > -1)) {
       VISU::VISUType aType;
       QString aName;
@@ -475,20 +491,23 @@ int VisuGUI_StreamLinesDlg::storeToPrsObject (VISU::ColoredPrs3d_i* thePrs)
 */
 void VisuGUI_StreamLinesDlg::setColor( QColor color )
 {
-  myColor = color;
-  SelColor->setPaletteBackgroundColor(myColor);
+  /*Color = color;
+  QPalette aPal = SelColor->palette();
+  aPal.setColor( SelColor->backgroundRole(), myColor );
+  SelColor->setPalette( aPal );*/
+  SelColor->setColor( color );
 }
 
 
 /*!
   Called when "Select Color" buttonx clicked
 */
-void VisuGUI_StreamLinesDlg::setVColor()
+/*void VisuGUI_StreamLinesDlg::setVColor()
 {
   QColor cnew = QColorDialog::getColor( myColor, this );
   if ( cnew.isValid() )
     setColor( cnew );
-}
+}*/
 
 
 /*!
@@ -515,7 +534,7 @@ void VisuGUI_StreamLinesDlg::IntegrationStepChanged(double theValue) {
 }
 
 void VisuGUI_StreamLinesDlg::PropagationTimeChanged(double theValue) {
-  myStepLen->setMaxValue(theValue);
+  myStepLen->setMaximum(theValue);
 }
 
 void VisuGUI_StreamLinesDlg::onSourceTypeChange(int theIndex) {
@@ -528,16 +547,16 @@ void VisuGUI_StreamLinesDlg::onSourceTypeChange(int theIndex) {
 
   switch(theIndex) {
   case 1: // Entity
-    mySrcCombo->insertStringList(myEntitiesLst);
+    mySrcCombo->addItems(myEntitiesLst);
     return;
   case 2: // Family
-    mySrcCombo->insertStringList(myFamilisLst);
+    mySrcCombo->addItems(myFamilisLst);
     return;
   case 3: // Group
-    mySrcCombo->insertStringList(myGroupsLst);
+    mySrcCombo->addItems(myGroupsLst);
     return;
   case 4: // Presentation
-    mySrcCombo->insertStringList(myPrsLst);
+    mySrcCombo->addItems(myPrsLst);
     return;
   }
 }
@@ -653,10 +672,10 @@ void VisuGUI_StreamLinesDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+        SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                                 tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                                 arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                                 tr("BUT_OK"));
   }
 }
 
@@ -666,7 +685,7 @@ void VisuGUI_StreamLinesDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index 1d67efd1fc3a39d7bb0333995f96807417f95a7d..757fd6b8cf8a3b93c96e4d258d1738271e534e04 100644 (file)
 
 #include "VisuGUI_Prs3dDlg.h"
 
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
+class QTabWidget;
+class QCheckBox;
+class QComboBox;
+
 
 #include "VISUConfig.hh"
 
 class SalomeApp_Module;
 class VisuGUI_InputPane;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
+class QtxColorButton;
 
 namespace VISU
 {
@@ -74,26 +74,25 @@ private slots:
 private:
   VISU::Mesh_ptr createMesh(VISU::VISUType theType, QString theName);
 
-    QtxDblSpinBox* myStepLen;
-    QtxDblSpinBox* myIntegStepLen;
-    QtxDblSpinBox* myPropTime;
+    QtxDoubleSpinBox* myStepLen;
+    QtxDoubleSpinBox* myIntegStepLen;
+    QtxDoubleSpinBox* myPropTime;
     QComboBox* myDirCombo;
     QCheckBox* myUseScalar;
-    QPushButton*    SelColor;
-    QColor          myColor;
+    QtxColorButton*   SelColor;
     //QCheckBox* myUseSrcChk;
     QComboBox* myUseSrcCombo;
-    QtxDblSpinBox* myPntPercent;
+    QtxDoubleSpinBox* myPntPercent;
     QComboBox* mySrcCombo;
 
     QTabWidget*            myTabBox;
     VisuGUI_ScalarBarPane* myScalarPane;
     VisuGUI_InputPane*     myInputPane;
 
-    QValueList<VISU::Prs3d_var> myPrsList;
-    QValueList<VISU::Prs3d_var> myEntityList;
-    QValueList<VISU::Prs3d_var> myFamilyList;
-    QValueList<VISU::Prs3d_var> myGroupList;
+    QList<VISU::Prs3d_var> myPrsList;
+    QList<VISU::Prs3d_var> myEntityList;
+    QList<VISU::Prs3d_var> myFamilyList;
+    QList<VISU::Prs3d_var> myGroupList;
     QStringList myEntitiesLst;
     QStringList myFamilisLst;
     QStringList myGroupsLst;
@@ -104,7 +103,7 @@ private:
     SalomeApp_Module* myVisuGUI;
 
 private slots:
-  void setVColor();
+  //void setVColor();
   void enableSetColor();
 };
 
index 1b0a471fd22d195d5143a6bab81c7b4f840c21ef..89878cbfcf4b7d08fcfdb13af9f84ee49b5433d8 100644 (file)
 #include <vtkRenderer.h>
 #include <vtkMapper.h>
 
-#include <qhbox.h>
-#include <qgrid.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qslider.h>
-#include <qthread.h>
-#include <qlistbox.h>
+#include <QGridLayout>
+#include <QImage>
+#include <QImageWriter>
+#include <QLayout>
+#include <QSlider>
+#include <QThread>
+#include <QListWidget>
+#include <QLCDNumber>
+#include <QToolButton>
+#include <QKeyEvent>
+#include <QComboBox>
+#include <QLineEdit>
+#include <QRadioButton>
+#include <QGroupBox>
+#include <QPushButton>
+#include <QLabel>
+
 #include <qwt_wheel.h>
-#include <qhgroupbox.h>
-#include <qlcdnumber.h>
-#include <qvgroupbox.h>
-#include <qtoolbutton.h>
 
 #define  MAXVAL 1e10
 
 ArrangeDlg::ArrangeDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator)
-  : QDialog(theParent, "ArrangeDlg", true,
-            WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
+  : QDialog(theParent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
     myAnimator(theAnimator),
     myViewWindow(theAnimator->getViewer())
 {
+  setModal( true );
   myCurrent = 0;
   init();
   QStringList aFieldNames;
@@ -103,18 +109,18 @@ ArrangeDlg::ArrangeDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator)
     aOffs.myOffset[2] = myAnimator->getFieldData(i).myOffset[2];
     myOffsets.append(aOffs);
   }
-  myFieldLst->insertStringList(aFieldNames);
-  myFieldLst->setSelected(0, true);
+  myFieldLst->addItems(aFieldNames);
+  myFieldLst->setCurrentRow(0);
 }
 
 ArrangeDlg::ArrangeDlg(QWidget* theParent, 
                       const SalomeApp_Module* theModule,
                       SVTK_ViewWindow* theViewWindow)
-  : QDialog(theParent, "ArrangeDlg", true, WStyle_Customize |
-            WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
+  : QDialog(theParent,  Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
     myAnimator(NULL), 
     myViewWindow(theViewWindow)
 {
+  setModal( true );
   myCurrent = 0;
   init();
   QStringList aPrsNames;
@@ -146,84 +152,107 @@ ArrangeDlg::ArrangeDlg(QWidget* theParent,
        }
       }
   }
-  myFieldLst->insertStringList(aPrsNames);
-  myFieldLst->setSelected(0, true);
+  myFieldLst->addItems(aPrsNames);
+  myFieldLst->setCurrentRow(0);
 }
 
 void ArrangeDlg::init()
 {
-  setCaption("Arrange Presentations");
+  setWindowTitle("Arrange Presentations");
   setSizeGripEnabled( TRUE );
 
-  QVBoxLayout* aMainLayout = new QVBoxLayout(this, 7, 6);
+  QVBoxLayout* aMainLayout = new QVBoxLayout(this);
+  aMainLayout->setMargin( 7 );
   aMainLayout->setSpacing(5);
 
-  QButtonGroup* aBtnGrp = new QButtonGroup(2, Qt::Horizontal, this);
+  QButtonGroup* aBtnGrp = new QButtonGroup( this);
   aBtnGrp->setExclusive(true);
-  aMainLayout->addWidget(aBtnGrp);
+  //aMainLayout->addWidget(aBtnGrp);
+
+  QGroupBox* aBtnGB = new QGroupBox( this );
+  aMainLayout->addWidget(aBtnGB);
+  QHBoxLayout* aHBLay = new QHBoxLayout( aBtnGB );
+  
+  QRadioButton* aAutoBtn = new QRadioButton("Auto", aBtnGB);
+  aHBLay->addWidget( aAutoBtn );
+  aBtnGrp->addButton(aAutoBtn, AutoMode);
 
-  QRadioButton* aAutoBtn = new QRadioButton("Auto", aBtnGrp);
-  aBtnGrp->insert(aAutoBtn, AutoMode);
+  QRadioButton* aManualBtn = new QRadioButton("Manual", aBtnGB);
+  aBtnGrp->addButton(aManualBtn, ManualMode);
+  aHBLay->addWidget( aManualBtn );
 
-  QRadioButton* aManualBtn = new QRadioButton("Manual", aBtnGrp);
-  aBtnGrp->insert(aManualBtn, ManualMode);
-  aBtnGrp->setButton(AutoMode);
+  aAutoBtn->setChecked( true );
 
-  myStackWgt = new QWidgetStack(this);
+  myStackWgt = new QStackedWidget(this);
   aMainLayout->addWidget(myStackWgt);
 
   //  AUTO Pane
-  QVBox* aAutoPane = new QVBox(myStackWgt);
-  aAutoPane->setSpacing(5);
+  QWidget* aAutoPane = new QWidget(myStackWgt);
+  QVBoxLayout* aVBLay = new QVBoxLayout( aAutoPane );  
+  aVBLay->setSpacing(5);
   // Axis Group
-  myAxisGrp = new QButtonGroup(3, Qt::Horizontal,"Axis", aAutoPane);
+  myAxisGrp = new QButtonGroup(aAutoPane);
+
+  QGroupBox* aAxisGB = new QGroupBox( "Axis", aAutoPane );
+  aVBLay->addWidget( aAxisGB );
 
-  QRadioButton* aXBtn = new QRadioButton("X",myAxisGrp );
-  myAxisGrp->insert(aXBtn, XAxis);
+  QRadioButton* aXBtn = new QRadioButton("X",aAxisGB );
+  aVBLay->addWidget( aXBtn );
+  myAxisGrp->addButton(aXBtn, XAxis);
 
-  QRadioButton* aYBtn = new QRadioButton("Y",myAxisGrp );
-  myAxisGrp->insert(aYBtn, YAxis);
+  QRadioButton* aYBtn = new QRadioButton("Y",aAxisGB );
+  aVBLay->addWidget( aYBtn );
+  myAxisGrp->addButton(aYBtn, YAxis);
 
-  QRadioButton* aZBtn = new QRadioButton("Z",myAxisGrp );
-  myAxisGrp->insert(aZBtn, ZAxis);
+  QRadioButton* aZBtn = new QRadioButton("Z",aAxisGB );
+  aVBLay->addWidget( aZBtn );
+  myAxisGrp->addButton(aZBtn, ZAxis);
 
-  myAxisGrp->setButton(XAxis);
+  aXBtn->setChecked( true );
 
   //Distance Input
-  QHBox* aDistPane = new QHBox(aAutoPane);
-  aDistPane->setSpacing(5);
-  new QLabel("Relative Distance", aDistPane);
-  myDistVal = new QtxDblSpinBox (-10,10, 0.5, aDistPane);
+  QWidget* aDistPane = new QWidget(aAutoPane);
+  QHBoxLayout* aHLay = new QHBoxLayout( aDistPane );
+  aHLay->setSpacing(5);
+  aHLay->addWidget( new QLabel("Relative Distance", aDistPane) );
+  myDistVal = new QtxDoubleSpinBox (-10,10, 0.5, aDistPane);
   myDistVal->setValue(1);
+  aHLay->addWidget( myDistVal );                       
 
-  myStackWgt->addWidget(aAutoPane, AutoMode);
+  myStackWgt->insertWidget( AutoMode, aAutoPane);
 
   // Manual Pane
-  QHBox* aManualPane = new QHBox(myStackWgt);
-  aManualPane->setSpacing(10);
+  QWidget* aManualPane = new QWidget(myStackWgt);
+  aHLay = new QHBoxLayout( aManualPane );
+  aHLay->setSpacing(10);
 
-  myFieldLst = new QListBox(aManualPane);
-  connect( myFieldLst, SIGNAL( highlighted(int) ),
+  myFieldLst = new QListWidget(aManualPane);
+  aHLay->addWidget( myFieldLst );
+  connect( myFieldLst, SIGNAL( currentRowChanged(int) ),
           this, SLOT( onFieldChange(int) ) );
 
-  QGrid* aCoordPane = new QGrid(2, aManualPane);
-  aCoordPane->setSpacing(5);
+  QWidget* aCoordPane = new QWidget( aManualPane);
+  QGridLayout* aCoordLayout = new QGridLayout( aCoordPane );
+  aCoordLayout->setSpacing(5);
 
-  new QLabel("X", aCoordPane);
-  myCoord[0] = new QtxDblSpinBox(aCoordPane);
+  aCoordLayout->addWidget( new QLabel("X", aCoordPane), 0, 0 );
+  myCoord[0] = new QtxDoubleSpinBox(aCoordPane);
   myCoord[0]->setRange(-MAXVAL, MAXVAL);
+  aCoordLayout->addWidget( myCoord[0], 0, 1 );
 
-  new QLabel("Y", aCoordPane);
-  myCoord[1] = new QtxDblSpinBox(aCoordPane);
+  aCoordLayout->addWidget( new QLabel("Y", aCoordPane), 1, 0 );
+  myCoord[1] = new QtxDoubleSpinBox(aCoordPane);
   myCoord[1]->setRange(-MAXVAL, MAXVAL);
+  aCoordLayout->addWidget( myCoord[1], 1, 1 );
 
-  new QLabel("Z", aCoordPane);
-  myCoord[2] = new QtxDblSpinBox(aCoordPane);
+  aCoordLayout->addWidget( new QLabel("Z", aCoordPane), 2, 0 );
+  myCoord[2] = new QtxDoubleSpinBox(aCoordPane);
   myCoord[2]->setRange(-MAXVAL, MAXVAL);
+  aCoordLayout->addWidget( myCoord[2], 2, 1 );
 
-  myStackWgt->addWidget(aManualPane, ManualMode);
+  myStackWgt->insertWidget(ManualMode, aManualPane );
 
-  myStackWgt->raiseWidget(AutoMode);
+  myStackWgt->setCurrentIndex(AutoMode);
 
   connect(aBtnGrp, SIGNAL(clicked(int)), myStackWgt, SLOT(raiseWidget(int)) );
 
@@ -239,22 +268,22 @@ void ArrangeDlg::init()
   }
 
   // Common buttons ===========================================================
-  QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
-  GroupButtons->setColumnLayout(0, Qt::Vertical );
-  GroupButtons->layout()->setSpacing( 0 );
-  GroupButtons->layout()->setMargin( 0 );
-  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+  QGroupBox* GroupButtons = new QGroupBox( this );
+  //GroupButtons->setColumnLayout(0, Qt::Vertical );
+  //GroupButtons->layout()->setSpacing( 0 );
+  //GroupButtons->layout()->setMargin( 0 );
+  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
   GroupButtonsLayout->setSpacing( 6 );
   GroupButtonsLayout->setMargin( 11 );
 
-  QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+  QPushButton* buttonOk = new QPushButton( tr( "&OK" ), GroupButtons );
   buttonOk->setAutoDefault( TRUE );
   buttonOk->setDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
 
-  QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+  QPushButton* buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons );
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
 
@@ -305,10 +334,10 @@ void ArrangeDlg::acceptAnimation()
       myAnimator->getFieldData(i).myOffset[2] = aOffs.myOffset[2];
     }
   } else {
-    QApplication::setOverrideCursor( Qt::waitCursor );
-    FieldData& aData = myAnimator->getFieldData(myFieldLst->currentItem());
+    QApplication::setOverrideCursor( Qt::WaitCursor );
+    FieldData& aData = myAnimator->getFieldData(myFieldLst->currentRow());
     if (aData.myPrs.empty())
-      myAnimator->generatePresentations(myFieldLst->currentItem());
+      myAnimator->generatePresentations(myFieldLst->currentRow());
     vtkFloatingPointType aBounds[6];
     aData.myPrs[0]->GetBounds(aBounds);
     vtkFloatingPointType aDist = 0;
@@ -365,7 +394,7 @@ void ArrangeDlg::acceptViewWindow()
     QMap<VISU::Prs3d_i*, int>::Iterator it;
     for (it = myPrsMap.begin(); it != myPrsMap.end(); ++it) {
       VISU::Prs3d_i* aPrs = it.key();
-      Offset& aOffs = myOffsets[it.data()];
+      Offset& aOffs = myOffsets[it.value()];
       if (VISU_Actor* anActor = VISU::FindActor(myViewWindow, aPrs))
         anActor->SetPosition(aOffs.myOffset);
       if (mySaveChk)
@@ -466,16 +495,16 @@ SetupDlg::SetupDlg (QWidget* theParent,
                    VisuGUI* theModule, 
                    VISU_TimeAnimation* theAnimator) :
   QDialog(theParent, 
-         "SetupDlg", 
-         true, 
-         WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
+         Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
   myAnimator(theAnimator),
   myModule(theModule)
 {
-  setCaption("Setup Animation");
+  setModal( true );
+  setWindowTitle("Setup Animation");
   setSizeGripEnabled( TRUE );
 
-  QVBoxLayout* aMainLayout = new QVBoxLayout(this, 7, 6);
+  QVBoxLayout* aMainLayout = new QVBoxLayout(this);
+  aMainLayout->setMargin( 7 );
   aMainLayout->setSpacing(5);
 
   // Range of time stamps
@@ -486,7 +515,7 @@ SetupDlg::SetupDlg (QWidget* theParent,
   aRangeGrp->setFrameStyle(QFrame::Box | QFrame::Raised);
 
   myUseRangeChk = new QCheckBox("Use range of time stamps", aRangeGrp);
-  aRangeLayout->addMultiCellWidget(myUseRangeChk, 0, 0, 0, 3);
+  aRangeLayout->addWidget(myUseRangeChk, 0, 0, 1, 4);
   myUseRangeChk->setChecked(myAnimator->isRangeDefined());
 
   double aMaxTime = myAnimator->getMaxTime();
@@ -503,7 +532,7 @@ SetupDlg::SetupDlg (QWidget* theParent,
   QLabel* aMinLbl = new QLabel("From", aRangeGrp);
   aMinLbl->setEnabled(myUseRangeChk->isChecked());
   aRangeLayout->addWidget(aMinLbl, 1, 0);
-  myMinVal = new QtxDblSpinBox( aMinTime, aMaxTime, aStep, aRangeGrp );
+  myMinVal = new QtxDoubleSpinBox( aMinTime, aMaxTime, aStep, aRangeGrp );
   myMinVal->setEnabled(myUseRangeChk->isChecked());
   if (myUseRangeChk->isChecked())
     myMinVal->setValue( myAnimator->getMinRange() );
@@ -517,7 +546,7 @@ SetupDlg::SetupDlg (QWidget* theParent,
   QLabel* aMaxLbl = new QLabel("To", aRangeGrp);
   aMaxLbl->setEnabled(myUseRangeChk->isChecked());
   aRangeLayout->addWidget(aMaxLbl, 1, 2);
-  myMaxVal = new QtxDblSpinBox( aMinTime, aMaxTime, aStep, aRangeGrp );
+  myMaxVal = new QtxDoubleSpinBox( aMinTime, aMaxTime, aStep, aRangeGrp );
   myMaxVal->setEnabled(myUseRangeChk->isChecked());
   if (myUseRangeChk->isChecked())
     myMaxVal->setValue( myAnimator->getMaxRange() );
@@ -539,11 +568,16 @@ SetupDlg::SetupDlg (QWidget* theParent,
 
 
   // Fields and Properties
-  QHBox* aPropFrame = new QHBox(this);
-  aPropFrame->setSpacing(5);
+  QWidget* aPropFrame = new QWidget(this);
+  QHBoxLayout* aHPropLayout = new QHBoxLayout( aPropFrame );
+  aHPropLayout->setSpacing(5);
 
-  QVGroupBox* aNamesBox = new QVGroupBox("Fields",aPropFrame);
-  myFieldLst = new QListBox(aNamesBox);
+  QGroupBox* aNamesBox = new QGroupBox("Fields",aPropFrame);
+  aHPropLayout->addWidget( aNamesBox );
+  QVBoxLayout* aVBoxLayout = new QVBoxLayout( aNamesBox );
+  
+  myFieldLst = new QListWidget(aNamesBox);
+  aVBoxLayout->addWidget( myFieldLst );
   QStringList aFieldNames;
   // Find names of fields
   for (int i = 0; i < myAnimator->getNbFields(); i++) {
@@ -553,26 +587,33 @@ SetupDlg::SetupDlg (QWidget* theParent,
       aFieldNames.append(aFieldName);
     else if ( myAnimator->getAnimationMode() == 1 ) {
       QString aFileName(VISU::getValue(aSO->GetFather()->GetFather()->GetFather(),"myInitFileName"));
-      aFileName = aFileName.right(aFileName.length() - (aFileName.findRev("/") + 1));
+      aFileName = aFileName.right(aFileName.length() - (aFileName.lastIndexOf("/") + 1));
       aFieldNames.append(aFileName + QString(" : ") + aFieldName);
     }
   }
-  myFieldLst->insertStringList(aFieldNames);
+  myFieldLst->addItems(aFieldNames);
   
   if ( myAnimator->getAnimationMode() == 0 ) {
-    myFieldLst->setSelected(0, true);
-    connect( myFieldLst, SIGNAL( highlighted(int) ),
+    myFieldLst->setCurrentRow(0);
+    connect( myFieldLst, SIGNAL( currentRowChanged(int) ),
             this, SLOT( onFieldChange(int) ) );
   }
   else if ( myAnimator->getAnimationMode() == 1 )
-    myFieldLst->setSelectionMode(QListBox::NoSelection);
+    myFieldLst->setSelectionMode(QAbstractItemView::NoSelection);
+  
+  QWidget* aSetupBox = new QWidget(aPropFrame);
+  aHPropLayout->addWidget( aSetupBox );
+  aVBoxLayout = new QVBoxLayout( aSetupBox );
+  aVBoxLayout->setSpacing(5);
+  aHPropLayout->addWidget( aSetupBox );
+
+  QGroupBox* aPropBox = new QGroupBox("Properties", aSetupBox);
+  aVBoxLayout->addWidget( aPropBox );
+  QVBoxLayout* aPropVBLay = new QVBoxLayout( aPropBox );
   
-    QVBox* aSetupBox = new QVBox(aPropFrame);
-  aSetupBox->setSpacing(5);
-
-  QVGroupBox* aPropBox = new QVGroupBox("Properties", aSetupBox);
   //QVGroupBox* aPropBox = new QVGroupBox("Properties", aPropFrame);
   myTypeCombo = new QComboBox(aPropBox);
+  aPropVBLay->addWidget( myTypeCombo );
   connect( myTypeCombo, SIGNAL( activated(int) ),
           this, SLOT( onTypeChanged(int) ) );
 
@@ -581,6 +622,7 @@ SetupDlg::SetupDlg (QWidget* theParent,
   //      this, SLOT( onScalarBarDlg() ) );
 
   myPropBtn = new QPushButton("Properties...", aPropBox);
+  aPropVBLay->addWidget( myPropBtn );
   //  myPropBtn->setEnabled(myAnimator->getFieldData(0).myPrsType != VISU::TSCALARMAP);
   connect( myPropBtn, SIGNAL( clicked() ),
           this, SLOT( onPreferencesDlg() ) );
@@ -592,8 +634,8 @@ SetupDlg::SetupDlg (QWidget* theParent,
   onFieldChange(0);
   aMainLayout->addWidget(aPropFrame);
 
-  QHBox* aBtnBox = new QHBox(this);
-  QHBoxLayout* aBtnLayout = new QHBoxLayout(aBtnBox->layout());
+  QWidget* aBtnBox = new QWidget(this);
+  QHBoxLayout* aBtnLayout = new QHBoxLayout(aBtnBox);
   aBtnLayout->addStretch();
 
   QPushButton* aCloseBtn = new QPushButton(tr("BUT_OK"), aBtnBox);
@@ -624,23 +666,23 @@ void SetupDlg::onFieldChange (int theIndex)
   myComboId2TypeId.clear();
 
   // ATTENTION: append items in the same order like it is done in the PrsComboItem enumeration
-  myTypeCombo->insertItem("Scalar Map");   // item 0
+  myTypeCombo->addItem("Scalar Map");   // item 0
   myTypeId2ComboId[TSCALARMAP_ITEM] = myComboId2TypeId.size();
   myComboId2TypeId.push_back(TSCALARMAP_ITEM);;
 
-  myTypeCombo->insertItem("Iso Surfaces"); // item 1
+  myTypeCombo->addItem("Iso Surfaces"); // item 1
   myTypeId2ComboId[TISOSURFACE_ITEM] = myComboId2TypeId.size();
   myComboId2TypeId.push_back(TISOSURFACE_ITEM);;
 
-  myTypeCombo->insertItem("Cut Planes");   // item 2
+  myTypeCombo->addItem("Cut Planes");   // item 2
   myTypeId2ComboId[TCUTPLANES_ITEM] = myComboId2TypeId.size();
   myComboId2TypeId.push_back(TCUTPLANES_ITEM);;
 
-  myTypeCombo->insertItem("Cut Lines");   // item 3
+  myTypeCombo->addItem("Cut Lines");   // item 3
   myTypeId2ComboId[TCUTLINES_ITEM] = myComboId2TypeId.size();
   myComboId2TypeId.push_back(TCUTLINES_ITEM);;
 
-  myTypeCombo->insertItem("Plot 3D");      // item 4
+  myTypeCombo->addItem("Plot 3D");      // item 4
   myTypeId2ComboId[TPLOT3D_ITEM] = myComboId2TypeId.size();
   myComboId2TypeId.push_back(TPLOT3D_ITEM);;
 
@@ -678,59 +720,59 @@ void SetupDlg::onFieldChange (int theIndex)
   }
 
   if (anEnableItems) {
-    myTypeCombo->insertItem("Deformed Shape"); // item 5
+    myTypeCombo->addItem("Deformed Shape"); // item 5
     myTypeId2ComboId[TDEFORMEDSHAPE_ITEM] = myComboId2TypeId.size();
     myComboId2TypeId.push_back(TDEFORMEDSHAPE_ITEM);;
 
-    myTypeCombo->insertItem("Vectors");        // item 6
+    myTypeCombo->addItem("Vectors");        // item 6
     myTypeId2ComboId[TVECTORS_ITEM] = myComboId2TypeId.size();
     myComboId2TypeId.push_back(TVECTORS_ITEM);;
 
-    myTypeCombo->insertItem("Stream Lines");   // item 7
+    myTypeCombo->addItem("Stream Lines");   // item 7
     myTypeId2ComboId[TSTREAMLINES_ITEM] = myComboId2TypeId.size();
     myComboId2TypeId.push_back(TSTREAMLINES_ITEM);;
 
-    myTypeCombo->insertItem("Scalar map on Deformed shape");   // item 9
+    myTypeCombo->addItem("Scalar map on Deformed shape");   // item 9
     myTypeId2ComboId[TSCALARMAPONDEFORMEDSHAPE_ITEM] = myComboId2TypeId.size();
     myComboId2TypeId.push_back(TSCALARMAPONDEFORMEDSHAPE_ITEM);;
   }
 
   if(anEnableGP){
-    myTypeCombo->insertItem("Gauss Points");   // item 8
+    myTypeCombo->addItem("Gauss Points");   // item 8
     myTypeId2ComboId[TGAUSSPOINTS_ITEM] = myComboId2TypeId.size();
     myComboId2TypeId.push_back(TGAUSSPOINTS_ITEM);;
   }
 
   switch (aPrsType) {
   case VISU::TSCALARMAP: //Scalar Map
-    myTypeCombo->setCurrentItem(myTypeId2ComboId[TSCALARMAP_ITEM]);
+    myTypeCombo->setCurrentIndex(myTypeId2ComboId[TSCALARMAP_ITEM]);
     break;
   case VISU::TISOSURFACE: //Iso Surfaces
-    myTypeCombo->setCurrentItem(myTypeId2ComboId[TISOSURFACE_ITEM]);
+    myTypeCombo->setCurrentIndex(myTypeId2ComboId[TISOSURFACE_ITEM]);
     break;
   case VISU::TCUTPLANES: //Cut Planes
-    myTypeCombo->setCurrentItem(myTypeId2ComboId[TCUTPLANES_ITEM]);
+    myTypeCombo->setCurrentIndex(myTypeId2ComboId[TCUTPLANES_ITEM]);
     break;
   case VISU::TCUTLINES: //Cut Lines
-    myTypeCombo->setCurrentItem(myTypeId2ComboId[TCUTLINES_ITEM]);
+    myTypeCombo->setCurrentIndex(myTypeId2ComboId[TCUTLINES_ITEM]);
     break;
   case VISU::TPLOT3D: //Plot 3D
-    myTypeCombo->setCurrentItem(myTypeId2ComboId[TPLOT3D_ITEM]);
+    myTypeCombo->setCurrentIndex(myTypeId2ComboId[TPLOT3D_ITEM]);
     break;
   case VISU::TDEFORMEDSHAPE: //Deformed Shape
-    myTypeCombo->setCurrentItem(myTypeId2ComboId[TDEFORMEDSHAPE_ITEM]);
+    myTypeCombo->setCurrentIndex(myTypeId2ComboId[TDEFORMEDSHAPE_ITEM]);
     break;
   case VISU::TSCALARMAPONDEFORMEDSHAPE: //Scalar Map on Deformed Shape
-    myTypeCombo->setCurrentItem(myTypeId2ComboId[TSCALARMAPONDEFORMEDSHAPE_ITEM]);
+    myTypeCombo->setCurrentIndex(myTypeId2ComboId[TSCALARMAPONDEFORMEDSHAPE_ITEM]);
     break;
   case VISU::TVECTORS: //Vectors
-    myTypeCombo->setCurrentItem(myTypeId2ComboId[TVECTORS_ITEM]);
+    myTypeCombo->setCurrentIndex(myTypeId2ComboId[TVECTORS_ITEM]);
     break;
   case VISU::TSTREAMLINES: //Stream Lines
-    myTypeCombo->setCurrentItem(myTypeId2ComboId[TSTREAMLINES_ITEM]);
+    myTypeCombo->setCurrentIndex(myTypeId2ComboId[TSTREAMLINES_ITEM]);
     break;
   case VISU::TGAUSSPOINTS: //Gauss Points
-    myTypeCombo->setCurrentItem(myTypeId2ComboId[TGAUSSPOINTS_ITEM]);
+    myTypeCombo->setCurrentIndex(myTypeId2ComboId[TGAUSSPOINTS_ITEM]);
     break;
   }
   //myPropBtn->setEnabled(aData.myPrsType != VISU::TSCALARMAP);
@@ -743,7 +785,7 @@ void SetupDlg::onTypeChanged (int theIndex)
   
   for (int i = 0; i < myAnimator->getNbFields(); i++) {
     FieldData& aData = ( myAnimator->getAnimationMode() == 0 ) ?
-      myAnimator->getFieldData(myFieldLst->currentItem()) :
+      myAnimator->getFieldData(myFieldLst->currentRow()) :
       myAnimator->getFieldData(i);
 
     switch (aType) {
@@ -818,7 +860,7 @@ void SetupDlg::onPreferencesDlg()
 {
   SUIT_OverrideCursor c;
 
-  int id = ( myAnimator->getAnimationMode() == 0 ) ? myFieldLst->currentItem() : 0;
+  int id = ( myAnimator->getAnimationMode() == 0 ) ? myFieldLst->currentRow() : 0;
   FieldData& aData = myAnimator->getFieldData(id);
   if (aData.myPrs.empty())
     myAnimator->generatePresentations(id);
@@ -831,7 +873,7 @@ void SetupDlg::onPreferencesDlg()
 
   if(!aData.myNbFrames || !aData.myPrs[0]){
     QApplication::restoreOverrideCursor();
-    SUIT_MessageBox::warn1(this,
+    SUIT_MessageBox::warning(this,
                            tr("ERROR"),
                            VisuGUI_TimeAnimationDlg::tr("MSG_NO_ANIMATIONDATA"),
                            tr("&OK"));
@@ -840,14 +882,14 @@ void SetupDlg::onPreferencesDlg()
 
   if(!aData.myNbFrames || !aData.myPrs[0]){
     QApplication::restoreOverrideCursor();
-    SUIT_MessageBox::warn1(this,
+    SUIT_MessageBox::warning(this,
                            tr("ERROR"),
                            VisuGUI_TimeAnimationDlg::tr("MSG_NO_ANIMATIONDATA"),
                            tr("&OK"));
     return;
   }
 
-  int aType = myComboId2TypeId[myTypeCombo->currentItem()];
+  int aType = myComboId2TypeId[myTypeCombo->currentIndex()];
   switch (aType) {
   case TSCALARMAP_ITEM: //Scalar Map
     c.suspend();
@@ -1067,16 +1109,16 @@ static QPixmap MYpausePixmap(pauseIco);
 
 VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Study) theStudy, int theMode) :
   QDialog(VISU::GetDesktop(theModule), 
-         "VisuGUI_TimeAnimationDlg", 
-         false, 
-         WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+         Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
   myModule(theModule),
   mySetupDlg(NULL)
 {
+  setAttribute( Qt::WA_DeleteOnClose, true );
+  setModal( false );
   if ( theMode == 0 )
-    setCaption(tr("PARALLEL_ANIMATION"));
+    setWindowTitle(tr("PARALLEL_ANIMATION"));
   else if ( theMode == 1 )
-    setCaption(tr("SUCCESSIVE_ANIMATION"));
+    setWindowTitle(tr("SUCCESSIVE_ANIMATION"));
   setSizeGripEnabled( TRUE );
 
   myAnimator = new VISU_TimeAnimation (theStudy);
@@ -1085,7 +1127,8 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
   connect(myAnimator, SIGNAL(stopped()),                 this, SLOT(onStop()));
   myAnimator->setAnimationMode(theMode);
 
-  QVBoxLayout* aMainLayout = new QVBoxLayout(this, 7, 6);
+  QVBoxLayout* aMainLayout = new QVBoxLayout(this);
+  aMainLayout->setMargin( 7 );
   aMainLayout->setSpacing(5);
 
   mySetupBtn = new QPushButton("Setup Animation...", this);
@@ -1109,45 +1152,46 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
   TopLayout->setMargin( 11 );
 
   myTimeLbl = new QLabel("0", myPlayFrame);
-  TopLayout->addMultiCellWidget(myTimeLbl, 0, 0, 0, 2, Qt::AlignHCenter);
+  TopLayout->addWidget(myTimeLbl, 0, 0, 1, 3, Qt::AlignHCenter);
 
-  mySlider = new QSlider(Qt::Horizontal, myPlayFrame);
-  mySlider->setMinValue(0);
-  mySlider->setMaxValue(3);
+  mySlider = new QSlider( myPlayFrame);
+  mySlider->setOrientation(Qt::Horizontal);
+  mySlider->setMinimum(0);
+  mySlider->setMaximum(3);
   mySlider->setTickInterval(1);
   //mySlider->setTickmarks(QSlider::Below);
   mySlider->setTracking(false);
-  connect( mySlider, SIGNAL( valueChanged(int) ),
+  connect( mySlider, SIGNAL( sliderMoved(int) ),
           this, SLOT( onWindowChanged(int) ) );
-  TopLayout->addMultiCellWidget(mySlider, 1, 1, 0, 2);
+  TopLayout->addWidget(mySlider, 1, 0, 1, 3);
 
   myPlayBtn = new QToolButton(myPlayFrame);
-  myPlayBtn->setIconSet(MYplayPixmap);
-  myPlayBtn->setToggleButton(true);
+  myPlayBtn->setIcon(MYplayPixmap);
+  myPlayBtn->setCheckable(true);
   connect( myPlayBtn, SIGNAL( clicked() ),
           this, SLOT( onPlayPressed() ) );
-  TopLayout->addMultiCellWidget(myPlayBtn, 2, 2, 0, 1);
+  TopLayout->addWidget(myPlayBtn, 2, 0, 1, 2);
 
   QToolButton* aBackBtn = new QToolButton(myPlayFrame);
-  aBackBtn->setIconSet(QPixmap(leftIco));
+  aBackBtn->setIcon(QPixmap(leftIco));
   connect( aBackBtn, SIGNAL( clicked() ),
           this, SLOT( onBackPressed() ) );
   TopLayout->addWidget(aBackBtn, 3, 0);
 
   QToolButton* aForvardBtn = new QToolButton(myPlayFrame);
-  aForvardBtn->setIconSet(QPixmap(rightIco));
+  aForvardBtn->setIcon(QPixmap(rightIco));
   connect( aForvardBtn, SIGNAL( clicked() ),
           this, SLOT( onForvardPressed() ) );
   TopLayout->addWidget(aForvardBtn, 3, 1);
 
   QToolButton* aFirstBtn = new QToolButton(myPlayFrame);
-  aFirstBtn->setIconSet(QPixmap(firstIco));
+  aFirstBtn->setIcon(QPixmap(firstIco));
   connect( aFirstBtn, SIGNAL( clicked() ),
           this, SLOT( onFirstPressed() ) );
   TopLayout->addWidget(aFirstBtn, 4, 0);
 
   QToolButton* aLastBtn = new QToolButton(myPlayFrame);
-  aLastBtn->setIconSet(QPixmap(lastIco));
+  aLastBtn->setIcon(QPixmap(lastIco));
   connect( aLastBtn, SIGNAL( clicked() ),
           this, SLOT( onLastPressed() ) );
   TopLayout->addWidget(aLastBtn, 4, 1);
@@ -1168,45 +1212,45 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
           aSpeedNum, SLOT(display(double)) );
   connect( aWheel, SIGNAL(valueChanged(double)),
           this, SLOT(onSpeedChange(double)) );
-  TopLayout->addMultiCellWidget(aWheel, 1, 3, 3, 3, Qt::AlignRight);
+  TopLayout->addWidget(aWheel, 1, 3, 3, 1, Qt::AlignRight);
 
   QCheckBox* aCycleCheck = new QCheckBox("Cycled animation",myPlayFrame);
   aCycleCheck->setChecked(myAnimator->isCycling());
   connect(aCycleCheck, SIGNAL(toggled(bool)), myAnimator, SLOT(setCyclingSlot(bool)));
-  TopLayout->addMultiCellWidget(aCycleCheck, 5, 5, 0, 3);
+  TopLayout->addWidget(aCycleCheck, 5, 0, 1, 4);
 
   QCheckBox* aPropCheck = new QCheckBox("Use proportional timing",myPlayFrame);
   aPropCheck->setChecked(myAnimator->isProportional());
   connect(aPropCheck, SIGNAL(toggled(bool)), myAnimator, SLOT(setProportionalSlot(bool)));
-  TopLayout->addMultiCellWidget(aPropCheck, 6, 6, 0, 3);
+  TopLayout->addWidget(aPropCheck, 6, 0, 1, 4);
 
   // Pictures saving on disk
   QGroupBox* aSaveBox = new QGroupBox( "Saving", myPlayFrame );
-  aSaveBox->setColumnLayout(0, Qt::Horizontal );
-  QGridLayout* aSaveLay = new QGridLayout(aSaveBox->layout());
+  //aSaveBox->setColumnLayout(0, Qt::Horizontal );
+  QGridLayout* aSaveLay = new QGridLayout(aSaveBox);
   aSaveLay->setSpacing( 5 );
   aSaveLay->setMargin( 5 );
 
   mySaveCheck = new QCheckBox("Save pictures to directory", aSaveBox);
   connect(mySaveCheck, SIGNAL( toggled(bool)),
           this, SLOT( onCheckDump(bool) ));
-  aSaveLay->addMultiCellWidget(mySaveCheck, 0, 0, 0, 2);
+  aSaveLay->addWidget(mySaveCheck, 0, 0, 1, 3);
 
   QLabel* aFormatLbl = new QLabel("Saving format:", aSaveBox);
   aFormatLbl->setEnabled(false);
   connect(mySaveCheck, SIGNAL( toggled(bool)),
           aFormatLbl, SLOT( setEnabled(bool) ));
-  aSaveLay->addMultiCellWidget(aFormatLbl, 1, 1, 0, 1);
+  aSaveLay->addWidget(aFormatLbl, 1, 0, 1, 2);
 
   myPicsFormat = new QComboBox(aSaveBox);
-  QStrList aDumpFormats = QImageIO::outputFormats();
+  QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
   for (unsigned int i = 0; i < aDumpFormats.count(); i++) {
-    myPicsFormat->insertItem(aDumpFormats.at(i));
+    myPicsFormat->addItem(aDumpFormats.at(i));
   }
-  if (aDumpFormats.find("JPEG"))
-    myPicsFormat->setCurrentItem(aDumpFormats.find("JPEG"));
+  if (aDumpFormats.indexOf("JPEG"))
+    myPicsFormat->setCurrentIndex(aDumpFormats.indexOf("JPEG"));
   else
-    myPicsFormat->setCurrentItem(0);
+    myPicsFormat->setCurrentIndex(0);
   myPicsFormat->setEnabled(false);
   aSaveLay->addWidget(myPicsFormat, 1, 2);
   connect(mySaveCheck, SIGNAL( toggled(bool)),
@@ -1239,7 +1283,7 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
   mySaveAVICheck = new QCheckBox("Save animation to AVI file", aSaveBox);
   connect(mySaveAVICheck, SIGNAL( toggled(bool)),
           this, SLOT( onCheckDump(bool) ));
-  aSaveLay->addMultiCellWidget(mySaveAVICheck, 3, 3, 0, 2);
+  aSaveLay->addWidget(mySaveAVICheck, 3, 0, 1, 3);
 
   myPathAVILbl = new QLabel("Path:", aSaveBox);
   myPathAVILbl->setEnabled(false);
@@ -1265,31 +1309,34 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
   mySaveAVICheck->setChecked(false);
   //mySaveAVICheck->setEnabled(myAnimator->checkAVIMaker());
 
-  TopLayout->addMultiCellWidget(aSaveBox, 7, 7, 0, 3);
+  TopLayout->addWidget(aSaveBox, 7, 0, 1, 4);
 
   QCheckBox* aCleanMemCheck = new QCheckBox("Clean memory at each frame",myPlayFrame);
   aCleanMemCheck->setChecked(myAnimator->isCleaningMemoryAtEachFrame());
   connect(aCleanMemCheck, SIGNAL(toggled(bool)), myAnimator, SLOT(setCleaningMemoryAtEachFrameSlot(bool)));
-  TopLayout->addMultiCellWidget(aCleanMemCheck, 8, 8, 0, 3);
+  TopLayout->addWidget(aCleanMemCheck, 8, 0, 1, 4);
 
   aMainLayout->addWidget(myPlayFrame);
 
   // Animation publishing in study
-  QHBox* aPublishBox = new QHBox(this);
-  aPublishBox->setSpacing(5);
+  QWidget* aPublishBox = new QWidget(this);
+  QHBoxLayout* aPubHBLay = new QHBoxLayout( aPublishBox );
+  aPubHBLay->setSpacing(5);
 
   myPublishBtn = new QPushButton("Publish to study", aPublishBox);
+  aPubHBLay->addWidget( myPublishBtn );
   connect(myPublishBtn, SIGNAL(clicked()), this, SLOT(publishToStudy()));
 
   mySaveBtn = new QPushButton("Save Animation", aPublishBox);
   mySaveBtn->setEnabled(myAnimator->isSavedInStudy());
+  aPubHBLay->addWidget( mySaveBtn );
   connect(mySaveBtn, SIGNAL(clicked()), this, SLOT(saveToStudy()));
 
   aMainLayout->addWidget(aPublishBox);
 
 
-  QHBox* aBtnBox = new QHBox(this);
-  QHBoxLayout* aBtnLayout = new QHBoxLayout(aBtnBox->layout());
+  QWidget* aBtnBox = new QWidget(this);
+  QHBoxLayout* aBtnLayout = new QHBoxLayout(aBtnBox);
   aBtnLayout->addStretch();
 
   QPushButton* aCloseBtn = new QPushButton(tr("BUT_CLOSE"), aBtnBox);
@@ -1350,18 +1397,18 @@ void VisuGUI_TimeAnimationDlg::createFrames()
   if (myAnimator->getNbFrames() == 0) {
     myPlayFrame->setEnabled(false);
     c.suspend();
-    SUIT_MessageBox::warn1(this,
+    SUIT_MessageBox::warning(this,
                            tr("ERROR"),
                            tr("MSG_NO_ANIMATIONDATA"),
                            tr("&OK"));
     return;
   }
-  mySlider->setMaxValue(myAnimator->getNbFrames()-1);
+  mySlider->setMaximum(myAnimator->getNbFrames()-1);
   myPlayFrame->setEnabled(true);
   if (!myAnimator->generateFrames()) {
     c.suspend();
     //myPlayFrame->setEnabled(false);
-    SUIT_MessageBox::warn1(this,
+    SUIT_MessageBox::warning(this,
                            tr("ERROR"),
                            myAnimator->getLastErrorMsg(),
                            tr("&OK"));
@@ -1373,15 +1420,15 @@ void VisuGUI_TimeAnimationDlg::createFrames()
 //------------------------------------------------------------------------
 void VisuGUI_TimeAnimationDlg::onPlayPressed()
 {
-  if (myPlayBtn->isOn() && (!myAnimator->running())) {
-    myPlayBtn->setIconSet(MYpausePixmap);
+  if (myPlayBtn->isChecked() && (!myAnimator->isRunning())) {
+    myPlayBtn->setIcon(MYpausePixmap);
     if (mySaveCheck->isChecked()) {
       onPicsFormatChanged();
       onPathChanged();
       
     } else if (mySaveAVICheck->isChecked()) {
       myAnimator->setDumpFormat("AVI");
-      myAnimator->dumpTo(myPathAVIEdit->text());
+      myAnimator->dumpTo((const char*)myPathAVIEdit->text().toLatin1());
     } else {
       myAnimator->dumpTo("");
     }
@@ -1389,7 +1436,7 @@ void VisuGUI_TimeAnimationDlg::onPlayPressed()
     myGenBtn->setEnabled(false);
     myAnimator->startAnimation();
   } else {
-    myPlayBtn->setIconSet(MYplayPixmap);
+    myPlayBtn->setIcon(MYplayPixmap);
     myAnimator->stopAnimation();
     mySetupBtn->setEnabled(true);
     myGenBtn->setEnabled(true);
@@ -1439,7 +1486,7 @@ void VisuGUI_TimeAnimationDlg::closeEvent (QCloseEvent* theEvent)
   if (myAnimator != NULL) {
     myAnimator->stopAnimation();
     myAnimator->wait(500);
-    if (myAnimator->running() && (! myAnimator->finished())) {
+    if (myAnimator->isRunning() && (! myAnimator->isFinished())) {
       theEvent->ignore();
       QCloseEvent* aNewCloseEvent = new QCloseEvent;
       QApplication::postEvent( this, aNewCloseEvent );
@@ -1468,8 +1515,8 @@ void VisuGUI_TimeAnimationDlg::onSpeedChange (double theSpeed)
 void VisuGUI_TimeAnimationDlg::stopAnimation()
 {
   myAnimator->stopAnimation();
-  myPlayBtn->setOn(false);
-  myPlayBtn->setIconSet(MYplayPixmap);
+  myPlayBtn->setChecked(false);
+  myPlayBtn->setIcon(MYplayPixmap);
   mySetupBtn->setEnabled(true);
   myGenBtn->setEnabled(true);
 }
@@ -1517,7 +1564,7 @@ void VisuGUI_TimeAnimationDlg::onBrowseAVI()
     aDir = getenv("HOME");
   else {
     QFileInfo aFile(myPathAVIEdit->text());
-    aDir = aFile.dirPath(true);
+    aDir = aFile.absoluteDir().absolutePath();
   }
   QString aPath = SUIT_FileDlg::getFileName(this, aDir, aFilter, "Select file", false);
   if (!aPath.isEmpty())
@@ -1544,7 +1591,7 @@ void VisuGUI_TimeAnimationDlg::onCheckDump(bool)
     if (mySaveAVICheck->isChecked()) {
       if (!myAnimator->checkAVIMaker()) {
         // AVI maker is not available
-        SUIT_MessageBox::warn1(this, tr("ERROR"), tr("MSG_NO_AVI_MAKER"), tr("&OK"));
+        SUIT_MessageBox::warning(this, tr("ERROR"), tr("MSG_NO_AVI_MAKER"), tr("&OK"));
         mySaveAVICheck->setChecked(false);
       }
       else {
@@ -1572,8 +1619,8 @@ void VisuGUI_TimeAnimationDlg::onCheckDump(bool)
 //------------------------------------------------------------------------
 void VisuGUI_TimeAnimationDlg::onStop()
 {
-  myPlayBtn->setOn(false);
-  myPlayBtn->setIconSet(MYplayPixmap);
+  myPlayBtn->setChecked(false);
+  myPlayBtn->setIcon(MYplayPixmap);
   mySetupBtn->setEnabled(true);
   myGenBtn->setEnabled(true);
 }
@@ -1592,7 +1639,7 @@ void VisuGUI_TimeAnimationDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
+    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
                           QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
                           arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
                           QObject::tr("BUT_OK"));
@@ -1620,20 +1667,20 @@ void VisuGUI_TimeAnimationDlg::restoreFromStudy(_PTR(SObject) theAnimation)
   myAnimator->restoreFromStudy(theAnimation);
   mySaveBtn->setEnabled(myAnimator->isSavedInStudy());
   if ( myAnimator->getAnimationMode() == 1 ) 
-    setCaption(tr("SUCCESSIVE_ANIMATION"));
+    setWindowTitle(tr("SUCCESSIVE_ANIMATION"));
 }
 
 //------------------------------------------------------------------------
 void VisuGUI_TimeAnimationDlg::onPicsFormatChanged()
 {
-  QStrList aDumpFormats = QImageIO::outputFormats();
-  myAnimator->setDumpFormat(aDumpFormats.at(myPicsFormat->currentItem()));
+  QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
+  myAnimator->setDumpFormat(aDumpFormats.at(myPicsFormat->currentIndex()));
 }
 
 //------------------------------------------------------------------------
 void VisuGUI_TimeAnimationDlg::onPathChanged()
 {
-  myAnimator->dumpTo(myPathEdit->text());
+  myAnimator->dumpTo((const char*)myPathEdit->text().toLatin1());
 }
 
 //------------------------------------------------------------------------
@@ -1643,7 +1690,7 @@ void VisuGUI_TimeAnimationDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index 70bd9952deb5ce4fe7bdc1a2939a4b28613f5d7c..144ee57a4434e6dfa4beeb135b4926c80a835527 100644 (file)
 #ifndef VISUGUI_TIMEANIMATION_H
 #define VISUGUI_TIMEANIMATION_H
 
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
 #include "SALOMEDSClient_Study.hxx"
 
 #include "VTKViewer.h"
 
-#include <qdialog.h>
-#include <qbuttongroup.h>
-#include <qwidgetstack.h>
+#include <QDialog>
+#include <QButtonGroup>
+#include <QStackedWidget>
+#include <QMap>
 
 #include <vector>
 #include <map>
@@ -47,11 +48,11 @@ namespace VISU
 
 class SVTK_ViewWindow;
 
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 
 class QLabel;
 class QSlider;
-class QListBox;
+class QListWidget;
 class QCheckBox;
 class QComboBox;
 class QToolButton;
@@ -75,9 +76,9 @@ class ArrangeDlg: public QDialog
 
   ~ArrangeDlg() {};
 
-  int getMode() const { return  myStackWgt->id(myStackWgt->visibleWidget()); }
+  int getMode() const { return  myStackWgt->indexOf(myStackWgt->currentWidget()); }
   double getDistance() const { return myDistVal->value(); }
-  int getAxis() const { return myAxisGrp->id(myAxisGrp->selected()); }
+  int getAxis() const { return myAxisGrp->id(myAxisGrp->checkedButton()); }
 
  protected slots:
   virtual void accept();
@@ -96,12 +97,12 @@ class ArrangeDlg: public QDialog
   VISU_TimeAnimation* myAnimator;
   SVTK_ViewWindow   * myViewWindow;
 
-  QWidgetStack*       myStackWgt;
+  QStackedWidget*       myStackWgt;
   QButtonGroup*       myAxisGrp;
-  QtxDblSpinBox*      myDistVal;
-  QListBox*           myFieldLst;
-  QtxDblSpinBox*      myCoord[3];
-  QValueList<Offset>  myOffsets;
+  QtxDoubleSpinBox*      myDistVal;
+  QListWidget*           myFieldLst;
+  QtxDoubleSpinBox*      myCoord[3];
+  QList<Offset>  myOffsets;
 
   QCheckBox*          mySaveChk;
 
@@ -133,7 +134,7 @@ class SetupDlg: public QDialog {
   VisuGUI* myModule;
   VISU_TimeAnimation* myAnimator;
 
-  QListBox* myFieldLst;
+  QListWidget* myFieldLst;
   QComboBox* myTypeCombo;
   std::vector<int> myComboId2TypeId;
   std::map<int,int> myTypeId2ComboId;
@@ -141,8 +142,8 @@ class SetupDlg: public QDialog {
   QPushButton* myPropBtn;
   QPushButton* myArrangeBtn;
   QCheckBox* myUseRangeChk;
-  QtxDblSpinBox* myMinVal;
-  QtxDblSpinBox* myMaxVal;
+  QtxDoubleSpinBox* myMinVal;
+  QtxDoubleSpinBox* myMaxVal;
 };
 
 
index b49b5f823a9127190ac7b738faec5e81fd4c6d26..be684730d1b0fbd56d89579decb1a510b92a4cf0 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <Utils_Timer.hxx>
 
-#include <qstring.h>
+#include <QString>
 
 class VisuGUI_Timer : public Utils_Timer
 {
index 45ffaa58c2a24b3bbb822772bdbfdd2c919f3b40..8140d5724c08964548c33490af4edd538ae17bb3 100644 (file)
@@ -50,7 +50,8 @@
 #include "LightApp_DataObject.h"
 #include "LightApp_SelectionMgr.h"
 
-#include "OB_Browser.h"
+//TODO
+//#include "OB_Browser.h"
 
 #include "SALOME_ListIO.hxx"
 #include "SALOME_ListIteratorOfListIO.hxx"
 
 #include "SUIT_Session.h"
 #include "SUIT_MessageBox.h"
+#include "SUIT_Desktop.h"
+#include "SUIT_ViewWindow.h"
+
+#include "CAM_DataModel.h"
 
 #include <vtkRenderer.h>
 #include <vtkActorCollection.h>
 
-#include <qstring.h>
+#include <QString>
 
 
 //=============================================================================
@@ -120,10 +125,9 @@ namespace VISU
             QWidget* theWidget )
   {
     if(IsStudyLocked(theStudy)){
-      SUIT_MessageBox::warn1(theWidget,
-                            QObject::tr("WRN_VISU_WARNING"),
-                            QObject::tr("WRN_STUDY_LOCKED"),
-                            QObject::tr("BUT_OK"));
+      SUIT_MessageBox::warning(theWidget,
+                               QObject::tr("WRN_VISU_WARNING"),
+                               QObject::tr("WRN_STUDY_LOCKED") );
        return true;
     }
     return false;
@@ -147,9 +151,9 @@ namespace VISU
     QString aSourceEntry = theEntry.section(':',0,aLevel);
     DataObjectList aList;
     theDataObject->children(aList);
-    DataObjectListIterator aDataObjectIter(aList);
-    while(SUIT_DataObject* aDataObject = aDataObjectIter.current()){
-      if(LightApp_DataObject* aChildDataObject = dynamic_cast<LightApp_DataObject*>(aDataObject)){
+    DataObjectList::Iterator aDataObjectIter = aList.begin();
+    while( aDataObjectIter!= aList.end() ) {
+      if(LightApp_DataObject* aChildDataObject = dynamic_cast<LightApp_DataObject*>(*aDataObjectIter)){
        QString anEntry = aChildDataObject->entry();
        QString aCurrentEntry = anEntry.section(':',0,aLevel);
        if(aSourceEntry == aCurrentEntry){
@@ -160,7 +164,7 @@ namespace VISU
          }
        }
       }
-      ++aDataObjectIter;
+      aDataObjectIter++;
     }
     return NULL;
   }
@@ -223,7 +227,7 @@ namespace VISU
       }
     }
     if(!aGen)
-      throw std::runtime_error(QObject::tr("ERR_CANT_FIND_VISU_COMPONENT").latin1());
+      throw std::runtime_error((const char*)QObject::tr("ERR_CANT_FIND_VISU_COMPONENT").toLatin1());
     return aGen;
   }
 
@@ -238,7 +242,7 @@ namespace VISU
       aGen = SALOME_MED::MED_Gen::_narrow(aComponent);
     }
     if(CORBA::is_nil(aGen))
-      throw std::runtime_error(QObject::tr("ERR_CANT_FIND_MED_COMPONENT").latin1());
+      throw std::runtime_error((const char*)QObject::tr("ERR_CANT_FIND_MED_COMPONENT").toLatin1());
     return aGen;
   }
 
@@ -267,7 +271,7 @@ namespace VISU
     QString aStr("");
     VISU::Storable::TRestoringMap aMap = getMapOfValue(theSObject);
     if (!aMap.empty())
-      aStr = VISU::Storable::FindValue(aMap, theKey.latin1());
+      aStr = VISU::Storable::FindValue(aMap, (const char*)theKey.toLatin1());
     return aStr;
   }
 
@@ -481,9 +485,9 @@ namespace VISU
              // mkr : 24.11.2006 : use AttributeName and module title for correct "Delete"
              //                    popup item displaying in object browser popup
               _PTR(AttributeName) aComment (anAttr);
-              aNAME = aComment->Value();
-             QString aVisuTITLE = theModule->getApp()->moduleTitle(QString(aVisuNAME));
-              if (!aVisuTITLE.compare(QString(aNAME))) {
+              aNAME = aComment->Value().c_str();
+             QString aVisuTITLE = theModule->getApp()->moduleTitle(QString(aVisuNAME.c_str()));
+              if (!aVisuTITLE.compare(QString(aNAME.c_str()))) {
                 isUnderVISU = true;
               }
             }
@@ -672,10 +676,9 @@ namespace VISU
          return true;
       }
     }
-    SUIT_MessageBox::warn1(GetDesktop(theModule),
-                           QObject::tr("WRN_VISU"),
-                           QObject::tr("WRN_NO_AVAILABLE_DATA"),
-                           QObject::tr("BUT_OK") );
+    SUIT_MessageBox::warning(GetDesktop(theModule),
+                             QObject::tr("WRN_VISU"),
+                             QObject::tr("WRN_NO_AVAILABLE_DATA") );
     return false;
   }
 
@@ -726,15 +729,14 @@ namespace VISU
     if (!thePrs || !theViewWindow)
       return aActor;
 
-    QApplication::setOverrideCursor( Qt::waitCursor );
+    QApplication::setOverrideCursor( Qt::WaitCursor );
     try {
       if ((aActor = thePrs->CreateActor()))
         theViewWindow->AddActor(aActor);
     } catch(std::exception& exc) {
-      SUIT_MessageBox::warn1
+      SUIT_MessageBox::warning
         (GetDesktop(theModule), QObject::tr("WRN_VISU"),
-         QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
-         QObject::tr("BUT_OK"));
+         QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()) );
     }
     QApplication::restoreOverrideCursor();
 
@@ -750,9 +752,10 @@ namespace VISU
     if (SalomeApp_Application* anApp = theModule->getApp()) {
       ViewManagerList aViewManagerList;
       anApp->viewManagers(SVTK_Viewer::Type(),aViewManagerList);
-      QPtrListIterator<SUIT_ViewManager> anIter (aViewManagerList);
-      while (SUIT_ViewManager* aViewManager = anIter.current()) {
-        QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+      QList<SUIT_ViewManager*>::Iterator anIter = aViewManagerList.begin();
+      while ( anIter != aViewManagerList.end() )
+      {
+        QVector<SUIT_ViewWindow*> aViews = (*anIter)->getViews();
         for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
           if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
             if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
@@ -764,7 +767,7 @@ namespace VISU
             }
           }
         }
-        ++anIter;
+        anIter++;
       }
     }
   }
@@ -775,7 +778,7 @@ namespace VISU
            SVTK_ViewWindow* theViewWindow,
            const QString& theEntry)
   {
-    TObjectInfo anObjectInfo = GetObjectByEntry(theStudy, theEntry);
+    TObjectInfo anObjectInfo = GetObjectByEntry(theStudy, (const char*)theEntry.toLatin1());
     VISU::Prs3d_i* aPrs3d = GetPrs3dFromBase(anObjectInfo.myBase);
     return FindActor(theViewWindow, aPrs3d);
   }
@@ -785,7 +788,7 @@ namespace VISU
   RecreateActor (const SalomeApp_Module* theModule,
                  VISU::Prs3d_i* thePrs)
   {
-    QApplication::setOverrideCursor(Qt::waitCursor);
+    QApplication::setOverrideCursor(Qt::WaitCursor);
 
     SALOMEDS::SObject_var aSObject = thePrs->GetSObject();
     CORBA::String_var anEntry = aSObject->GetID();
@@ -795,10 +798,9 @@ namespace VISU
     } catch (std::runtime_error& exc) {
       INFOS(exc.what());
       QApplication::restoreOverrideCursor();
-      SUIT_MessageBox::warn1
+      SUIT_MessageBox::warning
         (GetDesktop(theModule), QObject::tr("WRN_VISU"),
-         QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
-         QObject::tr("BUT_OK"));
+         QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()) );
 
       thePrs->RemoveActors();
       return;
@@ -923,7 +925,7 @@ namespace VISU
       if ( plotCurve ) {
         plotCurve->setHorTitle( theCurve->GetHorTitle().c_str() );
         //plotCurve->setVerTitle( ( theCurve->GetVerTitle().c_str() ) );
-        plotCurve->setVerTitle( theCurve->GetName() );
+        plotCurve->setVerTitle( theCurve->GetName().c_str() );
         plotCurve->setHorUnits( theCurve->GetHorUnits().c_str() );
         plotCurve->setVerUnits( theCurve->GetVerUnits().c_str() );
         double* xList = 0;
@@ -934,8 +936,8 @@ namespace VISU
           plotCurve->setData( xList, yList, nbPoints, zList );
         }
         if ( !theCurve->IsAuto() ) {
-          plotCurve->setLine( (Plot2d_Curve::LineType)theCurve->GetLine(), theCurve->GetLineWidth() );
-          plotCurve->setMarker( (Plot2d_Curve::MarkerType)theCurve->GetMarker() );
+          plotCurve->setLine( (Plot2d::LineType)theCurve->GetLine(), theCurve->GetLineWidth() );
+          plotCurve->setMarker( (Plot2d::MarkerType)theCurve->GetMarker() );
           SALOMEDS::Color color = theCurve->GetColor();
           plotCurve->setColor( QColor( (int)(color.R*255.), (int)(color.G*255.), (int)(color.B*255.) ) );
         }
@@ -976,7 +978,7 @@ namespace VISU
 
     if ( theDisplaying == VISU::eDisplayOnly )
       aPlot->EraseAll();
-    QList<Plot2d_Curve> clist;
+    QList<Plot2d_Curve*> clist;
     aPlot->getCurves( clist );
     _PTR(Study) aStudy = GetCStudy( GetAppStudy( theModule ) );
     _PTR(SObject) TableSO = aStudy->FindObjectID( table->GetEntry() );
@@ -1002,7 +1004,7 @@ namespace VISU
             UpdateCurve( theCurve, aPlot, plotCurve, theDisplaying );
 
             if ( theDisplaying == VISU::eErase && plotCurve ) {
-              clist.removeplotCurve );
+              clist.removeAll(plotCurve );
             }
           }
         }
@@ -1026,7 +1028,7 @@ namespace VISU
 
 //  if ( theDisplaying == VISU::eDisplayOnly )
 //    aPlot->EraseAll();
-    QList<Plot2d_Curve> clist;
+    QList<Plot2d_Curve*> clist;
     aPlot->getCurves( clist );
     SPlot2d_Curve* plotCurve = 0;
     SPlot2d_Curve* tmpCurve;
@@ -1050,22 +1052,23 @@ namespace VISU
   PlotRemoveCurve(const SalomeApp_Module* theModule,
                  VISU::Curve_i* pCrv)
   {
-    QString anEntry = pCrv->GetEntry();
+    QString anEntry = pCrv->GetEntry().c_str();
     ViewManagerList pvm_list;
     theModule->getApp()->viewManagers( SPlot2d_Viewer::Type(), pvm_list );
-    for( SUIT_ViewManager* mgr = pvm_list.first(); mgr; mgr = pvm_list.next() ){
-      Plot2d_ViewManager* pvm = dynamic_cast<Plot2d_ViewManager*>( mgr );
+    ViewManagerList::Iterator pvm_it = pvm_list.begin();
+    for( ; pvm_it != pvm_list.end(); pvm_it++ ){
+      Plot2d_ViewManager* pvm = dynamic_cast<Plot2d_ViewManager*>( *pvm_it );
       if( pvm ){
        SPlot2d_Viewer* aSPlot2d = dynamic_cast<SPlot2d_Viewer*>( pvm->getViewModel() );
        if( aSPlot2d ){
          Plot2d_ViewFrame* aPlot = aSPlot2d->getActiveViewFrame();
          if(aPlot){
-           QList<Plot2d_Curve> clist;
+           QList<Plot2d_Curve*> clist;
            aPlot->getCurves( clist );
            for (int i = 0; i < clist.count(); i++) {
-             if(SPlot2d_Curve* plotCurve = dynamic_cast<SPlot2d_Curve*>(clist.at(i)))
+             if(SPlot2d_Curve* plotCurve = dynamic_cast<SPlot2d_Curve*>(clist[i]))
                if(plotCurve->hasIO() && (plotCurve->getIO()->getEntry() == anEntry))
-                 aPlot->eraseCurve(clist.at(i));
+                 aPlot->eraseCurve(clist[i]);
            }
          }
        }
@@ -1088,7 +1091,7 @@ namespace VISU
 
     if ( theDisplaying == VISU::eDisplayOnly )
       aPlot->EraseAll();
-    QList<Plot2d_Curve> clist;
+    QList<Plot2d_Curve*> clist;
     aPlot->getCurves( clist );
     if ( container->GetNbCurves() > 0 ) {
       int nbCurves = container->GetNbCurves();
@@ -1101,7 +1104,7 @@ namespace VISU
           UpdateCurve( theCurve, aPlot, plotCurve, theDisplaying );
 
           if ( plotCurve && theDisplaying == VISU::eErase ) {
-            clist.remove( plotCurve );
+            clist.removeAll( plotCurve );
           }
         }
       }
@@ -1134,9 +1137,9 @@ namespace VISU
           }
           PlotContainer( theModule, pContainer, VISU::eDisplay );
 
-         QString anEntry = pContainer->GetEntry();
+         QString anEntry = pContainer->GetEntry().c_str();
          _PTR(Study) aStudy = theTableSO->GetStudy();
-         _PTR(SObject) aContainerSO = aStudy->FindObjectID(anEntry.latin1());
+         _PTR(SObject) aContainerSO = aStudy->FindObjectID((const char*)anEntry.toLatin1());
          _PTR(SObject) aParentSO = aContainerSO->GetFather();
          UpdateObjBrowser(theModule,true,aParentSO);
         }
@@ -1166,12 +1169,12 @@ namespace VISU
 
     Storable::TRestoringMap aMap = getMapOfValue(aResultSObj);
     bool isExist;
-    string aComment = Storable::FindValue(aMap,"myComment",&isExist).latin1();
+    string aComment = (const char*)Storable::FindValue(aMap,"myComment",&isExist).toLatin1();
     if (!isExist)
       return;
 
     CORBA::Object_var aMesh;
-    string aMeshName = Storable::FindValue(aMap,"myMeshName").latin1();
+    string aMeshName = (const char*)Storable::FindValue(aMap,"myMeshName").toLatin1();
 #ifdef CHECKTIME
     Utils_Timer timer;
     timer.Start();
@@ -1182,12 +1185,12 @@ namespace VISU
         aMesh = GetVisuGen(theModule)->MeshOnEntity(aResult,aMeshName.c_str(),anEntity);
     } else if (aComment == "FAMILY") {
       VISU::Entity anEntity = (VISU::Entity)Storable::FindValue(aMap,"myEntityId").toInt();
-      string aFamilyName = Storable::FindValue(aMap,"myName").latin1();
+      string aFamilyName = (const char*)Storable::FindValue(aMap,"myName").toLatin1();
       if (VISU::Mesh_i::IsPossible(pResult,aMeshName.c_str(),anEntity,aFamilyName.c_str()))
         aMesh = GetVisuGen(theModule)->FamilyMeshOnEntity
           (aResult,aMeshName.c_str(),anEntity,aFamilyName.c_str());
     } else if (aComment == "GROUP") {
-      string aGroupName = Storable::FindValue(aMap,"myName").latin1();
+      string aGroupName = (const char*)Storable::FindValue(aMap,"myName").toLatin1();
       if (VISU::Mesh_i::IsPossible(pResult,aMeshName.c_str(),aGroupName.c_str()))
         aMesh = GetVisuGen(theModule)->GroupMesh(aResult,aMeshName.c_str(),aGroupName.c_str());
     }
@@ -1202,10 +1205,9 @@ namespace VISU
     if (!CORBA::is_nil(aMesh))
       pPresent = dynamic_cast<VISU::Mesh_i*>(VISU::GetServant(aMesh).in());
     if (pPresent == NULL) {
-      SUIT_MessageBox::warn1 (GetDesktop(theModule),
-                              QObject::tr("WRN_VISU"),
-                              QObject::tr("ERR_CANT_BUILD_PRESENTATION"),
-                              QObject::tr("BUT_OK"));
+      SUIT_MessageBox::warning (GetDesktop(theModule),
+                                QObject::tr("WRN_VISU"),
+                                QObject::tr("ERR_CANT_BUILD_PRESENTATION") );
       return;
     }
 
@@ -1228,10 +1230,8 @@ namespace VISU
 #endif
       } catch (std::runtime_error& exc) {
         INFOS(exc.what());
-        SUIT_MessageBox::warn1
-          (GetDesktop(theModule), QObject::tr("WRN_VISU"),
-           QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
-           QObject::tr("BUT_OK"));
+        SUIT_MessageBox::warning(GetDesktop(theModule), QObject::tr("WRN_VISU"),
+                                 QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()) );
       }
     }
 
index 4685b59792dd2b0ccf650206e0b7cb418d385239..bbf95aa238debab481bd324adcb281ed52a556e6 100644 (file)
 #include "SVTK_ViewWindow.h"
 
 // QT Includes
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <QLabel>
+#include <QPushButton>
+#include <QSlider>
+#include <QLayout>
+#include <QGroupBox>
+#include <QKeyEvent>
 
 using namespace std;
 
@@ -64,77 +65,73 @@ using namespace std;
 //
 //=================================================================================
 VisuGUI_TransparencyDlg::VisuGUI_TransparencyDlg( VisuGUI* theModule,
-                                     const char* name,
-                                     bool modal,
-                                     WFlags fl)
-     : QDialog( VISU::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
-                WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
+                                                  bool modal )
+     : QDialog( VISU::GetDesktop( theModule ), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
      myModule(theModule),
      mySelectionMgr( VISU::GetSelectionMgr( theModule ) ),
      myViewWindow( VISU::GetActiveViewWindow<SVTK_ViewWindow>(theModule) )
 {
-  if (!name)
-    setName("VisuGUI_TransparencyDlg");
-  setCaption(tr("TRANSPARENCY_TITLE" ));
+  setModal( modal );
+  setAttribute( Qt::WA_DeleteOnClose );
+    
+  setWindowTitle(tr("TRANSPARENCY_TITLE" ));
   setSizeGripEnabled(TRUE);
   QGridLayout* VisuGUI_TransparencyDlgLayout = new QGridLayout(this);
   VisuGUI_TransparencyDlgLayout->setSpacing(6);
   VisuGUI_TransparencyDlgLayout->setMargin(11);
 
   /*************************************************************************/
-  QGroupBox* GroupC1 = new QGroupBox(this, "GroupC1");
-  GroupC1->setColumnLayout(0, Qt::Vertical);
-  GroupC1->layout()->setSpacing(0);
-  GroupC1->layout()->setMargin(0);
-  QGridLayout* GroupC1Layout = new QGridLayout(GroupC1->layout());
+  QGroupBox* GroupC1 = new QGroupBox(this);
+  //GroupC1->setColumnLayout(0, Qt::Vertical);
+  //GroupC1->layout()->setSpacing(0);
+  //GroupC1->layout()->setMargin(0);
+  QGridLayout* GroupC1Layout = new QGridLayout(GroupC1);
   GroupC1Layout->setAlignment(Qt::AlignTop);
   GroupC1Layout->setSpacing(6);
   GroupC1Layout->setMargin(11);
 
-  TextLabelTransparent = new QLabel(GroupC1, "TextLabelTransparent");
-  TextLabelTransparent->setText(tr("TRANSPARENCY_TRANSPARENT" ));
-  TextLabelTransparent->setAlignment(AlignLeft);
+  TextLabelTransparent = new QLabel(tr("TRANSPARENCY_TRANSPARENT" ), GroupC1);
+  TextLabelTransparent->setAlignment(Qt::AlignLeft);
   GroupC1Layout->addWidget(TextLabelTransparent, 0, 0);
 
-  ValueLab = new QLabel(GroupC1, "ValueLab");
-  ValueLab->setAlignment(AlignCenter);
+  ValueLab = new QLabel(GroupC1);
+  ValueLab->setAlignment(Qt::AlignCenter);
   ValueLab->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
   QFont fnt = ValueLab->font(); fnt.setBold(true); ValueLab->setFont(fnt);
   GroupC1Layout->addWidget(ValueLab, 0, 1);
 
-  TextLabelOpaque = new QLabel(GroupC1, "TextLabelOpaque");
-  TextLabelOpaque->setText(tr("TRANSPARENCY_OPAQUE" ));
-  TextLabelOpaque->setAlignment(AlignRight);
+  TextLabelOpaque = new QLabel(tr("TRANSPARENCY_OPAQUE" ), GroupC1);
+  TextLabelOpaque->setAlignment(Qt::AlignRight);
   GroupC1Layout->addWidget(TextLabelOpaque, 0, 2);
 
-  Slider1 = new QSlider(0, 10, 1, 5, Horizontal, GroupC1, "Slider1");
-  Slider1->setFocusPolicy(QWidget::NoFocus);
+  Slider1 = new QSlider( Qt::Horizontal, GroupC1 );
+  Slider1->setMinimum( 0 );
+  Slider1->setMaximum( 100 );
+  Slider1->setPageStep( 10 );
+  Slider1->setSingleStep( 1 );  
+  Slider1->setFocusPolicy(Qt::NoFocus);
   Slider1->setMinimumSize(300, 0);
-  Slider1->setTickmarks(QSlider::Above);
+  Slider1->setTickPosition(QSlider::TicksAbove);
   Slider1->setTickInterval(10);
   Slider1->setTracking(true);
-  Slider1->setMinValue(0);
-  Slider1->setMaxValue(100);
-  Slider1->setLineStep(1);
-  Slider1->setPageStep(10);
-  GroupC1Layout->addMultiCellWidget(Slider1, 1, 1, 0, 2);
+  GroupC1Layout->addWidget(Slider1, 1, 0, 1, 3);
 
   /*************************************************************************/
-  QGroupBox* GroupButtons = new QGroupBox(this, "GroupButtons");
-  GroupButtons->setColumnLayout(0, Qt::Vertical);
-  GroupButtons->layout()->setSpacing(0);
-  GroupButtons->layout()->setMargin(0);
-  QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons->layout());
+  QGroupBox* GroupButtons = new QGroupBox(this);
+  //GroupButtons->setColumnLayout(0, Qt::Vertical);
+  //GroupButtons->layout()->setSpacing(0);
+  //GroupButtons->layout()->setMargin(0);
+  QGridLayout* GroupButtonsLayout = new QGridLayout(GroupButtons);
   GroupButtonsLayout->setAlignment(Qt::AlignTop);
   GroupButtonsLayout->setSpacing(6);
   GroupButtonsLayout->setMargin(11);
 
-  buttonOk = new QPushButton(GroupButtons, "buttonOk");
+  buttonOk = new QPushButton(GroupButtons);
   buttonOk->setText(tr("BUT_CLOSE"));
   buttonOk->setAutoDefault(TRUE);
   buttonOk->setDefault(TRUE);
 
-  buttonHelp = new QPushButton(GroupButtons, "buttonHelp");
+  buttonHelp = new QPushButton(GroupButtons);
   buttonHelp->setText(tr("BUT_HELP"));
   buttonHelp->setAutoDefault(TRUE);
 
@@ -193,10 +190,10 @@ void VisuGUI_TransparencyDlg::ClickOnHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             tr("BUT_OK"));
   }
 }
 
@@ -291,7 +288,7 @@ void VisuGUI_TransparencyDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       ClickOnHelp();
index 2bf3ddbb98875c9557f7b1a7c7aef1dbbbf9c6c2..a2f90e1525df15e7fa68e55cc1d8622bd19a9ed0 100644 (file)
@@ -30,7 +30,7 @@
 #define VISUGUI_TRANSPARENCYDLG_H
 
 // QT Includes
-#include <qdialog.h>
+#include <QDialog>
 
 class QLabel;
 class QPushButton;
@@ -51,9 +51,7 @@ class VisuGUI_TransparencyDlg : public QDialog
 
 public:
   VisuGUI_TransparencyDlg( VisuGUI* = 0, 
-                          const char* name = 0,
-                          bool modal = false,
-                          WFlags fl = 0 );
+                          bool modal = false );
 
   ~VisuGUI_TransparencyDlg();
 
index 4a77ad49576b608f3d327a822c9bad363ff4f321..143236ddf7eed45c7d415c2609bde52413dd44e1 100644 (file)
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Session.h"
 
-#include <qlayout.h>
-#include <qcolordialog.h>
-#include <qtabwidget.h>
+#include <QtxColorButton.h>
+
+#include <QLayout>
+#include <QColorDialog>
+#include <QTabWidget>
+#include <QButtonGroup>
+#include <QGroupBox>
+#include <QRadioButton>
+#include <QCheckBox>
+#include <QLabel>
+#include <QSpinBox>
+#include <QPushButton>
+#include <QKeyEvent>
 
 using namespace std;
 
@@ -54,7 +64,7 @@ using namespace std;
 VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
   : VisuGUI_Prs3dDlg(theModule)
 {
-  setCaption(tr("DLG_TITLE"));
+  setWindowTitle(tr("DLG_TITLE"));
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout( this ); 
@@ -63,23 +73,25 @@ VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
 
   myTabBox = new QTabWidget(this);
 
-  QVBox* aBox = new QVBox(this);
-  aBox->setMargin( 11 );
+  QWidget* aBox = new QWidget(this);
+  QVBoxLayout* aVBLay = new QVBoxLayout( aBox );
+  aVBLay->setMargin( 11 );
 
-  TopGroup = new QButtonGroup( aBox, "TopGroup" );
-  TopGroup->setColumnLayout(0, Qt::Vertical );
-  TopGroup->layout()->setSpacing( 0 );
-  TopGroup->layout()->setMargin( 5 );
-  QGridLayout* TopGroupLayout = new QGridLayout( TopGroup->layout() );
+  TopGroup = new QGroupBox( aBox );
+  aVBLay->addWidget( TopGroup );
+  //TopGroup->setColumnLayout(0, Qt::Vertical );
+  //TopGroup->layout()->setSpacing( 0 );
+  //TopGroup->layout()->setMargin( 5 );
+  QGridLayout* TopGroupLayout = new QGridLayout( TopGroup );
   TopGroupLayout->setAlignment( Qt::AlignTop );
   TopGroupLayout->setSpacing( 6 );
   TopGroupLayout->setMargin( 11 );
 
   // Scale factor
-  ScaleLabel = new QLabel (tr("LBL_SCALE_FACTOR"), TopGroup, "ScaleLabel");
+  ScaleLabel = new QLabel (tr("LBL_SCALE_FACTOR"), TopGroup );
 
-  ScalFact = new QtxDblSpinBox( 1e-20, 1.0E+38, 0.1, TopGroup );
-  ScalFact->setPrecision( 5 );
+  ScalFact = new QtxDoubleSpinBox( 1e-20, 1.0E+38, 0.1, TopGroup );
+  ScalFact->setDecimals( 5 );
   ScalFact->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   ScalFact->setValue( 0.1 );
 
@@ -87,9 +99,13 @@ VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
   TopGroupLayout->addWidget( ScalFact, 0, 1 );
 
   // Line width
-  LineWidLabel = new QLabel (tr("LBL_LINE_WIDTH"), TopGroup, "LineWidLabel");
+  LineWidLabel = new QLabel (tr("LBL_LINE_WIDTH"), TopGroup );
 
-  LinWid = new QSpinBox( 1, 10, 1, TopGroup, "LinWid" );
+  LinWid = new QSpinBox( TopGroup );
+  LinWid->setMinimum( 1 );
+  LinWid->setMaximum( 10 );
+  LinWid->setSingleStep( 1 );
+  
   LinWid->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   LinWid->setValue( 1 );
 
@@ -97,9 +113,10 @@ VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
   TopGroupLayout->addWidget( LinWid, 1, 1 );
 
   // Color
-  UseMagn = new QCheckBox (tr("MAGNITUDE_COLORING_CHK"), TopGroup, "UseMagn");
+  UseMagn = new QCheckBox (tr("MAGNITUDE_COLORING_CHK"), TopGroup);
   //UseMagn->setText(tr("MAGNITUDE_COLORING_CHK"));
-  SelColor = new QPushButton (tr("SEL_COLOR_BTN"), TopGroup, "SelColor");
+  SelColor = new QtxColorButton (TopGroup);
+  SelColor->setText( tr("SEL_COLOR_BTN") );
 
   /*  ColorLab = new QLabel( TopGroup, "ColorLab" );
   ColorLab->setFixedSize( SelColor->sizeHint().height(), SelColor->sizeHint().height() );
@@ -110,70 +127,81 @@ VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
   TopGroupLayout->addWidget( SelColor, 2, 1 );
 
   // Gliphs
-  UseGlyph = new QCheckBox (tr("USE_GLYPHS_CHK"), TopGroup, "UseGlyph");
+  UseGlyph = new QCheckBox (tr("USE_GLYPHS_CHK"), TopGroup);
   
-  TypeGlyph = new QButtonGroup (tr("GLYPH_TYPE_GRP"), TopGroup, "TypeGlyph");
-  TypeGlyph->setColumnLayout(0, Qt::Vertical );
-  TypeGlyph->layout()->setSpacing( 0 );
-  TypeGlyph->layout()->setMargin( 0 );
-  QGridLayout* TypeGlyphLayout = new QGridLayout( TypeGlyph->layout() );
+  TypeGlyph = new QButtonGroup ( TopGroup);
+  TypeGB = new QGroupBox( tr("GLYPH_TYPE_GRP"), TopGroup );
+  //TypeGlyph->setColumnLayout(0, Qt::Vertical );
+  //TypeGlyph->layout()->setSpacing( 0 );
+  //TypeGlyph->layout()->setMargin( 0 );
+  QGridLayout* TypeGlyphLayout = new QGridLayout( TypeGB );
   TypeGlyphLayout->setAlignment( Qt::AlignTop );
   TypeGlyphLayout->setSpacing( 6 );
   TypeGlyphLayout->setMargin( 11 );
 
-  RBArrows = new QRadioButton (tr("ARROWS_BTN") , TypeGlyph, "RBArrows");
+  RBArrows = new QRadioButton (tr("ARROWS_BTN"), TypeGB );
   TypeGlyphLayout->addWidget( RBArrows, 0, 0 );
-  RBCones2 = new QRadioButton (tr("CONES2_BTN"), TypeGlyph, "RBCones2");
+  RBCones2 = new QRadioButton (tr("CONES2_BTN"), TypeG);
   TypeGlyphLayout->addWidget( RBCones2, 1, 0 );
-  RBCones6 = new QRadioButton (tr("CONES6_BTN"), TypeGlyph, "RBCones6");
+  RBCones6 = new QRadioButton (tr("CONES6_BTN"), TypeG);
   TypeGlyphLayout->addWidget( RBCones6, 2, 0 );
 
-  PosGlyph = new QButtonGroup (tr("GLYPH_POSITION_GRP"), TopGroup, "PosGlyph");
-  PosGlyph->setColumnLayout(0, Qt::Vertical );
-  PosGlyph->layout()->setSpacing( 0 );
-  PosGlyph->layout()->setMargin( 0 );
-  QGridLayout* PosGlyphLayout = new QGridLayout( PosGlyph->layout() );
+  TypeGlyph->addButton( RBArrows );
+  TypeGlyph->addButton( RBCones2 );
+  TypeGlyph->addButton( RBCones6 );
+
+  PosGlyph = new QButtonGroup ( TopGroup );
+  PosGB = new QGroupBox( tr("GLYPH_POSITION_GRP"), TopGroup );
+  //PosGlyph->setColumnLayout(0, Qt::Vertical );
+  //PosGlyph->layout()->setSpacing( 0 );
+  //PosGlyph->layout()->setMargin( 0 );
+  QGridLayout* PosGlyphLayout = new QGridLayout( PosGB );
   PosGlyphLayout->setAlignment( Qt::AlignTop );
   PosGlyphLayout->setSpacing( 6 );
   PosGlyphLayout->setMargin( 11 );
   
-  RBTail = new QRadioButton (tr("TAIL_BTN"  ), PosGlyph, "RBTail");
+  RBTail = new QRadioButton (tr("TAIL_BTN"  ), PosG);
   PosGlyphLayout->addWidget( RBTail, 0, 0 );
-  RBCent = new QRadioButton (tr("CENTER_BTN"), PosGlyph, "RBCent");
+  RBCent = new QRadioButton (tr("CENTER_BTN"), PosG);
   PosGlyphLayout->addWidget( RBCent, 1, 0 );
-  RBHead = new QRadioButton (tr("HEAD_BTN"  ), PosGlyph, "RBHead");
+  RBHead = new QRadioButton (tr("HEAD_BTN"  ), PosG);
   PosGlyphLayout->addWidget( RBHead, 2, 0 );
 
-  TopGroupLayout->addMultiCellWidget( UseGlyph, 3, 3, 0, 2 );
-  TopGroupLayout->addWidget( TypeGlyph, 4, 0 );
-  TopGroupLayout->addMultiCellWidget( PosGlyph, 4, 4, 1, 2 );
+  PosGlyph->addButton( RBTail );
+  PosGlyph->addButton( RBCent );
+  PosGlyph->addButton( RBHead );
+
+  TopGroupLayout->addWidget( UseGlyph, 3, 0, 1, 3 );
+  TopGroupLayout->addWidget( TypeGB, 4, 0 );
+  TopGroupLayout->addWidget( PosGB, 4, 1, 1, 2 );
 
   // Common buttons ===========================================================
-  GroupButtons = new QGroupBox( this, "GroupButtons" );
-  GroupButtons->setColumnLayout(0, Qt::Vertical );
-  GroupButtons->layout()->setSpacing( 0 );
-  GroupButtons->layout()->setMargin( 0 );
-  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+  GroupButtons = new QGroupBox( this );
+  //GroupButtons->setColumnLayout(0, Qt::Vertical );
+  //GroupButtons->layout()->setSpacing( 0 );
+  //GroupButtons->layout()->setMargin( 0 );
+  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
   GroupButtonsLayout->setSpacing( 6 );
   GroupButtonsLayout->setMargin( 11 );
 
-  buttonOk = new QPushButton( tr( "&OK" ), GroupButtons, "buttonOk" );
+  buttonOk = new QPushButton( tr( "BUT_OK" ), GroupButtons );
   buttonOk->setAutoDefault( TRUE );
   buttonOk->setDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
-  buttonCancel = new QPushButton( tr( "&Cancel" ) , GroupButtons, "buttonCancel" );
+  buttonCancel = new QPushButton( tr( "BUT_CANCEL" ) , GroupButtons );
   buttonCancel->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonCancel, 0, 2 );
-  buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  buttonHelp = new QPushButton( tr( "BUT_HELP" ) , GroupButtons );
   buttonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
   // top layout
   myTabBox->addTab(aBox, "Vectors");
   myScalarPane = new VisuGUI_ScalarBarPane(this, false);
-  myScalarPane->setMargin( 5 );
+  if ( myScalarPane->layout() )
+    myScalarPane->layout()->setMargin( 5 );
   myInputPane = new VisuGUI_InputPane(VISU::TVECTORS, theModule, this);
   myTabBox->addTab(myScalarPane, "Scalar Bar");  
   myTabBox->addTab(myInputPane, "Input");
@@ -183,7 +211,7 @@ VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule)
   
   // signals and slots connections
   connect( UseGlyph,     SIGNAL( clicked() ), this, SLOT( enableGlyphType() ) );
-  connect( SelColor,     SIGNAL( clicked() ), this, SLOT( setVColor() ) );
+  //connect( SelColor,     SIGNAL( clicked() ), this, SLOT( setVColor() ) );
   connect( UseMagn,      SIGNAL( clicked() ), this, SLOT( enableSetColor() ) );
   connect( buttonOk,     SIGNAL( clicked() ), this, SLOT( accept() ) );
   connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
@@ -228,7 +256,7 @@ void VisuGUI_VectorsDlg::initFromPrsObject(VISU::ColoredPrs3d_i* thePrs, bool th
     return;
 
   myInputPane->initFromPrsObject( myPrsCopy );
-  myTabBox->setCurrentPage( 0 );
+  myTabBox->setCurrentIndex( 0 );
 }
 
 
@@ -268,8 +296,8 @@ int VisuGUI_VectorsDlg::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs)
 */
 void VisuGUI_VectorsDlg::enableGlyphType()
 {
-  TypeGlyph->setEnabled( UseGlyph->isChecked() );
-  PosGlyph->setEnabled( UseGlyph->isChecked() );
+  TypeGB->setEnabled( UseGlyph->isChecked() );
+  PosGB->setEnabled( UseGlyph->isChecked() );
 }
 
 /*!
@@ -284,12 +312,12 @@ void VisuGUI_VectorsDlg::enableSetColor()
 /*!
   Called when "Select Color" buttonx clicked
 */
-void VisuGUI_VectorsDlg::setVColor()
+/*void VisuGUI_VectorsDlg::setVColor()
 {
   QColor cnew = QColorDialog::getColor( myColor, this );
   if ( cnew.isValid() )
     setColor( cnew );
-}
+}*/
 
 /*!
   Sets Scale factor
@@ -362,13 +390,11 @@ bool VisuGUI_VectorsDlg::getUseGlyphs()
 */
 void VisuGUI_VectorsDlg::setColor( QColor color )
 {
-  myColor = color;
-  SelColor->setPaletteBackgroundColor(myColor);
-/*  QPalette pal = ColorLab->palette();
-  QColorGroup ca = pal.active();
-  ca.setColor( QColorGroup::Background, myColor );
-  pal.setActive( ca );
-  ColorLab->setPalette( pal );*/
+  //myColor = color;
+  //QPalette aPal = SelColor->palette();
+  //aPal.setColor( SelColor->backgroundRole(), myColor );
+  //SelColor->setPalette( aPal );
+  SelColor->setColor( color );
 }
 
 /*!
@@ -466,10 +492,10 @@ void VisuGUI_VectorsDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+                SUIT_MessageBox::warning(0, tr("WRN_WARNING"),
+                                         tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                                         arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                                         tr("BUT_OK"));
   }
 }
 
@@ -479,7 +505,7 @@ void VisuGUI_VectorsDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index 829747fccab062aa113934ebe5b15862ade40bb4..78f71e1a3b817aedf531aeefb59cfaa6eb46ff64 100644 (file)
 #define VISUGUI_VECTORSDLG_H
 
 #include "VisuGUI_Prs3dDlg.h"
-#include "QtxDblSpinBox.h"
-
-#include <qdialog.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
+#include "QtxDoubleSpinBox.h"
+
+class QGroupBox;
+class QTabWidget;
+class QRadioButton;
+class QButtonGroup;
+class QCheckBox;
+class QPushButton;
+class QtxColorButton;
 
 #include "SALOMEconfig.h"
 #include CORBA_CLIENT_HEADER(VISU_Gen)
@@ -94,18 +92,19 @@ protected slots:
 private:
     QGroupBox*      TopGroup;
     QCheckBox*      UseMagn;
-    //QLabel*         ColorLab;
-    QPushButton*    SelColor;
+    QtxColorButton* SelColor;
     QLabel*         LineWidLabel;
     QSpinBox*       LinWid;
     QLabel*         ScaleLabel;
-    QtxDblSpinBox*  ScalFact;
+    QtxDoubleSpinBox*  ScalFact;
     QCheckBox*      UseGlyph;
     QButtonGroup*   TypeGlyph;
+    QGroupBox*      TypeGB;
     QRadioButton*   RBCones6;
     QRadioButton*   RBCones2;
     QRadioButton*   RBArrows;
     QButtonGroup*   PosGlyph;
+    QGroupBox*      PosGB;
     QRadioButton*   RBTail;
     QRadioButton*   RBCent;
     QRadioButton*   RBHead;
@@ -124,7 +123,7 @@ private:
 
 private slots:
     void enableGlyphType();
-    void setVColor();
+//void setVColor();
     void enableSetColor();
 };
 
index 6062909c2f4144eef14e4f5b6d02f526de25a69b..bff866e961aaed55ba2230f524695cf811c9fa90 100644 (file)
@@ -33,6 +33,8 @@
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewWindow.h"
 
+#include <SUIT_Desktop.h>
+
 namespace VISU 
 {
   //----------------------------------------------------------------------------
@@ -43,7 +45,7 @@ namespace VISU
                bool theIsHighlight)
   {
     if (theViewWindow) {
-      QApplication::setOverrideCursor( Qt::waitCursor );
+      QApplication::setOverrideCursor( Qt::WaitCursor );
       try {
        if (VISU_Actor* anActor = thePrs->CreateActor()) {
          theViewWindow->AddActor(anActor);
@@ -59,10 +61,9 @@ namespace VISU
 
        QApplication::restoreOverrideCursor();
        INFOS(exc.what());
-       SUIT_MessageBox::warn1
+       SUIT_MessageBox::warning
          (GetDesktop(theModule), QObject::tr("WRN_VISU"),
-          QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()),
-          QObject::tr("BUT_OK"));
+          QObject::tr("ERR_CANT_CREATE_ACTOR") + ": " + QObject::tr(exc.what()));
       }
     }
     return NULL;
@@ -95,10 +96,9 @@ namespace VISU
                isOk = false;
 
                INFOS(exc.what());
-               SUIT_MessageBox::warn1
+               SUIT_MessageBox::warning
                  (GetDesktop(theModule), QObject::tr("WRN_VISU"),
-                  QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
-                  QObject::tr("BUT_OK"));
+                  QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()) );
              }
            } else if (theDispOnly) {
              anActor->VisibilityOff();
index f75be372213a7d488227f813c16b3b0076ea211d..2b368dce7c37404bd2c8e3a904ee0f3fdacb2cd5 100644 (file)
@@ -158,11 +158,11 @@ VISU_I_LDADD=$(libVISUEngineImpl_la_LIBADD) $(libVISUEngineImpl_la_LDFLAGS) \
        -lsuit \
        -lstd \
        -lCAM \
-       -lLightApp \
        -lObjBrowser \
+       -lPyConsole \
+       -lLightApp \
        -lSalomePrs \
        -lPyInterp \
-       -lPythonConsole \
        -lLogWindow \
        -lToolsGUI  \
        -lGLViewer \
@@ -175,4 +175,4 @@ VISU_I_LDADD=$(libVISUEngineImpl_la_LIBADD) $(libVISUEngineImpl_la_LDFLAGS) \
        -lMEDWrapper_V2_2 \
        -lMEDWrapper_V2_1 \
        -lmed_V2_1 \
-       -lmedmem
\ No newline at end of file
+       -lmedmem
index c0e51c20703a5895fd1c4260acc949abae79c710..0ca4841ea7f6183bd30c0861d8c80f81680200c8 100644 (file)
@@ -80,7 +80,7 @@ namespace VISU{
 
   //===========================================================================
   static int mySCnt = 0;
-  static QMutex aMutex(TRUE);
+  static QMutex aMutex(QMutex::Recursive);
 
   Mutex::Mutex(QMutex* theMutex): myMutex(&aMutex){
     if(MYDEBUG) MESSAGE("Mutex::Mutex : "<<!mySCnt);
@@ -125,24 +125,24 @@ namespace VISU{
   ::StrToMap(const QString& theStr, 
             VISU::Storable::TRestoringMap& theMap)
   {
-    if(0 && MYDEBUG) MESSAGE("Storable::StrToMap : string="<<theStr);
-    QStringList strList = QStringList::split( ";", theStr, false );
+    if(0 && MYDEBUG) MESSAGE("Storable::StrToMap : string="<<(const char*)theStr.toLatin1());
+    QStringList strList = theStr.split( ";", QString::SkipEmptyParts );
     for ( int i = 0; i < strList.count(); i++ ) {
       QString next = strList[ i ];
-      int pos = next.find("=");
+      int pos = next.indexOf("=");
       QString aName, aValue;
       if ( pos < 0 ) {
-       aName = next.stripWhiteSpace();
+       aName = next.trimmed();
        aValue = "";
       }
       else {
-       aName = next.left( pos ).stripWhiteSpace();
+       aName = next.left( pos ).trimmed();
        aValue = next.mid( pos+1 );
        if ( aValue.isNull() )
          aValue = "";
       }
       if ( !aName.isEmpty() )
-       theMap.insert( TRestoringMap::value_type( aName.latin1(), aValue ) );
+       theMap.insert( TRestoringMap::value_type( (const char*)aName.toLatin1(), aValue ) );
     }
   }
 
@@ -155,7 +155,7 @@ namespace VISU{
     QString output = ( !theName.isNull() ? theName : QString("") )
                    + QString( "=" )
                   + ( !theVal.isNull()  ? theVal  : QString("") );
-    theStr<<output.latin1()<<";";
+    theStr<<(const char*)output.toLatin1()<<";";
   }
 
   void 
@@ -167,7 +167,7 @@ namespace VISU{
     QString output = ( !theName.isNull() ? theName : QString("") )
                    + QString( "=" )
                   + QString::number( theVal );
-    theStr<<output.latin1()<<";";
+    theStr<<(const char*)output.toLatin1()<<";";
   }
 
   void
@@ -179,7 +179,7 @@ namespace VISU{
     QString output = ( !theName.isNull() ? theName : QString("") )
                    + QString( "=" )
                   + QString::number( theVal );
-    theStr<<output.latin1()<<";";
+    theStr<<(const char*)output.toLatin1()<<";";
   }
 
   Storable* 
@@ -195,8 +195,8 @@ namespace VISU{
       bool isExist;
       QString aComment = VISU::Storable::FindValue(aMap,"myComment",&isExist);
       if ( isExist ) {
-       TCallbackMap::const_iterator anIter = VisuStoreMap.find(aComment.latin1());
-       if(MYDEBUG) MESSAGE("Storable::Create - "<<aComment.latin1()<<" "<<(anIter != VisuStoreMap.end()));
+       TCallbackMap::const_iterator anIter = VisuStoreMap.find((const char*)aComment.toLatin1());
+       if(MYDEBUG) MESSAGE("Storable::Create - "<<(const char*)aComment.toLatin1()<<" "<<(anIter != VisuStoreMap.end()));
        if(anIter == VisuStoreMap.end()) 
          return NULL;
        return (anIter->second)(theSObject, thePrefix, aMap);
index 0f7b962d78a82094c41e620c0da07791122b4a2f..7bab91686b737cbb61364f9821b1799bb6b377a0 100644 (file)
 #include "SALOMEDSClient_Study.hxx"
 
 // QT headers
-#include <qstring.h>
-#include <qthread.h>
-#include <qfileinfo.h>
-#include <qapplication.h>
+#include <QString>
+#include <QThread>
+#include <QFileInfo>
+#include <QApplication>
+#include <QMutex>
 
 // standard C++ headers
 #include <stdio.h>
index 2485fe3ba50e3befa4430895abf64bbac2c92b10..945184d76d090c142458e77c7fb2613a76391514 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "VISU_PipeLine.hxx"
 
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include "VTKViewer_Algorithm.h"
 #include "SVTK_Functor.h"
@@ -45,6 +45,8 @@
 
 #include <vtkRenderWindow.h>
 
+#include <QtGlobal>
+
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
 #else
@@ -134,7 +136,7 @@ namespace
       if( aHolderIter->first == theActiveHolderEntry )
        continue;
       const VISU::TLastVisitedPrsList& aPrsList = aHolderIter->second;
-      anIteration = QMAX( aPrsList.size() - 1, anIteration );
+      anIteration = qMax( (int)aPrsList.size() - 1, anIteration );
     }
 
     // To estimate what amount of memory can be obtained
@@ -394,7 +396,7 @@ VISU::ColoredPrs3dCache_i
     if(VISU::ColoredPrs3d_i* aColoredPrs3d = CreateColoredPrs3d(theType, theInput)){
       VISU::ColoredPrs3dHolder_i* aHolder = new VISU::ColoredPrs3dHolder_i(*this);
       std::string aComment = std::string("myComment=") + aColoredPrs3d->GetComment();
-      std::string aName = aColoredPrs3d->GenerateName().latin1();
+      std::string aName = (const char*)aColoredPrs3d->GenerateName().toLatin1();
       aHolder->PublishInStudy(aName, aColoredPrs3d->GetIconName(), aComment);
       RegisterInHolder(aColoredPrs3d, aHolder->GetEntry());
       if( aRequiredMemory > 1.0 / VTK_LARGE_FLOAT )
index 9927e98ba95a0ec035582506ef7bc8927e39c5db..854b65d3077cf460066d20ad794ad74694f4710c 100644 (file)
@@ -29,7 +29,7 @@
 #include "VISU_ColoredPrs3dCache_i.hh"
 #include "VISU_ColoredPrs3d_i.hh"
 
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 using namespace VISU;
 using namespace std;
index 351952dc8bcbd2f99439f26232e1f2b72312e5ea..5c38921fff29e735a827d777038635e4d5a25655 100644 (file)
@@ -32,7 +32,7 @@
 #include "VISU_Convertor.hxx"
 
 #include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include <strstream>
 #include <vtkMapper.h>
@@ -1138,7 +1138,7 @@ VISU::ColoredPrs3d_i
     return NULL;
 
   SetEntity((VISU::Entity)VISU::Storable::FindValue(theMap,"myEntity").toInt());
-  SetFieldName(VISU::Storable::FindValue(theMap,"myFieldName").latin1());
+  SetFieldName((const char*)VISU::Storable::FindValue(theMap,"myFieldName").toLatin1());
   SetTimeStampNumber(VISU::Storable::FindValue(theMap,"myIteration").toInt());
   myIsTimeStampFixed = VISU::Storable::FindValue(theMap,"myIsTimeStampFixed").toInt();
   OnSetInput(false);
@@ -1149,7 +1149,7 @@ VISU::ColoredPrs3d_i
   SetNbColors(VISU::Storable::FindValue(theMap,"myNumberOfColors").toInt());
   SetBarOrientation((VISU::ScalarMap::Orientation)VISU::Storable::FindValue(theMap,"myOrientation").toInt());
   
-  SetTitle(VISU::Storable::FindValue(theMap,"myTitle").latin1());
+  SetTitle((const char*)VISU::Storable::FindValue(theMap,"myTitle").toLatin1());
   myNumberOfLabels = VISU::Storable::FindValue(theMap,"myNumberOfLabels").toInt();
   myPosition[0] = VISU::Storable::FindValue(theMap,"myPosition[0]").toDouble();
   myPosition[1] = VISU::Storable::FindValue(theMap,"myPosition[1]").toDouble();
@@ -1183,7 +1183,7 @@ VISU::ColoredPrs3d_i
   TSuperClass::ToStream(theStr);
 
   Storable::DataToStream( theStr, "myEntity",         GetEntity() );
-  Storable::DataToStream( theStr, "myFieldName",      GetCFieldName() );
+  Storable::DataToStream( theStr, "myFieldName",      GetCFieldName().c_str() );
   Storable::DataToStream( theStr, "myIteration",      int(GetTimeStampNumber()) );
   Storable::DataToStream( theStr, "myIsTimeStampFixed", int(myIsTimeStampFixed) );
 
@@ -1252,7 +1252,7 @@ VISU::ColoredPrs3d_i
        SetTitle(GetCFieldName().c_str());
     }
     if(myPublishInStudyMode == EPublishUnderTimeStamp){
-      SetName(GenerateName().latin1(), false);
+      SetName((const char*)GenerateName().toLatin1(), false);
       aComment.sprintf("myComment=TIMESTAMP;myType=%d;myMeshName=%s;myEntityId=%d;myFieldName=%s;myTimeStampId=%d;myNumComponent=%d",
                       VISU::TTIMESTAMP,
                       GetCMeshName().c_str(),
@@ -1261,7 +1261,7 @@ VISU::ColoredPrs3d_i
                       GetTimeStampNumber(),
                       GetField()->myNbComp);
       std::string aResultEntry = GetCResult()->GetEntry();
-      std::string anEntry = GetCResult()->GetEntry(aComment.latin1());
+      std::string anEntry = GetCResult()->GetEntry((const char*)aComment.toLatin1());
       if(anEntry == "") 
        throw std::runtime_error("There is no Entry for binding the presentation !!!");
       aComment.sprintf("myComment=%s;myMeshName=%s;myEntityId=%d;myFieldName=%s;myTimeStampId=%d;myNumComponent=%d",
@@ -1278,10 +1278,10 @@ VISU::ColoredPrs3d_i
                       anIOR.in(),
                       GetName(),
                       "",
-                      aComment.latin1(),
+                      (const char*)aComment.toLatin1(),
                       true);
     }else if(myPublishInStudyMode == EPublishIndependently){
-      SetName(GenerateName().latin1(), false);
+      SetName((const char*)GenerateName().toLatin1(), false);
       CORBA::String_var anIOR = GetID();
       std::string aFatherEntry = ::FindOrCreate3DPresentationsFolder(GetStudyDocument());
       aComment.sprintf("myComment=%s",
@@ -1292,7 +1292,7 @@ VISU::ColoredPrs3d_i
                       anIOR.in(),
                       GetName(),
                       "",
-                      aComment.latin1(),
+                      (const char*)aComment.toLatin1(),
                       true);
     }
 #ifndef _DEXCEPT_
index 11427b1a9b0b1198d74ce49dbf0d7b526512a9dd..02d6c664c218fe1118901f9637c75134425e0ded 100644 (file)
@@ -1358,7 +1358,7 @@ VISU_MEDConvertor
       if(0 > anID || anID >= aSize){
        static QString aString;
        aString.sprintf("LoadPointsOnFamily - aSize(%d) <= aCellNumForType[%d] = %d < 0",aSize,iElem,anID);
-       throw std::runtime_error(aString.latin1());
+       throw std::runtime_error((const char*)aString.toLatin1());
       }
       aSubMeshID.push_back(anID);
     }
@@ -1661,7 +1661,7 @@ VISU_MEDConvertor
             if(anArray[k] < 0 || aNbPoints <= anArray[k]){
               static QString aString;
               aString.sprintf("LoadCellsOnEntity >> aNbPoints(%d) <= anArray[%d][%d]=%d < 0 !!!",aNbPoints,iElem,k,anArray[k]);
-              throw std::runtime_error(aString.latin1());
+              throw std::runtime_error((const char*)aString.toLatin1());
             }
           aCell2Connect.push_back(anArray);
         } // loop on elements
@@ -1741,7 +1741,7 @@ VISU_MEDConvertor
        if(0 > anID || anID >= aSize){
          static QString aString;
          aString.sprintf("LoadCellsOnFamily - aNbElem(%d) <= aCellNumForType[%d] = %d < 0 !!!",aNbElem,iElem,anID);
-         throw std::runtime_error(aString.latin1());
+         throw std::runtime_error((const char*)aString.toLatin1());
        }
        aSubMeshID.push_back(anID);
       }
index e634111b500103ff744d2fdd18beb1b4131e5bc3..b16c0438facb7235de47f5903b84f4d8d29e4f50 100644 (file)
@@ -33,7 +33,7 @@
 #include "VISU_PipeLineUtils.hxx"
 
 #include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include <vtkAppendPolyData.h>
 
@@ -169,14 +169,14 @@ VISU::CutLines_i
   else
     SetBasePlanePosition(VISU::Storable::FindValue(theMap,"myBasePlanePosition").toDouble());
   
-  QStringList aPosList = QStringList::split("|",VISU::Storable::FindValue(theMap,"myLinePosition") );
-  QStringList aCondList = QStringList::split("|",VISU::Storable::FindValue(theMap,"myLineCondition") );
+  QStringList aPosList = VISU::Storable::FindValue(theMap,"myLinePosition").split("|", QString::SkipEmptyParts );
+  QStringList aCondList = VISU::Storable::FindValue(theMap,"myLineCondition").split("|",QString::SkipEmptyParts );
   for(int i = 0, iEnd = GetNbLines(); i < iEnd; i++)
     if(aCondList[i].toInt() == 0)
       SetLinePosition(i,aPosList[i].toDouble());
 
   // Restoring the map - \a myMapCurvesInverted
-  QStringList aMapCurvesInverted = QStringList::split("|",VISU::Storable::FindValue(theMap,"myMapCurvesInverted") );
+  QStringList aMapCurvesInverted = VISU::Storable::FindValue(theMap,"myMapCurvesInverted").split("|",QString::SkipEmptyParts );
   if (aMapCurvesInverted.count() == GetNbLines()){
     for(int i = 0, iEnd = GetNbLines(); i < iEnd ; i++){
       if(aMapCurvesInverted[i].toInt())
@@ -220,15 +220,15 @@ VISU::CutLines_i
     aStrCon.append(QString::number(IsDefaultPosition(i)) + "|");
   }
 
-  Storable::DataToStream( theStr, "myLinePosition",  aStrPos.latin1());
-  Storable::DataToStream( theStr, "myLineCondition", aStrCon.latin1());
+  Storable::DataToStream( theStr, "myLinePosition",  (const char*)aStrPos.toLatin1());
+  Storable::DataToStream( theStr, "myLineCondition", (const char*)aStrCon.toLatin1());
   Storable::DataToStream( theStr,"myUseAbsLength", IsUseAbsoluteLength());
 
   // Storing the map - \a myMapCurvesInverted
   QString aStrCurvesInverted;
   for(int i = 0, iEnd = GetNbLines(); i < iEnd; i++) 
     aStrCurvesInverted.append(QString::number(IsCurveInverted(i)) + "|");
-  Storable::DataToStream( theStr, "myMapCurvesInverted", aStrCurvesInverted.latin1());
+  Storable::DataToStream( theStr, "myMapCurvesInverted", (const char*)aStrCurvesInverted.toLatin1());
 }
 
 
@@ -621,8 +621,8 @@ VISU::CutLines_i
     
     QString aTitle;
     aTitle.sprintf("%s",GetCTitle().c_str());
-    aTitle = aTitle.simplifyWhiteSpace();
-    aTableOfReal->SetTitle(aTitle.latin1());
+    aTitle = aTitle.simplified();
+    aTableOfReal->SetTitle((const char*)aTitle.toLatin1());
     
     int iLineEnd = myCutLinesPL->GetAppendPolyData()->GetNumberOfInputConnections(0);
     if(MYDEBUG) MESSAGE("CutPlanes_i::BuildTableOfReal iLineEnd = "<<iLineEnd);
@@ -757,7 +757,7 @@ VISU::CutLines_i
       vtkFloatingPointType aDist = *aXContIter; 
       aTableOfReal->PutValue(aDist,1,i+1);
       aString.sprintf("%d",i);
-      aTableOfReal->SetColumnTitle(i+1,aString.latin1());
+      aTableOfReal->SetColumnTitle(i+1,(const char*)aString.toLatin1());
       if(MYDEBUG) MESSAGE("CutPlanes_i::BuildTableOfReal aDist = "<<aDist);
       TXYMapCont::const_iterator aXYMapContIter = aXYMapCont.begin();
       for(; aXYMapContIter != aXYMapCont.end(); aXYMapContIter++){
@@ -778,7 +778,7 @@ VISU::CutLines_i
       int aScalarMode = myCutLinesPL->GetScalarMode();
       if(aScalarMode != 0) 
        aUnitName = GetField()->myUnitNames[aScalarMode-1].c_str();
-      aUnitName = aUnitName.simplifyWhiteSpace();
+      aUnitName = aUnitName.simplified();
       if(aUnitName.isEmpty()) aUnitName = "-";
       TXYMapCont::const_iterator aXYMapContIter = aXYMapCont.begin();
       for(; aXYMapContIter != aXYMapCont.end(); aXYMapContIter++){
@@ -786,9 +786,9 @@ VISU::CutLines_i
        long iLineId = aLineIdCont[iLine];
        aString.sprintf("Y%d",iLine);
        if(MYDEBUG) 
-         MESSAGE("CutPlanes_i::BuildTableOfReal - SetRowTitle("<<iLineId+2<<",'"<<aString<<"')");
-       aTableOfReal->SetRowTitle(iLineId+2,aString.latin1());
-       aTableOfReal->SetRowUnit(iLineId+2,aUnitName.latin1());
+         MESSAGE("CutPlanes_i::BuildTableOfReal - SetRowTitle("<<iLineId+2<<",'"<<(const char*)aString.toLatin1()<<"')");
+       aTableOfReal->SetRowTitle(iLineId+2,(const char*)aString.toLatin1());
+       aTableOfReal->SetRowUnit(iLineId+2,(const char*)aUnitName.toLatin1());
       }
     }
   }catch(std::exception& exc){
index 4d9583d22f399c1651151f1712b147369e4054fb..5a423856b72776cba22d5def42c05dc261da2b3b 100644 (file)
@@ -30,7 +30,7 @@
 #include "VISU_Actor.h"
 
 #include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
@@ -123,8 +123,8 @@ VISU::CutPlanes_i
   SetOrientation(VISU::CutPlanes::Orientation(VISU::Storable::FindValue(theMap,"myBasePlane").toInt()),
                 Storable::FindValue(theMap,"aRot[0]").toDouble(),
                 Storable::FindValue(theMap,"aRot[1]").toDouble());
-  QStringList aPosList = QStringList::split("|",VISU::Storable::FindValue(theMap,"myPlanePosition") );
-  QStringList aCondList = QStringList::split("|",VISU::Storable::FindValue(theMap,"myPlaneCondition") );
+  QStringList aPosList = VISU::Storable::FindValue(theMap,"myPlanePosition").split("|", QString::SkipEmptyParts );
+  QStringList aCondList = VISU::Storable::FindValue(theMap,"myPlaneCondition").split("|", QString::SkipEmptyParts );
   for(int i = 0, iEnd = GetNbPlanes(); i < iEnd; i++)
     if(aCondList[i].toInt() == 0)
       SetPlanePosition(i,aPosList[i].toDouble());
@@ -148,8 +148,8 @@ void VISU::CutPlanes_i::ToStream(std::ostringstream& theStr){
     aStrPos.append(QString::number(GetPlanePosition(i)) + "|");
     aStrCon.append(QString::number(IsDefault(i)) + "|");
   }
-  Storable::DataToStream( theStr, "myPlanePosition",  aStrPos.latin1());
-  Storable::DataToStream( theStr, "myPlaneCondition", aStrCon.latin1());
+  Storable::DataToStream( theStr, "myPlanePosition",  (const char*)aStrPos.toLatin1());
+  Storable::DataToStream( theStr, "myPlaneCondition", (const char*)aStrCon.toLatin1());
 }
 
 
index b942c81ae3a5dd0cec6b21c37ece6bdee8bd3395..dfac7fd82fa2bdd6403eb6caa1dfa2cdaa888972 100644 (file)
@@ -33,7 +33,7 @@
 #include "VISU_Convertor.hxx"
 
 #include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include <vtkDataSetMapper.h>
 #include <vtkProperty.h>
index 84c40f7664eb09400cd1db833c6fcf8ce27964c0..f4658411cb95984645190686e0391c548a4fc155 100644 (file)
@@ -50,8 +50,8 @@
 #include <strstream>
 #include <functional>
 
-#include <qstring.h>
-#include <qfileinfo.h>
+#include <QString>
+#include <QFileInfo>
 
 //#define COUT
 
@@ -99,7 +99,7 @@ namespace VISU
   {
     CORBA::String_var aString = theSObject->GetName();
 
-    std::string aName = QString(aString.in()).simplifyWhiteSpace().latin1();
+    std::string aName = (const char*)QString(aString.in()).simplified().toLatin1();
 
     //replace_if(aName.begin(),aName.end(),not1(ptr_fun(isxdigit)),'_');
     replace_if(aName.begin(),aName.end(),TReplacePredicate(),'_');
@@ -317,7 +317,7 @@ namespace VISU
       bool anIsExist;
       QString aMethodName = VISU::Storable::FindValue(aMap,"myComment",&anIsExist);
       if(anIsExist){
-       if(strcmp(aMethodName.latin1(),"ImportTables") == 0){
+       if(strcmp((const char*)aMethodName.toLatin1(),"ImportTables") == 0){
          return;
        }
       }
@@ -1040,7 +1040,7 @@ namespace VISU
              bool anIsExist;
              QString aSourceId = VISU::Storable::FindValue(aMap,"mySourceId",&anIsExist);
              if(anIsExist){
-               if(strcmp(aSourceId.latin1(),"CutLines") == 0){
+               if(strcmp((const char*)aSourceId.toLatin1(),"CutLines") == 0){
                  theStr<<thePrefix<<"if aName2ObjectMap.has_key('"<<theArgumentName<<"'):"<<endl;
                  thePrefix += PREFIX;
 
@@ -1072,7 +1072,7 @@ namespace VISU
 
                  theStr<<thePrefix<<"pass"<<endl<<endl;
                  theStr<<aPrefix<<"pass"<<endl<<endl;
-               }else if(strcmp(aSourceId.latin1(),"TableFile") == 0){
+               }else if(strcmp((const char*)aSourceId.toLatin1(),"TableFile") == 0){
                  CORBA::Short aTag = theSObject->Tag();
                  theStr<<thePrefix<<"anIsFound, aSObject = "<<theArgumentName<<".FindSubObject("<<aTag<<")"<<endl;
                  theStr<<thePrefix<<"if anIsFound:"<<endl;
@@ -1098,7 +1098,7 @@ namespace VISU
                                       thePrefix);
 
                  theStr<<thePrefix<<"pass"<<endl<<endl;
-               }else if(strcmp(aSourceId.latin1(),"TableAttr") == 0){
+               }else if(strcmp((const char*)aSourceId.toLatin1(),"TableAttr") == 0){
                  theArgumentName = aName;
                  DumpTableAttrToPython(theStudy,
                                        theIsPublished,
@@ -1157,11 +1157,11 @@ namespace VISU
        bool anIsExist;
        QString aTypeName = VISU::Storable::FindValue(aMap,"myComment",&anIsExist);
        if (anIsExist) {
-         if (strcmp(aTypeName.latin1(),"ImportTables") == 0) {
+         if (strcmp((const char*)aTypeName.toLatin1(),"ImportTables") == 0) {
            QString aFileName = VISU::Storable::FindValue(aMap,"myFileName",&anIsExist);
            if(anIsExist){
              std::string aName = GenerateName(theSObject,theName2EntryMap,theEntry2NameMap);
-             theStr<<thePrefix<<aName<<" = aVisu.ImportTables('"<<aFileName.latin1()<<"')"<<endl;
+             theStr<<thePrefix<<aName<<" = aVisu.ImportTables('"<<(const char*)aFileName.toLatin1()<<"')"<<endl;
              theStr<<thePrefix<<"if "<<aName<<":"<<endl;
              thePrefix += PREFIX;
 
@@ -1179,7 +1179,7 @@ namespace VISU
              theStr<<thePrefix<<"pass"<<endl<<endl;
              return;
            }
-         } else if (strcmp(aTypeName.latin1(),"VIEW3D") == 0) {
+         } else if (strcmp((const char*)aTypeName.toLatin1(),"VIEW3D") == 0) {
            std::string aName = GetName(theSObject);
            theStr<<thePrefix<<aName<<" = aBuilder.NewObject(aSComponent)"<<endl;
 
@@ -1196,8 +1196,8 @@ namespace VISU
            return;
          } else if (aTypeName == "ENTITY" || aTypeName == "FAMILY" || aTypeName == "GROUP") {
            // Set name (as this object could be renamed by user)
-           string aMeshName = VISU::Storable::FindValue(aMap,"myMeshName").latin1();
-           string aSubMeshName = VISU::Storable::FindValue(aMap,"myName").latin1();
+           string aMeshName = (const char*)VISU::Storable::FindValue(aMap,"myMeshName").toLatin1();
+           string aSubMeshName = (const char*)VISU::Storable::FindValue(aMap,"myName").toLatin1();
            string anEntityTypeKey = "myEntityId";
            if (aTypeName == "ENTITY") anEntityTypeKey = "myId";
            int anEntity = VISU::Storable::FindValue(aMap,anEntityTypeKey,"0").toInt();
@@ -1366,12 +1366,12 @@ namespace VISU
       //ANIMATION
       theStr<<endl;
       QString animName = aSObject->GetName();
-      theStr<<thePrefix<<"#Animation: "<<animName<<endl;
+      theStr<<thePrefix<<"#Animation: "<<(const char*)animName.toLatin1()<<endl;
       theStr<<endl;
       theStr<<thePrefix<<"animSO = aBuilder.NewObject(aSComponent)"<<endl;
-      theStr<<thePrefix<<"aBuilder.SetName(animSO, '"<<animName<<"')"<< endl;
+      theStr<<thePrefix<<"aBuilder.SetName(animSO, '"<<(const char*)animName.toLatin1()<<"')"<< endl;
       theStr<<thePrefix<<"strAttr = aBuilder.FindOrCreateAttribute(animSO, 'AttributeString')"<< endl;
-      theStr<<thePrefix<<"strAttr.SetValue('"<<value<<"')"<< endl;
+      theStr<<thePrefix<<"strAttr.SetValue('"<<(const char*)value.toLatin1()<<"')"<< endl;
 
 
     
@@ -1393,10 +1393,11 @@ namespace VISU
          value = refObj->GetName();
          QString path(theStudy->GetObjectPath(father));
          //The following code requierd as a field name can contain '/' character
-         theStr<<thePrefix<<"aBuilder.Addreference(fieldSO,getSObjectByFatherPathAndName(theStudy,'"<<path<<"','"<<value<<"'))"<<endl;
+         theStr<<thePrefix<<"aBuilder.Addreference(fieldSO,getSObjectByFatherPathAndName(theStudy,'"<<
+           (const char*)path.toLatin1()<<"','"<<(const char*)value.toLatin1()<<"'))"<<endl;
        }
        value = anObj->GetName();
-       if(!value.isEmpty()) theStr<<thePrefix<<"aBuilder.SetName(fieldSO, '"<<value<<"')"<< endl;
+       if(!value.isEmpty()) theStr<<thePrefix<<"aBuilder.SetName(fieldSO, '"<<(const char*)value.toLatin1()<<"')"<< endl;
 
        //SCALARMAP,...
        SALOMEDS::ChildIterator_var aSubIter = theStudy->NewChildIterator(anObj);
@@ -1405,7 +1406,7 @@ namespace VISU
          
          theStr<<thePrefix<<"subSO = aBuilder.NewObject(fieldSO)"<<endl;
          value = aSubObj->GetName();
-         if(!value.isEmpty()) theStr<<thePrefix<<"aBuilder.SetName(subSO, '"<<value<<"')"<< endl;
+         if(!value.isEmpty()) theStr<<thePrefix<<"aBuilder.SetName(subSO, '"<<(const char*)value.toLatin1()<<"')"<< endl;
          if (aSubObj->FindAttribute(anAttr, "AttributeString")) {
            aStringAttr = SALOMEDS::AttributeString::_narrow(anAttr);
            theStr<<thePrefix<<"strAttr = aBuilder.FindOrCreateAttribute(subSO, 'AttributeString')"<< endl;
index 5b79bf6078f00993a6164ec688620db4dfee2ac8..f0db83c75af3ac81c0d676b9b39a78f1a261d57c 100644 (file)
@@ -31,6 +31,8 @@
 #include "VISU_ColoredPrs3d_i.hh"
 #include "VISU_GaussPtsActorFactory.h"
 
+#include <QColor>
+
 class vtkLookupTable;
 class vtkScalarBarActor;
 
index 93cf423c4d9d4f663ac7c0147cf7d4c12c3ab705..b954a59a1e9ececa91c79deb29628a7e21d5f793 100644 (file)
@@ -52,7 +52,7 @@
 #include "LightApp_SelectionMgr.h"
 #include "SVTK_ViewModel.h"
 #include "SVTK_ViewWindow.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 #include "SALOME_ListIO.hxx"
 #include "SALOME_ListIteratorOfListIO.hxx"
 
@@ -65,9 +65,9 @@
 #include CORBA_SERVER_HEADER(MED_Gen)
 
 // QT Includes
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <QDir>
+#include <QFileInfo>
+#include <QRegExp>
 
 // VTK Includes
 #include <vtkRenderer.h>
@@ -330,8 +330,8 @@ namespace VISU
                if (MYDEBUG) MESSAGE("Error : Unknown type of VISU object!");
            }
            QString aNewStr = aStr;
-           aAttComment->SetValue( aNewStr.replace( QRegExp( QString("myType=") + aType ) ,
-                                                   QString("myType=") + QString::number(aVISUType) ).latin1() );             
+           aAttComment->SetValue( (const char*)aNewStr.replace( QRegExp( QString("myType=") + aType ) ,
+                                                   QString("myType=").append( QString::number(aVISUType) ) ).toLatin1() );
          }
        }
       }
@@ -428,7 +428,7 @@ namespace VISU
          const QFileInfo& aFileInfo = aResult->GetFileInfo();
          const std::string& aName = aResult->GetName();
          std::string aFileName = std::string("_") + aName;
-         std::string aFile = aFileInfo.filePath().latin1();
+         std::string aFile = (const char*)aFileInfo.absoluteFilePath().toLatin1();
          if(theIsMultiFile){
            aFileName = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()) + aFileName;
 
@@ -492,32 +492,38 @@ namespace VISU
       CORBA::Object_var anObj = SObjectToObject(gotBranch);
       if(CORBA::is_nil(anObj)) continue;
       if(Result_i* pResult = dynamic_cast<Result_i*>(GetServant(anObj).in())){
-       switch(pResult->GetCreationId()){
+       switch(pResult->GetCreationId())
+       {
        case Result_i::eImportFile:
-       case Result_i::eCopyAndImportFile: {
-         const QFileInfo& aFileInfo = pResult->GetFileInfo();
-         QString aPrefix("");
-         if (isMultiFile) aPrefix = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()).c_str();
-         QString aFileName = aPrefix + "_" + (pResult->GetName()).c_str();
-               QString tmpDir = QDir::convertSeparators( QString(aTmpDir.ToCString()) );;
-         static QString aCommand;
-    aCommand.sprintf(" %s %s%s",aFileInfo.filePath().latin1(),tmpDir.latin1(),aFileName.latin1());
-    aCommand = QDir::convertSeparators( aCommand );
-    aCommand.prepend( COPY_COMMAND );
-
-               if(system(aCommand.latin1())){
-           if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<aCommand);
-           continue;
-         }else
-           if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - "<<aCommand);
-
-               QString studyPath = tmpDir.append(aFileName);
-         TCollection_AsciiString aString((char *)(aFileName.latin1()));
-
-               HDFascii::ConvertFromHDFToASCII(strdup(studyPath.latin1()), true);
-
-         aFileNames.Append(aString);
-       }}
+       case Result_i::eCopyAndImportFile:
+         {
+           const QFileInfo& aFileInfo = pResult->GetFileInfo();
+           QString aPrefix("");
+           if (isMultiFile) aPrefix = SALOMEDS_Tool::GetNameFromPath(aStudy->URL()).c_str();
+           QString aFileName = aPrefix + "_" + (pResult->GetName()).c_str();
+           QString tmpDir = QDir::convertSeparators( QString(aTmpDir.ToCString()) );;
+           static QString aCommand;
+           aCommand.sprintf(" %s %s%s",(const char*)aFileInfo.absoluteFilePath().toLatin1(),
+                            (const char*)tmpDir.toLatin1(),
+                            (const char*)aFileName.toLatin1());
+           aCommand = QDir::convertSeparators( aCommand );
+           aCommand.prepend( COPY_COMMAND );
+           
+           if(system((const char*)aCommand.toLatin1())){
+             if(MYDEBUG) MESSAGE("VISU_Gen_i::Save - Can't execute the command :"<<(const char*)aCommand.toLatin1());
+             continue;
+           }else
+             if(MYDEBUG)
+               MESSAGE("VISU_Gen_i::Save - "<<(const char*)aCommand.toLatin1());
+           
+           QString studyPath = tmpDir.append(aFileName);
+           TCollection_AsciiString aString(aFileName.toLatin1().data());
+           
+           HDFascii::ConvertFromHDFToASCII(strdup((const char*)studyPath.toLatin1()), true);
+           
+           aFileNames.Append(aString);
+         }
+       }
       }
     }
     SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
@@ -582,11 +588,11 @@ namespace VISU
        {
          bool isActive = false;
          SUIT_Session* aSession = SUIT_Session::session();
-         QPtrList<SUIT_Application> anApplications = aSession->applications();
-         QPtrListIterator<SUIT_Application> anIter (anApplications);
-         SUIT_Application* aFirstApp = anIter.current();
-         while (SUIT_Application* anApp = anIter.current()) {
-           ++anIter;
+         QList<SUIT_Application*> anApplications = aSession->applications();
+         QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+         SUIT_Application* aFirstApp = *anIter;
+         while (anIter != anApplications.end()) {
+           SUIT_Application* anApp = *anIter;
            if (SUIT_Study* aSStudy = anApp->activeStudy()) {
              if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
                 if (_PTR(Study) aCStudy = aStudy->studyDS()) {
@@ -599,6 +605,7 @@ namespace VISU
                }
              }
            }
+           anIter++;
          }
          if (!isActive) {
            MESSAGE("!!! anApp->onLoadDoc(myStudyName) !!!");
@@ -827,7 +834,7 @@ namespace VISU
     }
 
     string aResultEntry = pResult->GetEntry();
-    string anEntry = pResult->GetEntry(aComment.latin1());
+    string anEntry = pResult->GetEntry((const char*)aComment.toLatin1());
     if (anEntry == "") return;
 
     SALOMEDS::SObject_ptr aSObject = myStudyDocument->FindObjectID(anEntry.c_str());
@@ -1218,7 +1225,7 @@ namespace VISU
     Result_i* aResultObj = dynamic_cast<Result_i*>(GetServant(theObject).in());
     if (!aResultObj) return aResultSO._retn();
     const QFileInfo& aFileInfo = aResultObj->GetFileInfo();
-    CORBA::String_var anEntry = aResultObj->Create(aFileInfo.filePath().latin1())->GetID();
+    CORBA::String_var anEntry = aResultObj->Create((const char*)aFileInfo.absoluteFilePath().toLatin1())->GetID();
     aResultSO = theStudy->FindObjectID(anEntry);
     return aResultSO._retn();
   }
@@ -1293,15 +1300,15 @@ namespace VISU
       string aFileName = string(SALOMEDS_Tool::GetNameFromPath(theObject->GetStudy()->URL())) + "_";
       if(strlen(aFileName.c_str()) == 1) aFileName="";
       const QFileInfo& aFileInfo = aResultObj->GetFileInfo();
-      aFileName += aFileInfo.fileName().latin1();
+      aFileName += (const char*)aFileInfo.fileName().toLatin1();
       static QString aCommand;
       string aFullFileName =  aTmpDir + aFileName;
-      aCommand.sprintf(" %s %s",aFileInfo.filePath().latin1(), aFullFileName.c_str() );
+      aCommand.sprintf(" %s %s",(const char*)aFileInfo.absoluteFilePath().toLatin1(), aFullFileName.c_str() );
       aCommand = QDir::convertSeparators( aCommand );
       aCommand.prepend( COPY_COMMAND );
 
-      if(system(aCommand.latin1()) == -1) {
-       if(MYDEBUG) MESSAGE("VISU_Gen_i::Copy - Cann't execute the command :"<<aCommand);
+      if(system((const char*)aCommand.toLatin1()) == -1) {
+       if(MYDEBUG) MESSAGE("VISU_Gen_i::Copy - Cann't execute the command :"<<(const char*)aCommand.toLatin1());
        return NULL;
       }
       aSeq->length(2);
index c152e8daf621c2e4b98ca9bd1d329598209b843d..2ae78415cc48236a7eea0489a8c474093a050938 100644 (file)
@@ -30,7 +30,7 @@
 #include "VISU_Actor.h"
 
 #include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
index 45669d75b108cd6fba37772f8d4134c851e289f9..c1b6341ed520437dfc63cba7554d4b25ceef5b10 100644 (file)
@@ -33,7 +33,7 @@
 #include "VISU_PipeLineUtils.hxx"
 #include "VISU_Convertor.hxx"
 
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include "SUIT_ResourceMgr.h"
 
@@ -191,7 +191,7 @@ VISU::Mesh_i
       myPresentType =  VISU::PresentationType(VISU::GetResourceMgr()->integerValue("VISU" , "mesh_represent", 2));
       if(myEntity == VISU::NODE_ENTITY)
        myPresentType = VISU::POINT;
-      SetName(GenerateName().latin1(), false);
+      SetName((const char*)GenerateName().toLatin1(), false);
       myCellColor.R = 0.0;  myCellColor.G = myCellColor.B = 1.0;
       myNodeColor.R = myNodeColor.G = 1.0;  myNodeColor.B = 1.0;
       myLinkColor.R = myLinkColor.G = myLinkColor.B = 83/255.;
@@ -232,7 +232,7 @@ VISU::Mesh_i
       aComment.append(";");
       aComment.append(aTmp.sprintf("myEntityId=%d;",myEntity));
       aComment.append("myName=");
-      aComment.append(mySubMeshName);
+      aComment.append(mySubMeshName.c_str());
       break;
     case VISU::TGROUP :
       anIDMapper = anInput->GetMeshOnGroup(GetCMeshName(),
@@ -243,7 +243,7 @@ VISU::Mesh_i
       aComment.append(GetCMeshName().c_str());
       aComment.append(";");
       aComment.append("myName=");
-      aComment.append(mySubMeshName);
+      aComment.append(mySubMeshName.c_str());
       
       break;
     }
@@ -255,7 +255,7 @@ VISU::Mesh_i
     if(!theRestoring) { //Setting IOR on the label
       myMeshPL->Init();
       string aResultEntry = GetCResult()->GetEntry();
-      string anEntry = GetCResult()->GetEntry(aComment.latin1());
+      string anEntry = GetCResult()->GetEntry((const char*)aComment.toLatin1());
       if(anEntry == "") 
        throw std::runtime_error("Mesh_i::Build - anEntry was not found !!!");
       SALOMEDS::SObject_var aSObject = GetStudyDocument()->FindObjectID(anEntry.c_str());
@@ -440,7 +440,7 @@ VISU::Mesh_i
     return NULL;
 
   myEntity = VISU::Storable::FindValue(theMap,"myEntity").toInt();//jfa IPAL9284
-  mySubMeshName = VISU::Storable::FindValue(theMap,"mySubMeshName").latin1();
+  mySubMeshName = (const char*)VISU::Storable::FindValue(theMap,"mySubMeshName").toLatin1();
 
   myPresentType = VISU::PresentationType(VISU::Storable::FindValue(theMap,"myPresentType").toInt());
 
index 34ac5d2a03e5855532f509c24dbabb230c2e33aa..7de686bfe01d2ba2bbc459c46907b30daf7eaeb8 100644 (file)
@@ -25,7 +25,7 @@
 #include "VISU_Actor.h"
 
 #include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
index afb7eee5dd0cb1e8304b27702023050167fe52b6..6ecf67facb3f92af838124b03d805c046538b220 100644 (file)
@@ -30,7 +30,7 @@
 #include "VISU_Result_i.hh"
 #include "VISU_Actor.h"
 
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include <vtkActorCollection.h>
 #include <vtkUnstructuredGrid.h>
@@ -276,12 +276,12 @@ VISU::Prs3d_i
          const Storable::TRestoringMap& theMap)
 {
   SetStudyDocument(theStudy);
-  SetResultEntry(VISU::Storable::FindValue(theMap,"myResultEntry").latin1());
+  SetResultEntry((const char*)VISU::Storable::FindValue(theMap,"myResultEntry").toLatin1());
   if(!GetCResult())
     return NULL;
 
-  SetMeshName(VISU::Storable::FindValue(theMap,"myMeshName").latin1());
-  SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
+  SetMeshName((const char*)VISU::Storable::FindValue(theMap,"myMeshName").toLatin1());
+  SetName((const char*)VISU::Storable::FindValue(theMap,"myName").toLatin1(), false);
   myOffset[0] = VISU::Storable::FindValue(theMap,"myOffset[0]").toFloat();
   myOffset[1] = VISU::Storable::FindValue(theMap,"myOffset[1]").toFloat();
   myOffset[2] = VISU::Storable::FindValue(theMap,"myOffset[2]").toFloat();
@@ -316,8 +316,8 @@ void
 VISU::Prs3d_i
 ::ToStream(std::ostringstream& theStr)
 {
-  Storable::DataToStream( theStr, "myResultEntry", GetResultEntry() );
-  Storable::DataToStream( theStr, "myMeshName", GetCMeshName() );
+  Storable::DataToStream( theStr, "myResultEntry", GetResultEntry().c_str() );
+  Storable::DataToStream( theStr, "myMeshName", GetCMeshName().c_str() );
   Storable::DataToStream( theStr, "myName", GetName().c_str() );
   Storable::DataToStream( theStr, "myOffset[0]", myOffset[0] );
   Storable::DataToStream( theStr, "myOffset[1]", myOffset[1] );
index 86be553af228b00b4b573093f9d0294727c186de..5349251f47efa3d693f5ef250e9c05f2065603a2 100644 (file)
@@ -37,7 +37,7 @@
 #include "HDFascii.hxx"
 
 #include "SUIT_Session.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 #include "SalomeApp_Study.h"
 #include "SalomeApp_Application.h"
 
 #include <boost/bind.hpp>
 
 // QT Includes
-#include <qstring.h>
-#include <qfileinfo.h>
-#include <qsemaphore.h>
-#include <qthread.h>
-#include <qdir.h>
+#include <QString>
+#include <QFileInfo>
+#include <QSemaphore>
+#include <QThread>
+#include <QDir>
+#include <QList>
 
 // VTK Includes
 #include <vtkCell.h>
@@ -138,9 +139,10 @@ namespace VISU
     Execute()
     {
       SUIT_Session* aSession = SUIT_Session::session();
-      QPtrList<SUIT_Application> anApplications = aSession->applications();
-      QPtrListIterator<SUIT_Application> anIter (anApplications);
-      while (SUIT_Application* aSApp = anIter.current()) {
+      QList<SUIT_Application*> anApplications = aSession->applications();
+      QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+      while ( anIter != anApplications.end() ) {
+       SUIT_Application* aSApp (*anIter);
        if(SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>(aSApp)){
          if(SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(anApp->activeStudy())) {
            if(_PTR(Study) aStudyDS = aStudy->studyDS()){
@@ -151,7 +153,7 @@ namespace VISU
            }
          }
        }
-       ++anIter;
+       anIter++;
       }
     }
   };
@@ -170,11 +172,11 @@ namespace VISU
     QString tmp;
     if (i == aMap.end()) {
       aMap[theName] = 0;
-      tmp = theName;
+      tmp = theName.c_str();
     } else {
       tmp = GenerateName(theName,++aMap[theName]);
     }
-    if(MYDEBUG) MESSAGE("GenerateName - "<<tmp<<" from - "<<theName<<"; " <<aMap[theName]);
+    if(MYDEBUG) MESSAGE("GenerateName - "<<(const char*)tmp.toLatin1()<<" from - "<<theName<<"; " <<aMap[theName]);
     return tmp;
   }
   
@@ -189,8 +191,8 @@ namespace VISU
       aName.sprintf("%s, -",theName.c_str());
     else
       aName.sprintf("%s, %s",theName.c_str(),theUnits.c_str());
-    aName = aName.simplifyWhiteSpace();
-    return aName.latin1();
+    aName = aName.simplified();
+    return (const char*)aName.toLatin1();
   }
 
 
@@ -384,9 +386,10 @@ namespace VISU
     {
       TLock aLock(myMutex);
       SUIT_Session* aSession = SUIT_Session::session();
-      QPtrList<SUIT_Application> anApplications = aSession->applications();
-      QPtrListIterator<SUIT_Application> anIter (anApplications);
-      while (SUIT_Application* aSApp = anIter.current()) {
+      QList<SUIT_Application*> anApplications = aSession->applications();
+      QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+      while ( anIter != anApplications.end() ) {
+       SUIT_Application* aSApp = *anIter;
        if(SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>(aSApp)){
          if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(anApp->activeStudy())) {
            if (_PTR(Study) aCStudy = aStudy->studyDS()) {
@@ -399,7 +402,7 @@ namespace VISU
            }
          }
        }
-       ++anIter;
+       anIter++;
       }
     }
   };
@@ -439,25 +442,25 @@ namespace VISU
        continue;
       aComment = "";
       aComment.append("myComment=MESH;");
-      aComment.append("myName=");aComment.append(aMeshName);aComment.append(";");
+      aComment.append("myName=");aComment.append(aMeshName.c_str());aComment.append(";");
       aComment.append(aTmp.sprintf("myDim=%d",aMesh->myDim));
       aMesh->myEntry = 
        CreateAttributes(theStudy,
                         theResultEntry,
                         "",
                         aMeshName,
-                        aComment.latin1(),
+                        (const char*)aComment.toLatin1(),
                         true);
     
       aComment = "";
       aComment.append("myComment=FAMILIES;");
-      aComment.append("myMeshName=");aComment.append(aMeshName);
+      aComment.append("myMeshName=");aComment.append(aMeshName.c_str());
       string aSubMeshesEntry = 
        CreateAttributes(theStudy,
                         aMesh->myEntry,
                         "",
                         "Families",
-                        aComment.latin1(),
+                        (const char*)aComment.toLatin1(),
                         true);
 
       if(theIsBuildGroups){
@@ -517,7 +520,7 @@ namespace VISU
        
        aComment = "";
        aComment.append(aTmp.sprintf("myComment=ENTITY;myType=%d;",VISU::TENTITY));
-       aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+       aComment.append("myMeshName=");aComment.append(aMeshName.c_str());aComment.append(";");
        aComment.append(aTmp.sprintf("myId=%d",anEntity));
        
        
@@ -526,7 +529,7 @@ namespace VISU
                           aSubMeshesEntry, 
                           "", 
                           anEntityName.c_str(), 
-                          aComment.latin1(), 
+                          (const char*)aComment.toLatin1(), 
                           true);
       }
     }
@@ -578,16 +581,16 @@ namespace VISU
          const PFamily& aFamily = aFamilyMapIter->second;
          aComment = "";
          aComment.append(aTmp.sprintf("myComment=FAMILY;myType=%d;",TFAMILY));
-         aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+         aComment.append("myMeshName=");aComment.append(aMeshName.c_str());aComment.append(";");
          aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
-         aComment.append("myName=");aComment.append(aFamilyName);
+         aComment.append("myName=");aComment.append(aFamilyName.c_str());
          
          aFamily->myEntry =
            CreateAttributes(theStudy,
                             aMeshOnEntity->myEntry,
                             "",
                             aFamilyName,
-                            aComment.latin1(),
+                            (const char*)aComment.toLatin1(),
                             true);
        }
       }
@@ -596,13 +599,13 @@ namespace VISU
       if(!aGroupMap.empty()){
        aComment = "";
        aComment.append("myComment=GROUPS;");
-       aComment.append("myMeshName=");aComment.append(aMeshName);
+       aComment.append("myMeshName=");aComment.append(aMeshName.c_str());
 
        UpdateAttributes(theStudy,
                         aMesh->myGroupsEntry,
                         "",
                         "Groups",
-                        aComment.latin1());
+                        (const char*)aComment.toLatin1());
 
        TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin();
        for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
@@ -611,14 +614,14 @@ namespace VISU
          aComment = "";
          aComment.sprintf("myComment=GROUP;myType=%d;",
                           TGROUP);
-         aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
-         aComment.append("myName=");aComment.append(aGroupName);
+         aComment.append("myMeshName=");aComment.append(aMeshName.c_str());aComment.append(";");
+         aComment.append("myName=");aComment.append(aGroupName.c_str());
          aGroup->myEntry = 
            CreateAttributes(theStudy,
                             aMesh->myGroupsEntry,
                             "",
                             aGroupName,
-                            aComment.latin1(),
+                            (const char*)aComment.toLatin1(),
                             true);
          const TFamilySet& aFamilySet = aGroup->myFamilySet;
          TFamilySet::const_iterator aFamilyIter = aFamilySet.begin();
@@ -689,14 +692,14 @@ namespace VISU
          {
            aComment = "";
            aComment.append("myComment=FIELDS;");
-           aComment.append("myMeshName=");aComment.append(aMeshName);
+           aComment.append("myMeshName=");aComment.append( aMeshName.c_str() );
 
            UpdateAttributes(
                             theStudy,
                             aMesh->myFieldsEntry,
                             "",
                             "Fields",
-                            aComment.latin1());
+                            (const char*)aComment.toLatin1());
 
            anIsFieldsEntryUpdated = true;
          }
@@ -707,9 +710,9 @@ namespace VISU
          QString aFieldNameWithUnit = GenerateFieldName(aFieldName,aField->myUnitNames[0]);
          aComment = "";
          aComment.sprintf("myComment=FIELD;myType=%d;",TFIELD);
-         aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+         aComment.append("myMeshName=");aComment.append(aMeshName.c_str());aComment.append(";");
          aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
-         aComment.append("myName=");aComment.append(aFieldName);aComment.append(";");
+         aComment.append("myName=");aComment.append(aFieldName.c_str());aComment.append(";");
          aComment.append(aTmp.sprintf("myNbTimeStamps=%d;",aValField.size()));
          aComment.append(aTmp.sprintf("myNumComponent=%d",aField->myNbComp));
 
@@ -717,8 +720,8 @@ namespace VISU
                                             theStudy,
                                             aMesh->myFieldsEntry,
                                             "",
-                                            aFieldNameWithUnit.latin1(),
-                                            aComment.latin1(),
+                                            (const char*)aFieldNameWithUnit.toLatin1(),
+                                            (const char*)aComment.toLatin1(),
                                             true);
 
          CreateReference(
@@ -734,9 +737,9 @@ namespace VISU
            const PValForTime& aValForTime = aValFieldIter->second;
            aComment = "";
            aComment.sprintf("myComment=TIMESTAMP;myType=%d;",TTIMESTAMP);
-           aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+           aComment.append("myMeshName=");aComment.append(aMeshName.c_str());aComment.append(";");
            aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
-           aComment.append("myFieldName=");aComment.append(aFieldName);aComment.append(";");
+           aComment.append("myFieldName=");aComment.append(aFieldName.c_str());aComment.append(";");
            aComment.append(aTmp.sprintf("myTimeStampId=%d;myNumComponent=%d",aTimeStamp,aField->myNbComp));
 
            string aTimeStampId = VISU_Convertor::GenerateName(aValForTime->myTime);
@@ -746,7 +749,7 @@ namespace VISU
                                                    aField->myEntry,
                                                    "",
                                                    aTimeStampId,
-                                                   aComment.latin1(),
+                                                   (const char*)aComment.toLatin1(),
                                                    true);
          }
        }
@@ -780,7 +783,7 @@ namespace VISU
     try
     {
       multipr::Obj multiprObj;
-      multiprObj.create(theResult->GetFileInfoMultipr().filePath().latin1());
+      multiprObj.create((const char*)theResult->GetFileInfoMultipr().absoluteFileName().toLatin1());
       if (multiprObj.isValidDistributedMEDFile())
       {
        theResult->SetIsDistributedMEDMultipr(true);
@@ -800,7 +803,7 @@ namespace VISU
                         aMesh->myPartsEntry,
                         "",
                         "Parts",
-                        aComment.latin1());
+                        (const char*)aComment.toLatin1());
 
        string lastEntry;
 
@@ -836,7 +839,7 @@ namespace VISU
                             lastEntry, // father
                             "",
                             lPartName,
-                            aComment.latin1(),
+                            (const char*)aComment.toLatin1(),
                             true);
          }
          else
@@ -888,9 +891,9 @@ namespace VISU
                                         aMesh->myPartsEntry, // father
                                         "",
                                         lPartName,
-                                        aComment.latin1(),
+                                        (const char*)aComment.toLatin1(),
                                         true,
-                                        icon.latin1());
+                                        (const char*)icon.toLatin1());
          }
 
          theResult->AddPartMultipr(lPartName, lMEDFileName);
@@ -1313,14 +1316,14 @@ VISU::Result_i
   aComment.sprintf("myComment=%s;myType=%d;myFileName=%s;myInitFileName=%s",
                   GetComment(),
                   VISU::TRESULT,
-                  myFileInfo.filePath().latin1(),
+                  (const char*)myFileInfo.filePath().toLatin1(),
                   myInitFileName.c_str()); // Restoring of Python dump
   string aResultEntry =
     CreateAttributes(myStudy,
                     aSComponentEntry.in(),
                     anIOR.in(),
                     myName,
-                    aComment.latin1(),
+                    (const char*)aComment.toLatin1(),
                     true);
   mySObject = myStudyDocument->FindObjectID(aResultEntry.c_str());
   if(!CORBA::is_nil(theSObject)){
@@ -1370,7 +1373,7 @@ VISU::Result_i
   }
   else {
 #ifdef ENABLE_MULTIPR
-    if (strlen(GetFileInfoMultipr().filePath().latin1()) == 0)
+    if (strlen((const char*)GetFileInfoMultipr().absoluteFilePath().toLatin1()) == 0)
 #endif
     {
       // sequential MED file
@@ -1497,7 +1500,7 @@ Create(const char* theFileName)
        throw std::runtime_error("distributed MED file; bad format"); 
 
       //cout << "MULTIPR: original med file=" << originalMEDFileName << endl;
-      myFileInfoMultipr.setFile(myFileInfo.filePath());
+      myFileInfoMultipr.setFile(myFileInfo.absoluteFilePath());
       myFileInfo.setFile(originalMEDFileName);
     }
     else
@@ -1506,24 +1509,24 @@ Create(const char* theFileName)
     }
 #endif
 
-    myInitFileName = myFileInfo.filePath().latin1();
-    myName = ::GenerateName(myFileInfo.fileName()).latin1();
+    myInitFileName = (const char*)myFileInfo.filePath().toLatin1();
+    myName = (const char*)::GenerateName((const char*)myFileInfo.fileName().toLatin1()).toLatin1();
     if(mySourceId == eRestoredFile){
       std::string aTmpDir(SALOMEDS_Tool::GetTmpDir());
       static QString aCommand;
-      aCommand.sprintf(" %s %s", myFileInfo.absFilePath().latin1(), aTmpDir.c_str() );
+      aCommand.sprintf(" %s %s", (const char*)myFileInfo.absoluteFilePath().toLatin1(), aTmpDir.c_str() );
       aCommand = QDir::convertSeparators( aCommand );
       aCommand.prepend( COPY_COMMAND );
 
-      if(system(aCommand.latin1()) == -1){
-       MESSAGE("Create - Can't execute the command :"<<aCommand);
+      if(system((const char*)aCommand.toLatin1()) == -1){
+       MESSAGE("Create - Can't execute the command :"<<(const char*)aCommand.toLatin1());
        return NULL;
       }
-      if(MYDEBUG) MESSAGE("Result_i::Create - aCommand = "<<aCommand);
+      if(MYDEBUG) MESSAGE("Result_i::Create - aCommand = "<<(const char*)aCommand.toLatin1());
       myFileInfo.setFile(QString(aTmpDir.c_str()) + myFileInfo.fileName());
     }
 
-    myInput = CreateConvertor(myFileInfo.absFilePath().latin1());
+    myInput = CreateConvertor((const char*)myFileInfo.absoluteFilePath().toLatin1());
 
     if(myInput){
       if(myIsBuildImmediately)
@@ -1556,7 +1559,7 @@ VISU::Result_i
     myFileInfo.setFile(aCompDataType.c_str());
     myInitFileName = aCompDataType;
 
-    myName = ::GenerateName("aResult").latin1();
+    myName = (const char*)::GenerateName("aResult").toLatin1();
 
     return Build(theMedSObject);
   }catch(std::exception& exc){
@@ -1585,7 +1588,7 @@ VISU::Result_i
     myFileInfo.setFile(aCompDataType.c_str());
     myInitFileName = aCompDataType;
 
-    myName = ::GenerateName("aResult").latin1();
+    myName = (const char*)::GenerateName("aResult").toLatin1();
 
     CORBA::String_var anIOR = myStudyDocument->ConvertObjectToIOR(theField);
     SALOMEDS::SObject_var aFieldSObject = myStudyDocument->FindObjectIOR(anIOR);
@@ -1612,8 +1615,8 @@ VISU::Result_i
     mySObject = SALOMEDS::SObject::_duplicate(theSObject);
     myStudyDocument = mySObject->GetStudy();
     mySComponent = mySObject->GetFatherComponent();
-    myName = VISU::Storable::FindValue(theMap, "myName").latin1();
-    myInitFileName = VISU::Storable::FindValue(theMap, "myInitFileName").latin1();
+    myName = (const char*)VISU::Storable::FindValue(theMap, "myName").toLatin1();
+    myInitFileName = (const char*)VISU::Storable::FindValue(theMap, "myInitFileName").toLatin1();
 
     SALOMEDS::SObject_var aRefSObj, aTargetRefSObj;
     if (mySObject->FindSubObject(1, aRefSObj) &&
@@ -1672,9 +1675,9 @@ VISU::Result_i
        myFileInfo.setFile(aFileName.c_str());
       }
       if(MYDEBUG)
-       MESSAGE("Result_i::Restore - aFileName = " << myFileInfo.filePath() << "; " << myFileInfo.isFile());
+       MESSAGE("Result_i::Restore - aFileName = " << (const char*)myFileInfo.absoluteFilePath().toLatin1() << "; " << myFileInfo.isFile());
       
-      const char* aPathLatin = myFileInfo.filePath().latin1();
+      const char* aPathLatin = (const char*)myFileInfo.absoluteFilePath().toLatin1();
       if (HDFascii::isASCII(aPathLatin)) {
        MESSAGE("ConvertFromASCIIToHDF(" << aPathLatin << ")");
        char* aResultPath = HDFascii::ConvertFromASCIIToHDF(aPathLatin);
@@ -1684,28 +1687,28 @@ VISU::Result_i
        
        if (IsMultifile()) { // set this file as new - temporary
          static QString aCommand;
-         aCommand.sprintf(" %s %s%s",aHDFFileName, aResultPath, myFileInfo.baseName().latin1());
+         aCommand.sprintf(" %s %s%s",aHDFFileName, aResultPath, (const char*)myFileInfo.baseName().toLatin1());
          aCommand = QDir::convertSeparators( aCommand );
          aCommand.prepend( MOVE_COMMAND );
          
-         if (system(aCommand.latin1()) == -1) {
-           if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :" << aCommand);
+         if (system((const char*)aCommand.toLatin1()) == -1) {
+           if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :" << (const char*)aCommand.toLatin1());
            return NULL;
          } else {
-           if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - " << aCommand);
+           if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - " << (const char*)aCommand.toLatin1());
          }
-         myFileInfo.setFile(QString(aResultPath) + QString(myFileInfo.baseName().latin1()));
+         myFileInfo.setFile(QString(aResultPath) + QString(myFileInfo.baseName().toLatin1()));
        } else { // change current temporary file to the new: with hdf-format
          static QString aCommand;
-         aCommand.sprintf(" %s %s\0",aHDFFileName, myFileInfo.filePath().latin1());
+         aCommand.sprintf(" %s %s\0",aHDFFileName, (const char*)myFileInfo.absoluteFilePath().toLatin1());
          aCommand = QDir::convertSeparators( aCommand );
          aCommand.prepend( MOVE_COMMAND );
          
-         if (system(aCommand.latin1()) == -1) {
-           if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :" << aCommand);
+         if (system((const char*)aCommand.toLatin1()) == -1) {
+           if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - Can't execute the command :" << (const char*)aCommand.toLatin1());
            return NULL;
          } else {
-           if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - " << aCommand);
+           if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - " << (const char*)aCommand.toLatin1());
          }
          SALOMEDS::ListOfFileNames_var anEmptyList = new SALOMEDS::ListOfFileNames;
          SALOMEDS_Tool::RemoveTemporaryFiles(aResultPath, anEmptyList.in(), true);
@@ -1719,7 +1722,7 @@ VISU::Result_i
        mySourceId = eFile;
       }
       if(MYDEBUG) MESSAGE("VISU::Result_i::Restore - mySourceId = " << mySourceId);
-      myInput = CreateConvertor(myFileInfo.filePath().latin1());
+      myInput = CreateConvertor((const char*)myFileInfo.absoluteFilePath().toLatin1());
 
       myInput->BuildEntities();
       if(myIsBuildFields){
@@ -1737,13 +1740,13 @@ VISU::Result_i
 
       QString aComment;
       aComment.sprintf("myComment=%s;myType=%d;myFileName=%s;myInitFileName=%s",
-                      GetComment(), VISU::TRESULT, myFileInfo.filePath().latin1(),
+                      GetComment(), VISU::TRESULT, (const char*)myFileInfo.absoluteFilePath().toLatin1(),
                       myInitFileName.c_str()); // Restoring of Python dump
       SALOMEDS::GenericAttribute_var anAttr;
       if (!theSObject->FindAttribute(anAttr, "AttributeString"))
        throw std::runtime_error("Build - There is no AttributeString for the SObject !!!");
       SALOMEDS::AttributeString_var aCmnt = SALOMEDS::AttributeString::_narrow(anAttr);
-      aCmnt->SetValue(aComment.latin1());
+      aCmnt->SetValue((const char*)aComment.toLatin1());
     }
     bool anIsBuildAll = VISU::GetResourceMgr()->booleanValue("VISU", "full_med_loading", false);
     if(anIsBuildAll)
@@ -1923,21 +1926,21 @@ VISU::Result_i
   if (mySourceId == eRestoredFile) {
     static QString aCommand;
 #ifndef WNT
-    aCommand.sprintf("rm %s",myFileInfo.filePath().latin1());
+    aCommand.sprintf("rm %s",(const char*)myFileInfo.absoluteFilePath().toLatin1());
 #else
-    aCommand.sprintf("del /F %s",myFileInfo.filePath().latin1());
+    aCommand.sprintf("del /F %s",(const char*)myFileInfo.absoluteFilePath().toLatin1());
 #endif
-    int res = system(aCommand);
-    MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<res);
+    int res = system((const char*)aCommand.toLatin1());
+    MESSAGE("Result_i::~Result_i - system("<<(const char*)aCommand.toLatin1()<<") = "<<res);
 
 #ifndef WNT
-    aCommand.sprintf("rmdir --ignore-fail-on-non-empty %s",myFileInfo.dirPath().latin1());
+    aCommand.sprintf("rmdir --ignore-fail-on-non-empty %s",(const char*)myFileInfo.absolutePath().toLatin1());
 #else
-    aCommand.sprintf("del /F %s",myFileInfo.dirPath().latin1());
+    aCommand.sprintf("del /F %s",(const char*)myFileInfo.absolutePath().toLatin1());
 #endif
 
-    res = system(aCommand);
-    MESSAGE("Result_i::~Result_i - system("<<aCommand<<") = "<<res);
+    res = system((const char*)aCommand.toLatin1());
+    MESSAGE("Result_i::~Result_i - system("<<(const char*)aCommand.toLatin1()<<") = "<<res);
   }
   if(myInput) delete myInput;
 }
index 3046fbcde707cff31f319e742a8913685616e54e..a8f7498f9461157c710b8ebe37512be729c7678e 100644 (file)
@@ -31,7 +31,7 @@
 #include "VISU_Result_i.hh"
 
 #include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include <vtkUnstructuredGrid.h>
 #include <vtkProperty.h>
@@ -169,8 +169,8 @@ VISU::ScalarMapOnDeformedShape_i
   QString aFieldName = VISU::Storable::FindValue(theMap,"myScalarFieldName");
   int aTimeStampNumber = VISU::Storable::FindValue(theMap,"myScalarIteration").toInt();
 
-  SetScalarField(aMeshName,
-                aFieldName,
+  SetScalarField((const char*)aMeshName.toLatin1(),
+                (const char*)aFieldName.toLatin1(),
                 aTimeStampNumber,
                 anEntity);
 
index 9ce78f1c4cd45cdfd7dd0aa6b8ed4d05291821c7..bc2ee9e4a78269a4461123885e416a3fdc092400 100644 (file)
@@ -37,7 +37,7 @@
 #include "SUIT_ResourceMgr.h"
 
 #include "SUIT_Session.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 #include "SalomeApp_Study.h"
 #include "SalomeApp_Application.h"
 
@@ -146,9 +146,10 @@ VISU::ScalarMap_i
 
   // Update Object Browser
   SUIT_Session* aSession = SUIT_Session::session();
-  QPtrList<SUIT_Application> anApplications = aSession->applications();
-  QPtrListIterator<SUIT_Application> anIter(anApplications);
-  while(SUIT_Application* aSApp = anIter.current()){
+  QList<SUIT_Application*> anApplications = aSession->applications();
+  QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+  while( anIter != anApplications.end() ){
+    SUIT_Application* aSApp = *anIter;
     if(SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>(aSApp)){
       if(SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(anApp->activeStudy())){
        if(_PTR(Study) aCStudy = aStudy->studyDS()){
@@ -159,7 +160,7 @@ VISU::ScalarMap_i
        }
       }
     }
-    ++anIter;
+    anIter++;
   }
 }
 
@@ -257,13 +258,13 @@ VISU::ScalarMap_i
   UseFixedRange(VISU::Storable::FindValue(theMap,"myIsFixedRange").toInt());
 
   QString aGeomNames = VISU::Storable::FindValue(theMap, "myGeomNameList");
-  QStringList aGeomNameList = QStringList::split("|", aGeomNames);
+  QStringList aGeomNameList = aGeomNames.split("|", QString::SkipEmptyParts);
   int aNbOfGroups = aGeomNameList.count();
   if(aNbOfGroups > 0){
     RemoveAllGeom();
     for(int aGroupNum = 0; aGroupNum < aNbOfGroups; aGroupNum++){
       QString aGroupName = aGeomNameList[aGroupNum];
-      AddMeshOnGroup(aGroupName.latin1());
+      AddMeshOnGroup((const char*)aGroupName.toLatin1());
     }
   }
 
@@ -290,7 +291,7 @@ VISU::ScalarMap_i
     const std::string& aGroupName = *anIter;
     aGeomNameList<<aGroupName<<"|";   
   }
-  Storable::DataToStream(theStr, "myGeomNameList",  aGeomNameList.str());
+  Storable::DataToStream(theStr, "myGeomNameList",  aGeomNameList.str().c_str() );
 }
 
 
index 5658bd562ed4896658fac6cfcd730afbaf8940b8..48ed13ed96902e63a7b72c0e12f2276a0bcbbc18 100644 (file)
@@ -32,7 +32,7 @@
 #include "VISU_Convertor.hxx"
 
 #include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include <vtkDataSetMapper.h>
 #include <vtkAppendFilter.h>
@@ -168,7 +168,7 @@ VISU::StreamLines_i
            VISU::Prs3d::_nil(),
            aPercents,
            VISU::StreamLines::Direction(aDirection));
-  mySourceEntry = VISU::Storable::FindValue(theMap,"mySourceEntry").latin1();
+  mySourceEntry = (const char*)VISU::Storable::FindValue(theMap,"mySourceEntry").toLatin1();
 
   return this;
 }
index adce191ecac95788f3db164f02a54041b5b5a1a1..c7973a6d67c89893168d3e6cf74f1e4a37801cdb 100644 (file)
 #include "VISU_Result_i.hh"
 #include "VISU_ViewManager_i.hh"
 
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 #include "SPlot2d_Curve.h"
 
 #include <memory>
 #include <fstream>
 #include <strstream>
 
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <QString>
+#include <QRegExp>
+#include <QFile>
 
 using namespace std;
 
@@ -59,7 +58,7 @@ const string VISU::Table_i::myComment  = "TABLE";
 */
 const char* VISU::Table_i::GenerateName()
 {
-  return VISU::GenerateName( "Table", ++myNbPresent );
+  return (const char*)VISU::GenerateName( "Table", ++myNbPresent ).toLatin1();
 }
 /*!
   Gets comment string
@@ -239,7 +238,7 @@ VISU::Storable* VISU::Table_i::Build( int theRestoring )
            bool anIsExist;
            QString aMethodName = VISU::Storable::FindValue(aMap,"myComment",&anIsExist);
            if(anIsExist){
-             if(strcmp(aMethodName.latin1(),"ImportTables") == 0){
+             if(strcmp((const char*)aMethodName.toLatin1(),"ImportTables") == 0){
                aComment.sprintf("myComment=%s;myType=%d;mySourceId=TableFile",GetComment(),VISU::TTABLE);
              }
            }
@@ -252,7 +251,7 @@ VISU::Storable* VISU::Table_i::Build( int theRestoring )
                                          GetID(),
                                          GetName(),
                                          "",
-                                         aComment.latin1(),
+                                         (const char*)aComment.toLatin1(),
                                          pCutLines );
        // create SObject referenced to real table object
        mySObj = SALOMEDS::SObject::_duplicate(GetStudyDocument()->FindObjectID( anEntry.c_str() ));
@@ -274,8 +273,8 @@ VISU::Storable* VISU::Table_i::Build( int theRestoring )
 VISU::Storable* VISU::Table_i::Restore( const Storable::TRestoringMap& theMap, SALOMEDS::SObject_ptr SO)
 {
   if(MYDEBUG) MESSAGE(GetComment());
-  SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
-  myTitle = VISU::Storable::FindValue(theMap,"myTitle").latin1();
+  SetName((const char*)VISU::Storable::FindValue(theMap,"myName").toLatin1(), false);
+  myTitle = (const char*)VISU::Storable::FindValue(theMap,"myTitle").toLatin1();
   myOrientation = ( VISU::Table::Orientation )( VISU::Storable::FindValue(theMap,"myOrientation").toInt() );
   mySObj = SALOMEDS::SObject::_duplicate(SO);
   return Build( true );
@@ -367,7 +366,7 @@ const string VISU::Curve_i::myComment  = "CURVE";
 */
 const char* VISU::Curve_i::GenerateName()
 {
-  return VISU::GenerateName( "Curve", ++myNbPresent );
+  return (const char*)VISU::GenerateName( "Curve", ++myNbPresent ).toLatin1();
 }
 /*!
   Gets comment string
@@ -510,7 +509,7 @@ VISU::Storable* VISU::Curve_i::Build(int theRestoring )
                                          GetID(),
                                          GetName(),
                                          "",
-                                         aComment.latin1(),
+                                         (const char*)aComment.toLatin1(),
                                          true );
        // create SObject referenced to real table object
        mySObj = SALOMEDS::SObject::_duplicate(GetStudyDocument()->FindObjectID(anEntry.c_str()));
@@ -783,8 +782,8 @@ SPlot2d_Curve* VISU::Curve_i::CreatePresentation()
   //for ( int i =0 ; i < nbPoints; i++ ) {
   //  cout << i<<"\t"<<xList[i] << "\t"<< yList[i] << endl;
   //}
-  crv->setLine( (Plot2d_Curve::LineType)GetLine(), GetLineWidth() );
-  crv->setMarker( (Plot2d_Curve::MarkerType)GetMarker() );
+  crv->setLine( (Plot2d::LineType)GetLine(), GetLineWidth() );
+  crv->setMarker( (Plot2d::MarkerType)GetMarker() );
   SALOMEDS::Color color = GetColor();
   crv->setColor( QColor( (int)(color.R*255.), (int)(color.G*255.), (int)(color.B*255.) ) );
   crv->setAutoAssign( IsAuto() );
@@ -801,7 +800,7 @@ VISU::Storable* VISU::Curve_i::Restore( const Storable::TRestoringMap& theMap, S
 {
   if(MYDEBUG) MESSAGE(GetComment());
   mySObj = SALOMEDS::SObject::_duplicate(theSO);
-  SetName(VISU::Storable::FindValue(theMap,"myName").latin1(), false);
+  SetName((const char*)VISU::Storable::FindValue(theMap,"myName").toLatin1(), false);
   myHRow = VISU::Storable::FindValue(theMap,"myHRow").toInt();
   myVRow = VISU::Storable::FindValue(theMap,"myVRow").toInt();
   bool ok = false;
@@ -891,7 +890,7 @@ const string VISU::Container_i::myComment  = "CONTAINER";
 */
 const char* VISU::Container_i::GenerateName()
 {
-  return VISU::GenerateName( "Plot2DView", ++myNbPresent );
+  return (const char*)VISU::GenerateName( "Plot2DView", ++myNbPresent ).toLatin1();
 }
 /*!
   Gets comment string
@@ -928,9 +927,9 @@ void VISU::Container_i::AddCurve( Curve_ptr theCurve )
   PortableServer::POA_ptr aPOA = GetPOA();
   Curve_i* pCurve = dynamic_cast<Curve_i*>( aPOA->reference_to_servant( theCurve ) );
   if( pCurve ) {
-    QString entry = pCurve->GetEntry();
-    SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( entry.latin1() );
-    if ( !SO->_is_nil() && myCurves.find( entry ) == myCurves.end() ) {
+    QString entry( pCurve->GetEntry().c_str() );
+    SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( (const char*)entry.toLatin1() );
+    if ( !SO->_is_nil() && myCurves.indexOf( entry ) == -1 ) {
       myCurves.append( entry );
       SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
       SALOMEDS::SObject_var newSO = Builder->NewObject( mySO );
@@ -951,10 +950,10 @@ void VISU::Container_i::RemoveCurve( Curve_ptr theCurve )
   PortableServer::POA_ptr aPOA = GetPOA();
   Curve_i* pCurve = dynamic_cast<Curve_i*>( aPOA->reference_to_servant( theCurve ) );
   if( pCurve ) {
-    QString entry = pCurve->GetEntry();
-    if ( myCurves.find( entry ) != myCurves.end() ) {
+    QString entry( pCurve->GetEntry().c_str() );
+    if ( myCurves.indexOf( entry ) != -1 ) {
       // found !!!
-      myCurves.remove( entry );
+      myCurves.removeAll( entry );
       SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
       SALOMEDS::ChildIterator_var CI = GetStudyDocument()->NewChildIterator( mySO );
       for ( ; CI->More(); CI->Next() ) {
@@ -992,7 +991,7 @@ void VISU::Container_i::Clear()
   }
   SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
   for ( int i = 0; i < toDelete.count(); i++ ) {
-    SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( toDelete[i].latin1() );
+    SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( (const char*)toDelete[i].toLatin1() );
     Builder->RemoveObject( SO );
   }
   myCurves.clear();
@@ -1024,7 +1023,7 @@ VISU::Storable* VISU::Container_i::Build( int theRestoring )
                                       GetID(),
                                       GetName(),
                                       "",
-                                      aComment.latin1(),
+                                      (const char*)aComment.toLatin1(),
                                       true );
     mySObj = SALOMEDS::SObject::_duplicate(GetStudyDocument()->FindObjectID(anEntry.c_str()));
   }
@@ -1044,7 +1043,7 @@ void VISU::Container_i::Update()
     QStringList toDelete;
     int i;
     for ( i = 0; i < myCurves.count(); i++ ) {
-      SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( myCurves[i].latin1() );
+      SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( (const char*)myCurves[i].toLatin1() );
       if ( !SO->_is_nil() && Builder->FindAttribute( SO, anAttr, "AttributeIOR" ) ) {
        // if real Curve Object still exists
        SALOMEDS::ChildIterator_var CI = GetStudyDocument()->NewChildIterator( mySO );
@@ -1068,7 +1067,7 @@ void VISU::Container_i::Update()
       }
     }
     for ( i = 0; i < toDelete.count(); i++ ) {
-      myCurves.remove( toDelete[i] );
+      myCurves.removeAll( toDelete[i] );
     }
     toDelete.clear();
     SALOMEDS::ChildIterator_var CI = GetStudyDocument()->NewChildIterator( mySO );
@@ -1076,7 +1075,7 @@ void VISU::Container_i::Update()
       SALOMEDS::SObject_var childSO = CI->Value();
       SALOMEDS::SObject_var refSO;
       if ( childSO->ReferencedObject( refSO ) && ( refSO->_is_nil() || !Builder->FindAttribute( refSO, anAttr, "AttributeIOR" ) ||
-                                                  myCurves.find( refSO->GetID() ) == myCurves.end() ) ) {
+                                                  myCurves.indexOf( refSO->GetID() ) == -1 ) ) {
        toDelete.append( childSO->GetID() );
       }
     }
@@ -1100,7 +1099,7 @@ VISU::Curve_i* VISU::Container_i::GetCurve( CORBA::Long theIndex )
   if ( theIndex > 0 && theIndex <= myCurves.count()  ) {
     SALOMEDS::StudyBuilder_var Builder = GetStudyDocument()->NewBuilder();
     SALOMEDS::GenericAttribute_var anAttr;
-    SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID( myCurves[  theIndex-1 ].latin1() );
+    SALOMEDS::SObject_var SO = GetStudyDocument()->FindObjectID((const char*) myCurves[ theIndex-1 ].toLatin1() );
     CORBA::Object_var anObject = VISU::SObjectToObject( SO );
     if( !CORBA::is_nil( anObject ) ) {
       // if real Curve Object exists
@@ -1118,9 +1117,9 @@ VISU::Storable* VISU::Container_i::Restore( const Storable::TRestoringMap& theMa
 {
   if(MYDEBUG) MESSAGE(GetComment());
   mySObj = SALOMEDS::SObject::_duplicate(SO);
-  SetName(VISU::Storable::FindValue( theMap, "myName" ).latin1(), false);
+  SetName((const char*)VISU::Storable::FindValue( theMap, "myName" ).toLatin1(), false);
   QString val = VISU::Storable::FindValue( theMap, "myCurves" );
-  myCurves = QStringList::split( QString( "*" ), val, false );
+  myCurves = val.split( "*", QString::SkipEmptyParts );
   return Build( true );
 }
 /*!
@@ -1250,30 +1249,30 @@ void ImportTables(const char* theFileName, TTableCont& theTableCont){
   QString aTmp;
   do {
     // find beginning of table (tables are separated by empty lines)
-    while( getLine( aStmIn, aTmp ) && aTmp.stripWhiteSpace() == "");
+    while( getLine( aStmIn, aTmp ) && aTmp.trimmed() == "");
     TTable2D aTable2D;
     if(MYDEBUG) cout << "New table is found" << endl;
-    while( !aStmIn.eof() && aTmp.stripWhiteSpace() != "" ){
-      QString data = aTmp.stripWhiteSpace();
+    while( !aStmIn.eof() && aTmp.trimmed() != "" ){
+      QString data = aTmp.trimmed();
       QString cmt = "";
       QString keyword = "";
       // split string to data and comment (comment starts from '#' symbol)
-      int index = aTmp.find( "#" );
+      int index = aTmp.indexOf( "#" );
       if ( index >= 0 ) {
-       data = aTmp.left( index ).stripWhiteSpace();
-       cmt = aTmp.mid( index+1 ).stripWhiteSpace();
+       data = aTmp.left( index ).trimmed();
+       cmt = aTmp.mid( index+1 ).trimmed();
       }
       // if comment is not empty, try to get keyword from it (separated by ':' symbol)
       if ( !cmt.isEmpty() ) {
-       int index1 = cmt.find( ":" );
+       int index1 = cmt.indexOf( ":" );
        if ( index1 >= 0 ) {
-         QString tmpstr = cmt.left( index1 ).stripWhiteSpace();
+         QString tmpstr = cmt.left( index1 ).trimmed();
          if ( tmpstr == QString( "TITLE" ) ||
               tmpstr == QString( "COLUMN_TITLES" ) ||
               tmpstr == QString( "COLUMN_UNITS" ) ||
               tmpstr == QString( "COMMENT" ) ) {
            keyword = tmpstr;
-           cmt = cmt.mid( index1+1 ).stripWhiteSpace();
+           cmt = cmt.mid( index1+1 ).trimmed();
          }
        }
       }
@@ -1286,39 +1285,39 @@ void ImportTables(const char* theFileName, TTableCont& theTableCont){
            QString title = cmt;
            if ( aTable2D.myTitle != "" )
              title = QString( aTable2D.myTitle.c_str() ) + QString( " " ) + title;
-           if(MYDEBUG) cout << "...Table TITLE is: " << title.latin1() << endl;
-           aTable2D.myTitle = title.latin1();
+           if(MYDEBUG) cout << "...Table TITLE is: " << (const char*)title.toLatin1() << endl;
+           aTable2D.myTitle = (const char*)title.toLatin1();
          }
          else if ( keyword == QString( "COLUMN_TITLES" ) ) {
            // comment may contain column headers
-           QStringList aStrList = QStringList::split( "|", cmt );
+           QStringList aStrList = cmt.split( "|", QString::SkipEmptyParts );
            if(MYDEBUG) cout << "...Column TITLES are: ";
            for ( int i = 0; i < aStrList.count(); i++ ) {
-             QString tmpstr = aStrList[ i ].stripWhiteSpace();
-             if(MYDEBUG) cout << tmpstr.latin1() << " ";
-             aTable2D.myColumnTitles.push_back( tmpstr.latin1() );
+             QString tmpstr = aStrList[ i ].trimmed();
+             if(MYDEBUG) cout << (const char*)tmpstr.toLatin1() << " ";
+             aTable2D.myColumnTitles.push_back( (const char*)tmpstr.toLatin1() );
            }
            if(MYDEBUG) cout << endl;
          }
          else if ( keyword == QString( "COLUMN_UNITS" ) ) {
            // comment may contain column units
-           QStringList aStrList = QStringList::split( " ", cmt );
+           QStringList aStrList = cmt.split( " ", QString::SkipEmptyParts );
            if(MYDEBUG) cout << "...Column UNITS are: ";
            for ( int i = 0; i < aStrList.count(); i++ ) {
-             QString tmpstr = aStrList[ i ].stripWhiteSpace();
-             if(MYDEBUG) cout << tmpstr.latin1() << " ";
-             aTable2D.myColumnUnits.push_back( tmpstr.latin1() );
+             QString tmpstr = aStrList[ i ].trimmed();
+             if(MYDEBUG) cout << (const char*)tmpstr.toLatin1() << " ";
+             aTable2D.myColumnUnits.push_back( (const char*)tmpstr.toLatin1() );
            }
            if(MYDEBUG) cout << endl;
          }
          else if ( keyword == QString( "COMMENT" ) ) {
            // keyword 'COMMENT' processing can be here
            // currently it is ignored
-           if(MYDEBUG) cout << "...COMMENT: " << cmt.latin1() << endl;
+           if(MYDEBUG) cout << "...COMMENT: " << (const char*)cmt.toLatin1() << endl;
          }
        }
        else {
-         if(MYDEBUG) cout << "...comment: " << cmt.latin1() << endl;
+         if(MYDEBUG) cout << "...comment: " << (const char*)cmt.toLatin1() << endl;
          // simple comment processing can be here
          // currently it is ignored
        }
@@ -1328,14 +1327,14 @@ void ImportTables(const char* theFileName, TTableCont& theTableCont){
        TRow aRow;
        if(MYDEBUG) cout << "...New row is found: " << endl;
        if ( !cmt.isEmpty() ) {
-         aRow.myTitle = cmt.latin1();
-         if(MYDEBUG) cout << "......ROW TITLE is: " << cmt.latin1() << endl;
+         aRow.myTitle = (const char*)cmt.toLatin1();
+         if(MYDEBUG) cout << "......ROW TITLE is: " << (const char*)cmt.toLatin1() << endl;
        }
        QString datar1 = data.replace(QRegExp("\t"), " ");
-       QStringList aValList = QStringList::split( " ", datar1 );
+       QStringList aValList = datar1.split( " ", QString::SkipEmptyParts );
        for ( int i = 0; i < aValList.count(); i++ ) {
-         if ( aValList[i].stripWhiteSpace() != "" ) {
-           TValue aVal = aValList[i].stripWhiteSpace().latin1();
+         if ( aValList[i].trimmed() != "" ) {
+           TValue aVal = (const char*)aValList[i].trimmed().toLatin1();
            aRow.myValues.push_back( aVal );
          }
        }
@@ -1377,13 +1376,13 @@ SALOMEDS::SObject_var VISU::ImportTables(const char* theFileName, SALOMEDS::Stud
     aStudyBuilder->FindOrCreateAttribute(aFileObject, "AttributeName");
   SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
   QFileInfo aFileInfo(theFileName);
-  aName->SetValue(aFileInfo.fileName().latin1());
+  aName->SetValue( (const char*)aFileInfo.fileName().toLatin1());
   anAttr = aStudyBuilder->FindOrCreateAttribute(aFileObject, "AttributeString");
   SALOMEDS::AttributeString_var aComment = SALOMEDS::AttributeString::_narrow(anAttr);
   QString aString;
   aString.sprintf("myComment=ImportTables;myFileName=%s",
-                 aFileInfo.absFilePath().latin1());
-  aComment->SetValue(aString.latin1());
+                 (const char*)aFileInfo.absoluteFilePath().toLatin1());
+  aComment->SetValue((const char*)aString.toLatin1());
   for(int i = 0, iEnd = aTableCont.size(); i < iEnd; i++){
     const TTable2D& aTable2D = aTableCont[i];
     SALOMEDS::SObject_var aRealObject = aStudyBuilder->NewObject(aFileObject);
@@ -1395,7 +1394,7 @@ SALOMEDS::SObject_var VISU::ImportTables(const char* theFileName, SALOMEDS::Stud
     else{
       QString aNewName;
       aNewName.sprintf("Table:%d",i);
-      aName->SetValue(aNewName.latin1());
+      aName->SetValue((const char*)aNewName.toLatin1());
     }
     anAttr = aStudyBuilder->FindOrCreateAttribute(aRealObject, "AttributeTableOfReal");
     SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
@@ -1411,7 +1410,7 @@ SALOMEDS::SObject_var VISU::ImportTables(const char* theFileName, SALOMEDS::Stud
        QString aVal = aNewTable2D.myRows[j].myValues[k].c_str();
        bool anIsOk = false;
        double aValue = aVal.toDouble(&anIsOk);
-       if(anIsOk && !aVal.contains("NAN",false) && !aVal.contains("INF",false))
+       if(anIsOk && !aVal.contains("NAN",Qt::CaseInsensitive) && !aVal.contains("INF",Qt::CaseInsensitive))
          aTableOfReal->PutValue(aValue,j+1,k+1);
       }
 
@@ -1429,7 +1428,7 @@ template<class TTableAttr> bool ExportTableToFile(const TTableAttr& aTabAttr,
 {
   if (!CORBA::is_nil(aTabAttr)) {
     QFile aFile(theFileName);
-    aFile.open(IO_WriteOnly);
+    aFile.open(QIODevice::WriteOnly);
 
     /* extract the tabe info and write it into file */
 
@@ -1439,11 +1438,11 @@ template<class TTableAttr> bool ExportTableToFile(const TTableAttr& aTabAttr,
 
     SALOMEDS::StringSeq_var aRowTitles = aTabAttr->GetRowTitles();
     QString anAbscissTitle(aRowTitles[0]); /*Absciss row title (X coord)*/
-    anAbscissTitle.stripWhiteSpace();
+    anAbscissTitle.trimmed();
 
     SALOMEDS::StringSeq_var aRowUnits = aTabAttr->GetRowUnits();
     QString anAbscissUnit(aRowUnits[0]);
-    anAbscissUnit.stripWhiteSpace();
+    anAbscissUnit.trimmed();
 
     SALOMEDS::StringSeq_var aColumnTitles = aTabAttr->GetColumnTitles();
     if (aRowsNb > 2 && aTitle.length() )  aTitle = aTitle + " - ";
@@ -1453,24 +1452,24 @@ template<class TTableAttr> bool ExportTableToFile(const TTableAttr& aTabAttr,
       {
        /* TITLE */
        QString anOrdinate(aRowTitles[i-1]), aTail;
-       anOrdinate.stripWhiteSpace();
+       anOrdinate.trimmed();
 
        aLine = "#TITLE: " + aTitle +
          ((anOrdinate.length())?  anOrdinate :
                                  (aRowsNb>2)? aTail.sprintf("%d",i-1) : aTail.sprintf("") ) + "\n";
-       aFile.writeBlock(aLine, aLine.length() );
+       aFile.write(aLine.toLatin1() );
 
        /* COLUMN_TITLES */
        if ( anAbscissTitle.length() || anOrdinate.length() ) {
          aLine = "#COLUMN_TITLES: " + anAbscissTitle + " | " + anOrdinate + "\n";
-         aFile.writeBlock(aLine, aLine.length() );
+         aFile.write(aLine.toLatin1() );
        }
 
        /* COLUMN_UNITS */
        aLine = anAbscissUnit + " " +aRowUnits[i-1];
-       if (!aLine.stripWhiteSpace().isEmpty()) {
+       if (!aLine.trimmed().isEmpty()) {
          aLine = "#COLUMN_UNITS: " + aLine  + "\n";
-         aFile.writeBlock(aLine, aLine.length() );
+         aFile.write(aLine.toLatin1() );
        }
 
        /* CURVE COORDINATES */
@@ -1480,15 +1479,15 @@ template<class TTableAttr> bool ExportTableToFile(const TTableAttr& aTabAttr,
              aLine = aLine.sprintf("%.16g %.16g",
                                    (double)(aTabAttr->GetValue(1,j)),
                                    (double)(aTabAttr->GetValue(i,j)));  /* aTabAttr->GetValue(1,j) - X coord */
-             if ( !aLine.stripWhiteSpace().isEmpty() ) {
+             if ( !aLine.trimmed().isEmpty() ) {
                QString aColTitle(aColumnTitles[j-1]);
-               if ( !aColTitle.stripWhiteSpace().isEmpty() )
+               if ( !aColTitle.trimmed().isEmpty() )
                  aLine = aLine + "  #TITLE: " + aColTitle ;
-               aFile.writeBlock(aLine + "\n", aLine.length() + 1);
+               aFile.write(QString(aLine + "\n").toLatin1() );
              }
            }
          }
-       aFile.writeBlock("\n", 1);
+       aFile.write("\n", 1);
       }
     aFile.close();
     return true;
index b241a6b9a5649bd09895538eaf6de77db9010fc8..58047cbdfb49c7fa41654caa1b2907befa49f12a 100644 (file)
@@ -29,7 +29,7 @@
 
 #include "VISU_PrsObject_i.hh"
 
-#include <qstringlist.h>
+#include <QStringList>
 
 class SPlot2d_Curve;
 
index 73c609b38169781ff06568b09d03933d78d60ea1..bb28bf00d0aa999b7ece3d2ac34a577cafa1ef62 100644 (file)
@@ -26,7 +26,7 @@
 #ifdef WNT
 #include <windows.h>
 #include <vfw.h>
-#include <qmessagebox.h>
+#include <QMessageBox>
 #endif
 
 #include "VISUConfig.hh"
@@ -53,7 +53,7 @@
 
 #include "SVTK_ViewWindow.h"
 
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Application.h"
 #include "SALOMEDSClient_AttributeName.hxx"
 #include "CASCatch.hxx"
 
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qstrlist.h>
-#include <qdir.h>
+#include <QPixmap>
+#include <QImage>
+#include <QImageWriter>
+#include <QStringList>
+#include <QDir>
 
 #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
 #define NO_CAS_CATCH
@@ -151,11 +152,11 @@ VISU_TimeAnimation::~VISU_TimeAnimation()
     return;
   }
 
-  if (QThread::running() && !QThread::finished()) {
+  if (QThread::isRunning() && !QThread::isFinished()) {
     //myExecutionState->SetActive(false);
     stopAnimation();
     QThread::wait(500);
-    if (QThread::running() && !QThread::finished()) {
+    if (QThread::isRunning() && !QThread::isFinished()) {
       QThread::terminate();
     }
   }
@@ -336,9 +337,9 @@ namespace
       bool anIsCreated = false;
       TPrs3d* aPresent = new TPrs3d(VISU::ColoredPrs3d_i::EDoNotPublish);
       aPresent->SetCResult(theResult);
-      aPresent->SetMeshName(aMeshName.latin1());
+      aPresent->SetMeshName((const char*)aMeshName.toLatin1());
       aPresent->SetEntity(anEntity);
-      aPresent->SetFieldName(aFieldName.latin1());
+      aPresent->SetFieldName((const char*)aFieldName.toLatin1());
       aPresent->SetTimeStampNumber(aTimeStampId);
 #ifdef NO_CAS_CATCH
       try{       
@@ -396,7 +397,7 @@ namespace
   }
 }
 
-double getMinFieldsValue( QValueList<FieldData>& theFieldsLst )
+double getMinFieldsValue( QList<FieldData>& theFieldsLst )
 {
   // for succcessive animation mode only
   double aRes;
@@ -414,7 +415,7 @@ double getMinFieldsValue( QValueList<FieldData>& theFieldsLst )
   return aRes;
 }
 
-double getMaxFieldsValue( QValueList<FieldData>& theFieldsLst )
+double getMaxFieldsValue( QList<FieldData>& theFieldsLst )
 {
   // for succcessive animation mode only
   double aRes;
@@ -1054,7 +1055,7 @@ std::pair<int,long> VISU_TimeAnimation::getRelativeFrameNumber(long theFrame)
 }
 
 //------------------------------------------------------------------------
-void VISU_TimeAnimation::parallelAnimation( bool& theIsDumping, QValueList<int>& theIndexList )
+void VISU_TimeAnimation::parallelAnimation( bool& theIsDumping, QList<int>& theIndexList )
 {
   double k = 1;
   double aOneVal = 1;
@@ -1141,7 +1142,7 @@ void VISU_TimeAnimation::parallelAnimation( bool& theIsDumping, QValueList<int>&
 }
 
 //------------------------------------------------------------------------
-void VISU_TimeAnimation::succcessiveAnimation( bool& theIsDumping, QValueList<int>& theIndexList )
+void VISU_TimeAnimation::succcessiveAnimation( bool& theIsDumping, QList<int>& theIndexList )
 {
   if (myFrame >= getNbFrames() - 1)
   {
@@ -1251,7 +1252,7 @@ void VISU_TimeAnimation::succcessiveAnimation( bool& theIsDumping, QValueList<in
 //------------------------------------------------------------------------
 void VISU_TimeAnimation::saveImages( int theFieldId, 
                                     double& theOneVal, int& theNbFiles, 
-                                    QValueList<int>& theIndexList )
+                                    QList<int>& theIndexList )
 {
   if (myDumpFormat.compare("AVI") != 0) {
     QString aFile(myDumpPath);
@@ -1263,18 +1264,18 @@ void VISU_TimeAnimation::saveImages( int theFieldId,
       aName = QString("%1").arg(myFieldsLst[theFieldId].myTiming[getRelativeFrameNumber(myFrame).second]);
 
     int aPos = -1;
-    while ((aPos = aName.find(".")) > -1 )
+    while ((aPos = aName.indexOf(".")) > -1 )
       aName.replace(aPos, 1, "_");
     aFile += aName;
     aFile += ".";
-    aFile += myDumpFormat.lower();
+    aFile += myDumpFormat.toLower();
     ProcessVoidEvent(new TVoidMemFunEvent<SVTK_ViewWindow>
                     (myView,&SVTK_ViewWindow::RefreshDumpImage)); // IPAL13602
     ProcessEvent(new TMemFun2ArgEvent<SVTK_ViewWindow,bool,const QString&,const QString&>
                 (myView,&SVTK_ViewWindow::dumpViewToFormat,aFile,myDumpFormat));
   } else {
     QFileInfo aFileInfo(myDumpPath);
-    QString aDirPath = aFileInfo.dirPath(true);
+    QString aDirPath = aFileInfo.absolutePath();
     QString aBaseName = aFileInfo.fileName();
     
     switch (myFrame) {
@@ -1295,7 +1296,7 @@ void VISU_TimeAnimation::saveImages( int theFieldId,
     
     QString aFile = aDirPath + QDir::separator() + aBaseName;
     aFile += "_";
-    aFile += QString("%1").arg(myFileIndex).rightJustify(8, '0');
+    aFile += QString("%1").arg(myFileIndex).rightJustified(8, '0');
     aFile += ".jpeg";
     
     /* check image size is divisable 16
@@ -1326,7 +1327,7 @@ void VISU_TimeAnimation::run()
 
   bool isDumping = !myDumpPath.isEmpty();
   myFileIndex = 0;
-  QValueList<int> anIndexList;
+  QList<int> anIndexList;
 
   if ( myAnimationMode == 0 ) // parallel animation mode
     parallelAnimation( isDumping, anIndexList );
@@ -1338,7 +1339,7 @@ void VISU_TimeAnimation::run()
     double aFPS = 17.3 * mySpeed;
 
     QFileInfo aFileInfo(myDumpPath);
-    QString aDirPath = aFileInfo.dirPath(true);
+    QString aDirPath = aFileInfo.absolutePath();
     QString aBaseName = aFileInfo.fileName();
 
     // add missing files
@@ -1348,13 +1349,13 @@ void VISU_TimeAnimation::run()
       int aStartIndex = anIndexList[0], anEndIndex;
       for (int i = 1; i < anIndexList.count(); i++) {
        anEndIndex = anIndexList[i];
-       QString aCurFile = aFFile.arg(QString::number(aStartIndex).rightJustify(8, '0'));
+       QString aCurFile = aFFile.arg(QString::number(aStartIndex).rightJustified(8, '0'));
        QStringList aCommands;
        for (int j = aStartIndex+1; j < anEndIndex; j++) {
-         QString aFile = aFFile.arg(QString::number(j).rightJustify(8, '0'));
+         QString aFile = aFFile.arg(QString::number(j).rightJustified(8, '0'));
          aCommands.append(QString("ln -s %1 %2").arg(aCurFile).arg(aFile));
        }
-       system(aCommands.join(" ; \\\n").latin1());
+       system((const char*)aCommands.join(" ; \\\n").toLatin1());
        aStartIndex = anEndIndex;
       }
     }
@@ -1372,7 +1373,7 @@ void VISU_TimeAnimation::run()
     aCmd += QString(" -j %1").arg(aPattern);
     aCmd += " | yuv2lav";
     aCmd += QString(" -o %1").arg(myDumpPath);
-    system(aCmd.latin1());
+    system((const char*)aCmd.toLatin1());
 
     // remove temporary jpeg files
     aCmd = "( ";
@@ -1381,7 +1382,7 @@ void VISU_TimeAnimation::run()
     aCmd += QString(" | egrep '%1_[0-9]*.jpeg'").arg(aBaseName);
     aCmd += " | xargs rm";
     aCmd += " )";
-    system(aCmd.latin1());
+    system((const char*)aCmd.toLatin1());
   }
 
   if (myExecutionState->IsActive())
@@ -1423,7 +1424,7 @@ double VISU_TimeAnimation::getTimeValue (_PTR(SObject) theTimeStamp)
   if (theTimeStamp->FindAttribute(anAttr, "AttributeName")) {
     _PTR(AttributeName) aName (anAttr);
     QString aNameString (aName->Value().c_str());
-    int time_len = aNameString.find(',');
+    int time_len = aNameString.indexOf(',');
     if (time_len > -1)
       return aNameString.left(time_len).toDouble();
     else
@@ -1441,27 +1442,27 @@ void VISU_TimeAnimation::setSpeed(CORBA::Long theSpeed)
 std::string VISU_TimeAnimation::setDumpFormat(const char* theFormat)
 {
   myDumpFormat = theFormat;
-  QStrList aDumpFormats = QImageIO::outputFormats();
+  QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
   if (myDumpFormat.isEmpty() || 
-      (aDumpFormats.find(theFormat) < 0 && myDumpFormat.compare("AVI") != 0)) {
-    if (aDumpFormats.find("JPEG"))
+      (aDumpFormats.indexOf(theFormat) < 0 && myDumpFormat.compare("AVI") != 0)) {
+    if (aDumpFormats.indexOf("JPEG"))
       myDumpFormat = "JPEG";
     else
       myDumpFormat = aDumpFormats.at(0);
   }
-  return myDumpFormat.latin1();
+  return (const char*)myDumpFormat.toLatin1();
 }
 
 //------------------------------------------------------------------------
 bool VISU_TimeAnimation::checkAVIMaker() const
 {
-  QStrList aDumpFormats = QImageIO::outputFormats();
-  if (aDumpFormats.find("JPEG") < 0) return false;
+  QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
+  if (aDumpFormats.indexOf("JPEG") < 0) return false;
 
   QString aCmd("which ");
   aCmd += myAVIMaker;
   aCmd += " >& /dev/null";
-  int iErr = system(aCmd.latin1());
+  int iErr = system((const char*)aCmd.toLatin1());
   return (iErr == 0);
 }
 
@@ -1530,7 +1531,7 @@ SALOMEDS::SObject_ptr VISU_TimeAnimation::publishInStudy()
                    VISU::TANIMATION,myTimeMinVal,myTimeMaxVal,myAnimationMode);
 
   string anEntry = VISU::CreateAttributes(myStudy,aSComponentEntry.c_str(),"","",
-                                          GenerateName(),"",aComment,true);
+                                          (const char*)GenerateName().toLatin1(),"",(const char*)aComment.toLatin1(),true);
   myAnimEntry = anEntry.c_str();
   _PTR(SObject) aAnimSObject = myStudy->FindObjectID(anEntry.c_str());
 
@@ -1564,7 +1565,7 @@ void VISU_TimeAnimation::saveAnimation()
   if (myStudy->GetProperties()->IsLocked()) return;
   if (myAnimEntry.isEmpty()) return;
 
-  _PTR(SObject) aAnimSObject = myStudy->FindObjectID(myAnimEntry.latin1());
+  _PTR(SObject) aAnimSObject = myStudy->FindObjectID((const char*)myAnimEntry.toLatin1());
   if (!aAnimSObject) return;
 
   _PTR(StudyBuilder) aStudyBuilder = myStudy->NewBuilder();
@@ -1579,7 +1580,7 @@ void VISU_TimeAnimation::saveAnimation()
   _PTR(GenericAttribute) anAttr;
   anAttr = aStudyBuilder->FindOrCreateAttribute(aAnimSObject, "AttributeString");
   _PTR(AttributeString) aCmnt (anAttr);
-  aCmnt->SetValue(aComment.latin1());
+  aCmnt->SetValue((const char*)aComment.toLatin1());
 
   _PTR(ChildIterator) anIter = myStudy->NewChildIterator(aAnimSObject);
   int i = 0, nbf = getNbFields();
@@ -1782,10 +1783,10 @@ struct TNewAnimationEvent: public SALOME_Event
   Execute()
   {
     SUIT_Session* aSession = SUIT_Session::session();
-    QPtrList<SUIT_Application> anApplications = aSession->applications();
-    QPtrListIterator<SUIT_Application> anIter (anApplications);
-    while (SUIT_Application* anApp = anIter.current()) {
-      ++anIter;
+    QList<SUIT_Application*> anApplications = aSession->applications();
+    QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+    while ( anIter !=  anApplications.end() ) {
+      SUIT_Application* anApp = *anIter;
       if (SUIT_Study* aSStudy = anApp->activeStudy()) {
         if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
           if (_PTR(Study) aCStudy = aStudy->studyDS()) {
@@ -1796,6 +1797,7 @@ struct TNewAnimationEvent: public SALOME_Event
           }
         }
       }
+      anIter++;
     }
   }
 };
index 1cee7a313eb3081588ce6d4d40f6377c74154716..c57d15676186ef684f47a42e9d90ace4f2c6ed68 100644 (file)
@@ -28,9 +28,9 @@
 
 #include <vector>
 
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qthread.h>
+#include <QObject>
+#include <QList>
+#include <QThread>
 
 class SVTK_ViewWindow;
 class VISU_Actor;
@@ -55,7 +55,7 @@ struct FieldData
 };
 
 
-class VISU_I_EXPORT VISU_TimeAnimation: public QObject, public QThread
+class VISU_I_EXPORT VISU_TimeAnimation: public QThread
 {
   Q_OBJECT;
 
@@ -74,9 +74,9 @@ class VISU_I_EXPORT VISU_TimeAnimation: public QObject, public QThread
   void _emitFrameChanged(long theNewFrame, double theTime);
   void _emitStopped();
 
-  void parallelAnimation( bool& theIsDumping, QValueList<int>& theIndexList );
-  void succcessiveAnimation( bool& theIsDumping, QValueList<int>& theIndexList );
-  void saveImages( int theFieldId, double& theOneVal, int& theNbFiles, QValueList<int>& theIndexList );
+  void parallelAnimation( bool& theIsDumping, QList<int>& theIndexList );
+  void succcessiveAnimation( bool& theIsDumping, QList<int>& theIndexList );
+  void saveImages( int theFieldId, double& theOneVal, int& theNbFiles, QList<int>& theIndexList );
 
  public:
   //static VISU::Result_i* createPresent (SALOMEDS::SObject_var theField);
@@ -187,7 +187,7 @@ class VISU_I_EXPORT VISU_TimeAnimation: public QObject, public QThread
  private:
   QString myLastError;
 
-  QValueList<FieldData> myFieldsLst;
+  QList<FieldData> myFieldsLst;
   VISU::ExecutionState* myExecutionState;
   long myFrame;
   std::vector<long> myFieldsAbsFrames;
index caee0703274236d185ac884ff0ed9fe1f3464015..d5471f51e094df48f7bc040f1cb12de47de16fb1 100644 (file)
@@ -33,7 +33,7 @@
 #include "VISU_Convertor.hxx"
 
 #include "SUIT_ResourceMgr.h"
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include <vtkProperty.h>
 
index 439bb3a47c5d615ad984fb1ce4466170a62d7bb4..f8e58417f875a543f742d6d919046f54ad1db877 100644 (file)
@@ -47,7 +47,7 @@
 #include "SalomeApp_Application.h"
 #include "LightApp_SelectionMgr.h"
 
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 #include "SALOME_ListIO.hxx"
 #include "SALOME_ListIteratorOfListIO.hxx"
 
@@ -58,7 +58,7 @@
 #include <vtkRenderer.h>
 #include <vtkRenderWindow.h>
 
-#include <qapplication.h>
+#include <QApplication>
 
 using namespace std;
 
@@ -87,10 +87,10 @@ namespace VISU {
     {
       MESSAGE("Find application for study with id = : " << myStudyId);
       SUIT_Session* aSession = SUIT_Session::session();
-      QPtrList<SUIT_Application> anApplications = aSession->applications();
-      QPtrListIterator<SUIT_Application> anIter (anApplications);
-      while (SUIT_Application* anApp = anIter.current()) {
-       ++anIter;
+      QList<SUIT_Application*> anApplications = aSession->applications();
+      QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+      while ( anIter != anApplications.end() ) {
+       SUIT_Application* anApp = *anIter;
        if (SUIT_Study* aSStudy = anApp->activeStudy()) {
          if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
             if (_PTR(Study) aCStudy = aStudy->studyDS()) {
@@ -102,6 +102,7 @@ namespace VISU {
            }
          }
        }
+       anIter++;
       }
       if (!myResult) {
         //MESSAGE("Error: application is not found for study : " << myStudyName);
@@ -331,7 +332,7 @@ namespace VISU {
     if(MYDEBUG) MESSAGE("UpdatePlot2d - theDisplaying = " << theDisplaying);
     if (!theView)
       return;
-    QList<Plot2d_Curve> clist;
+    QList<Plot2d_Curve*> clist;
     theView->getCurves(clist);
     if (theDisplaying == eEraseAll) {
       for (int i = 0; i < clist.count(); i++) {
@@ -369,9 +370,9 @@ namespace VISU {
              aSPlot2dC->setData( xList, yList, nbPoints, zList );
            }
            if (!theCurve->IsAuto()) {
-             aSPlot2dC->setLine((Plot2d_Curve::LineType)theCurve->GetLine(),
+             aSPlot2dC->setLine((Plot2d::LineType)theCurve->GetLine(),
                                 theCurve->GetLineWidth());
-             aSPlot2dC->setMarker((Plot2d_Curve::MarkerType)theCurve->GetMarker());
+             aSPlot2dC->setMarker((Plot2d::MarkerType)theCurve->GetMarker());
              SALOMEDS::Color color = theCurve->GetColor();
              aSPlot2dC->setColor(QColor((int)(color.R*255.),
                                         (int)(color.G*255.),
@@ -418,8 +419,8 @@ namespace VISU {
              aSPlot2dC->setData( xList, yList, nbPoints, zList );
            }
            if ( !theCurve->IsAuto() ) {
-             aSPlot2dC->setLine((Plot2d_Curve::LineType)theCurve->GetLine(), theCurve->GetLineWidth());
-             aSPlot2dC->setMarker((Plot2d_Curve::MarkerType)theCurve->GetMarker());
+             aSPlot2dC->setLine((Plot2d::LineType)theCurve->GetLine(), theCurve->GetLineWidth());
+             aSPlot2dC->setMarker((Plot2d::MarkerType)theCurve->GetMarker());
              SALOMEDS::Color color = theCurve->GetColor();
              aSPlot2dC->setColor(QColor((int)(color.R*255.), (int)(color.G*255.), (int)(color.B*255.)));
            }
@@ -501,10 +502,10 @@ namespace VISU {
       CORBA::String_var studyName = myStudyDocument->Name();
       std::string aStudyName = studyName.in();
       SUIT_Session* aSession = SUIT_Session::session();
-      QPtrList<SUIT_Application> anApplications = aSession->applications();
-      QPtrListIterator<SUIT_Application> anIter (anApplications);
-      while (SUIT_Application* aSUITApp = anIter.current()) {
-        ++anIter;
+      QList<SUIT_Application*> anApplications = aSession->applications();
+      QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+      while ( anIter != anApplications.end() ) {
+       SUIT_Application* aSUITApp = *anIter;
        if (SUIT_Study* aSStudy = aSUITApp->activeStudy()) {
           if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
             if (_PTR(Study) aCStudy = aStudy->studyDS()) {
@@ -515,6 +516,7 @@ namespace VISU {
            }
          }
         }
+       anIter++;
       }
       if (!anApp)
         return;
@@ -541,15 +543,15 @@ namespace VISU {
       // 3. Remove Actors
       ViewManagerList aViewManagerList;
       anApp->viewManagers(SVTK_Viewer::Type(), aViewManagerList);
-      QPtrListIterator<SUIT_ViewManager> anVMIter (aViewManagerList);
-      for (; anVMIter.current(); ++anVMIter) {
-        SUIT_ViewManager* aViewManager = anVMIter.current();
-       QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+      QList<SUIT_ViewManager*>::Iterator anVMIter = aViewManagerList.begin();
+      for (; anVMIter != aViewManagerList.end(); anVMIter++ ) {
+        SUIT_ViewManager* aViewManager = *anVMIter;
+       QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
        for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
          if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
            if (Plot2d_ViewWindow* vw = dynamic_cast<Plot2d_ViewWindow*>(aViewWindow)) {
               Plot2d_ViewFrame* vf = vw->getViewFrame();
-             QList<Plot2d_Curve> clist;
+             QList<Plot2d_Curve*> clist;
              vf->getCurves(clist);
              for (int i = 0; i < clist.count(); i++) {
                 if (SPlot2d_Curve* cu = dynamic_cast<SPlot2d_Curve*>(clist.at(i))) {
@@ -655,10 +657,10 @@ namespace VISU {
     CORBA::String_var studyName = myStudyDocument->Name();
     std::string aStudyName = studyName.in();
     SUIT_Session* aSession = SUIT_Session::session();
-    QPtrList<SUIT_Application> anApplications = aSession->applications();
-    QPtrListIterator<SUIT_Application> anIter (anApplications);
-    while (SUIT_Application* aSUITApp = anIter.current()) {
-      ++anIter;
+    QList<SUIT_Application*> anApplications = aSession->applications();
+    QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
+    while (anIter != anApplications.end()) {
+      SUIT_Application* aSUITApp = *anIter;
       if (SUIT_Study* aSStudy = aSUITApp->activeStudy()) {
         if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
           if (_PTR(Study) aCStudy = aStudy->studyDS()) {
@@ -669,6 +671,7 @@ namespace VISU {
          }
        }
       }
+      anIter++;
     }
     if (!anApp)
       return;
@@ -695,10 +698,10 @@ namespace VISU {
     // 3. Remove Actors
     ViewManagerList aViewManagerList;
     anApp->viewManagers(SVTK_Viewer::Type(), aViewManagerList);
-    QPtrListIterator<SUIT_ViewManager> anVMIter (aViewManagerList);
-    for (; anVMIter.current(); ++anVMIter) {
-      SUIT_ViewManager* aViewManager = anVMIter.current();
-      QPtrVector<SUIT_ViewWindow> aViews = aViewManager->getViews();
+    QList<SUIT_ViewManager*>::Iterator anVMIter = aViewManagerList.begin();
+    for (; anVMIter != aViewManagerList.end(); anVMIter++ ) {
+      SUIT_ViewManager* aViewManager = *anVMIter;
+      QVector<SUIT_ViewWindow*> aViews = aViewManager->getViews();
       for (int i = 0, iEnd = aViews.size(); i < iEnd; i++) {
        if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
          if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
index add80327a48b0c929f5e332ff6be4e2970a93e78..7ef0ef2e5bbb003f67ac768904c720a5540ec151 100644 (file)
@@ -37,7 +37,7 @@
 #include "VISU_Actor.h"
 #include "VISU_ScalarMapAct.h"
 
-#include "SALOME_Event.hxx"
+#include "SALOME_Event.h"
 
 #include "SUIT_ViewWindow.h"
 #include "SUIT_ViewManager.h"
 #include "SalomeApp_Study.h"
 
 #include <QtxWorkstack.h>
+#include <QtxWorkspace.h>
 
-#include <qworkspace.h>
-#include <qimage.h>
+#include <QWorkspace>
+#include <QImage>
 
 #include <vtkCamera.h>
 #include <vtkRenderer.h>
@@ -160,7 +161,7 @@ namespace VISU {
          ViewManagerList::const_iterator anIt = mgrs.begin(), aLast = mgrs.end();
          for( ; anIt!=aLast; anIt++ )
          {
-           const QPtrVector<SUIT_ViewWindow>& views = (*anIt)->getViews();
+           const QVector<SUIT_ViewWindow*>& views = (*anIt)->getViews();
            for( int i=0; i<views.count(); i++ )
              views[i]->setShown( myState );
          }
@@ -204,9 +205,9 @@ namespace VISU {
        ViewManagerList::const_iterator anIt = aViewManagerList.begin();
        for( ; anIt != aViewManagerList.end(); anIt++ )
        {
-         const QPtrVector<SUIT_ViewWindow>& views = (*anIt)->getViews();
+         const QVector<SUIT_ViewWindow*>& views = (*anIt)->getViews();
          for( int i=0; i<views.count(); i++ ) {
-           myResult = views[i]->isShown();
+           myResult = views[i]->isVisible();
            return;
          }
        }
@@ -262,7 +263,7 @@ namespace VISU {
     SUIT_ViewWindow* aVW = GetViewWindow();
     if (aVW)
       ProcessVoidEvent(new TSplitEvent(myApplication, aVW,
-                                      Qt::Horizontal, QtxWorkstack::SPLIT_MOVE));
+                                      Qt::Horizontal, QtxWorkstack::SplitMove));
   }
 
   void
@@ -272,7 +273,7 @@ namespace VISU {
     SUIT_ViewWindow* aVW = GetViewWindow();
     if (aVW)
       ProcessVoidEvent(new TSplitEvent(myApplication, aVW,
-                                      Qt::Horizontal, QtxWorkstack::SPLIT_STAY));
+                                      Qt::Horizontal, QtxWorkstack::SplitStay));
   }
 
   void
@@ -282,7 +283,7 @@ namespace VISU {
     SUIT_ViewWindow* aVW = GetViewWindow();
     if (aVW)
       ProcessVoidEvent(new TSplitEvent(myApplication, aVW,
-                                      Qt::Vertical, QtxWorkstack::SPLIT_MOVE));
+                                      Qt::Vertical, QtxWorkstack::SplitMove));
   }
 
   void
@@ -292,7 +293,7 @@ namespace VISU {
     SUIT_ViewWindow* aVW = GetViewWindow();
     if (aVW)
       ProcessVoidEvent(new TSplitEvent(myApplication, aVW,
-                                      Qt::Vertical, QtxWorkstack::SPLIT_STAY));
+                                      Qt::Vertical, QtxWorkstack::SplitStay));
   }
 
   void
@@ -557,7 +558,7 @@ namespace VISU {
     void
     Execute()
     {
-      if (QWidget* aParent = myVW->parentWidget(true)) {
+      if (QWidget* aParent = myVW->parentWidget()) {
        QRect aQRect = aParent->frameGeometry();
        (aQRect.*myAction)(mySize);
        aParent->setGeometry(aQRect);
@@ -601,7 +602,7 @@ namespace VISU {
     void
     Execute()
     {
-      if(QWidget* aParent = myVW->parentWidget(true)){
+      if(QWidget* aParent = myVW->parentWidget()){
        QRect aQRect = aParent->frameGeometry();
        myResult = (aQRect.*myAction)();
       }
@@ -642,12 +643,12 @@ namespace VISU {
   class TAlignEvent: public TWorkspaceEvent
   {
   protected:
-    Qt::AlignmentFlags myAligment;
+    Qt::AlignmentFlag myAligment;
 
   public:
     TAlignEvent(QWidget* theViewWindow,
                QWidget* theWorkspace,
-               Qt::AlignmentFlags theAligment):
+               Qt::AlignmentFlag theAligment):
       TWorkspaceEvent(theViewWindow,theWorkspace),
       myAligment(theAligment)
     {}
@@ -656,7 +657,7 @@ namespace VISU {
     void
     Execute()
     {
-      if(QWidget* aParent = myVW->parentWidget(true))
+      if(QWidget* aParent = myVW->parentWidget())
        SUIT_Tools::alignWidget(aParent,myWorkspace,myAligment);
     }
   };
@@ -737,7 +738,7 @@ namespace VISU {
       void
       Execute()
       {
-       if(QWidget* aParent = myVW->parentWidget(true))
+       if(QWidget* aParent = myVW->parentWidget())
          aParent->move(int(myX*myWorkspace->width()),int(myY*myWorkspace->height()));
       }
     };
@@ -764,7 +765,7 @@ namespace VISU {
       void
       Execute()
       {
-       if(QWidget* aParent = myVW->parentWidget(true))
+       if(QWidget* aParent = myVW->parentWidget())
          aParent->setGeometry(aParent->x(),
                               aParent->y(),
                               int(myX*myWorkspace->width()),
@@ -796,7 +797,10 @@ namespace VISU {
        aColor[0] = int(255.0*myColor.R);
        aColor[1] = int(255.0*myColor.G);
        aColor[2] = int(255.0*myColor.B);
-       myWidget->setBackgroundColor(QColor(aColor[0],aColor[1],aColor[2]));
+       QPalette aPal( myWidget->palette() );
+       aPal.setColor( myWidget->backgroundRole(), QColor(aColor[0],aColor[1],aColor[2]) );
+       myWidget->setPalette( aPal );
+       //myWidget->setBackgroundColor(QColor(aColor[0],aColor[1],aColor[2]));
       }
     };
 
@@ -820,7 +824,7 @@ namespace VISU {
     void
     Execute()
     {
-      const QColor& aColor = myWidget->backgroundColor();
+      const QColor& aColor = myWidget->palette().color( myWidget->backgroundRole() );
       myResult.R = aColor.red()/255.0;
       myResult.G = aColor.green()/255.0;
       myResult.B = aColor.blue()/255.0;
@@ -920,11 +924,11 @@ namespace VISU {
        if (!img.isNull()) {
           QString fileName (myFileName);
           if (!fileName.isEmpty()) {
-            QString fmt = SUIT_Tools::extension(fileName).upper();
+            QString fmt = SUIT_Tools::extension(fileName).toUpper();
            if (fmt.isEmpty()) fmt = QString("BMP"); // default format
            if (fmt == "JPG" ) fmt = "JPEG";
            //QApplication::setOverrideCursor(Qt::waitCursor);
-           img.save(fileName, fmt.latin1());
+           img.save(fileName, fmt.toLatin1());
            myResult = true;
            //QApplication::restoreOverrideCursor();
           }
@@ -954,8 +958,8 @@ namespace VISU {
   SUIT_ViewWindow* View_i::GetViewWindow()
   {
     if (myViewWindow) {
-      QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
-      int aPos = aViews.find(myViewWindow);
+      QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
+      int aPos = aViews.indexOf(myViewWindow);
       if (aPos < 0)
        myViewWindow = NULL;
     }
@@ -1064,13 +1068,13 @@ namespace VISU {
     SUIT_ViewWindow* aVW = GetViewWindow();
     if (aVW)
       ProcessVoidEvent(new TVoidMemFun1ArgEvent<SUIT_ViewWindow,const QString&,QString>
-                      (aVW, &SUIT_ViewWindow::setCaption, QString(theTitle)));
+                      (aVW, &SUIT_ViewWindow::setWindowTitle, QString(theTitle)));
   }
   char* XYPlot_i::GetTitle()
   {
     SUIT_ViewWindow* aVW = GetViewWindow();
     if (aVW)
-      return CORBA::string_dup(aVW->caption().latin1());
+      return CORBA::string_dup( (const char*)aVW->windowTitle().toLatin1());
     return CORBA::string_dup("");
   }
 
@@ -1084,7 +1088,7 @@ namespace VISU {
   char* XYPlot_i::GetSubTitle()
   {
     if (GetViewWindow())
-      return CORBA::string_dup(myView->getTitle());
+      return CORBA::string_dup((const char*)myView->getTitle().toLatin1());
     return CORBA::string_dup("");
   }
 
@@ -1233,7 +1237,7 @@ namespace VISU {
   char* XYPlot_i::GetXTitle()
   {
     if (GetViewWindow())
-      return CORBA::string_dup(myView->getTitle(Plot2d_ViewFrame::XTitle));
+      return CORBA::string_dup((const char*)myView->getTitle(Plot2d_ViewFrame::XTitle).toLatin1());
     return CORBA::string_dup("");
   }
 
@@ -1245,7 +1249,7 @@ namespace VISU {
   char* XYPlot_i::GetYTitle()
   {
     if (GetViewWindow())
-      return CORBA::string_dup(myView->getTitle(Plot2d_ViewFrame::YTitle));
+      return CORBA::string_dup((const char*)myView->getTitle(Plot2d_ViewFrame::YTitle).toLatin1());
     return CORBA::string_dup("");
   }
 
@@ -1472,13 +1476,13 @@ namespace VISU {
   void TableView_i::SetTitle (const char* theTitle)
   {
     ProcessVoidEvent(new TVoidMemFun1ArgEvent<VisuGUI_TableDlg,const QString&,QString>
-                     (myView, &VisuGUI_TableDlg::setCaption, QString(theTitle)));
+                     (myView, &VisuGUI_TableDlg::setWindowTitle, QString(theTitle)));
   }
 
   char* TableView_i::GetTitle()
   {
     //jfa: may be need to be enclosed in SALOME_Event?
-    return CORBA::string_dup(myView->caption().latin1());
+    return CORBA::string_dup((const char*)myView->windowTitle().toLatin1());
   }
 
   void TableView_i::Close()
@@ -1694,7 +1698,7 @@ namespace VISU {
        Storable::StrToMap(strIn, aMap);
        if (Storable::FindValue(aMap, "myComment").compare
            (View3D_i::myComment.c_str()) >= 0) {
-         if (MYDEBUG) MESSAGE("View3D_i::RestoreViewPoint - aComm = " << strIn);
+         if (MYDEBUG) MESSAGE("View3D_i::RestoreViewPoint - aComm = " << (const char*)strIn.toLatin1());
          Restore(theViewManager->getActiveView(), aMap);
          return true;
        }
@@ -1844,14 +1848,14 @@ namespace VISU {
     SUIT_ViewWindow* aVW = GetViewWindow();
     if (aVW)
       ProcessVoidEvent(new TVoidMemFun1ArgEvent<SUIT_ViewWindow,const QString&,QString>
-                      (aVW,&SUIT_ViewWindow::setCaption,QString(theTitle)));
+                      (aVW,&SUIT_ViewWindow::setWindowTitle,QString(theTitle)));
   }
 
   char* View3D_i::GetTitle()
   {
     SUIT_ViewWindow* aVW = GetViewWindow();
     if (aVW)
-      return CORBA::string_dup(aVW->caption().latin1());
+      return CORBA::string_dup((const char*)aVW->windowTitle().toLatin1());
     return CORBA::string_dup("");
   }
 
index b91a4aa7775ea14748c0de3309c07d4a438589bb..24928666d5dd5ec8bd61235b7c3e39f587519eb1 100755 (executable)
@@ -28,7 +28,7 @@
 
 #include "VVTK_ImageWriter.h"
 
-#include <qsemaphore.h>
+#include <QSemaphore>
 
 #include <vtkImageData.h>
 #include <vtkImageClip.h>
@@ -105,8 +105,8 @@ VVTK_ImageWriter
 
   if(MYDEBUG) cout<<"VVTK_ImageWriter::run "<<
                "- this = "<<this<<
-               "; total = "<<mySemaphore->total()<<
+               //"; total = "<<mySemaphore->total()<<
                "; available = "<<mySemaphore->available()<<endl;
-  *mySemaphore -= 1;
+  mySemaphore->release();
 }
 
index 027e1c39539478e119ae0d8fc264657b215806ba..9e3a2d918f615e60c72cf166ac5f851450f738b0 100755 (executable)
@@ -31,7 +31,7 @@
 
 #include <vtkImageData.h>
 
-#include <qsemaphore.h>
+#include <QSemaphore>
 
 #include <limits>
 
@@ -48,9 +48,9 @@ VVTK_ImageWriterMgr
 {
   int aMax = std::numeric_limits<int>::max() / 2;
   mySemaphore = new QSemaphore(aMax);
-  *mySemaphore += aMax;
+  mySemaphore->acquire( aMax );
   if(MYDEBUG) cout<<"VVTK_ImageWriterMgr::VVTK_ImageWriterMgr "<<
-               "- total = "<<mySemaphore->total()<<
+               //"- total = "<<mySemaphore->total()<<
                "; available = "<<mySemaphore->available()<<endl;
 }
 
@@ -91,10 +91,10 @@ VVTK_ImageWriterMgr
 ::Stop()
 {
   if(MYDEBUG) cout<<"VVTK_ImageWriterMgr::Stop "<<
-               "- total = "<<mySemaphore->total()<<
+               //"- total = "<<mySemaphore->total()<<
                "; available = "<<mySemaphore->available()<<endl;
   if(MYDEBUG) cout<<"VVTK_ImageWriterMgr::Stop - *mySemaphore += "<<myThreads.size()<<endl;
-  *mySemaphore += myThreads.size();
+  mySemaphore->acquire( myThreads.size() );
 
   for(size_t anId = 0, anEnd = myThreads.size(); anId < anEnd; anId++){
     VVTK_ImageWriter* anImageWriter = myThreads[anId];
index 80a3345c36be3422da7ef61f0ac2abe594cd9cc4..d72b7600aab87ae34089c9578906d0fbc056a7f4 100644 (file)
 #include "SUIT_Tools.h"
 #include "SUIT_ViewWindow.h"
 #include "SUIT_ResourceMgr.h"
-#include "SUIT_ToolButton.h"
 #include "SUIT_Accel.h"
 #include "SUIT_MessageBox.h"
 #include "QtxAction.h"
+#include "QtxMultiAction.h"
 
-#include <qimage.h>
-#include <qtoolbar.h>
-#include <qsplitter.h>
-#include <qfiledialog.h>
-#include <qapplication.h>
+#include <QImage>
+#include <QToolBar>
+#include <QSplitter>
+#include <QFileDialog>
+#include <QApplication>
 
 //----------------------------------------------------------------------------
 VVTK_MainWindow
@@ -75,45 +75,48 @@ VVTK_MainWindow
 
   myInteractorStyle->Delete();
 
-  moveDockWindow(myToolBar,Qt::DockLeft);
-  myActionsMap[NonIsometric]->removeFrom(myToolBar);
+  addToolBar( Qt::LeftToolBarArea, myToolBar );
+  //TO DO:
+  //myActionsMap[NonIsometric]->removeFrom(myToolBar);
 
   // Recording
-  myRecordingToolBar = new QToolBar(this);
-  myRecordingToolBar->setCloseMode(QDockWindow::Undocked);
-  myRecordingToolBar->setLabel(tr("LBL_TOOLBAR_RECORD_LABEL"));
-  moveDockWindow(myRecordingToolBar,Qt::DockLeft);
+  myRecordingToolBar = new QToolBar(tr("LBL_TOOLBAR_RECORD_LABEL"), this);
+  addToolBar(Qt::LeftToolBarArea, myRecordingToolBar );
 
   myStartAction = new QtxAction(tr("MNU_VVTK_RECORDING_START"), 
                                theResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_RECORDING_START" ) ),
                                tr( "MNU_VVTK_RECORDING_START" ), 0, this);
   myStartAction->setStatusTip(tr("DSC_VVTK_RECORDING_START"));
-  myStartAction->addTo( myRecordingToolBar );
-  connect( myStartAction, SIGNAL( activated() ), this, SLOT( OnStartRecording() ) );
+  //myStartAction->addTo( myRecordingToolBar );
+  myRecordingToolBar->addAction( myStartAction  );
+  connect( myStartAction, SIGNAL( triggered ( bool ) ), this, SLOT( OnStartRecording() ) );
 
   myPlayAction = new QtxAction(tr("MNU_VVTK_RECORDING_PLAY"), 
                               theResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_RECORDING_PLAY" ) ),
                               tr( "MNU_VVTK_RECORDING_PLAY" ), 0, this);
   myPlayAction->setStatusTip(tr("DSC_VVTK_RECORDING_PLAY"));
   myPlayAction->setEnabled( false );
-  myPlayAction->addTo( myRecordingToolBar );
-  connect( myPlayAction, SIGNAL( activated() ), this, SLOT( OnPlayRecording() ) );
+  //myPlayAction->addTo( myRecordingToolBar );
+  myRecordingToolBar->addAction( myPlayAction  );
+  connect( myPlayAction, SIGNAL( triggered ( bool ) ), this, SLOT( OnPlayRecording() ) );
 
   myPauseAction = new QtxAction(tr("MNU_VVTK_RECORDING_PAUSE"), 
                                theResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_RECORDING_PAUSE" ) ),
                                tr( "MNU_VVTK_RECORDING_PAUSE" ), 0, this);
   myPauseAction->setStatusTip(tr("DSC_VVTK_RECORDING_PAUSE"));
   myPauseAction->setEnabled( false );
-  myPauseAction->addTo( myRecordingToolBar );
-  connect( myPauseAction, SIGNAL( activated() ), this, SLOT( OnPauseRecording() ) );
+  //myPauseAction->addTo( myRecordingToolBar );
+  myRecordingToolBar->addAction( myPauseAction  );
+  connect( myPauseAction, SIGNAL( triggered ( bool ) ), this, SLOT( OnPauseRecording() ) );
 
   myStopAction = new QtxAction(tr("MNU_VVTK_RECORDING_STOP"), 
                               theResourceMgr->loadPixmap( "VISU", tr( "ICON_VVTK_RECORDING_STOP" ) ),
                               tr( "MNU_VVTK_RECORDING_STOP" ), 0, this);
   myStopAction->setStatusTip(tr("DSC_VVTK_RECORDING_STOP"));
   myStopAction->setEnabled( false );
-  myStopAction->addTo( myRecordingToolBar );
-  connect( myStopAction, SIGNAL( activated() ), this, SLOT( OnStopRecording() ) );
+  //myStopAction->addTo( myRecordingToolBar );
+  myRecordingToolBar->addAction( myStopAction  );
+  connect( myStopAction, SIGNAL( triggered ( bool ) ), this, SLOT( OnStopRecording() ) );
   
   myRecorder = VVTK_Recorder::New();
   //myRecorder->CheckExistAVIMaker();
@@ -167,14 +170,14 @@ void VVTK_MainWindow::onDumpView()
   if( fileName.isEmpty() )
     return;
 
-  QString fmt = SUIT_Tools::extension( fileName ).upper();
+  QString fmt = SUIT_Tools::extension( fileName ).toUpper();
   if( fmt.isEmpty() )
     fmt = QString( "BMP" ); // default format
   else if( fmt == "JPG" )
     fmt = "JPEG";
 
-  QApplication::setOverrideCursor( Qt::waitCursor );
-  img.save( fileName, fmt.latin1() );
+  QApplication::setOverrideCursor( Qt::WaitCursor );
+  img.save( fileName, fmt.toLatin1() );
   QApplication::restoreOverrideCursor();
 }
 
@@ -194,7 +197,7 @@ void VVTK_MainWindow::OnStartRecording()
 {
   myRecorder->CheckExistAVIMaker();
   if (myRecorder->ErrorStatus()) {
-    SUIT_MessageBox::warn1(this, tr("ERROR"), tr("MSG_NO_AVI_MAKER"), tr("&OK"));
+    SUIT_MessageBox::warning(this, tr("ERROR"), tr("MSG_NO_AVI_MAKER") );
   }
   else {
     VVTK_RecorderDlg* aRecorderDlg = new VVTK_RecorderDlg( this, myRecorder );
@@ -268,10 +271,8 @@ VVTK_MainWindow1
   mySplitter(theParent),
   myPickingDlg(NULL)
 {
-  myPtsToolBar = new QToolBar(this);
-  myPtsToolBar->setCloseMode(QDockWindow::Undocked);
-  myPtsToolBar->setLabel(tr("LBL_TOOLBAR_GAUSS_LABEL"));
-  moveDockWindow(myPtsToolBar,Qt::DockLeft);
+  myPtsToolBar = new QToolBar( tr("LBL_TOOLBAR_GAUSS_LABEL"), this );
+  addToolBar( Qt::LeftToolBarArea, myPtsToolBar );
 
   QPixmap aPixmap;
   QtxAction* anAction;
@@ -282,12 +283,12 @@ VVTK_MainWindow1
                           tr( "MNU_VVTK_INTERACTOR_STYLE_SWITCH" ), 
                           0, 
                           this, 
-                          "VVTK/SVTK StyleSwitch", 
+                          //"VVTK/SVTK StyleSwitch", 
                           true);
-  anAction->setToggleAction(true);
+  anAction->setCheckable(true);
   anAction->setStatusTip(tr("DSC_VVTK_INTERACTOR_STYLE_SWITCH"));
 
-  anAction->addTo( myPtsToolBar );
+  myPtsToolBar->addAction( anAction );
   myStyleSwitchAction = anAction;
 
   if( theResourceMgr->integerValue( "VISU", "mouse_behaviour", true ) == 1 )
@@ -299,11 +300,11 @@ VVTK_MainWindow1
                                  tr( "MNU_VVTK_SELECTION_MODE_SWITCH" ), 
                                  0, 
                                  this, 
-                                 "VVTK/SVTK SelectionSwitch", 
+                                 //"VVTK/SVTK SelectionSwitch", 
                                  true);
-  myPickingAction->setToggleAction(true);
+  myPickingAction->setCheckable(true);
   myPickingAction->setStatusTip(tr("DSC_VVTK_SELECTION_MODE_SWITCH"));
-  myPickingAction->addTo( myPtsToolBar );
+  myPtsToolBar->addAction( myPickingAction );
   connect(myPickingAction, SIGNAL(toggled(bool)), this, SLOT(OnSelectionModeSwitch(bool)));
 
   myPickingDlg = new VVTK_PickingDlg( myPickingAction, this, "PickingDlg" );
@@ -315,12 +316,12 @@ VVTK_MainWindow1
                                            tr( "MNU_VVTK_PLANE_SEGMENTATION_SWITCH" ), 
                                            0, 
                                            this, 
-                                           "VVTK/SVTK PlaneSegmentationSwitch", 
+                                           //"VVTK/SVTK PlaneSegmentationSwitch", 
                                            true);
-  myPlaneSegmentationAction->setToggleAction(true);
+  myPlaneSegmentationAction->setCheckable(true);
   myPlaneSegmentationAction->setStatusTip(tr("DSC_VVTK_PLANE_SEGMENTATION_SWITCH"));
   //myPlaneSegmentationAction->addTo( myPtsToolBar );
-  connect( myPlaneSegmentationAction, SIGNAL( activated() ), this, SLOT( OnSegmentationSwitch() ) );
+  connect( myPlaneSegmentationAction, SIGNAL( triggered() ), this, SLOT( OnSegmentationSwitch() ) );
 
   aPixmap = theResourceMgr->loadPixmap("VISU",tr("ICON_VVTK_SPHERE_SEGMENTATION_SWITCH"));
   mySphereSegmentationAction = new QtxAction(tr("MNU_VVTK_SPHERE_SEGMENTATION_SWITCH"), 
@@ -328,9 +329,9 @@ VVTK_MainWindow1
                                             tr( "MNU_VVTK_SPHERE_SEGMENTATION_SWITCH" ), 
                                             0, 
                                             this, 
-                                            "VVTK/SVTK SphereSegmentationSwitch", 
+                                            //"VVTK/SVTK SphereSegmentationSwitch", 
                                             true);
-  mySphereSegmentationAction->setToggleAction(true);
+  mySphereSegmentationAction->setCheckable(true);
   mySphereSegmentationAction->setStatusTip(tr("DSC_VVTK_SPHERE_SEGMENTATION_SWITCH"));
   //mySphereSegmentationAction->addTo( myPtsToolBar );
   connect( mySphereSegmentationAction, SIGNAL( activated() ), this, SLOT( OnSegmentationSwitch() ) );
@@ -340,9 +341,11 @@ VVTK_MainWindow1
   mySegmentationCursorDlg->SetSphereAction( mySphereSegmentationAction );
   connect( mySegmentationCursorDlg, SIGNAL( scgClose() ), this, SLOT( OnSegmentationSwitch() ) );
 
-  SUIT_ToolButton* aSegmentationButton = new SUIT_ToolButton( myPtsToolBar );
-  aSegmentationButton->AddAction( myPlaneSegmentationAction );
-  aSegmentationButton->AddAction( mySphereSegmentationAction );
+  //SUIT_ToolButton* aSegmentationButton = new SUIT_ToolButton( myPtsToolBar );
+  QtxMultiAction* aSegmentationAction = new QtxMultiAction( this );
+  aSegmentationAction->insertAction( myPlaneSegmentationAction );
+  aSegmentationAction->insertAction( mySphereSegmentationAction );
+  myPtsToolBar->addAction( aSegmentationAction );
 }
 
 void
@@ -353,7 +356,7 @@ VVTK_MainWindow1
   myRenderer = theRenderer;
   VVTK_MainWindow::Initialize(theInteractor);
 
-  if( myStyleSwitchAction->isOn() )
+  if( myStyleSwitchAction->isEnabled() )
     PushInteractorStyle(myInteractorStyle.GetPointer());
   connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
 
@@ -413,10 +416,10 @@ VVTK_MainWindow1
 ::OnSelectionChanged()
 {
   Selection_Mode aSelectionMode = SelectionMode();
-  if(myPickingAction->isOn() && aSelectionMode != GaussPointSelection)
-    myPickingAction->setOn(false);
-  else if(!myPickingAction->isOn() && aSelectionMode == GaussPointSelection)
-    myPickingAction->setOn(true);
+  if(myPickingAction->isEnabled() && aSelectionMode != GaussPointSelection)
+    myPickingAction->setEnabled(false);
+  else if(!myPickingAction->isEnabled() && aSelectionMode == GaussPointSelection)
+    myPickingAction->setEnabled(true);
 }
 
 
@@ -454,7 +457,7 @@ void
 VVTK_MainWindow1
 ::SetPlanesSegementation(bool theIsOn)
 {
-  myPlaneSegmentationAction->setOn( theIsOn );
+  myPlaneSegmentationAction->setEnabled( theIsOn );
   OnSegmentationSwitch(myPlaneSegmentationAction);
 }
 
@@ -462,7 +465,7 @@ void
 VVTK_MainWindow1
 ::SetSphereSegementation(bool theIsOn)
 {
-  mySphereSegmentationAction->setOn( theIsOn );
+  mySphereSegmentationAction->setEnabled( theIsOn );
   OnSegmentationSwitch(mySphereSegmentationAction);
 }
 
@@ -470,8 +473,8 @@ void
 VVTK_MainWindow1
 ::OnSegmentationSwitch(QtxAction* theAction)
 {
-  bool anIsSegmentationOn = myPlaneSegmentationAction->isOn() ||
-    mySphereSegmentationAction->isOn();
+  bool anIsSegmentationOn = myPlaneSegmentationAction->isEnabled() ||
+    mySphereSegmentationAction->isEnabled();
 
   if( !theAction )
     return;
@@ -485,9 +488,9 @@ VVTK_MainWindow1
   aWidgetCtrl->SetEnabled(anIsSegmentationOn);
 
   if( theAction == myPlaneSegmentationAction && anIsSegmentationOn )
-    mySphereSegmentationAction->setOn( false );
+    mySphereSegmentationAction->setEnabled( false );
   else if( theAction == mySphereSegmentationAction && anIsSegmentationOn )
-    myPlaneSegmentationAction->setOn( false );
+    myPlaneSegmentationAction->setEnabled( false );
 
   if( anIsSegmentationOn )
   {
@@ -537,7 +540,7 @@ VVTK_MainWindow2
 {
   VVTK_MainWindow::Initialize(theInteractor);
 
-  if( myStyleSwitchAction->isOn() )
+  if( myStyleSwitchAction->isEnabled() )
     PushInteractorStyle(myInteractorStyle.GetPointer());
   connect(myStyleSwitchAction, SIGNAL(toggled(bool)), this, SLOT(OnInteractorStyleSwitch(bool)));
 }
index e59a57e946833e84ba32cde8e72ce70d1f4e76cd..6c72bc9aa75477632f9c1241f669616045c4b4e0 100644 (file)
@@ -30,6 +30,8 @@
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Session.h"
 
+#include "CAM_Module.h"
+
 #include "SVTK_MainWindow.h"
 #include "SVTK_RenderWindowInteractor.h"
 
 
 #include "utilities.h"
 
-#include <qcheckbox.h>
-#include <qcolordialog.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
+#include <QCheckBox>
+#include <QColorDialog>
+#include <QComboBox>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLayout>
+#include <QPushButton>
+#include <QVBoxLayout>
+#include <QKeyEvent>
 
 #include "QtxAction.h"
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
 #include "QtxIntSpinBox.h"
+#include "QtxColorButton.h"
 
 #include "LightApp_Application.h"
 
@@ -73,44 +77,47 @@ VVTK_PickingDlg::VVTK_PickingDlg(QtxAction* theAction,
   myEventCallbackCommand->SetClientData(this); 
   myEventCallbackCommand->SetCallback(VVTK_PickingDlg::ProcessEvents);
 
-  setCaption( tr( "PICKING_DLG_TITLE" ) );
+  setWindowTitle( tr( "PICKING_DLG_TITLE" ) );
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout( this );
   TopLayout->setSpacing(6);
   TopLayout->setMargin(11);
 
-  QVBox* aBox = new QVBox( this );
-  aBox->setMargin(0);
-  aBox->setSpacing(6);
+  QWidget* aBox = new QWidget( this );
+  QVBoxLayout* BoxLayout = new QVBoxLayout( aBox );
+  BoxLayout->setMargin(0);
+  BoxLayout->setSpacing(6);
 
   // Cursor
-  QGroupBox* CursorGroup = new QGroupBox( tr( "CURSOR_TITLE" ), aBox, "CursorGroup" );
-  CursorGroup->setColumnLayout(0, Qt::Vertical );
-  CursorGroup->layout()->setSpacing( 0 );
-  CursorGroup->layout()->setMargin( 0 );
+  QGroupBox* CursorGroup = new QGroupBox( tr( "CURSOR_TITLE" ), aBox );
+  //CursorGroup->setColumnLayout(0, Qt::Vertical );
+  //CursorGroup->layout()->setSpacing( 0 );
+  //CursorGroup->layout()->setMargin( 0 );
 
-  QGridLayout* CursorGroupLayout = new QGridLayout (CursorGroup->layout());
+  QGridLayout* CursorGroupLayout = new QGridLayout (CursorGroup);
   CursorGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   CursorGroupLayout->setSpacing(6);
   CursorGroupLayout->setMargin(11);
 
   QLabel* CursorSizeLabel = new QLabel( tr( "CURSOR_SIZE" ), CursorGroup );
-  myCursorSizeSpinBox = new QtxDblSpinBox( 0, 1, 0.1, CursorGroup );
+  myCursorSizeSpinBox = new QtxDoubleSpinBox( 0, 1, 0.1, CursorGroup );
   myCursorSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
   QLabel* PyramidHeightLabel = new QLabel( tr( "PYRAMID_HEIGHT" ), CursorGroup );
   double aHeightMin=1.e-7;
   double aHeightMax=10.;
   double aHeightStep=0.1;
-  myPyramidHeightSpinBox = new QtxDblSpinBox(aHeightMin, aHeightMax, aHeightStep, CursorGroup );
+  myPyramidHeightSpinBox = new QtxDoubleSpinBox(aHeightMin, aHeightMax, aHeightStep, CursorGroup );
   myPyramidHeightSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   
   QLabel* SelectionColorLabel = new QLabel( tr( "SELECTION_COLOR" ), CursorGroup );
-  mySelectionColorButton = new QPushButton( CursorGroup );
-  mySelectionColorButton->setPaletteBackgroundColor( Qt::blue );
-  mySelectionColorButton->setPaletteForegroundColor( Qt::blue );
-  connect( mySelectionColorButton, SIGNAL( clicked() ), this, SLOT( onColorButtonPressed() ) );
+  mySelectionColorButton = new QtxColorButton( CursorGroup );
+  mySelectionColorButton->setColor( Qt::blue );
+  //QPalette aPalette( mySelectionColorButton->palette() );
+  //aPalette.setColor( mySelectionColorButton->backgroundRole(), Qt::blue );
+  //mySelectionColorButton->setPalette( aPalette );
+  //connect( mySelectionColorButton, SIGNAL( clicked() ), this, SLOT( onColorButtonPressed() ) );
 
   CursorGroupLayout->addWidget( CursorSizeLabel, 0, 0 );
   CursorGroupLayout->addWidget( myCursorSizeSpinBox, 0, 1 );
@@ -119,31 +126,35 @@ VVTK_PickingDlg::VVTK_PickingDlg(QtxAction* theAction,
   CursorGroupLayout->addWidget( SelectionColorLabel, 2, 0 );
   CursorGroupLayout->addWidget( mySelectionColorButton, 2, 1 );
 
+  BoxLayout->addWidget( CursorGroup );
+
   // Tolerance
-  QGroupBox* ToleranceGroup = new QGroupBox( tr( "TOLERANCE_TITLE" ), aBox, "ToleranceGroup" );
-  ToleranceGroup->setColumnLayout(0, Qt::Vertical );
-  ToleranceGroup->layout()->setSpacing( 0 );
-  ToleranceGroup->layout()->setMargin( 0 );
+  QGroupBox* ToleranceGroup = new QGroupBox( tr( "TOLERANCE_TITLE" ), aBox );
+  //ToleranceGroup->setColumnLayout(0, Qt::Vertical );
+  //ToleranceGroup->layout()->setSpacing( 0 );
+  //ToleranceGroup->layout()->setMargin( 0 );
 
-  QGridLayout* ToleranceGroupLayout = new QGridLayout (ToleranceGroup->layout());
+  QGridLayout* ToleranceGroupLayout = new QGridLayout (ToleranceGroup);
   ToleranceGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   ToleranceGroupLayout->setSpacing(6);
   ToleranceGroupLayout->setMargin(11);
 
   QLabel* PointToleranceLabel = new QLabel( tr( "POINT_TOLERANCE" ), ToleranceGroup );
-  myPointToleranceSpinBox = new QtxDblSpinBox( 0.001, 10.0, 0.01, ToleranceGroup );
+  myPointToleranceSpinBox = new QtxDoubleSpinBox( 0.001, 10.0, 0.01, ToleranceGroup );
   myPointToleranceSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
   ToleranceGroupLayout->addWidget( PointToleranceLabel, 0, 0 );
   ToleranceGroupLayout->addWidget( myPointToleranceSpinBox, 0, 1 );
 
+  BoxLayout->addWidget( ToleranceGroup );
+
   // Information window
-  QGroupBox* InfoWindowGroup = new QGroupBox( tr( "INFO_WINDOW_TITLE" ), aBox, "InfoWindowGroup" );
-  InfoWindowGroup->setColumnLayout(0, Qt::Vertical );
-  InfoWindowGroup->layout()->setSpacing( 0 );
-  InfoWindowGroup->layout()->setMargin( 0 );
+  QGroupBox* InfoWindowGroup = new QGroupBox( tr( "INFO_WINDOW_TITLE" ), aBox );
+  //InfoWindowGroup->setColumnLayout(0, Qt::Vertical );
+  //InfoWindowGroup->layout()->setSpacing( 0 );
+  //InfoWindowGroup->layout()->setMargin( 0 );
 
-  QGridLayout* InfoWindowGroupLayout = new QGridLayout (InfoWindowGroup->layout());
+  QGridLayout* InfoWindowGroupLayout = new QGridLayout (InfoWindowGroup);
   InfoWindowGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   InfoWindowGroupLayout->setSpacing(6);
   InfoWindowGroupLayout->setMargin(11);
@@ -159,27 +170,29 @@ VVTK_PickingDlg::VVTK_PickingDlg(QtxAction* theAction,
   myPositionComboBox = new QComboBox( InfoWindowGroup );
   myPositionComboBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
-  myPositionComboBox->insertItem( tr( "BELOW_POINT" ) );
-  myPositionComboBox->insertItem( tr( "TOP_LEFT_CORNER" ) );
+  myPositionComboBox->addItem( tr( "BELOW_POINT" ) );
+  myPositionComboBox->addItem( tr( "TOP_LEFT_CORNER" ) );
 
   InfoWindowGroupLayout->addWidget( TransparencyLabel, 0, 0 );
   InfoWindowGroupLayout->addWidget( myTransparencySpinBox, 0, 1 );
   InfoWindowGroupLayout->addWidget( PositionLabel, 1, 0 );
   InfoWindowGroupLayout->addWidget( myPositionComboBox, 1, 1 );
 
+  BoxLayout->addWidget( InfoWindowGroup );
+
   // Movement of the camera
-  QGroupBox* CameraGroup = new QGroupBox( tr( "CAMERA_TITLE" ), aBox, "CameraGroup" );
-  CameraGroup->setColumnLayout(0, Qt::Vertical );
-  CameraGroup->layout()->setSpacing( 0 );
-  CameraGroup->layout()->setMargin( 0 );
+  QGroupBox* CameraGroup = new QGroupBox( tr( "CAMERA_TITLE" ), aBox );
+  //CameraGroup->setColumnLayout(0, Qt::Vertical );
+  //CameraGroup->layout()->setSpacing( 0 );
+  //CameraGroup->layout()->setMargin( 0 );
 
-  QGridLayout* CameraGroupLayout = new QGridLayout (CameraGroup->layout());
+  QGridLayout* CameraGroupLayout = new QGridLayout (CameraGroup);
   CameraGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   CameraGroupLayout->setSpacing(6);
   CameraGroupLayout->setMargin(11);
 
   QLabel* ZoomFactorLabel = new QLabel( tr( "ZOOM_FACTOR" ), CameraGroup );
-  myZoomFactorSpinBox = new QtxDblSpinBox( 0.1, 10.0, 0.1, CameraGroup );
+  myZoomFactorSpinBox = new QtxDoubleSpinBox( 0.1, 10.0, 0.1, CameraGroup );
   myZoomFactorSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
   QLabel* StepNumberLabel = new QLabel( tr( "STEP_NUMBER" ), CameraGroup );
@@ -191,13 +204,15 @@ VVTK_PickingDlg::VVTK_PickingDlg(QtxAction* theAction,
   CameraGroupLayout->addWidget( StepNumberLabel, 1, 0 );
   CameraGroupLayout->addWidget( myStepNumberSpinBox, 1, 1 );
 
+  BoxLayout->addWidget( CameraGroup );
+
   // Display parent mesh element
-  QGroupBox* ParentMeshGroup = new QGroupBox( tr( "PARENT_MESH_TITLE" ), aBox, "ParentMeshGroup" );
-  ParentMeshGroup->setColumnLayout(0, Qt::Vertical );
-  ParentMeshGroup->layout()->setSpacing( 0 );
-  ParentMeshGroup->layout()->setMargin( 0 );
+  QGroupBox* ParentMeshGroup = new QGroupBox( tr( "PARENT_MESH_TITLE" ), aBox );
+  //ParentMeshGroup->setColumnLayout(0, Qt::Vertical );
+  //ParentMeshGroup->layout()->setSpacing( 0 );
+  //ParentMeshGroup->layout()->setMargin( 0 );
 
-  QGridLayout* ParentMeshGroupLayout = new QGridLayout (ParentMeshGroup->layout());
+  QGridLayout* ParentMeshGroupLayout = new QGridLayout (ParentMeshGroup);
   ParentMeshGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
   ParentMeshGroupLayout->setSpacing(6);
   ParentMeshGroupLayout->setMargin(11);
@@ -205,27 +220,29 @@ VVTK_PickingDlg::VVTK_PickingDlg(QtxAction* theAction,
   myDisplayParentMeshCheckBox = new QCheckBox( tr( "DISPLAY_PARENT_MESH" ), ParentMeshGroup );
   ParentMeshGroupLayout->addWidget( myDisplayParentMeshCheckBox, 0, 0 );
 
+  BoxLayout->addWidget( ParentMeshGroup );
+
   // Common buttons ===========================================================
-  QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
-  GroupButtons->setColumnLayout(0, Qt::Vertical );
-  GroupButtons->layout()->setSpacing( 0 );
-  GroupButtons->layout()->setMargin( 0 );
-  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+  QGroupBox* GroupButtons = new QGroupBox( this );
+  //GroupButtons->setColumnLayout(0, Qt::Vertical );
+  //GroupButtons->layout()->setSpacing( 0 );
+  //GroupButtons->layout()->setMargin( 0 );
+  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
   GroupButtonsLayout->setSpacing( 6 );
   GroupButtonsLayout->setMargin( 11 );
 
-  QPushButton* buttonApply = new QPushButton( tr( "&Apply" ), GroupButtons, "buttonApply" );
+  QPushButton* buttonApply = new QPushButton( tr( "&Apply" ), GroupButtons );
   buttonApply->setAutoDefault( TRUE );
   buttonApply->setDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonApply, 0, 0 );
   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
 
-  QPushButton* buttonClose = new QPushButton( tr( "&Close" ) , GroupButtons, "buttonClose" );
+  QPushButton* buttonClose = new QPushButton( tr( "&Close" ) , GroupButtons );
   buttonClose->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonClose, 0, 2 );
 
-  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons );
   buttonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
@@ -269,16 +286,24 @@ void VVTK_PickingDlg::Update()
     myPyramidHeightSpinBox->setValue( myPickingSettings->GetPyramidHeight() );
     myPointToleranceSpinBox->setValue( myPickingSettings->GetPointTolerance() );
     myTransparencySpinBox->setValue( int(myPickingSettings->GetInfoWindowTransparency() * 100.0) );
-    myPositionComboBox->setCurrentItem( myPickingSettings->GetInfoWindowPosition() );
+    myPositionComboBox->setCurrentIndex( myPickingSettings->GetInfoWindowPosition() );
     myZoomFactorSpinBox->setValue( myPickingSettings->GetZoomFactor() );
     myStepNumberSpinBox->setValue( myPickingSettings->GetStepNumber() );
     myDisplayParentMeshCheckBox->setChecked( myPickingSettings->GetDisplayParentMesh() );
 
     vtkFloatingPointType* aColor = myPickingSettings->GetColor();
-    mySelectionColorButton->setPaletteBackgroundColor( QColor( ( int )( aColor[0] * 255.0 ),
-                                                              ( int )( aColor[1] * 255.0 ),
-                                                              ( int )( aColor[2] * 255.0 ) ) );
-
+   
+    //QPalette aPalette( mySelectionColorButton->palette() );
+    /*aPalette.setColor( mySelectionColorButton->backgroundRole(),
+                      QColor( ( int )( aColor[0] * 255.0 ),
+                              ( int )( aColor[1] * 255.0 ),
+                              ( int )( aColor[2] * 255.0 ) ) );
+                               mySelectionColorButton->setPalette( aPalette );*/
+    mySelectionColorButton->setColor(
+                 QColor( ( int )( aColor[0] * 255.0 ),
+                ( int )( aColor[1] * 255.0 ),
+                 ( int )( aColor[2] * 255.0 ) ) );
+    
     return;
   }
 
@@ -294,13 +319,15 @@ void VVTK_PickingDlg::Update()
   myPointToleranceSpinBox->setValue( aPointTolerance );
 
   aColor = aResourceMgr->colorValue( "VISU", "picking_selection_color", aColor );
-  mySelectionColorButton->setPaletteBackgroundColor( aColor );
+  //QPalette aPalette( mySelectionColorButton->palette() );
+  //aPalette.setColor( mySelectionColorButton->backgroundRole(), aColor );
+  mySelectionColorButton->setColor( aColor );
 
   anInfoWindowTransparency = aResourceMgr->integerValue( "VISU", "picking_transparency", anInfoWindowTransparency );
   myTransparencySpinBox->setValue( anInfoWindowTransparency );
 
   anInfoWindowPosition = aResourceMgr->integerValue( "VISU", "picking_position", anInfoWindowPosition );
-  myPositionComboBox->setCurrentItem( anInfoWindowPosition );
+  myPositionComboBox->setCurrentIndex( anInfoWindowPosition );
 
   aZoomFactor = aResourceMgr->doubleValue( "VISU", "picking_zoom_factor", aZoomFactor );
   myZoomFactorSpinBox->setValue( aZoomFactor );
@@ -367,12 +394,13 @@ void VVTK_PickingDlg::onClickApply()
   myPickingSettings->SetPyramidHeight( myPyramidHeightSpinBox->value() );
   myPickingSettings->SetPointTolerance( myPointToleranceSpinBox->value() );
   myPickingSettings->SetInfoWindowTransparency( myTransparencySpinBox->value() / 100.0 );
-  myPickingSettings->SetInfoWindowPosition( myPositionComboBox->currentItem() );
+  myPickingSettings->SetInfoWindowPosition( myPositionComboBox->currentIndex() );
   myPickingSettings->SetZoomFactor( myZoomFactorSpinBox->value() );
   myPickingSettings->SetStepNumber( myStepNumberSpinBox->value() );
   myPickingSettings->SetDisplayParentMesh( myDisplayParentMeshCheckBox->isChecked() );
 
-  QColor aButtonColor = mySelectionColorButton->paletteBackgroundColor();
+  //QPalette aPalette( mySelectionColorButton->palette() );
+  QColor aButtonColor = mySelectionColorButton->color();//aPalette.color(mySelectionColorButton->backgroundRole() );
   vtkFloatingPointType aColor[3];
   aColor[0] = aButtonColor.red() / 255.0;
   aColor[1] = aButtonColor.green() / 255.0;
@@ -400,19 +428,27 @@ void VVTK_PickingDlg::onClickHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+       SUIT_MessageBox::warning( 0,
+                                 QObject::tr("WRN_WARNING"),
+                                 QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                                   arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                                 QObject::tr("BUT_OK"));
   }
 }
 
-void VVTK_PickingDlg::onColorButtonPressed()
+/*void VVTK_PickingDlg::onColorButtonPressed()
 {
-  QColor aColor = QColorDialog::getColor( mySelectionColorButton->paletteBackgroundColor(), this );
+  QPalette aPalette( mySelectionColorButton->palette() );
+  QColor aColor = QColorDialog::
+    getColor( aPalette.color(mySelectionColorButton->backgroundRole() ), this );
+
   if( aColor.isValid() )
-    mySelectionColorButton->setPaletteBackgroundColor( aColor );
-}
+  {
+      aPalette.setColor( mySelectionColorButton->backgroundRole(),
+                    aColor );
+      mySelectionColorButton->setPalette( aPalette );
+  }
+}*/
 
 void VVTK_PickingDlg::keyPressEvent( QKeyEvent* e )
 {
@@ -420,7 +456,7 @@ void VVTK_PickingDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onClickHelp();
index 81b2576cfb95a4f377fb9f424d4b980e65c586ec..1026285da8a3609cc0281f9286b5f0523e471253 100644 (file)
@@ -39,8 +39,9 @@ class QCheckBox;
 class QPushButton;
 
 class QtxAction;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 class QtxIntSpinBox;
+class QtxColorButton;
 
 class VISU_GaussPtsAct;
 class VISU_PickingSettings;
@@ -80,7 +81,7 @@ protected slots:
   void             onClickClose();
   void             onClickHelp();
 
-  void             onColorButtonPressed();
+  //void             onColorButtonPressed();
 
 private:
   static void      ProcessEvents(vtkObject* theObject, 
@@ -92,23 +93,26 @@ private:
   void             keyPressEvent( QKeyEvent* e );
 
 private:
-  QtxDblSpinBox*   myCursorSizeSpinBox;
-  QtxDblSpinBox*   myPyramidHeightSpinBox;
-  QPushButton*     mySelectionColorButton;
-  QtxDblSpinBox*   myPointToleranceSpinBox;
-  QtxIntSpinBox*   myTransparencySpinBox;
-  QComboBox*       myPositionComboBox;
-  QtxDblSpinBox*   myZoomFactorSpinBox;
-  QtxIntSpinBox*   myStepNumberSpinBox;
-  QCheckBox*       myDisplayParentMeshCheckBox;
-
-  QtxAction*       myAction;
-  vtkSmartPointer<VISU_PickingSettings> myPickingSettings;
-
-  SVTK_RenderWindowInteractor* myInteractor;
-
-  float            myPriority;
-  vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
+  QtxDoubleSpinBox* myCursorSizeSpinBox;
+  QtxDoubleSpinBox* myPyramidHeightSpinBox;
+  QtxColorButton*   mySelectionColorButton;
+  QtxDoubleSpinBox* myPointToleranceSpinBox;
+  QtxIntSpinBox*    myTransparencySpinBox;
+  QComboBox*        myPositionComboBox;
+  QtxDoubleSpinBox* myZoomFactorSpinBox;
+  QtxIntSpinBox*    myStepNumberSpinBox;
+  QCheckBox*        myDisplayParentMeshCheckBox;
+
+  QtxAction*        myAction;
+  vtkSmartPointer<VISU_PickingSettings> 
+                    myPickingSettings;
+
+  SVTK_RenderWindowInteractor* 
+                    myInteractor;
+
+  float             myPriority;
+  vtkSmartPointer<vtkCallbackCommand> 
+                    myEventCallbackCommand;
 };
 
 #endif
index 908d825b9c04f7ba22ad4631f44b85d6f23f4cb2..c12bd86507657534f66f94d2488bbe8369f82728 100644 (file)
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Session.h"
 
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
 #include "QtxIntSpinBox.h"
 
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qfiledialog.h>
+#include <QLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QButtonGroup>
+#include <QRadioButton>
+#include <QPushButton>
+#include <QFileDialog>
 
 #include <iostream>
 
@@ -53,11 +53,11 @@ VVTK_PrimitiveBox::VVTK_PrimitiveBox( QWidget* parent ) :
   SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
 
   setTitle( tr( "PRIMITIVE_TITLE" ) );
-  setColumnLayout(0, Qt::Vertical );
-  layout()->setSpacing( 0 );
-  layout()->setMargin( 0 );
+  //setColumnLayout(0, Qt::Vertical );
+  //layout()->setSpacing( 0 );
+  //layout()->setMargin( 0 );
 
-  QGridLayout* aLayout = new QGridLayout( layout() );
+  QGridLayout* aLayout = new QGridLayout( this );
   aLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   aLayout->setSpacing(6);
   aLayout->setMargin(11);
@@ -69,32 +69,41 @@ VVTK_PrimitiveBox::VVTK_PrimitiveBox( QWidget* parent ) :
   myAlphaTexture = aRootDir + "sprite_alpha.bmp";
 
   // Primitive Type
-  QButtonGroup* aPrimitiveTypeGroup = new QButtonGroup( 3, Qt::Horizontal, this, "PrimitiveTypeGroup" );
+  QGroupBox* aPrimitiveTypeGroup = new QGroupBox( this );
   aPrimitiveTypeGroup->setMinimumWidth( 450 );
-  aPrimitiveTypeGroup->setRadioButtonExclusive( true );
-  aPrimitiveTypeGroup->setFrameStyle( QFrame::NoFrame );
-  aPrimitiveTypeGroup->layout()->setMargin( 0 );
+  QHBoxLayout* aPrimLayout = new QHBoxLayout( aPrimitiveTypeGroup );
+  aPrimLayout->setMargin( 0 );
+
+  //QButtonGroup* aPrimitiveTypeGroup = new QButtonGroup( 3, Qt::Horizontal, this, "PrimitiveTypeGroup" );
+  //aPrimitiveTypeGroup->setMinimumWidth( 450 );
+  //aPrimitiveTypeGroup->setRadioButtonExclusive( true );
+  //aPrimitiveTypeGroup->setFrameStyle( QFrame::NoFrame );
+  //aPrimitiveTypeGroup->layout()->setMargin( 0 );
 
   myPointSpriteButton = new QRadioButton( tr( "POINT_SPRITE" ), aPrimitiveTypeGroup );
   myOpenGLPointButton = new QRadioButton( tr( "OPENGL_POINT" ), aPrimitiveTypeGroup );
   myGeomSphereButton = new QRadioButton( tr( "GEOMETRICAL_SPHERE" ), aPrimitiveTypeGroup );
 
-  aLayout->addMultiCellWidget( aPrimitiveTypeGroup, 0, 0, 0, 2 );
+  aPrimLayout->addWidget( myPointSpriteButton );
+  aPrimLayout->addWidget( myOpenGLPointButton );
+  aPrimLayout->addWidget( myGeomSphereButton );
+
+  aLayout->addWidget( aPrimitiveTypeGroup, 0, 0, 1, 2 );
 
   // Clamp ( Point Sprite & OpenGL Point )
   myClampLabel = new QLabel( tr( "CLAMP" ), this );
-  myClampSpinBox = new QtxDblSpinBox( 1.0, 512.0, 1.0, this );
+  myClampSpinBox = new QtxDoubleSpinBox( 1.0, 512.0, 1.0, this );
   myClampSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
   aLayout->addWidget( myClampLabel, 1, 0 );
-  aLayout->addMultiCellWidget( myClampSpinBox, 1, 1, 1, 2 );
+  aLayout->addWidget( myClampSpinBox, 1, 1, 1, 2 );
 
   // Main Texture ( Point Sprite )
   myMainTextureLabel = new QLabel( tr( "MAIN_TEXTURE" ), this );
   myMainTextureLineEdit = new QLineEdit( this );
   myMainTextureButton = new QPushButton( this );
   myMainTextureButton->setAutoDefault( false );
-  myMainTextureButton->setPixmap( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
+  myMainTextureButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
   connect( myMainTextureButton, SIGNAL( clicked() ), this, SLOT( onBrowseMainTexture() ) );
 
   aLayout->addWidget( myMainTextureLabel, 2, 0 );
@@ -106,7 +115,7 @@ VVTK_PrimitiveBox::VVTK_PrimitiveBox( QWidget* parent ) :
   myAlphaTextureLineEdit = new QLineEdit( this );
   myAlphaTextureButton = new QPushButton( this );
   myAlphaTextureButton->setAutoDefault( false );
-  myAlphaTextureButton->setPixmap( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
+  myAlphaTextureButton->setIcon( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
   connect( myAlphaTextureButton, SIGNAL( clicked() ), this, SLOT( onBrowseAlphaTexture() ) );
 
   aLayout->addWidget( myAlphaTextureLabel, 3, 0 );
@@ -115,11 +124,11 @@ VVTK_PrimitiveBox::VVTK_PrimitiveBox( QWidget* parent ) :
 
   // Alpha Threshold ( Point Sprite )
   myAlphaThresholdLabel = new QLabel( tr( "ALPHA_THRESHOLD" ), this );
-  myAlphaThresholdSpinBox = new QtxDblSpinBox( 0.0, 1.0, 0.1, this );
+  myAlphaThresholdSpinBox = new QtxDoubleSpinBox( 0.0, 1.0, 0.1, this );
   myAlphaThresholdSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
   aLayout->addWidget( myAlphaThresholdLabel, 4, 0 );
-  aLayout->addMultiCellWidget( myAlphaThresholdSpinBox, 4, 4, 1, 2 );
+  aLayout->addWidget( myAlphaThresholdSpinBox, 4, 1, 1, 2 );
 
   // Resolution ( Geometrical Sphere )
   myResolutionLabel = new QLabel( tr( "RESOLUTION" ), this );
@@ -127,8 +136,8 @@ VVTK_PrimitiveBox::VVTK_PrimitiveBox( QWidget* parent ) :
   myResolutionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   connect( myResolutionSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( onResolutionChanged( int ) ) );
 
-  aLayout->addWidget( myResolutionLabel, 1, 0 );
-  aLayout->addMultiCellWidget( myResolutionSpinBox, 1, 1, 1, 2 );
+  aLayout->addWidget( myResolutionLabel, 5, 0 );
+  aLayout->addWidget( myResolutionSpinBox, 5, 1, 1, 2 );
 
   // Number of faces ( Geometrical Sphere )
   myFaceNumberLabel = new QLabel( tr( "FACE_NUMBER" ), this );
@@ -137,16 +146,16 @@ VVTK_PrimitiveBox::VVTK_PrimitiveBox( QWidget* parent ) :
   myFaceNumberLineEdit->setEnabled( false );
   //myFaceNumberLineEdit->setReadOnly( true );
 
-  aLayout->addWidget( myFaceNumberLabel, 2, 0 );
-  aLayout->addMultiCellWidget( myFaceNumberLineEdit, 2, 2, 1, 2 );
+  aLayout->addWidget( myFaceNumberLabel, 6, 0 );
+  aLayout->addWidget( myFaceNumberLineEdit, 6, 1, 1, 2 );
 
   // Notification ( Geometrical Sphere )
   myFaceLimitLabel = new QLabel( tr( "FACE_LIMIT" ), this );
   myFaceLimitSpinBox = new QtxIntSpinBox( 10, 1000000, 10, this );
   myFaceLimitSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
-  aLayout->addWidget( myFaceLimitLabel, 3, 0 );
-  aLayout->addMultiCellWidget( myFaceLimitSpinBox, 3, 3, 1, 2 );
+  aLayout->addWidget( myFaceLimitLabel, 7, 0 );
+  aLayout->addWidget( myFaceLimitSpinBox, 7, 1, 1, 2 );
 
   connect( myPointSpriteButton, SIGNAL( clicked() ), this, SLOT( onTogglePointSprite() ) );
   connect( myOpenGLPointButton, SIGNAL( clicked() ), this, SLOT( onToggleOpenGLPoint() ) );
@@ -276,7 +285,7 @@ void VVTK_PrimitiveBox::setClamp( float theClamp )
 
 void VVTK_PrimitiveBox::setClampMaximum( float theClampMaximum )
 {
-  myClampSpinBox->setMaxValue( theClampMaximum );
+  myClampSpinBox->setMaximum( theClampMaximum );
 }
 
 void VVTK_PrimitiveBox::setMainTexture( const QString& theMainTexture )
@@ -336,7 +345,10 @@ void VVTK_PrimitiveBox::setFaceLimit( int theFaceLimit )
 void VVTK_PrimitiveBox::onBrowseMainTexture()
 {
   QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/";
-  QString aFileName = QFileDialog::getOpenFileName( aRootDir, "Bitmap (*.bmp *.jpg *.png)", this );
+  QString aFileName = QFileDialog::getOpenFileName( this,
+                                                   0,
+                                                   aRootDir,
+                                                   "Bitmap (*.bmp *.jpg *.png)" );
 
   if( aFileName.isNull() )
     return;
@@ -348,7 +360,10 @@ void VVTK_PrimitiveBox::onBrowseMainTexture()
 void VVTK_PrimitiveBox::onBrowseAlphaTexture()
 {
   QString aRootDir = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/visu/";
-  QString aFileName = QFileDialog::getOpenFileName( aRootDir, "Bitmap (*.bmp *.jpg *.png)", this );
+  QString aFileName = QFileDialog::getOpenFileName( this,
+                                                   0,
+                                                   aRootDir,
+                                                   "Bitmap (*.bmp *.jpg *.png)" );
 
   if( aFileName.isNull() )
     return;
index 722d17f2420c796b748e2a32ac3b1685a32c1c04..e7ad6ca15b984e237db6f388945486fd626c1141 100644 (file)
 
 #include "VVTK.h"
 
-#include <qgroupbox.h>
+#include <QGroupBox>
 
 class QLabel;
 class QLineEdit;
 class QPushButton;
 class QRadioButton;
 
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 class QtxIntSpinBox;
 
 class VVTK_EXPORT VVTK_PrimitiveBox : public QGroupBox
@@ -95,7 +95,7 @@ private:
   QString                  myAlphaTexture;
 
   QLabel*                  myClampLabel;
-  QtxDblSpinBox*           myClampSpinBox;
+  QtxDoubleSpinBox*        myClampSpinBox;
 
   QLabel*                  myMainTextureLabel;
   QLineEdit*               myMainTextureLineEdit;
@@ -106,7 +106,7 @@ private:
   QPushButton*             myAlphaTextureButton;
 
   QLabel*                  myAlphaThresholdLabel;
-  QtxDblSpinBox*           myAlphaThresholdSpinBox;
+  QtxDoubleSpinBox*        myAlphaThresholdSpinBox;
 
   QLabel*                  myResolutionLabel;
   QtxIntSpinBox*           myResolutionSpinBox;
index f42b72520e9d1be599a6c7ab73b3a3e60fbc3d2d..4208ca7597465dc0d4bcf3880994550ab7017fe8 100755 (executable)
@@ -48,8 +48,9 @@
 #include <unistd.h>
 #endif
 
-#include <qapplication.h>
-#include <qfileinfo.h>
+#include <QApplication>
+#include <QFileInfo>
+#include <QDir>
 
 #include "utilities.h"
 
@@ -289,7 +290,7 @@ void
 VVTK_Recorder
 ::Stop()
 {
-  QApplication::setOverrideCursor( Qt::waitCursor );
+  QApplication::setOverrideCursor( Qt::WaitCursor );
 
   if(myState == VVTK_Recorder_Record){ 
     if(!myPaused)
@@ -473,7 +474,7 @@ VVTK_Recorder
   if(MYDEBUG) cout<<"VVTK_Recorder::MakeFileAVI - "<<aString<<endl;
 
   QFileInfo aFileInfo(myName.c_str());
-  QString aDirPath = aFileInfo.dirPath(TRUE);
+  QString aDirPath = aFileInfo.absoluteDir().path();
   QString aBaseName = aFileInfo.fileName();
   QString aCommand = 
     QString("(cd ") + aDirPath + 
@@ -485,6 +486,6 @@ VVTK_Recorder
   aCommand = 
     QString("rm ") + aDirPath + "/" + aBaseName + "*.jpeg";
 
-  if(MYDEBUG) cout<<"VVTK_Recorder::MakeFileAVI - "<<aCommand.latin1()<<endl;
-  system(aCommand.latin1());
+  if(MYDEBUG) cout<<"VVTK_Recorder::MakeFileAVI - "<<(const char*)aCommand.toLatin1()<<endl;
+  system((const char*)aCommand.toLatin1());
 }
index 3d287ec4619962a75d050aad72d8e98f6e334371..93f7bd41f27b2c9e275c6b265f08810ae3415ac6 100644 (file)
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Session.h"
 
-#include "QtxDblSpinBox.h"
+#include "QtxDoubleSpinBox.h"
 #include "QtxIntSpinBox.h"
 
 #include "LightApp_Application.h"
 
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include "CAM_Module.h"
+
+#include <QCheckBox>
+#include <QComboBox>
+#include <QGroupBox>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QPushButton>
 
 /*!
  * Constructor
  */
 VVTK_RecorderDlg::VVTK_RecorderDlg( QWidget* theParent, VVTK_Recorder* theRecorder ):
-  QDialog( theParent, "VVTK_RecorderDlg", false ),
+  QDialog( theParent ),
   myRecorder( theRecorder )
 {
-  setCaption( tr( "DLG_RECORDER_TITLE" ) );
+  setWindowTitle( tr( "DLG_RECORDER_TITLE" ) );
 
   SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
 
   QVBoxLayout* aTopLayout = new QVBoxLayout( this );
   aTopLayout->setSpacing( 6 );
   aTopLayout->setMargin( 6 );
-  aTopLayout->setAutoAdd( true );
+  //aTopLayout->setAutoAdd( true );
 
   // Settings
   QGroupBox* mySettingsBox = new QGroupBox( tr( "SETTINGS" ), this );
-  mySettingsBox->setColumnLayout( 0, Qt::Vertical );
-  mySettingsBox->layout()->setSpacing( 0 );
-  mySettingsBox->layout()->setMargin( 0 );
+  //mySettingsBox->setColumnLayout( 0, Qt::Vertical );
+  //mySettingsBox->layout()->setSpacing( 0 );
+  //mySettingsBox->layout()->setMargin( 0 );
 
-  QGridLayout* aSettingsLayout = new QGridLayout( mySettingsBox->layout() );
+  QGridLayout* aSettingsLayout = new QGridLayout( mySettingsBox );
   aSettingsLayout->setSpacing( 6 );
   aSettingsLayout->setMargin( 11 );
 
@@ -76,20 +79,15 @@ VVTK_RecorderDlg::VVTK_RecorderDlg( QWidget* theParent, VVTK_Recorder* theRecord
   myFileNameLineEdit = new QLineEdit( mySettingsBox );
   myFileNameLineEdit->setMinimumWidth( 250 );
   myFileNameLineEdit->setReadOnly( true );
-  /*
-  QPushButton* aFileNameButton = new QPushButton( mySettingsBox );
-  aFileNameButton->setAutoDefault( false );
-  aFileNameButton->setPixmap( aResourceMgr->loadPixmap( "VISU", tr( "ICON_LOAD_TEXTURE" ) ) );
-  connect( aFileNameButton, SIGNAL( clicked() ), this, SLOT( onBrowseFile() ) );
-  */
+
   QLabel* aRecordingModeLabel = new QLabel( tr( "RECORDING_MODE" ), mySettingsBox );
   myRecordingModeComboBox = new QComboBox( mySettingsBox );
-  myRecordingModeComboBox->insertItem( tr( "SKIPPED_FRAMES" ) );
-  myRecordingModeComboBox->insertItem( tr( "ALL_DISLPAYED_FRAMES" ) );
-  myRecordingModeComboBox->setCurrentItem( aResourceMgr->integerValue( "VISU", "recorder_mode", 1 ) );
+  myRecordingModeComboBox->addItem( tr( "SKIPPED_FRAMES" ) );
+  myRecordingModeComboBox->addItem( tr( "ALL_DISLPAYED_FRAMES" ) );
+  myRecordingModeComboBox->setCurrentIndex( aResourceMgr->integerValue( "VISU", "recorder_mode", 1 ) );
 
   QLabel* aFPSLabel = new QLabel( tr( "FPS" ), mySettingsBox );
-  myFPSSpinBox = new QtxDblSpinBox( 0.1, 100.0, 1.0, mySettingsBox );
+  myFPSSpinBox = new QtxDoubleSpinBox( 0.1, 100.0, 1.0, mySettingsBox );
   myFPSSpinBox->setValue( aResourceMgr->doubleValue( "VISU", "recorder_fps", 10.0 ) );
 
   QLabel* aQualityLabel = new QLabel( tr( "QUALITY" ), mySettingsBox );
@@ -100,7 +98,7 @@ VVTK_RecorderDlg::VVTK_RecorderDlg( QWidget* theParent, VVTK_Recorder* theRecord
   myProgressiveCheckBox->setChecked( aResourceMgr->booleanValue( "VISU", "recorder_progressive", false ) );
 
   aSettingsLayout->addWidget( aFileNameLabel, 0, 0 );
-  aSettingsLayout->addMultiCellWidget( myFileNameLineEdit, 1, 1, 0, 1 );
+  aSettingsLayout->addWidget( myFileNameLineEdit, 1, 0, 1, 2 );
   //aSettingsLayout->addWidget( aFileNameButton, 1, 2 );
   aSettingsLayout->addWidget( aRecordingModeLabel, 2, 0 );
   aSettingsLayout->addWidget( myRecordingModeComboBox, 2, 1 );
@@ -110,12 +108,14 @@ VVTK_RecorderDlg::VVTK_RecorderDlg( QWidget* theParent, VVTK_Recorder* theRecord
   aSettingsLayout->addWidget( myQualitySpinBox, 4, 1 );
   aSettingsLayout->addWidget( myProgressiveCheckBox, 5, 0 );
 
+  aTopLayout->addWidget( mySettingsBox );
+
   // Start / Close
   QGroupBox* CommonGroup = new QGroupBox( this );
-  CommonGroup->setColumnLayout(0, Qt::Vertical );
-  CommonGroup->layout()->setSpacing( 0 );
-  CommonGroup->layout()->setMargin( 0 );
-  QGridLayout* CommonGroupLayout = new QGridLayout( CommonGroup->layout() );
+  //CommonGroup->setColumnLayout(0, Qt::Vertical );
+  //CommonGroup->layout()->setSpacing( 0 );
+  //CommonGroup->layout()->setMargin( 0 );
+  QGridLayout* CommonGroupLayout = new QGridLayout( CommonGroup );
   CommonGroupLayout->setAlignment( Qt::AlignTop );
   CommonGroupLayout->setSpacing( 6 );
   CommonGroupLayout->setMargin( 11 );
@@ -134,6 +134,8 @@ VVTK_RecorderDlg::VVTK_RecorderDlg( QWidget* theParent, VVTK_Recorder* theRecord
   aHelpButton->setAutoDefault( true );
   CommonGroupLayout->addWidget( aHelpButton, 0, 3 );
 
+  aTopLayout->addWidget( CommonGroup );
+
   connect( aStartButton, SIGNAL( clicked() ), this, SLOT( onStart() ) );
   connect( aCloseButton, SIGNAL( clicked() ), this, SLOT( onClose() ) );
   connect( aHelpButton,  SIGNAL( clicked() ), this, SLOT( onHelp() ) );
@@ -154,9 +156,9 @@ void VVTK_RecorderDlg::onStart()
   if( myFileName.isNull() )
     return;
 
-  myRecorder->SetName( myFileName.latin1() );
+  myRecorder->SetName( (const char*)myFileName.toLatin1() );
 
-  myRecorder->SetUseSkippedFrames( myRecordingModeComboBox->currentItem() == 0 );
+  myRecorder->SetUseSkippedFrames( myRecordingModeComboBox->currentIndex() == 0 );
   myRecorder->SetNbFPS( myFPSSpinBox->value() );
   myRecorder->SetQuality( myQualitySpinBox->value() );
   myRecorder->SetProgressiveMode( myProgressiveCheckBox->isChecked() );
@@ -183,10 +185,9 @@ void VVTK_RecorderDlg::onHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+                            QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                            arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName) );
   }
 }
 
@@ -216,7 +217,7 @@ void VVTK_RecorderDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onHelp();
index 23b5a1df53834b590da90871b6cf1069ecdafa68..34a19d37cb06f71aa4cd0a13e9bfef73e88a46b7 100644 (file)
@@ -29,8 +29,8 @@
 #ifndef VVTK_RECORDERDLG_H
 #define VVTK_RECORDERDLG_H
 
-#include <qdatetime.h>
-#include <qdialog.h>
+#include <QDateTime>
+#include <QDialog>
 
 class QCheckBox;
 class QComboBox;
@@ -40,7 +40,7 @@ class QLineEdit;
 class QPushButton;
 class QTimer;
 
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 class QtxIntSpinBox;
 
 class VVTK_Recorder;
@@ -74,10 +74,10 @@ private:
 
   QLineEdit*       myFileNameLineEdit;
 
-  QComboBox*       myRecordingModeComboBox;
-  QtxDblSpinBox*   myFPSSpinBox;
-  QtxIntSpinBox*   myQualitySpinBox;
-  QCheckBox*       myProgressiveCheckBox;
+  QComboBox*        myRecordingModeComboBox;
+  QtxDoubleSpinBox* myFPSSpinBox;
+  QtxIntSpinBox*    myQualitySpinBox;
+  QCheckBox*        myProgressiveCheckBox;
 
 };
 
index 55b1fb7aac4f1caf73a8b3138263998ad94dfb23..d939b345a9bb9c61911b2d17160ee9d45fb6ffa8 100644 (file)
 #include "VISU_GaussPointsPL.hxx"
 #include "VISU_OpenGLPointSpriteMapper.hxx"
 
-#include "LightApp_Application.h"
-#include "SUIT_MessageBox.h"
-#include "SUIT_ResourceMgr.h"
-#include "SUIT_Session.h"
+#include <LightApp_Application.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
 
-#include "SVTK_RenderWindowInteractor.h"
+#include <SVTK_RenderWindowInteractor.h>
 
 #include <vtkActorCollection.h>
 #include <vtkCallbackCommand.h>
 
 #include "utilities.h"
 
-#include <qbuttongroup.h>
-#include <qcolordialog.h>
-#include <qfiledialog.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qvbox.h>
-
-#include "QtxAction.h"
-#include "QtxDblSpinBox.h"
-#include "QtxIntSpinBox.h"
+#include <QButtonGroup>
+#include <QColorDialog>
+#include <QFileDialog>
+#include <QGroupBox>
+#include <QKeyEvent>
+#include <QLabel>
+#include <QLayout>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QRadioButton>
+#include <QTabWidget>
+//#include <qvbox.h>
+
+#include <QtxAction.h>
+#include <QtxDoubleSpinBox.h>
+#include <QtxIntSpinBox.h>
+#include <CAM_Module.h>
 
 using namespace std;
 
@@ -79,16 +81,16 @@ namespace VISU
   Image2VTI(const QString& theImageFileName)
   {
     QFileInfo aFileInfo(theImageFileName);
-    QString aFormat = aFileInfo.extension(FALSE);
+    QString aFormat = aFileInfo.suffix();
 #ifdef WIN32
     QString aTmpDir = getenv( "TEMP" );
 #else
     QString aTmpDir = QString( "/tmp/" ) + getenv("USER");
 #endif
-    QString aVTIName = aTmpDir + "-" + aFileInfo.baseName(TRUE) + ".vti";
+    QString aVTIName = aTmpDir + "-" + aFileInfo.completeBaseName() + ".vti";
     QString aCommand = QString( "VISU_img2vti " ) + aFormat + " " +  theImageFileName + " " + aVTIName;
 
-    if(system( aCommand.latin1() ) == 0)
+    if(system( (const char*)aCommand.toLatin1() ) == 0)
       return aVTIName;
 
     return QString::null;
@@ -104,7 +106,7 @@ namespace VISU
 #else:
       QString aCommand = QString( "del /F " ) + theFileName;
 #endif
-      system( aCommand.latin1() );
+      system( (const char*)aCommand.toLatin1() );
     }
   }
   
@@ -119,7 +121,8 @@ namespace VISU
     static TTextureMap aTextureMap;
     
     TTextureValue aTextureValue;
-    TTextureKey aTextureKey(theMainTexture.latin1(),theAlphaTexture.latin1());
+    TTextureKey aTextureKey((const char*)theMainTexture.toLatin1(),
+                           (const char*)theAlphaTexture.toLatin1());
     TTextureMap::const_iterator anIter = aTextureMap.find(aTextureKey);
     if(anIter != aTextureMap.end()){
       aTextureValue = anIter->second;
@@ -129,8 +132,8 @@ namespace VISU
       
       if( !aMainTextureVTI.isNull() && !anAlphaTextureVTI.isNull() ){
        aTextureValue =
-         VISU_GaussPointsPL::MakeTexture( aMainTextureVTI.latin1(), 
-                                          anAlphaTextureVTI.latin1());
+         VISU_GaussPointsPL::MakeTexture( (const char*)aMainTextureVTI.toLatin1(), 
+                                          (const char*)anAlphaTextureVTI.toLatin1());
 
        if( aTextureValue.GetPointer() )
          aTextureMap[aTextureKey] = aTextureValue;
@@ -147,7 +150,8 @@ namespace VISU
 
 //----------------------------------------------------------------
 VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const char* name )
-  :QDialog( parent, name, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
+  :QDialog( parent,
+           Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
    myEventCallbackCommand( vtkCallbackCommand::New() ),
    myInsideCursorSettings( VISU_InsideCursorSettings::New() ),
    myOutsideCursorSettings( VISU_OutsideCursorSettings::New() ),
@@ -155,6 +159,8 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
    myWidgetCtrl(NULL),
    myInteractor(NULL)
 {
+  setAccessibleName( name );
+
   myPriority = 0.0;
   myEventCallbackCommand->Delete();
   myEventCallbackCommand->SetClientData(this); 
@@ -164,7 +170,7 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
                                      myEventCallbackCommand.GetPointer(), 
                                      myPriority);
 
-  setCaption( tr( "SEGMENTATION_CURSOR_DLG_TITLE" ) );
+  setWindowTitle( tr( "SEGMENTATION_CURSOR_DLG_TITLE" ) );
   setSizeGripEnabled(TRUE);
 
   QVBoxLayout* TopLayout = new QVBoxLayout( this );
@@ -174,36 +180,37 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
   myTabBox = new QTabWidget( this );
 
   // Segmentation cursor pane
-  mySegmentationCursorBox = new QVBox( this );
-  mySegmentationCursorBox->setMargin(11);
-  mySegmentationCursorBox->setSpacing(6);
-  mySegmentationCursorBox->layout()->setAlignment(Qt::AlignTop);
+  mySegmentationCursorBox = new QWidget( this );
+  QVBoxLayout* SCBoxLayout = new QVBoxLayout( mySegmentationCursorBox );
+  SCBoxLayout->setMargin(11);
+  SCBoxLayout->setSpacing(6);
+  SCBoxLayout->setAlignment(Qt::AlignTop);
 
   // Origin
-  myOriginGroup = new QGroupBox( tr( "ORIGIN_TITLE" ), mySegmentationCursorBox, "OriginGroup" );
-  myOriginGroup->setColumnLayout( 0, Qt::Vertical );
-  myOriginGroup->layout()->setSpacing( 0 );
-  myOriginGroup->layout()->setMargin( 0 );
+  myOriginGroup = new QGroupBox( tr( "ORIGIN_TITLE" ), mySegmentationCursorBox );
+  //myOriginGroup->setColumnLayout( 0, Qt::Vertical );
+  //myOriginGroup->layout()->setSpacing( 0 );
+  //myOriginGroup->layout()->setMargin( 0 );
 
-  QGridLayout* OriginGroupLayout = new QGridLayout( myOriginGroup->layout() );
+  QGridLayout* OriginGroupLayout = new QGridLayout( myOriginGroup );
   OriginGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   OriginGroupLayout->setSpacing(6);
   OriginGroupLayout->setMargin(11);
 
   QLabel* XOriginLabel = new QLabel( tr( "ORIGIN_X" ), myOriginGroup );
-  myXOriginSpinBox = new QtxDblSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
+  myXOriginSpinBox = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
   myXOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myXOriginSpinBox->setMinimumWidth( 100 );
   myXOriginSpinBox->setValue( 0.0 );
 
   QLabel* YOriginLabel = new QLabel( tr( "ORIGIN_Y" ), myOriginGroup );
-  myYOriginSpinBox = new QtxDblSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
+  myYOriginSpinBox = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
   myYOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myYOriginSpinBox->setMinimumWidth( 100 );
   myYOriginSpinBox->setValue( 0.0 );
 
   QLabel* ZOriginLabel = new QLabel( tr( "ORIGIN_Z" ), myOriginGroup );
-  myZOriginSpinBox = new QtxDblSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
+  myZOriginSpinBox = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, myOriginGroup );
   //myZOriginSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myZOriginSpinBox->setMinimumWidth( 100 );
   myZOriginSpinBox->setValue( 1.0 );
@@ -215,31 +222,33 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
   OriginGroupLayout->addWidget(   ZOriginLabel,   0, 4 );
   OriginGroupLayout->addWidget( myZOriginSpinBox, 0, 5 );
 
+  SCBoxLayout->addWidget( myOriginGroup );
+
   // Direction ( Plane Segmentation )
-  myDirectionGroup = new QGroupBox( tr( "DIRECTION_TITLE" ), mySegmentationCursorBox, "DirectionGroup" );
-  myDirectionGroup->setColumnLayout( 0, Qt::Vertical );
-  myDirectionGroup->layout()->setSpacing( 0 );
-  myDirectionGroup->layout()->setMargin( 0 );
+  myDirectionGroup = new QGroupBox( tr( "DIRECTION_TITLE" ), mySegmentationCursorBox );
+  //myDirectionGroup->setColumnLayout( 0, Qt::Vertical );
+  //myDirectionGroup->layout()->setSpacing( 0 );
+  //myDirectionGroup->layout()->setMargin( 0 );
 
-  QGridLayout* DirectionGroupLayout = new QGridLayout( myDirectionGroup->layout() );
+  QGridLayout* DirectionGroupLayout = new QGridLayout( myDirectionGroup );
   DirectionGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   DirectionGroupLayout->setSpacing(6);
   DirectionGroupLayout->setMargin(11);
 
   QLabel* DXDirectionLabel = new QLabel( tr( "DIRECTION_DX" ), myDirectionGroup );
-  myDXDirectionSpinBox = new QtxDblSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
+  myDXDirectionSpinBox = new QtxDoubleSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
   myDXDirectionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myDXDirectionSpinBox->setMinimumWidth( 100 );
   myDXDirectionSpinBox->setValue( 0.0 );
 
   QLabel* DYDirectionLabel = new QLabel( tr( "DIRECTION_DY" ), myDirectionGroup );
-  myDYDirectionSpinBox = new QtxDblSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
+  myDYDirectionSpinBox = new QtxDoubleSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
   myDYDirectionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myDYDirectionSpinBox->setMinimumWidth( 100 );
   myDYDirectionSpinBox->setValue( 0.0 );
 
   QLabel* DZDirectionLabel = new QLabel( tr( "DIRECTION_DZ" ), myDirectionGroup );
-  myDZDirectionSpinBox = new QtxDblSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
+  myDZDirectionSpinBox = new QtxDoubleSpinBox( -1.0, 1.0, 0.1, myDirectionGroup );
   myDZDirectionSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myDZDirectionSpinBox->setMinimumWidth( 100 );
   myDZDirectionSpinBox->setValue( 1.0 );
@@ -251,19 +260,21 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
   DirectionGroupLayout->addWidget(   DZDirectionLabel,   0, 4 );
   DirectionGroupLayout->addWidget( myDZDirectionSpinBox, 0, 5 );
 
+  SCBoxLayout->addWidget( myDirectionGroup );
+
   // Depth ( Plane Segmentation )
-  myDepthGroup = new QGroupBox( tr( "DEPTH_TITLE" ), mySegmentationCursorBox, "DepthGroup" );
-  myDepthGroup->setColumnLayout( 0, Qt::Vertical );
-  myDepthGroup->layout()->setSpacing( 0 );
-  myDepthGroup->layout()->setMargin( 0 );
+  myDepthGroup = new QGroupBox( tr( "DEPTH_TITLE" ), mySegmentationCursorBox );
+  //myDepthGroup->setColumnLayout( 0, Qt::Vertical );
+  //myDepthGroup->layout()->setSpacing( 0 );
+  //myDepthGroup->layout()->setMargin( 0 );
 
-  QGridLayout* DepthGroupLayout = new QGridLayout( myDepthGroup->layout() );
+  QGridLayout* DepthGroupLayout = new QGridLayout( myDepthGroup );
   DepthGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   DepthGroupLayout->setSpacing(6);
   DepthGroupLayout->setMargin(11);
 
   QLabel* DepthLabel = new QLabel( tr( "DEPTH" ), myDepthGroup );
-  myDepthSpinBox = new QtxDblSpinBox( 0.0, VTK_LARGE_FLOAT, 0.1, myDepthGroup );
+  myDepthSpinBox = new QtxDoubleSpinBox( 0.0, VTK_LARGE_FLOAT, 0.1, myDepthGroup );
   myDepthSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myDepthSpinBox->setMinimumWidth( 100 );
   myDepthSpinBox->setValue( 1.0 );
@@ -271,25 +282,27 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
   DepthGroupLayout->addWidget(   DepthLabel,   0, 0 );
   DepthGroupLayout->addWidget( myDepthSpinBox, 0, 1 );
 
+  SCBoxLayout->addWidget( myDepthGroup );
+
   // Radius ( Sphere Segmentation )
-  myRadiusGroup = new QGroupBox( tr( "RADIUS_TITLE" ), mySegmentationCursorBox, "RadiusGroup" );
-  myRadiusGroup->setColumnLayout( 0, Qt::Vertical );
-  myRadiusGroup->layout()->setSpacing( 0 );
-  myRadiusGroup->layout()->setMargin( 0 );
+  myRadiusGroup = new QGroupBox( tr( "RADIUS_TITLE" ), mySegmentationCursorBox );
+  //myRadiusGroup->setColumnLayout( 0, Qt::Vertical );
+  //myRadiusGroup->layout()->setSpacing( 0 );
+  //myRadiusGroup->layout()->setMargin( 0 );
 
-  QGridLayout* RadiusGroupLayout = new QGridLayout( myRadiusGroup->layout() );
+  QGridLayout* RadiusGroupLayout = new QGridLayout( myRadiusGroup );
   RadiusGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   RadiusGroupLayout->setSpacing(6);
   RadiusGroupLayout->setMargin(11);
 
   QLabel* RadiusLabel = new QLabel( tr( "RADIUS" ),myRadiusGroup  );
-  myRadiusSpinBox = new QtxDblSpinBox( 0.0, 1000.0, 1.0,myRadiusGroup  );
+  myRadiusSpinBox = new QtxDoubleSpinBox( 0.0, 1000.0, 1.0,myRadiusGroup  );
   myRadiusSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myRadiusSpinBox->setMinimumWidth( 100 );
   myRadiusSpinBox->setValue( 100.0 );
 
   QLabel* RatioLabel = new QLabel( tr( "RATIO" ), myRadiusGroup );
-  myRatioSpinBox = new QtxDblSpinBox( 0.1, 10.0, 0.1,myRadiusGroup  );
+  myRatioSpinBox = new QtxDoubleSpinBox( 0.1, 10.0, 0.1,myRadiusGroup  );
   myRatioSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myRatioSpinBox->setMinimumWidth( 100 );
   myRatioSpinBox->setValue( 2.0 );
@@ -299,22 +312,23 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
   RadiusGroupLayout->addWidget( RatioLabel,      0, 2 );
   RadiusGroupLayout->addWidget( myRatioSpinBox,  0, 3 );
 
+  SCBoxLayout->addWidget( myRadiusGroup );
 
   myTabBox->addTab( mySegmentationCursorBox, tr( "SEGMENTATION_CURSOR_TAB" ) );
 
-
   // Gauss points pane
-  myGaussPointsBox = new QVBox( this );
-  myGaussPointsBox->setMargin(11);
-  myGaussPointsBox->setSpacing(6);
+  myGaussPointsBox = new QWidget( this );
+  QVBoxLayout* GPBoxLayout = new QVBoxLayout( myGaussPointsBox );
+  GPBoxLayout->setMargin(11);
+  GPBoxLayout->setSpacing(6);
 
   // Inside Gauss points
   QGroupBox* anInsideGroup = new QGroupBox( tr( "INSIDE_GAUSS_POINTS" ), myGaussPointsBox );
-  anInsideGroup->setColumnLayout( 0, Qt::Vertical );
-  anInsideGroup->layout()->setSpacing( 0 );
-  anInsideGroup->layout()->setMargin( 0 );
+  //anInsideGroup->setColumnLayout( 0, Qt::Vertical );
+  //anInsideGroup->layout()->setSpacing( 0 );
+  //anInsideGroup->layout()->setMargin( 0 );
 
-  QGridLayout* anInsideGroupLayout = new QGridLayout( anInsideGroup->layout() );
+  QGridLayout* anInsideGroupLayout = new QGridLayout( anInsideGroup );
   anInsideGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   anInsideGroupLayout->setSpacing(6);
   anInsideGroupLayout->setMargin(11);
@@ -329,13 +343,15 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
   anInsideGroupLayout->addWidget( myInsidePrimitiveBox, 0, 0 );
   anInsideGroupLayout->addWidget( myInsideSizeBox, 1, 0 );
 
+  GPBoxLayout->addWidget( anInsideGroup );
+
   // Outside Gauss points
   QGroupBox* anOutsideGroup = new QGroupBox( tr( "OUTSIDE_GAUSS_POINTS" ), myGaussPointsBox );
-  anOutsideGroup->setColumnLayout( 0, Qt::Vertical );
-  anOutsideGroup->layout()->setSpacing( 0 );
-  anOutsideGroup->layout()->setMargin( 0 );
+  //anOutsideGroup->setColumnLayout( 0, Qt::Vertical );
+  //anOutsideGroup->layout()->setSpacing( 0 );
+  //anOutsideGroup->layout()->setMargin( 0 );
 
-  QGridLayout* anOutsideGroupLayout = new QGridLayout( anOutsideGroup->layout() );
+  QGridLayout* anOutsideGroupLayout = new QGridLayout( anOutsideGroup );
   anOutsideGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   anOutsideGroupLayout->setSpacing(6);
   anOutsideGroupLayout->setMargin(11);
@@ -350,14 +366,15 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
   anOutsideGroupLayout->addWidget( myOutsidePrimitiveBox, 0, 0 );
   anOutsideGroupLayout->addWidget( myOutsideSizeBox, 1, 0 );
 
+  GPBoxLayout->addWidget( anOutsideGroup );
 
   // Magnification
-  QGroupBox* MagnificationGroup = new QGroupBox ( tr( "MAGNIFICATION_TITLE" ), myGaussPointsBox, "MagnificationGroup" );
-  MagnificationGroup->setColumnLayout(0, Qt::Vertical );
-  MagnificationGroup->layout()->setSpacing( 0 );
-  MagnificationGroup->layout()->setMargin( 0 );
+  QGroupBox* MagnificationGroup = new QGroupBox ( tr( "MAGNIFICATION_TITLE" ), myGaussPointsBox );
+  //MagnificationGroup->setColumnLayout(0, Qt::Vertical );
+  //MagnificationGroup->layout()->setSpacing( 0 );
+  //MagnificationGroup->layout()->setMargin( 0 );
 
-  QGridLayout* MagnificationGroupLayout = new QGridLayout (MagnificationGroup->layout());
+  QGridLayout* MagnificationGroupLayout = new QGridLayout ( MagnificationGroup );
   MagnificationGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   MagnificationGroupLayout->setSpacing(6);
   MagnificationGroupLayout->setMargin(11);
@@ -371,7 +388,7 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
 
   // Increment
   myIncrementLabel = new QLabel( tr( "INCREMENT" ), MagnificationGroup );
-  myIncrementSpinBox = new QtxDblSpinBox( 0.01, 10, 0.1, MagnificationGroup );
+  myIncrementSpinBox = new QtxDoubleSpinBox( 0.01, 10, 0.1, MagnificationGroup );
   myIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
   MagnificationGroupLayout->addWidget( myIncrementLabel, 0, 2 );
@@ -379,30 +396,33 @@ VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const c
 
 
   myTabBox->addTab( myGaussPointsBox, tr( "GAUSS_POINTS_TAB" ) );
-  myTabBox->showPage( myGaussPointsBox );
+  //myTabBox->showPage( myGaussPointsBox );
+  myTabBox->setCurrentWidget( myGaussPointsBox );
+
+  GPBoxLayout->addWidget( MagnificationGroup );
 
 
   // Common buttons ===========================================================
-  QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
-  GroupButtons->setColumnLayout(0, Qt::Vertical );
-  GroupButtons->layout()->setSpacing( 0 );
-  GroupButtons->layout()->setMargin( 0 );
-  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+  QGroupBox* GroupButtons = new QGroupBox( this );
+  //GroupButtons->setColumnLayout(0, Qt::Vertical );
+  //GroupButtons->layout()->setSpacing( 0 );
+  //GroupButtons->layout()->setMargin( 0 );
+  QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
   GroupButtonsLayout->setAlignment( Qt::AlignTop );
   GroupButtonsLayout->setSpacing( 6 );
   GroupButtonsLayout->setMargin( 11 );
 
-  QPushButton* buttonApply = new QPushButton( tr( "&Apply" ), GroupButtons, "buttonApply" );
+  QPushButton* buttonApply = new QPushButton( tr( "&Apply" ), GroupButtons );
   buttonApply->setAutoDefault( TRUE );
   buttonApply->setDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonApply, 0, 0 );
   GroupButtonsLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
 
-  QPushButton* buttonClose = new QPushButton( tr( "&Close" ) , GroupButtons, "buttonClose" );
+  QPushButton* buttonClose = new QPushButton( tr( "&Close" ) , GroupButtons );
   buttonClose->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonClose, 0, 2 );
 
-  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons, "buttonHelp" );
+  QPushButton* buttonHelp = new QPushButton( tr( "&Help" ) , GroupButtons );
   buttonHelp->setAutoDefault( TRUE );
   GroupButtonsLayout->addWidget( buttonHelp, 0, 3 );
 
@@ -695,13 +715,13 @@ VVTK_SegmentationCursorDlg
     myOutsideAlphaTexture = theAlphaTexture;
   }
 
-  return VISU::GetTexture( theMainTexture.latin1(), 
-                          theAlphaTexture.latin1());
+  return VISU::GetTexture( (const char*)theMainTexture.toLatin1(), 
+                          (const char*)theAlphaTexture.toLatin1());
 }
 
 void VVTK_SegmentationCursorDlg::onClickApply()
 {
-  if( myTabBox->currentPage() == mySegmentationCursorBox )
+  if( myTabBox->currentWidget() == mySegmentationCursorBox )
     ApplySegmentationCursor();
   else
   {
@@ -709,7 +729,7 @@ void VVTK_SegmentationCursorDlg::onClickApply()
     aWarning.append( "presentation might be too important to ensure an acceptable frame rate.\n\n" );
     aWarning.append( "Can you please confirm that you want to continue anyway?" );
     bool toApply = CheckNumberOfFaces() ||
-      SUIT_MessageBox::warn2( this, tr( "Warning" ), aWarning,
+      SUIT_MessageBox::warning( this, tr( "Warning" ), aWarning,
                              tr( "&OK" ), tr( "&Cancel" ), 0, 1, 1 ) == 0;
 
     if( toApply )
@@ -824,8 +844,8 @@ void VVTK_SegmentationCursorDlg::ApplyOutsideGaussPoints()
 
 void VVTK_SegmentationCursorDlg::onClickClose()
 {
-  myPlaneAction->setOn( false );
-  mySphereAction->setOn( false );
+  myPlaneAction->setChecked( false );
+  mySphereAction->setChecked( false );
 
   emit scgClose();
 
@@ -845,17 +865,17 @@ void VVTK_SegmentationCursorDlg::onClickHelp()
 #else
                platform = "application";
 #endif
-    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
-                          QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
-                          QObject::tr("BUT_OK"));
+    SUIT_MessageBox::warning( 0, QObject::tr("WRN_WARNING"),
+                             QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+                             QObject::tr("BUT_OK"));
   }
 }
 
 void VVTK_SegmentationCursorDlg::done( int r )
 {
-  myPlaneAction->setOn( false );
-  mySphereAction->setOn( false );
+  myPlaneAction->setChecked( false );
+  mySphereAction->setChecked( false );
 
   emit scgClose();
 
@@ -864,7 +884,7 @@ void VVTK_SegmentationCursorDlg::done( int r )
 
 void VVTK_SegmentationCursorDlg::onParentShow()
 {
-  if(myPlaneAction->isOn() || mySphereAction->isOn())
+  if(myPlaneAction->isChecked() || mySphereAction->isChecked())
     show();
   else
     hide();
@@ -906,7 +926,7 @@ void VVTK_SegmentationCursorDlg::keyPressEvent( QKeyEvent* e )
   if ( e->isAccepted() )
     return;
 
-  if ( e->key() == Key_F1 )
+  if ( e->key() == Qt::Key_F1 )
     {
       e->accept();
       onClickHelp();
index 50d17609fdf306c1bf1a9d93e97ecf4514c2a850..4049ce5fc36b4b3d9636333e8cb955a0d9c0dd06 100644 (file)
@@ -41,10 +41,11 @@ class QPushButton;
 class QRadioButton;
 class QTabWidget;
 class QGroupBox;
-class QVBox;
+class QWidget;
+//class QVBox;
 
 class QtxAction;
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 class QtxIntSpinBox;
 
 class VISU_GaussPtsAct1;
@@ -143,60 +144,60 @@ signals:
 private:
   SVTK_RenderWindowInteractor* myInteractor;
 
-  QTabWidget*      myTabBox;
+  QTabWidget*       myTabBox;
 
   // Segmentation cursor
-  QVBox*           mySegmentationCursorBox;
+  QWidget*          mySegmentationCursorBox;
 
-  QGroupBox*       myOriginGroup;
-  QtxDblSpinBox*   myXOriginSpinBox;
-  QtxDblSpinBox*   myYOriginSpinBox;
-  QtxDblSpinBox*   myZOriginSpinBox;
+  QGroupBox*        myOriginGroup;
+  QtxDoubleSpinBox* myXOriginSpinBox;
+  QtxDoubleSpinBox* myYOriginSpinBox;
+  QtxDoubleSpinBox* myZOriginSpinBox;
 
-  QGroupBox*       myDirectionGroup;
-  QtxDblSpinBox*   myDXDirectionSpinBox;
-  QtxDblSpinBox*   myDYDirectionSpinBox;
-  QtxDblSpinBox*   myDZDirectionSpinBox;
+  QGroupBox*        myDirectionGroup;
+  QtxDoubleSpinBox* myDXDirectionSpinBox;
+  QtxDoubleSpinBox* myDYDirectionSpinBox;
+  QtxDoubleSpinBox* myDZDirectionSpinBox;
 
-  QGroupBox*       myDepthGroup;
-  QtxDblSpinBox*   myDepthSpinBox;
+  QGroupBox*        myDepthGroup;
+  QtxDoubleSpinBox* myDepthSpinBox;
 
-  QGroupBox*       myRadiusGroup;
-  QtxDblSpinBox*   myRadiusSpinBox;
-  QtxDblSpinBox*   myRatioSpinBox;
+  QGroupBox*        myRadiusGroup;
+  QtxDoubleSpinBox* myRadiusSpinBox;
+  QtxDoubleSpinBox* myRatioSpinBox;
 
-  bool             myIsPlaneSegmentation;
+  bool              myIsPlaneSegmentation;
 
-  float            myPriority;
+  float             myPriority;
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
 
-  VISU_WidgetCtrl* myWidgetCtrl;
-  QtxAction*       myPlaneAction;
-  QtxAction*       mySphereAction;
+  VISU_WidgetCtrl*  myWidgetCtrl;
+  QtxAction*        myPlaneAction;
+  QtxAction*        mySphereAction;
 
   // Gauss Points
-  QVBox*           myGaussPointsBox;
+  QWidget*          myGaussPointsBox;
 
   VVTK_PrimitiveBox* myInsidePrimitiveBox;
-  VVTK_SizeBox*    myInsideSizeBox;
+  VVTK_SizeBox*     myInsideSizeBox;
 
-  QString          myInsideMainTexture;
-  QString          myInsideAlphaTexture;
+  QString           myInsideMainTexture;
+  QString           myInsideAlphaTexture;
 
   vtkSmartPointer<VISU_InsideCursorSettings> myInsideCursorSettings;
 
   VVTK_PrimitiveBox* myOutsidePrimitiveBox;
-  VVTK_SizeBox*    myOutsideSizeBox;
+  VVTK_SizeBox*     myOutsideSizeBox;
 
-  QString          myOutsideMainTexture;
-  QString          myOutsideAlphaTexture;
+  QString           myOutsideMainTexture;
+  QString           myOutsideAlphaTexture;
 
   vtkSmartPointer<VISU_OutsideCursorSettings> myOutsideCursorSettings;
 
-  QLabel*          myMagnificationLabel;
-  QtxIntSpinBox*   myMagnificationSpinBox;
-  QLabel*          myIncrementLabel;
-  QtxDblSpinBox*   myIncrementSpinBox;
+  QLabel*           myMagnificationLabel;
+  QtxIntSpinBox*    myMagnificationSpinBox;
+  QLabel*           myIncrementLabel;
+  QtxDoubleSpinBox* myIncrementSpinBox;
 };
 
 #endif
index 18d1d020c7f701b25fd21a67eb356a8db1030352..4f41b9912fc4b8b288f7ad4240d16a8a2578df88 100644 (file)
 #include "SUIT_ResourceMgr.h"
 #include "SUIT_Session.h"
 
-#include "QtxDblSpinBox.h"
-#include "QtxIntSpinBox.h"
-
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qcolordialog.h>
+#include <QtxDoubleSpinBox.h>
+#include <QtxIntSpinBox.h>
+#include <QtxColorButton.h>
+
+#include <QLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QCheckBox>
+#include <QGroupBox>
+#include <QButtonGroup>
+#include <QRadioButton>
+#include <QPushButton>
+#include <QColorDialog>
 
 using namespace std;
 
 VVTK_SizeBox::VVTK_SizeBox( QWidget* parent ) :
-  QVBox( parent )
+  QWidget( parent )
 {
-  layout()->setSpacing( 0 );
-  layout()->setMargin( 0 );
+  QVBoxLayout* aMainLayout = new QVBoxLayout( this );
+  aMainLayout->setSpacing( 0 );
+  aMainLayout->setMargin( 0 );
 
   // Size
-  QGroupBox* SizeGroup = new QGroupBox ( tr( "SIZE_TITLE" ), this, "SizeGroup" );
-  SizeGroup->setColumnLayout(0, Qt::Vertical );
-  SizeGroup->layout()->setSpacing( 0 );
-  SizeGroup->layout()->setMargin( 0 );
+  QGroupBox* SizeGroup = new QGroupBox ( tr( "SIZE_TITLE" ), this );
+  //SizeGroup->setColumnLayout(0, Qt::Vertical );
+  //SizeGroup->layout()->setSpacing( 0 );
+  //SizeGroup->layout()->setMargin( 0 );
 
-  QGridLayout* SizeGroupLayout = new QGridLayout (SizeGroup->layout());
+  QGridLayout* SizeGroupLayout = new QGridLayout (SizeGroup);
   SizeGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignCenter);
   SizeGroupLayout->setSpacing(6);
   SizeGroupLayout->setMargin(11);
@@ -104,20 +106,21 @@ VVTK_SizeBox::VVTK_SizeBox( QWidget* parent ) :
 
   // Increment
   myIncrementLabel = new QLabel( tr( "INCREMENT" ), SizeGroup );
-  myIncrementSpinBox = new QtxDblSpinBox( 0.01, 10, 0.1, SizeGroup );
+  myIncrementSpinBox = new QtxDoubleSpinBox( 0.01, 10, 0.1, SizeGroup );
   myIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
 
   SizeGroupLayout->addWidget( myIncrementLabel, 2, 2 );
   SizeGroupLayout->addWidget( myIncrementSpinBox, 2, 3 );
 
+  aMainLayout->addWidget( SizeGroup );
 
   // Color
-  myColorGroup = new QGroupBox ( tr( "COLOR_TITLE" ), this, "ColorGroup" );
-  myColorGroup->setColumnLayout(0, Qt::Vertical );
-  myColorGroup->layout()->setSpacing( 0 );
-  myColorGroup->layout()->setMargin( 0 );
+  myColorGroup = new QGroupBox ( tr( "COLOR_TITLE" ), this );
+  //myColorGroup->setColumnLayout(0, Qt::Vertical );
+  //myColorGroup->layout()->setSpacing( 0 );
+  //myColorGroup->layout()->setMargin( 0 );
 
-  QGridLayout* ColorGroupLayout = new QGridLayout (myColorGroup->layout());
+  QGridLayout* ColorGroupLayout = new QGridLayout ( myColorGroup );
   ColorGroupLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
   ColorGroupLayout->setSpacing(6);
   ColorGroupLayout->setMargin(11);
@@ -125,14 +128,16 @@ VVTK_SizeBox::VVTK_SizeBox( QWidget* parent ) :
   myUniformCheckBox = new QCheckBox( tr( "UNIFORM_COLOR" ), myColorGroup );
 
   myColorLabel = new QLabel( tr( "COLOR" ), myColorGroup );
-  myColorButton = new QPushButton( myColorGroup );
+  myColorButton = new QtxColorButton( myColorGroup );
 
   ColorGroupLayout->addWidget( myUniformCheckBox, 0, 0 );
   ColorGroupLayout->addWidget( myColorLabel, 0, 1 );
   ColorGroupLayout->addWidget( myColorButton, 0, 2 );
 
+  aMainLayout->addWidget( myColorGroup );
+
   connect( myUniformCheckBox, SIGNAL( toggled( bool ) ), myColorButton, SLOT( setEnabled( bool ) ) );
-  connect( myColorButton, SIGNAL( clicked() ), this, SLOT( onColorButtonPressed() ) );
+  //connect( myColorButton, SIGNAL( clicked() ), this, SLOT( onColorButtonPressed() ) );
 
   setType( VVTK_SizeBox::Results );
 }
@@ -332,17 +337,30 @@ void VVTK_SizeBox::setUniform( bool theUniform )
 
 QColor VVTK_SizeBox::getColor() const
 {
-  return myColorButton->paletteBackgroundColor();
+  return myColorButton->color();//palette().color( myColorButton->backgroundRole() );
+  //return myColorButton->paletteBackgroundColor();
 }
 
 void VVTK_SizeBox::setColor( const QColor& theColor )
 {
-  myColorButton->setPaletteBackgroundColor( theColor );
+  if ( theColor.isValid() )
+  {
+    //QPalette aPalette( myColorButton->palette() );
+    //aPalette.setColor( myColorButton->backgroundRole(), theColor );
+    myColorButton->setColor( theColor );
+  }
+  //myColorButton->setPaletteBackgroundColor( theColor );
 }
 
-void VVTK_SizeBox::onColorButtonPressed()
+/*void VVTK_SizeBox::onColorButtonPressed()
 {
-  QColor aColor = QColorDialog::getColor( myColorButton->paletteBackgroundColor(), this );
+  QPalette aPalette( myColorButton->palette() );
+  QColor aColor = QColorDialog::
+    getColor( aPalette.color(myColorButton->backgroundRole() ), this );
+
   if( aColor.isValid() )
-    myColorButton->setPaletteBackgroundColor( aColor );
-}
+  {
+      aPalette.setColor( myColorButton->backgroundRole(), aColor );
+      myColorButton->setPalette( aPalette );
+  }
+}*/
index 06e3971cb033d1b29c56b2d07fd1aab9ba07be5d..365f61ac1f388fe3acb97b7a4f8fad104167d0bd 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "VVTK.h"
 
-#include <qvbox.h>
+#include <QWidget>
 
 class QLabel;
 class QLineEdit;
@@ -38,10 +38,11 @@ class QPushButton;
 class QCheckBox;
 class QGroupBox;
 
-class QtxDblSpinBox;
+class QtxDoubleSpinBox;
 class QtxIntSpinBox;
+class QtxColorButton;
 
-class VVTK_EXPORT VVTK_SizeBox : public QVBox
+class VVTK_EXPORT VVTK_SizeBox : public QWidget
 {
   Q_OBJECT
 
@@ -86,7 +87,7 @@ protected slots:
   void                     onToggleInside();
   void                     onToggleOutside();
 
-  void                     onColorButtonPressed();
+  //void                     onColorButtonPressed();
 
 private:
   int                      myType;
@@ -107,13 +108,13 @@ private:
   QtxIntSpinBox*           myMagnificationSpinBox;
 
   QLabel*                  myIncrementLabel;
-  QtxDblSpinBox*           myIncrementSpinBox;
+  QtxDoubleSpinBox*        myIncrementSpinBox;
 
   QCheckBox*               myUniformCheckBox;  
 
   QGroupBox*               myColorGroup;
   QLabel*                  myColorLabel;
-  QPushButton*             myColorButton;
+  QtxColorButton*          myColorButton;
 };
 
 
index a1eb30f7f804f325c8fae25618254fa65dab30b5..9777de973a66b5a5fd8d05e7a5fe6b261cf6530c 100644 (file)
@@ -20,6 +20,8 @@
 #include "VVTK_ViewManager.h"
 #include "VVTK_ViewModel.h"
 
+#include <SUIT_ViewWindow.h>
+
 int VVTK_ViewManager::_VVTKViewMgr_Id = 0;
 
 //***************************************************************
@@ -40,6 +42,6 @@ VVTK_ViewManager::~VVTK_ViewManager()
 //***************************************************************
 void VVTK_ViewManager::setViewName(SUIT_ViewWindow* theView)
 {
-  int aPos = myViews.find(theView);
-  theView->setCaption( tr( "VTK_VIEW_TITLE" ).arg( myId ).arg( aPos + 1 ) );
+  int aPos = myViews.indexOf(theView);
+  theView->setWindowTitle( tr( "VTK_VIEW_TITLE" ).arg( myId ).arg( aPos + 1 ) );
 }
index b1b3ec4e82cd8d9160f535d620cba7d624660d5c..df70b0834be3eea488d739be4f77919f658e99ad 100644 (file)
@@ -27,6 +27,8 @@
 #include "SVTK_View.h"
 #include "SVTK_Prs.h"
 
+#include <SUIT_ViewManager.h>
+
 #include <vtkActorCollection.h>
 #include <vtkRenderer.h>
 
@@ -70,7 +72,7 @@ VVTK_Viewer
       while(VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(aCollection->GetNextActor())){
        if(!anActor->GetFactory()->GetActiveState())
          continue;
-       QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
+       QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
        for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){
          if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i))){
            if(SVTK_View* aView = aViewWindow->getView()){
@@ -108,7 +110,7 @@ bool
 VVTK_Viewer
 ::isVisible( const Handle(SALOME_InteractiveObject)& theIO )
 {
-  QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
+  QVector<SUIT_ViewWindow*> aViews = myViewManager->getViews();
   for(int i = 0, iEnd = aViews.size(); i < iEnd; i++)
     if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i))){
       bool aResult;
index a7512e886c9ca1872e79e69f084524fc9ef05364..a1fe968d9b39e1f157fb46c418a8c996531c1d38 100755 (executable)
 #include "SVTK_RenderWindowInteractor.h"
 #include "SVTK_GenericRenderWindowInteractor.h"
 
-#include <qsplitter.h>
-#include <qlayout.h>
-#include <qimage.h>
+#include <QLayout>
+#include <QList>
+#include <QSplitter>
+#include <QToolBar>
 
 //----------------------------------------------------------------------------
 VVTK_ViewWindow
@@ -61,9 +62,10 @@ void VVTK_ViewWindow::Initialize(SVTK_ViewModelBase* theModel)
     setCentralWidget(aWidget);
     
     QBoxLayout* aLayout = new QVBoxLayout(aWidget);
-    aLayout->setAutoAdd(true);
+    //aLayout->setAutoAdd(true);
     QSplitter* aSplitter = new QSplitter(Qt::Vertical,aWidget);
     //aSplitter->setChildrenCollapsible(true);
+    aLayout->addWidget( aSplitter );
 
     VISU_WidgetCtrl* aWidgetCtrl = NULL;
     VISU_InsideCursorSettings* anInsideCursorSettings = NULL;
@@ -149,7 +151,7 @@ void VVTK_ViewWindow::Initialize(SVTK_ViewModelBase* theModel)
     aSelector->Delete();
 
     int h = height() / 2;
-    QValueList<int> aSizes;
+    QList<int> aSizes;
     aSizes.append( h );
     aSizes.append( h );
     aSplitter->setSizes( aSizes );
@@ -281,7 +283,7 @@ VVTK_ViewWindow
 {
   if( myMainWindow1->GetInteractor()->hasFocus() )
     {
-      if ( myMainWindow1->getToolBar()->hasMouse() || myDumpImage.isNull() )
+      if ( myMainWindow1->getToolBar()->testAttribute(Qt::WA_UnderMouse) || myDumpImage.isNull() )
        return myMainWindow1->dumpView();
       else
        return myDumpImage;
@@ -289,7 +291,7 @@ VVTK_ViewWindow
   
   if( myMainWindow2->GetInteractor()->hasFocus() )
     {
-      if ( myMainWindow1->getToolBar()->hasMouse() || myDumpImage.isNull() )
+      if ( myMainWindow1->getToolBar()->testAttribute(Qt::WA_UnderMouse) || myDumpImage.isNull() )
        return myMainWindow2->dumpView();
       else
        return myDumpImage;
index 7e2dbf05960d6ad0964f6bb5d1ccbbaa9224c22d..a8c011fbe0963546122524f4a15e5376f8c8dfc2 100755 (executable)
@@ -27,7 +27,7 @@
 #include "VVTK.h"
 #include "SVTK_ViewWindow.h"
 
-#include <qimage.h>
+#include <QImage>
 
 #include <string>