]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
To introduce desired update rate management for VTK viewes
authorapo <apo@opencascade.com>
Fri, 21 Apr 2006 13:37:21 +0000 (13:37 +0000)
committerapo <apo@opencascade.com>
Fri, 21 Apr 2006 13:37:21 +0000 (13:37 +0000)
20 files changed:
src/SVTK/Makefile.in
src/SVTK/SVTK.h
src/SVTK/SVTK_CubeAxesDlg.cxx
src/SVTK/SVTK_CubeAxesDlg.h
src/SVTK/SVTK_DialogBase.cxx [new file with mode: 0644]
src/SVTK/SVTK_DialogBase.h [new file with mode: 0644]
src/SVTK/SVTK_InteractorStyle.cxx
src/SVTK/SVTK_MainWindow.cxx
src/SVTK/SVTK_MainWindow.h
src/SVTK/SVTK_NonIsometricDlg.cxx
src/SVTK/SVTK_NonIsometricDlg.h
src/SVTK/SVTK_UpdateRateDlg.cxx [new file with mode: 0644]
src/SVTK/SVTK_UpdateRateDlg.h [new file with mode: 0644]
src/SVTK/resources/SVTK_images.po [new file with mode: 0644]
src/SVTK/resources/SVTK_msg_en.po
src/VTKViewer/Makefile.in
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/resources/VTKViewerM_images.po [deleted file]
src/VTKViewer/resources/VTKViewerM_msg_en.po [deleted file]
src/VTKViewer/resources/view_update_rate.png [new file with mode: 0755]

index 58c7e6fdb0843cda861f4a555fa8e2b21a4766c8..d6eeea6bd08659c4aeb240559062ac998617f677 100755 (executable)
@@ -19,6 +19,7 @@ EXPORT_HEADERS= \
        SALOME_Actor.h \
        SVTK_RectPicker.h \
        SVTK_DeviceActor.h \
+       SVTK_DialogBase.h \
        SVTK_FontWidget.h \
        SVTK_CubeAxesActor2D.h \
        SVTK_Functor.h \
@@ -38,7 +39,9 @@ EXPORT_HEADERS= \
        SVTK_Event.h \
        SVTK_ViewModelBase.h
 
-PO_FILES = SVTK_msg_en.po
+PO_FILES = \
+       SVTK_msg_en.po \
+       SVTK_images.po
 
 # Libraries targets
 LIB = libSVTK.la
@@ -51,7 +54,9 @@ LIB_SRC= \
        SVTK_DeviceActor.cxx \
        SVTK_CubeAxesActor2D.cxx \
        SVTK_NonIsometricDlg.cxx \
+       SVTK_UpdateRateDlg.cxx \
        SVTK_CubeAxesDlg.cxx \
+       SVTK_DialogBase.cxx \
        SVTK_FontWidget.cxx \
        SVTK_Trihedron.cxx \
        SVTK_MainWindow.cxx \
@@ -70,8 +75,10 @@ LIB_MOC = \
        SVTK_GenericRenderWindowInteractor.h \
        SVTK_RenderWindowInteractor.h \
        SVTK_NonIsometricDlg.h \
+       SVTK_UpdateRateDlg.h \
        SVTK_CubeAxesDlg.h \
        SVTK_FontWidget.h \
+       SVTK_DialogBase.h \
        SVTK_ViewModelBase.h \
        SVTK_ViewManager.h \
        SVTK_ViewWindow.h \
@@ -85,11 +92,13 @@ CPPFLAGS+= \
        $(QT_INCLUDES) \
        $(OCC_INCLUDES) \
        $(VTK_INCLUDES) \
+       $(QWT_INCLUDES) \
        $(BOOST_CPPFLAGS)
 
 LDFLAGS+= \
        $(QT_MT_LIBS) \
        $(OCC_LIBS) \
+       $(QWT_LIBS) \
        $(VTK_LIBS)
 
 LIBS+= -lqtx -lsuit -lstd -lCAM -lSalomeObject -lSalomePrs -lVTKViewer
index d4d8cf530f9969b489dc80e3f8d9b6034a6a0cbb..69bf29c1cba46885b1197b978b8d8a3b13d39582 100755 (executable)
 //
 // See http://www.salome-platform.org/
 //
-#ifdef WNT\r
-#ifdef SVTK_EXPORTS\r
-#define SVTK_EXPORT __declspec(dllexport)\r
-#else\r
-#define SVTK_EXPORT __declspec(dllimport)\r
-#endif\r
-#else\r
-#define SVTK_EXPORT\r
-#endif\r
-\r
-#if defined WNT\r
-#pragma warning ( disable: 4251 )\r
-#pragma warning ( disable: 4786 )\r
-#endif\r
+#ifndef SVTK_H
+#define SVTK_H
+
+#include "VTKViewer.h"
+
+#ifdef WNT
+#  ifdef SVTK_EXPORTS
+#    define SVTK_EXPORT __declspec(dllexport)
+#  else
+#   define SVTK_EXPORT __declspec(dllimport)
+#  endif
+#else
+#  define SVTK_EXPORT
+#endif
+
+#if defined WNT
+#pragma warning ( disable: 4251 )
+#pragma warning ( disable: 4786 )
+#endif
+
+#endif
index b26734e5d1a992d043315f3fb669752aff586077..3cec4197a401bc08e4f81b90afb7375e613141d1 100644 (file)
@@ -387,21 +387,22 @@ bool SVTK_AxisWidget::Apply(vtkAxisActor2D* theActor)
 // name    : SVTK_CubeAxesDlg::SVTK_CubeAxesDlg
 // Purpose : Constructor
 //=======================================================================
-SVTK_CubeAxesDlg::SVTK_CubeAxesDlg(SVTK_MainWindow* theParent,
-                                  const char* theName,
-                                  QtxAction* theAction):
-  QDialog(theParent, 
-         theName, 
-         false,
-         WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
-  myMainWindow(theParent),
-  myAction(theAction)
+SVTK_CubeAxesDlg::SVTK_CubeAxesDlg(QtxAction* theAction,
+                                  SVTK_MainWindow* theParent,
+                                  const char* theName):
+  SVTK_DialogBase(theAction,
+                 theParent, 
+                 theName),
+  myMainWindow(theParent)
 {
   setCaption(tr("CAPTION"));
 
   QVBoxLayout* aLay = new QVBoxLayout(this, 5, 5);
   aLay->addWidget(createMainFrame(this));
   aLay->addWidget(createButtonFrame(this));
+
+  connect(theParent, SIGNAL(Show( QShowEvent * )), this, SLOT(onParentShow()));
+  connect(theParent, SIGNAL(Hide( QHideEvent * )), this, SLOT(onParentHide()));
 }
 
 //=======================================================================
@@ -551,12 +552,4 @@ void SVTK_CubeAxesDlg::onOk()
 void SVTK_CubeAxesDlg::onClose()
 {
   reject();
-
-  myAction->setOn( false );
-}
-
-void SVTK_CubeAxesDlg::done( int r )
-{
-  myAction->setOn( false );
-  QDialog::done( r );
 }
index 642306084f6c0e935ffa8ebbe7d57a7b05d0da43..b8047e2014b79a8f492a6ba49aa42307467b74c3 100644 (file)
@@ -27,7 +27,8 @@
 #ifndef SVTK_CubeAxesDlg_H
 #define SVTK_CubeAxesDlg_H
 
-#include <qdialog.h>
+#include "SVTK_DialogBase.h"
+
 #include <qframe.h>
 
 class QWidget;
@@ -52,14 +53,14 @@ class SVTK_MainWindow;
  * Class       : SVTK_CubeAxesDlg
  * Description : Dialog for specifynig cube axes properties
  */
-class SVTK_CubeAxesDlg : public QDialog
+class SVTK_CubeAxesDlg : public SVTK_DialogBase
 {
   Q_OBJECT
 
 public:
-                  SVTK_CubeAxesDlg(SVTK_MainWindow* theParent,
-                                  const char* theName,
-                                  QtxAction* theAction);
+                  SVTK_CubeAxesDlg(QtxAction* theAction,
+                                  SVTK_MainWindow* theParent,
+                                  const char* theName);
   virtual         ~SVTK_CubeAxesDlg();
 
   void            Update();
@@ -69,8 +70,6 @@ private slots:
   bool            onApply();
   void            onClose();
 
-  virtual void    done( int );
-
 private:
   QWidget*        createButtonFrame( QWidget* );
   QWidget*        createMainFrame  ( QWidget* );
@@ -79,7 +78,6 @@ private:
 private:
   SVTK_MainWindow *myMainWindow;
   SVTK_CubeAxesActor2D* myActor;
-  QtxAction* myAction;
 
   QTabWidget*     myTabWg;
   QCheckBox*      myIsVisible;
diff --git a/src/SVTK/SVTK_DialogBase.cxx b/src/SVTK/SVTK_DialogBase.cxx
new file mode 100644 (file)
index 0000000..ff35c36
--- /dev/null
@@ -0,0 +1,84 @@
+//  SALOME VTKViewer : build VTK viewer into Salome desktop
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : 
+//  Author : 
+//  Module : SALOME
+//  $Header$
+
+#include "SVTK_DialogBase.h"
+
+#include "QtxAction.h"
+
+/*!
+  Constructor
+*/
+SVTK_DialogBase
+::SVTK_DialogBase(QtxAction* theAction,
+                 QWidget* theParent,
+                 const char* theName, 
+                 bool theModal, 
+                 WFlags theWFalgs):
+  QDialog(theParent, 
+         theName, 
+         theModal, 
+         theWFalgs | WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
+  myAction(theAction)
+{
+  connect(theParent, SIGNAL(Show( QShowEvent * )), this, SLOT(onParentShow()));
+  connect(theParent, SIGNAL(Hide( QHideEvent * )), this, SLOT(onParentHide()));
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+SVTK_DialogBase
+::~SVTK_DialogBase()
+{
+  // no need to delete child widgets, Qt does it all for us
+}
+
+void 
+SVTK_DialogBase
+::onParentShow()
+{
+  if(myAction->isOn())
+    show();
+  else
+    hide();
+}
+
+void 
+SVTK_DialogBase
+::onParentHide()
+{
+  hide();
+}
+
+void 
+SVTK_DialogBase
+::done( int r )
+{
+  myAction->setOn( false );
+  QDialog::done( r );
+}
diff --git a/src/SVTK/SVTK_DialogBase.h b/src/SVTK/SVTK_DialogBase.h
new file mode 100644 (file)
index 0000000..eb2262f
--- /dev/null
@@ -0,0 +1,60 @@
+//  SALOME VTKViewer : build VTK viewer into Salome desktop
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : 
+//  Author : 
+//  Module : SALOME
+//  $Header$
+
+#ifndef SVTK_DIALOGBASE_H
+#define SVTK_DIALOGBASE_H
+
+#include "SVTK.h"
+
+#include <qdialog.h>
+
+class QtxAction;
+
+class SVTK_EXPORT SVTK_DialogBase : public QDialog
+{
+  Q_OBJECT;
+
+public:
+  SVTK_DialogBase(QtxAction* theAction,
+                 QWidget* theParent,
+                 const char* theName = "", 
+                 bool theModal = FALSE, 
+                 WFlags theWFalgs = 0);
+
+  ~SVTK_DialogBase();
+
+protected slots:
+  void onParentShow();
+  void onParentHide();
+  virtual void done( int );
+
+protected:
+  QtxAction* myAction;
+};
+
+#endif // SVTK_DIALOGBASE_H
index f442fd9b12b8697b639d5d9761aeda1267a75784..b3d49249a852ae141f23fbf6b958066a3f98c886 100644 (file)
@@ -838,9 +838,13 @@ void
 SVTK_InteractorStyle
 ::onStartOperation()
 {
-  if (!GetRenderWidget()) return;
-  // VSV: LOD actor activisation
-  //  this->Interactor->GetRenderWindow()->SetDesiredUpdateRate(this->Interactor->GetDesiredUpdateRate());
+  if (!GetRenderWidget()) 
+    return;
+
+  vtkRenderWindowInteractor *aRWI = this->Interactor;
+  vtkRenderWindow *aRenWin = aRWI->GetRenderWindow();
+  aRenWin->SetDesiredUpdateRate(aRWI->GetDesiredUpdateRate());
+
   switch (State) {
     case VTK_INTERACTOR_STYLE_CAMERA_SELECT:
     case VTK_INTERACTOR_STYLE_CAMERA_FIT:
@@ -870,8 +874,9 @@ SVTK_InteractorStyle
   if (!GetRenderWidget()) 
     return;
 
-  // VSV: LOD actor activisation
-  //  rwi->GetRenderWindow()->SetDesiredUpdateRate(rwi->GetStillUpdateRate());
+  vtkRenderWindowInteractor *aRWI = this->Interactor;
+  vtkRenderWindow *aRenWin = aRWI->GetRenderWindow();
+  aRenWin->SetDesiredUpdateRate(aRWI->GetStillUpdateRate());
 
   SVTK_SelectionEvent* aSelectionEvent = GetSelectionEventFlipY();
 
index 77bc71317c0076b3009076867f850cf399e6e039..afeb1176e2dc137b5b5f698c13309ee80ecb09b1 100644 (file)
@@ -40,6 +40,7 @@
 #include "SUIT_Tools.h"
 #include "SUIT_ResourceMgr.h"
 #include "SVTK_NonIsometricDlg.h"
+#include "SVTK_UpdateRateDlg.h"
 #include "SVTK_CubeAxesDlg.h"
 
 #include "SVTK_MainWindow.h"
@@ -82,6 +83,10 @@ SVTK_MainWindow
   myInteractor->setFocusPolicy(StrongFocus);
   myInteractor->setFocus();
   setFocusProxy(myInteractor);
+
+  myUpdateRateDlg = new SVTK_UpdateRateDlg(myActionsMap[UpdateRate],this,"SVTK_UpdateRateDlg");
+  myNonIsometricDlg = new SVTK_NonIsometricDlg(myActionsMap[NonIsometric],this,"SVTK_NonIsometricDlg");
+  myCubeAxesDlg = new SVTK_CubeAxesDlg(myActionsMap[GraduatedAxes],this,"SVTK_CubeAxesDlg");
 }
 
 
@@ -471,8 +476,6 @@ SVTK_MainWindow
   connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onNonIsometric(bool)));
   myActionsMap[ NonIsometric ] = anAction;
 
-  myNonIsometricDlg = new SVTK_NonIsometricDlg(this,"SVTK_NonIsometricDlg",anAction);
-
   // onGraduatedAxes: Manage graduated axes params
   anAction = new QtxAction(tr("MNU_SVTK_GRADUATED_AXES"), 
                           theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_GRADUATED_AXES" ) ),
@@ -482,7 +485,14 @@ SVTK_MainWindow
   connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onGraduatedAxes(bool)));
   myActionsMap[ GraduatedAxes ] = anAction;
 
-  myCubeAxesDlg = new SVTK_CubeAxesDlg(this,"SVTK_CubeAxesDlg",anAction);
+  // onGraduatedAxes: Manage graduated axes params
+  anAction = new QtxAction(tr("MNU_SVTK_UPDATE_RATE"), 
+                          theResourceMgr->loadPixmap( "VTKViewer", tr( "ICON_UPDATE_RATE" ) ),
+                          tr( "MNU_SVTK_UPDATE_RATE" ), 0, this);
+  anAction->setStatusTip(tr("DSC_SVTK_UPDATE_RATE"));
+  anAction->setToggleAction(true);
+  connect(anAction, SIGNAL(toggled(bool)), this, SLOT(onUpdateRate(bool)));
+  myActionsMap[ UpdateRate ] = anAction;
 }
 
 #if defined(WIN32) && !defined(_DEBUG)
@@ -518,10 +528,27 @@ SVTK_MainWindow
 
   myActionsMap[ResetId]->addTo(myToolBar);
 
+  myActionsMap[UpdateRate]->addTo(myToolBar);
   myActionsMap[NonIsometric]->addTo(myToolBar);
   myActionsMap[GraduatedAxes]->addTo(myToolBar);
 }
 
+//----------------------------------------------------------------------------
+void
+SVTK_MainWindow
+::showEvent( QShowEvent * theEvent ) 
+{
+  emit Show( theEvent );
+}
+
+void
+SVTK_MainWindow
+::hideEvent( QHideEvent * theEvent ) 
+{
+  emit Hide( theEvent );
+}
+
+
 //----------------------------------------------------------------------------
 void
 SVTK_MainWindow
@@ -653,6 +680,17 @@ SVTK_MainWindow
 }
 
 //----------------------------------------------------------------------------
+void
+SVTK_MainWindow
+::onUpdateRate(bool theIsActivate)
+{
+  if(theIsActivate){
+    myUpdateRateDlg->Update();
+    myUpdateRateDlg->show();
+  }else
+    myUpdateRateDlg->hide();
+}
+
 void
 SVTK_MainWindow
 ::onNonIsometric(bool theIsActivate)
index 45f525f288a80383d17d685f385a7f606576b555..0943f1e639ec837b8e75a4797936b3e469fd2cbf 100644 (file)
@@ -25,6 +25,7 @@ class SUIT_ViewWindow;
 
 class SVTK_RenderWindowInteractor;
 class SVTK_NonIsometricDlg;
+class SVTK_UpdateRateDlg;
 class SVTK_CubeAxesActor2D;
 class SVTK_CubeAxesDlg;
 
@@ -175,7 +176,14 @@ public:
   //----------------------------------------------------------------------------
   QToolBar* getToolBar();
 
+ signals:
+  void Show( QShowEvent * );
+  void Hide( QHideEvent * );
+  
  public slots:
+  virtual void showEvent( QShowEvent * );
+  virtual void hideEvent( QHideEvent * );
+
   void activateZoom();
   void activateWindowFit();
   void activateRotation();
@@ -195,6 +203,7 @@ public:
   void onViewTrihedron(); 
   void onViewCubeAxes();
 
+  void onUpdateRate(bool theIsActivate);
   void onNonIsometric(bool theIsActivate);
   void onGraduatedAxes(bool theIsActivate);
 
@@ -216,12 +225,13 @@ public:
 
   enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, RotationId,
          FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, 
-        ViewTrihedronId, NonIsometric, GraduatedAxes};
+        ViewTrihedronId, NonIsometric, GraduatedAxes, UpdateRate};
   typedef QMap<int, QtxAction*> TActionsMap;
 
   SUIT_ViewWindow* myViewWindow;
 
   SVTK_NonIsometricDlg* myNonIsometricDlg;
+  SVTK_UpdateRateDlg* myUpdateRateDlg;
   SVTK_CubeAxesDlg* myCubeAxesDlg;
 
   vtkSmartPointer<vtkObject> myEventDispatcher;
index 21a149d552c39b0eb477e52a0540dc8d488cc618..a2e5ed466daef92566873b3029b9fefd2a7fd16d 100644 (file)
@@ -44,15 +44,13 @@ using namespace std;
   Constructor
 */
 SVTK_NonIsometricDlg
-::SVTK_NonIsometricDlg(SVTK_MainWindow* theParent,
-                      const char* theName,
-                      QtxAction* theAction):
-  QDialog(theParent, 
-         theName, 
-         false, 
-         WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
-  m_MainWindow(theParent),
-  m_Action(theAction)
+::SVTK_NonIsometricDlg(QtxAction* theAction,
+                      SVTK_MainWindow* theParent,
+                      const char* theName):
+  SVTK_DialogBase(theAction,
+                 theParent, 
+                 theName),
+  m_MainWindow(theParent)
 {
   setCaption(tr("DLG_TITLE"));
   setSizeGripEnabled(TRUE);
@@ -191,14 +189,4 @@ SVTK_NonIsometricDlg
 ::onClickClose()
 {
   reject();
-
-  m_Action->setOn( false );
-}
-
-void 
-SVTK_NonIsometricDlg
-::done( int r )
-{
-  m_Action->setOn( false );
-  QDialog::done( r );
 }
index 6a11a14f649c151eed39918854108200ad0129a3..7043f922e2714f5625be5ab8585e7bfa74662f19 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef SVTK_NONISOMETRICDLG_H
 #define SVTK_NONISOMETRICDLG_H
 
-#include <qdialog.h>
+#include "SVTK_DialogBase.h"
 
 class SVTK_MainWindow;
 
@@ -39,14 +39,14 @@ class QtxAction;
 class QPushButton;
 
 
-class SVTK_NonIsometricDlg : public QDialog
+class SVTK_NonIsometricDlg : public SVTK_DialogBase
 {
   Q_OBJECT;
 
 public:
-  SVTK_NonIsometricDlg(SVTK_MainWindow* theParent,
-                      const char* theName,
-                      QtxAction* theAction);
+  SVTK_NonIsometricDlg(QtxAction* theAction,
+                      SVTK_MainWindow* theParent,
+                      const char* theName);
 
   ~SVTK_NonIsometricDlg();
 
@@ -54,7 +54,6 @@ public:
 
 protected:
   SVTK_MainWindow *m_MainWindow;
-  QtxAction* m_Action;
 
   QtxDblSpinBox* m_sbXcoeff;
   QtxDblSpinBox* m_sbYcoeff;
@@ -66,8 +65,6 @@ protected slots:
   void onClickReset();
   void onClickOk();
   void onClickClose();
-
-  virtual void done( int );
 };
 
 #endif // SVTK_NONISOMETRICDLG_H
diff --git a/src/SVTK/SVTK_UpdateRateDlg.cxx b/src/SVTK/SVTK_UpdateRateDlg.cxx
new file mode 100644 (file)
index 0000000..7363e1f
--- /dev/null
@@ -0,0 +1,365 @@
+//  SALOME VTKViewer : build VTK viewer into Salome desktop
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : 
+//  Author : 
+//  Module : SALOME
+//  $Header$
+
+#include "SVTK_UpdateRateDlg.h"
+
+#include "SVTK_MainWindow.h"
+#include "SVTK_RenderWindowInteractor.h"
+#include "VTKViewer_Algorithm.h"
+#include "SALOME_Actor.h"
+
+#include "QtxDblSpinBox.h"
+#include "QtxAction.h"
+
+#include <sstream>
+
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+
+#include <vtkGenericRenderWindowInteractor.h>
+#include <vtkCallbackCommand.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderer.h>
+#include <vtkMapper.h>
+#include <vtkDataSet.h>
+
+static vtkFloatingPointType OFF_UPDATE_RATE = 0.00001;
+static vtkFloatingPointType FLOAT_TOLERANCE = 1.0 / VTK_LARGE_FLOAT;
+
+using namespace std;
+
+namespace
+{
+  //----------------------------------------------------------------------------
+  inline
+  QString 
+  GetUpdateRate(SVTK_RenderWindowInteractor* theRWInteractor)
+  {
+    if(vtkRenderer *aRenderer = theRWInteractor->getRenderer()){
+      vtkFloatingPointType aLastRenderTimeInSeconds = aRenderer->GetLastRenderTimeInSeconds();
+      if(aLastRenderTimeInSeconds > FLOAT_TOLERANCE){
+       std::ostringstream aStr;
+       vtkFloatingPointType aFPS = 1.0 / aLastRenderTimeInSeconds;
+       aStr<<aFPS;
+       return QString(aStr.str().c_str());
+      }
+    }
+    return "Inf";
+  }
+
+
+  //----------------------------------------------------------------------------
+  struct TRenderTimeMultiplier
+  {
+    vtkFloatingPointType myVTKMultiplier;
+    vtkFloatingPointType mySALOMEMultiplier;
+
+    TRenderTimeMultiplier():
+      myVTKMultiplier(0.0),
+      mySALOMEMultiplier(0.0)
+    {}
+
+    void
+    operator()(vtkActor* theActor)
+    {
+      if(theActor->GetVisibility()){
+       myVTKMultiplier += theActor->GetAllocatedRenderTime();
+       if(dynamic_cast<SALOME_Actor*>(theActor))
+         mySALOMEMultiplier += theActor->GetAllocatedRenderTime();
+      }
+    }
+  };
+
+
+  //----------------------------------------------------------------------------
+  inline
+  vtkFloatingPointType 
+  AdjustUpdateRate(SVTK_RenderWindowInteractor* theRWInteractor,
+                  vtkFloatingPointType theUpdateRate)
+  {
+    if(vtkRenderer *aRenderer = theRWInteractor->getRenderer()){
+      if(vtkActorCollection *anActorCollection = aRenderer->GetActors()){
+       TRenderTimeMultiplier aMultiplier;
+       using namespace VTK;
+       aMultiplier = ForEach<vtkActor>(anActorCollection,
+                                       aMultiplier);
+       if(aMultiplier.mySALOMEMultiplier > FLOAT_TOLERANCE)
+         theUpdateRate *= aMultiplier.mySALOMEMultiplier / aMultiplier.myVTKMultiplier;
+      }
+    }
+    return theUpdateRate;
+  }
+
+
+  //----------------------------------------------------------------------------
+  struct TCellsCounter
+  {
+    vtkIdType myCounter;
+    TCellsCounter():
+      myCounter(0)
+    {}
+
+    void
+    operator()(SALOME_Actor* theActor)
+    {
+      if(theActor->GetVisibility()){
+       if(vtkMapper *aMapper = theActor->GetMapper()){
+         if(vtkDataSet *aDataSet = aMapper->GetInput()){
+           myCounter += aDataSet->GetNumberOfCells();
+         }
+       }
+      }
+    }
+  };
+
+
+  //----------------------------------------------------------------------------
+  inline
+  QString 
+  GetNumberOfCells(SVTK_RenderWindowInteractor* theRWInteractor)
+  {
+    if(vtkRenderer *aRenderer = theRWInteractor->getRenderer()){
+      if(vtkActorCollection *anActorCollection = aRenderer->GetActors()){
+       TCellsCounter aCounter;
+       using namespace VTK;
+       aCounter = ForEach<SALOME_Actor>(anActorCollection,
+                                        aCounter);
+       return QString::number(aCounter.myCounter);
+      }
+    }
+    
+    return QString::number(0);
+  }
+}
+
+/*!
+  Constructor
+*/
+SVTK_UpdateRateDlg
+::SVTK_UpdateRateDlg(QtxAction* theAction,
+                    SVTK_MainWindow* theParent,
+                    const char* theName):
+  SVTK_DialogBase(theAction,
+                 theParent, 
+                 theName),
+  myPriority(0.0),
+  myEventCallbackCommand(vtkCallbackCommand::New()),
+  myRWInteractor(theParent->GetInteractor()),
+  myAction(theAction)
+{
+  vtkRenderWindowInteractor* aRWI = myRWInteractor->GetDevice();
+  bool anIsEnabledUpdateRate = false;
+
+  setCaption(tr("DLG_TITLE"));
+  QVBoxLayout* aVBoxLayout = new QVBoxLayout(this, 5, 5);
+  {
+    QGroupBox* aGroupBox = new QGroupBox(tr("INPUT_FRAME_TITLE"), this);
+    aGroupBox->setColumnLayout(0, Qt::Vertical );
+    aGroupBox->layout()->setSpacing( 6 );
+    aGroupBox->layout()->setMargin( 11 );
+
+    aGroupBox->setCheckable(true);
+    aGroupBox->setChecked(anIsEnabledUpdateRate);
+    myIsEnableUpdateRateGroupBox = aGroupBox;
+
+    QGridLayout* aGridLayout = new QGridLayout(aGroupBox->layout());
+    {
+      QLabel* aLabel = new QLabel(tr("DESIRED"), aGroupBox);
+      aLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+      aGridLayout->addWidget(aLabel, 0, 0);
+
+      QtxDblSpinBox* aDblSpinBox = new QtxDblSpinBox(OFF_UPDATE_RATE, VTK_LARGE_FLOAT, 2, aGroupBox);
+      aDblSpinBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+      aGridLayout->addWidget(aDblSpinBox, 0, 1);
+
+      aDblSpinBox->setValue(aRWI->GetDesiredUpdateRate());
+      aDblSpinBox->setEnabled(anIsEnabledUpdateRate);
+      connect(aGroupBox, SIGNAL(toggled(bool)), aDblSpinBox, SLOT(setEnabled(bool)));
+      myDesiredUpdateRateSblSpinBox = aDblSpinBox;
+    }
+    {
+      QLabel* aLabel = new QLabel(tr("STILL"), aGroupBox);
+      aLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+      aGridLayout->addWidget(aLabel, 1, 0);
+
+      QtxDblSpinBox* aDblSpinBox = new QtxDblSpinBox(OFF_UPDATE_RATE, VTK_LARGE_FLOAT, 2, aGroupBox);
+      aDblSpinBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+      aGridLayout->addWidget(aDblSpinBox, 1, 1);
+
+      aDblSpinBox->setValue(aRWI->GetStillUpdateRate());
+      aDblSpinBox->setEnabled(anIsEnabledUpdateRate);
+      connect(aGroupBox, SIGNAL(toggled(bool)), aDblSpinBox, SLOT(setEnabled(bool)));
+      myStillUpdateRateSblSpinBox = aDblSpinBox;
+    }
+    aVBoxLayout->addWidget(aGroupBox);
+  }
+  {
+    QGroupBox* aGroupBox = new QGroupBox(tr("INFORMATION_FRAME_TITLE"), this);
+    aGroupBox->setColumnLayout(0, Qt::Vertical );
+    aGroupBox->layout()->setSpacing( 6 );
+    aGroupBox->layout()->setMargin( 11 );
+
+    QGridLayout* aGridLayout = new QGridLayout(aGroupBox->layout());
+    {
+      QLabel* aLabel = new QLabel(tr("CURRENT_FPS"), aGroupBox);
+      aLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+      aGridLayout->addWidget(aLabel, 0, 0);
+
+      QLineEdit* aLineEdit = new QLineEdit( aGroupBox );
+      aLineEdit->setReadOnly( TRUE );
+      aGridLayout->addWidget(aLineEdit, 0, 1);
+
+      myCurrentUpdateRateLineEdit = aLineEdit;
+      myCurrentUpdateRateLineEdit->setText( GetUpdateRate(myRWInteractor) );
+    }
+    {
+      QLabel* aLabel = new QLabel(tr("NUMBER_CELLS"), aGroupBox);
+      aLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+      aGridLayout->addWidget(aLabel, 1, 0);
+
+      QLineEdit* aLineEdit = new QLineEdit( aGroupBox );
+      aLineEdit->setReadOnly( TRUE );
+      aGridLayout->addWidget(aLineEdit, 1, 1);
+
+      myNumberOfCellsLineEdit = aLineEdit;
+      myNumberOfCellsLineEdit->setText( GetNumberOfCells(myRWInteractor) );
+    }
+    aVBoxLayout->addWidget(aGroupBox);
+  }
+  {
+    QGroupBox* aGroupBox = new QGroupBox(this);
+    QHBoxLayout* aHBoxLayout = new QHBoxLayout(aGroupBox);
+    aHBoxLayout->setMargin(11);
+    aHBoxLayout->setSpacing(6);
+    {
+      QPushButton* aPushButton = new QPushButton(tr("OK"), aGroupBox);
+      aPushButton->setDefault(TRUE);
+      aPushButton->setAutoDefault(TRUE);
+      aHBoxLayout->addWidget(aPushButton);
+      connect(aPushButton, SIGNAL(clicked()), this, SLOT(onClickOk()));
+    }
+    {
+      QPushButton* aPushButton = new QPushButton(tr("Apply"), aGroupBox);
+      aPushButton->setDefault(TRUE);
+      aPushButton->setAutoDefault(TRUE);
+      aHBoxLayout->addWidget(aPushButton);
+      connect(aPushButton, SIGNAL(clicked()), this, SLOT(onClickApply()));
+    }
+    aHBoxLayout->addStretch();
+    {
+      QPushButton* aPushButton = new QPushButton(tr("Close"), aGroupBox);
+      aPushButton->setDefault(TRUE);
+      aPushButton->setAutoDefault(TRUE);
+      aHBoxLayout->addWidget(aPushButton);
+      connect(aPushButton, SIGNAL(clicked()), this, SLOT(onClickClose()));
+    }
+    aVBoxLayout->addWidget(aGroupBox);
+  }
+
+  if(!anIsEnabledUpdateRate){
+    aRWI->SetDesiredUpdateRate(OFF_UPDATE_RATE);
+    aRWI->SetStillUpdateRate(OFF_UPDATE_RATE);  
+  }
+
+  myEventCallbackCommand->Delete();
+  myEventCallbackCommand->SetClientData(this);
+  myEventCallbackCommand->SetCallback(SVTK_UpdateRateDlg::ProcessEvents);
+  vtkRenderer *aRenderer = myRWInteractor->getRenderer();
+  aRenderer->AddObserver(vtkCommand::EndEvent,
+                        myEventCallbackCommand.GetPointer(), 
+                        myPriority);
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+SVTK_UpdateRateDlg
+::~SVTK_UpdateRateDlg()
+{
+  // no need to delete child widgets, Qt does it all for us
+}
+
+void 
+SVTK_UpdateRateDlg
+::ProcessEvents(vtkObject* vtkNotUsed(theObject), 
+               unsigned long theEvent,
+               void* theClientData, 
+               void* vtkNotUsed(theCallData))
+{
+  SVTK_UpdateRateDlg* self = reinterpret_cast<SVTK_UpdateRateDlg*>(theClientData);
+
+  if(theEvent == vtkCommand::EndEvent){
+    self->myCurrentUpdateRateLineEdit->setText( GetUpdateRate(self->myRWInteractor) );
+    self->myNumberOfCellsLineEdit->setText( GetNumberOfCells(self->myRWInteractor) );
+  }
+}
+
+void 
+SVTK_UpdateRateDlg
+::Update()
+{
+  vtkRenderWindowInteractor* aRWI = myRWInteractor->GetDevice();
+
+  vtkFloatingPointType anUpdateRate;
+  if(myIsEnableUpdateRateGroupBox->isChecked()){
+    anUpdateRate = AdjustUpdateRate(myRWInteractor,myDesiredUpdateRateSblSpinBox->value());
+    aRWI->SetDesiredUpdateRate(anUpdateRate);
+    anUpdateRate = AdjustUpdateRate(myRWInteractor,myStillUpdateRateSblSpinBox->value());
+    aRWI->SetStillUpdateRate(anUpdateRate);
+  }else{
+    aRWI->SetDesiredUpdateRate(OFF_UPDATE_RATE);
+    aRWI->SetStillUpdateRate(OFF_UPDATE_RATE);
+  }
+
+  myRWInteractor->getRenderWindow()->Render();
+}
+
+void 
+SVTK_UpdateRateDlg
+::onClickOk()
+{
+  Update();
+  onClickClose();
+}
+
+void
+SVTK_UpdateRateDlg
+::onClickApply()
+{
+  Update();
+}
+
+void 
+SVTK_UpdateRateDlg
+::onClickClose()
+{
+  reject();
+}
diff --git a/src/SVTK/SVTK_UpdateRateDlg.h b/src/SVTK/SVTK_UpdateRateDlg.h
new file mode 100644 (file)
index 0000000..7b32674
--- /dev/null
@@ -0,0 +1,93 @@
+//  SALOME VTKViewer : build VTK viewer into Salome desktop
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : 
+//  Author : 
+//  Module : SALOME
+//  $Header$
+
+#ifndef SVTK_UPDATERATEDLG_H
+#define SVTK_UPDATERATEDLG_H
+
+#include "SVTK_DialogBase.h"
+
+#include <vtkSmartPointer.h>
+
+class SVTK_MainWindow;
+class SVTK_RenderWindowInteractor;
+
+class QtxDblSpinBox;
+class QtxAction;
+
+class QGroupBox;
+class QLineEdit;
+
+class vtkCallbackCommand;
+class vtkObject;
+
+
+class SVTK_UpdateRateDlg : public SVTK_DialogBase
+{
+  Q_OBJECT;
+
+public:
+  SVTK_UpdateRateDlg(QtxAction* theAction,
+                    SVTK_MainWindow* theParent,
+                    const char* theName);
+
+  ~SVTK_UpdateRateDlg();
+
+  void Update();
+
+protected:
+  SVTK_RenderWindowInteractor* myRWInteractor;
+  QtxDblSpinBox* myDesiredUpdateRateSblSpinBox;
+  QtxDblSpinBox* myStillUpdateRateSblSpinBox;
+  QGroupBox* myIsEnableUpdateRateGroupBox;
+
+  QLineEdit* myCurrentUpdateRateLineEdit;
+  QLineEdit* myNumberOfCellsLineEdit;
+
+  QtxAction* myAction;
+
+  //----------------------------------------------------------------------------
+  // Priority at which events are processed
+  vtkFloatingPointType myPriority;
+
+  // Used to process events
+  vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
+
+  // Description:
+  // Main process event method
+  static void ProcessEvents(vtkObject* object, 
+                            unsigned long event,
+                            void* clientdata, 
+                            void* calldata);
+  
+protected slots:
+  void onClickOk();
+  void onClickApply();
+  void onClickClose();
+};
+
+#endif // SVTK_UPDATERATEDLG_H
diff --git a/src/SVTK/resources/SVTK_images.po b/src/SVTK/resources/SVTK_images.po
new file mode 100644 (file)
index 0000000..4790e54
--- /dev/null
@@ -0,0 +1,43 @@
+#  VISU VISUGUI : GUI of VISU component
+#
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+# 
+#  This library is free software; you can redistribute it and/or 
+#  modify it under the terms of the GNU Lesser General Public 
+#  License as published by the Free Software Foundation; either 
+#  version 2.1 of the License. 
+# 
+#  This library is distributed in the hope that it will be useful, 
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+#  Lesser General Public License for more details. 
+# 
+#  You should have received a copy of the GNU Lesser General Public 
+#  License along with this library; if not, write to the Free Software 
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+# 
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+#
+#
+#
+#  File   : 
+#  Module : 
+
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n"
+"PO-Revision-Date: 2005-05-10 15:20+0400\n"
+"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+
+
+msgid "ICON_SVTK_SCALING"
+msgstr "view_scaling.png"
+
+msgid "ICON_GRADUATED_AXES"
+msgstr "view_graduated_axes.png"
+
+msgid "ICON_UPDATE_RATE"
+msgstr "view_update_rate.png"
index ecc7da4192b2aab8881ecf6bf911af38d53b22d0..b7059b2f1bc0e4dc16a666768bdd1e5497c1c891 100755 (executable)
@@ -148,3 +148,130 @@ msgstr "Show/Hide trihedron"
 
 msgid "DSC_SHOW_TRIHEDRON"
 msgstr "Show/Hide trihedron in the current view"
+
+msgid "SVTK_NonIsometricDlg::MEN_SCALING"
+msgstr "Scaling"
+
+msgid "SVTK_NonIsometricDlg::O&K"
+msgstr ""
+
+msgid "SVTK_NonIsometricDlg::&Apply"
+msgstr ""
+
+msgid "SVTK_NonIsometricDlg::&Cancel"
+msgstr ""
+
+msgid "SVTK_NonIsometricDlg::&Reset"
+msgstr ""
+
+msgid "SVTK_NonIsometricDlg::DLG_TITLE"
+msgstr "Scaling"
+
+msgid "SVTK_NonIsometricDlg::LBL_X"
+msgstr "X :"
+
+msgid "SVTK_NonIsometricDlg::LBL_Y"
+msgstr "Y :"
+
+msgid "SVTK_NonIsometricDlg::LBL_Z"
+msgstr "Z :"
+
+msgid "SVTK_MainWindow::MNU_SVTK_SCALING"
+msgstr "Scaling"
+
+msgid "SVTK_MainWindow::DSC_SVTK_SCALING"
+msgstr "Scaling"
+
+msgid "SVTK_FontWidget::ARIAL"
+msgstr "Arial"
+
+msgid "SVTK_FontWidget::COURIER"
+msgstr "Courier"
+
+msgid "SVTK_FontWidget::TIMES"
+msgstr "Times"
+
+msgid "SVTK_FontWidget::BOLD"
+msgstr "Bold"
+
+msgid "SVTK_FontWidget::ITALIC"
+msgstr "Italic"
+
+msgid "SVTK_FontWidget::SHADOW"
+msgstr "Shadow"
+
+msgid "SVTK_CubeAxesDlg::CAPTION"
+msgstr "Graduated axes"
+
+msgid "SVTK_CubeAxesDlg::X_AXIS"
+msgstr "X axis"
+
+msgid "SVTK_CubeAxesDlg::Y_AXIS"
+msgstr "Y axis"
+
+msgid "SVTK_CubeAxesDlg::Z_AXIS"
+msgstr "Z axis"
+
+msgid "SVTK_CubeAxesDlg::IS_VISIBLE"
+msgstr "Is visible"
+
+msgid "SVTK_AxisWidget::AXIS_NAME"
+msgstr "Axis name"
+
+msgid "SVTK_AxisWidget::IS_VISIBLE"
+msgstr "Is visible"
+
+msgid "SVTK_AxisWidget::NAME"
+msgstr "Name"
+
+msgid "SVTK_AxisWidget::FONT"
+msgstr "Font"
+
+msgid "SVTK_AxisWidget::LABELS"
+msgstr "Labels"
+
+msgid "SVTK_AxisWidget::NUMBER"
+msgstr "Number"
+
+msgid "SVTK_AxisWidget::OFFSET"
+msgstr "Offset"
+
+msgid "SVTK_AxisWidget::TICK_MARKS"
+msgstr "Tick marks"
+
+msgid "SVTK_AxisWidget::LENGTH"
+msgstr "Length"
+
+msgid "SVTK_MainWindow::MNU_SVTK_GRADUATED_AXES"
+msgstr "Graduated axes"
+
+msgid "SVTK_MainWindow::DSC_SVTK_GRADUATED_AXES"
+msgstr "Graduated axes"
+
+msgid "SVTK_MainWindow::MNU_SVTK_UPDATE_RATE"
+msgstr "Update rate"
+
+msgid "SVTK_MainWindow::DSC_SVTK_UPDATE_RATE"
+msgstr "Update rate"
+
+msgid "SVTK_UpdateRateDlg::DLG_TITLE"
+msgstr "Update Rate"
+
+msgid "SVTK_UpdateRateDlg::INPUT_FRAME_TITLE"
+msgstr "Enable"
+
+msgid "SVTK_UpdateRateDlg::DESIRED"
+msgstr "Desired Update Rate, FPS"
+
+msgid "SVTK_UpdateRateDlg::STILL"
+msgstr "Still Update Rate, FPS"
+
+msgid "SVTK_UpdateRateDlg::INFORMATION_FRAME_TITLE"
+msgstr "Rendering Metrics"
+
+msgid "SVTK_UpdateRateDlg::CURRENT_FPS"
+msgstr "Current Update Rate, FPS"
+
+msgid "SVTK_UpdateRateDlg::NUMBER_CELLS"
+msgstr "Number of Cells, -"
+
index 6b30c5153986df012789053a67e4118e7c2cf9dc..59fbc60e1fb61fa11b7adb2a582f57d1e95506ca 100755 (executable)
@@ -39,10 +39,8 @@ EXPORT_HEADERS= \
 
 PO_FILES = \
        VTKViewer_images.po \
-       VTKViewer_msg_en.po \
-       VTKViewerM_images.po \
-       VTKViewerM_msg_en.po 
-
+       VTKViewer_msg_en.po
+       
 # Libraries targets
 LIB = libVTKViewer.la
 
index 11769256c1474d55cd431fb0395d806ea354ca74..168149018e2802a2c54cc2fa460c248eae0fbb6e 100755 (executable)
@@ -198,6 +198,9 @@ void
 VTKViewer_Actor
 ::Render(vtkRenderer *ren, vtkMapper* m)
 {
+  static vtkFloatingPointType PERCENTS_OF_DETAILS = 0.50;
+  SetNumberOfCloudPoints(vtkIdType(GetInput()->GetNumberOfPoints()*PERCENTS_OF_DETAILS));
+
   if(myIsResolveCoincidentTopology){
     int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
     vtkFloatingPointType aFactor, aUnit; 
diff --git a/src/VTKViewer/resources/VTKViewerM_images.po b/src/VTKViewer/resources/VTKViewerM_images.po
deleted file mode 100644 (file)
index ce2c6c7..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#  VISU VISUGUI : GUI of VISU component
-#
-#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-# 
-#  This library is free software; you can redistribute it and/or 
-#  modify it under the terms of the GNU Lesser General Public 
-#  License as published by the Free Software Foundation; either 
-#  version 2.1 of the License. 
-# 
-#  This library is distributed in the hope that it will be useful, 
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-#  Lesser General Public License for more details. 
-# 
-#  You should have received a copy of the GNU Lesser General Public 
-#  License along with this library; if not, write to the Free Software 
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-# 
-#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
-#
-#
-#
-#  File   : 
-#  Module : 
-
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n"
-"PO-Revision-Date: 2005-05-10 15:20+0400\n"
-"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-
-msgid "ICON_SVTK_SCALING"
-msgstr "view_scaling.png"
-
-msgid "ICON_GRADUATED_AXES"
-msgstr "view_graduated_axes.png"
diff --git a/src/VTKViewer/resources/VTKViewerM_msg_en.po b/src/VTKViewer/resources/VTKViewerM_msg_en.po
deleted file mode 100644 (file)
index d5e8cc2..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: PROJECT VERSION\n"
-"POT-Creation-Date: 2002-02-22 16:56:46 CET\n"
-"PO-Revision-Date: 2005-06-27 12:38+0400\n"
-"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-
-#: SVTK_NonIsometricDlg.cxx
-
-msgid "SVTK_NonIsometricDlg::MEN_SCALING"
-msgstr "Scaling"
-
-msgid "SVTK_NonIsometricDlg::O&K"
-msgstr ""
-
-msgid "SVTK_NonIsometricDlg::&Apply"
-msgstr ""
-
-msgid "SVTK_NonIsometricDlg::&Cancel"
-msgstr ""
-
-msgid "SVTK_NonIsometricDlg::&Reset"
-msgstr ""
-
-msgid "SVTK_NonIsometricDlg::DLG_TITLE"
-msgstr "Scaling"
-
-msgid "SVTK_NonIsometricDlg::LBL_X"
-msgstr "X :"
-
-msgid "SVTK_NonIsometricDlg::LBL_Y"
-msgstr "Y :"
-
-msgid "SVTK_NonIsometricDlg::LBL_Z"
-msgstr "Z :"
-
-msgid "SVTK_MainWindow::MNU_SVTK_SCALING"
-msgstr "Scaling"
-
-msgid "SVTK_MainWindow::DSC_SVTK_SCALING"
-msgstr "Scaling"
-
-msgid "SVTK_FontWidget::ARIAL"
-msgstr "Arial"
-
-msgid "SVTK_FontWidget::COURIER"
-msgstr "Courier"
-
-msgid "SVTK_FontWidget::TIMES"
-msgstr "Times"
-
-msgid "SVTK_FontWidget::BOLD"
-msgstr "Bold"
-
-msgid "SVTK_FontWidget::ITALIC"
-msgstr "Italic"
-
-msgid "SVTK_FontWidget::SHADOW"
-msgstr "Shadow"
-
-msgid "SVTK_CubeAxesDlg::CAPTION"
-msgstr "Graduated axes"
-
-msgid "SVTK_CubeAxesDlg::X_AXIS"
-msgstr "X axis"
-
-msgid "SVTK_CubeAxesDlg::Y_AXIS"
-msgstr "Y axis"
-
-msgid "SVTK_CubeAxesDlg::Z_AXIS"
-msgstr "Z axis"
-
-msgid "SVTK_CubeAxesDlg::IS_VISIBLE"
-msgstr "Is visible"
-
-msgid "SVTK_AxisWidget::AXIS_NAME"
-msgstr "Axis name"
-
-msgid "SVTK_AxisWidget::IS_VISIBLE"
-msgstr "Is visible"
-
-msgid "SVTK_AxisWidget::NAME"
-msgstr "Name"
-
-msgid "SVTK_AxisWidget::FONT"
-msgstr "Font"
-
-msgid "SVTK_AxisWidget::LABELS"
-msgstr "Labels"
-
-msgid "SVTK_AxisWidget::NUMBER"
-msgstr "Number"
-
-msgid "SVTK_AxisWidget::OFFSET"
-msgstr "Offset"
-
-msgid "SVTK_AxisWidget::TICK_MARKS"
-msgstr "Tick marks"
-
-msgid "SVTK_AxisWidget::LENGTH"
-msgstr "Length"
-
-msgid "SVTK_MainWindow::MNU_SVTK_GRADUATED_AXES"
-msgstr "Graduated axes"
-
-msgid "SVTK_MainWindow::DSC_SVTK_GRADUATED_AXES"
-msgstr "Graduated axes"
\ No newline at end of file
diff --git a/src/VTKViewer/resources/view_update_rate.png b/src/VTKViewer/resources/view_update_rate.png
new file mode 100755 (executable)
index 0000000..3d01ad1
Binary files /dev/null and b/src/VTKViewer/resources/view_update_rate.png differ