]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Switching from SVTK to VVTK InteractorStyle is being implemented.
authorasv <asv@opencascade.com>
Fri, 26 Aug 2005 11:30:49 +0000 (11:30 +0000)
committerasv <asv@opencascade.com>
Fri, 26 Aug 2005 11:30:49 +0000 (11:30 +0000)
src/VVTK/VVTK_ViewWindow.cxx
src/VVTK/VVTK_ViewWindow.h

index a9c905f0d72e5bef242e25596e45df7c57715fa7..f42c30501c011544540f9fb08d0b5219bf72832f 100755 (executable)
@@ -4,6 +4,14 @@
 
 #include "SVTK_View.h"
 
+#include "SUIT_ResourceMgr.h"
+#include "SUIT_Session.h"
+
+#include "QtxAction.h"
+
+#include <qtoolbar.h>
+
+
 //----------------------------------------------------------------------------
 VVTK_ViewWindow
 ::VVTK_ViewWindow( SUIT_Desktop* theDesktop, 
@@ -14,6 +22,19 @@ VVTK_ViewWindow
 
   connect(this,SIGNAL(selectionChanged()),
          theModel,SLOT(onSelectionChanged()));
+
+  // create another toolbar
+  myToolBar = new QToolBar(this);
+  myToolBar->setCloseMode(QDockWindow::Undocked);
+  myToolBar->setLabel(tr("LBL_TOOLBAR_LABEL"));
+
+  SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+  // SVTK / VVTK switcher action
+  QtxAction* aAction = new QtxAction(tr("MNU_VVTK_SWITCH"), aResMgr->loadPixmap( "VISU", tr( "ICON_VVTK_SWITCH" ) ),
+                                    tr( "MNU_VVTK_SWITCH" ), 0, this);
+  aAction->setStatusTip(tr("DSC_VVTK_SWITCH"));
+  connect(aAction, SIGNAL(activated()), this, SLOT(onSwitchIS()));
+  aAction->addTo( myToolBar );
 }
 
 //----------------------------------------------------------------------------
@@ -21,3 +42,11 @@ VVTK_ViewWindow
 ::~VVTK_ViewWindow()
 {
 }
+
+//----------------------------------------------------------------------------
+void
+VVTK_ViewWindow
+::onSwitchIS()
+{
+  printf( "onswitch IS \n\n" );
+}
index 3507f7f08a71bef054788572e81acf79201beeef..e646b9255d89ecacac07fdb2d0b58329bd0b18a0 100755 (executable)
@@ -9,6 +9,7 @@
 #include "SVTK_ViewWindow.h"
 
 class VVTK_Viewer;
+class QToolBar;
 
 class VVTK_EXPORT VVTK_ViewWindow : public SVTK_ViewWindow
 {
@@ -17,6 +18,13 @@ class VVTK_EXPORT VVTK_ViewWindow : public SVTK_ViewWindow
 public:
   VVTK_ViewWindow( SUIT_Desktop*, VVTK_Viewer* );
   virtual ~VVTK_ViewWindow();
+
+protected slots:
+  void onSwitchIS(); 
+
+private:
+  QToolBar* myToolBar;
 };
 
 #ifdef WIN32