]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Introduced ViewExtender
authorvsv <vsv@opencascade.com>
Thu, 8 May 2008 15:21:51 +0000 (15:21 +0000)
committervsv <vsv@opencascade.com>
Thu, 8 May 2008 15:21:51 +0000 (15:21 +0000)
src/VISUGUI/Makefile.am
src/VISUGUI/VISU_msg_en.ts
src/VISUGUI/VisuGUI_ClippingPlaneMgr.cxx [new file with mode: 0644]
src/VISUGUI/VisuGUI_ClippingPlaneMgr.h [new file with mode: 0644]
src/VISUGUI/VisuGUI_Module.cxx
src/VISUGUI/VisuGUI_Module.h
src/VISUGUI/VisuGUI_ViewExtender.cxx [new file with mode: 0644]
src/VISUGUI/VisuGUI_ViewExtender.h [new file with mode: 0644]

index f5ad51ad09e5bf09c4796a4798136ac14e2a376b..68d70bb7670cd706c974d889aa172d8eae777064 100644 (file)
@@ -71,7 +71,9 @@ dist_libVISU_la_SOURCES= \
        VisuGUI_Slider.cxx \
        VisuGUI_InputPane.cxx \
        VisuGUI_CacheDlg.cxx \
-       VisuGUI_FieldFilter.cxx
+       VisuGUI_FieldFilter.cxx \
+       VisuGUI_ViewExtender.cxx \
+       VisuGUI_ClippingPlaneMgr.cxx
 
 MOC_FILES= \
        VisuGUI_moc.cxx \
@@ -101,7 +103,9 @@ MOC_FILES= \
        VisuGUI_TransparencyDlg_moc.cxx \
        VisuGUI_Slider_moc.cxx \
        VisuGUI_InputPane_moc.cxx \
-       VisuGUI_CacheDlg_moc.cxx
+       VisuGUI_CacheDlg_moc.cxx \
+       VisuGUI_ViewExtender_moc.cxx \
+       VisuGUI_ClippingPlaneMgr_moc.cxx
 
 nodist_libVISU_la_SOURCES=$(MOC_FILES)
 
index dcb15c658e47c26b870074fbd349e9c2cfd2e6d6..a44661ff63b9a234ea5ca6a810df1914316395ea 100644 (file)
@@ -3208,4 +3208,78 @@ Please, refer to the documentation.</translation>
             <translation>auto</translation>
         </message>
     </context>
+    <context>
+        <name>VisuGUI_ClippingPlaneMgr</name>
+        <message>
+            <source>TITLE</source>
+            <translation>Clipping planes configuration</translation>
+        </message>
+        <message>
+            <source>TITLE_PLANES</source>
+            <translation>Planes definition</translation>
+        </message>
+        <message>
+            <source>LBL_NAME</source>
+            <translation>Name of the plane</translation>
+        </message>
+        <message>
+            <source>BYVECTOR_TITLE</source>
+            <translation>Normal vector</translation>
+        </message>
+        <message>
+            <source>BYPLANE_TITLE</source>
+            <translation>Main plane</translation>
+        </message>
+        <message>
+            <source>CHK_AUTOAPPLY</source>
+            <translation>Auto apply</translation>
+        </message>
+        <message>
+            <source>CHK_SHOW_PREVIEW</source>
+            <translation>Show preview</translation>
+        </message>
+        <message>
+            <source>ORIGIN_TITLE</source>
+            <translation>Origin</translation>
+        </message>
+        <message>
+            <source>DIRECTION_TITLE</source>
+            <translation>Direction</translation>
+        </message>
+        <message>
+            <source>LBL_ORIENTATION</source>
+            <translation>Orientation</translation>
+        </message>
+        <message>
+            <source>LBL_DISTANCE</source>
+            <translation>Distance</translation>
+        </message>
+        <message>
+            <source>LBL_ROTATION</source>
+            <translation>Rotation around %1</translation>
+        </message>
+        <message>
+            <source>BTN_NEW</source>
+            <translation>New</translation>
+        </message>
+        <message>
+            <source>BTN_DELETE</source>
+            <translation>Delete</translation>
+        </message>
+    </context>
+    <context>
+        <name>VisuGUI_ViewExtender</name>
+        <message>
+            <source>MNU_CLIPPING_PLANE_MGR</source>
+            <translation>Clipping planes</translation>
+        </message>
+        <message>
+            <source>DSK_CLIPPING_PLANE_MGR</source>
+            <translation>Manage clipping planes in the viewer</translation>
+        </message>
+        <message>
+            <source>VISU_VIEW_TOOLBAR</source>
+            <translation>VISU tools</translation>
+        </message>
+    </context>
 </TS>
diff --git a/src/VISUGUI/VisuGUI_ClippingPlaneMgr.cxx b/src/VISUGUI/VisuGUI_ClippingPlaneMgr.cxx
new file mode 100644 (file)
index 0000000..f557887
--- /dev/null
@@ -0,0 +1,221 @@
+// Copyright (C) 2005  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "VisuGUI_ClippingPlaneMgr.h"
+
+#include "VisuGUI.h"
+#include "VisuGUI_Tools.h"
+
+#include <SUIT_Desktop.h>
+#include <QtxDoubleSpinBox.h>
+
+#include <QVBoxLayout>
+#include <QHBoxLayout>
+#include <QListView>
+#include <QLineEdit>
+#include <QTabWidget>
+#include <QWidget>
+#include <QGroupBox>
+#include <QGridLayout>
+#include <QComboBox>
+#include <QCheckBox>
+#include <QPushButton>
+
+
+using namespace std;
+
+VisuGUI_ClippingPlaneMgr::VisuGUI_ClippingPlaneMgr(VisuGUI* theModule)
+  : QDialog(VISU::GetDesktop(theModule), Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
+    myModule(theModule)
+{
+  setWindowTitle(tr("TITLE"));
+  setSizeGripEnabled(true);
+  setAttribute( Qt::WA_DeleteOnClose, true );
+  setModal(false);
+
+  QVBoxLayout* aMainLayout = new QVBoxLayout(this);
+  aMainLayout->setSpacing(6);
+  aMainLayout->setMargin(11);
+
+  QHBoxLayout* aPlanesBox = new QHBoxLayout(this);
+  aPlanesBox->setMargin(6);
+  aMainLayout->addLayout(aPlanesBox);
+
+  myPlanesList = new QListView(this);
+  aPlanesBox->addWidget(myPlanesList);
+
+  // Planes parameters box
+  QFrame* aPlanesFrame = new QFrame(this);
+  aPlanesFrame->setWindowTitle(tr("TITLE_PLANES"));
+  aPlanesBox->addWidget(aPlanesFrame);
+
+  QVBoxLayout* aFrameLayout = new QVBoxLayout(aPlanesFrame);
+  aFrameLayout->setSpacing(5);
+  aFrameLayout->setMargin(6);
+
+  QHBoxLayout* aNameBox = new QHBoxLayout(aPlanesFrame);
+  aFrameLayout->addLayout(aNameBox);
+  aNameBox->setSpacing(5);
+
+  aNameBox->addWidget(new QLabel(tr("LBL_NAME"), aPlanesFrame));
+  myNameEdt = new QLineEdit(aPlanesFrame);
+  aNameBox->addWidget(myNameEdt);
+
+  myMethodTab = new QTabWidget(aPlanesFrame);
+  aFrameLayout->addWidget(myMethodTab);
+
+  myMethodTab->addTab(createVectorTab(), tr("BYVECTOR_TITLE"));
+  myMethodTab->addTab(createPlanesTab(), tr("BYPLANE_TITLE"));
+
+  myAutoApply = new QCheckBox(tr("CHK_AUTOAPPLY"), aPlanesFrame);
+  aFrameLayout->addWidget(myAutoApply);
+
+  // Buttons for management of planes
+  QHBoxLayout* aManageBox = new QHBoxLayout(this);
+  aMainLayout->addLayout(aManageBox);
+  aManageBox->setMargin(6);
+
+  QPushButton* aNewBtn = new QPushButton(tr("BTN_NEW"), this);
+  aManageBox->addWidget(aNewBtn);
+
+  QPushButton* aDeleteBtn = new QPushButton(tr("BTN_DELETE"), this);
+  aManageBox->addWidget(aDeleteBtn);
+  
+  aManageBox->addStretch();
+
+  myShowPreview = new QCheckBox(tr("CHK_SHOW_PREVIEW"), this);
+  aManageBox->addWidget(myShowPreview);
+
+  // Dialog buttons
+  QGroupBox* aGroupButtons = new QGroupBox (this);
+  aMainLayout->addWidget(aGroupButtons);
+
+  QSizePolicy aSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed );
+  QHBoxLayout* aButtonsLayout = new QHBoxLayout(aGroupButtons);
+  aButtonsLayout->setSpacing(6);
+  aButtonsLayout->setMargin(11);
+
+  QPushButton* aBtnOk = new QPushButton(tr("BUT_OK"), aGroupButtons);
+  aButtonsLayout->addWidget(aBtnOk);
+
+  QPushButton* aBtnApply = new QPushButton(tr("BUT_APPLY"), aGroupButtons);
+  aButtonsLayout->addWidget(aBtnApply);
+
+  aButtonsLayout->addStretch();
+
+  QPushButton* aBtnClose = new QPushButton(tr("BUT_CLOSE"), aGroupButtons);
+  aButtonsLayout->addWidget(aBtnClose);
+
+  QPushButton* aBtnHelp = new QPushButton(tr("BUT_HELP"), aGroupButtons);
+  aButtonsLayout->addWidget(aBtnHelp);
+}
+
+
+//****************************************************************
+QWidget* VisuGUI_ClippingPlaneMgr::createVectorTab()
+{
+  QWidget* aVectorTab = new QWidget(myMethodTab);
+  QVBoxLayout* aVectorTabLayout = new QVBoxLayout(aVectorTab);
+
+  QGroupBox* aOriginGroup = new QGroupBox( tr( "ORIGIN_TITLE" ), aVectorTab );
+  aVectorTabLayout->addWidget(aOriginGroup);
+  QHBoxLayout* aOriginLayout = new QHBoxLayout(aOriginGroup);
+
+  aOriginLayout->addWidget( new QLabel("X", aOriginGroup) );
+  myXOrigin = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aOriginGroup );
+  myXOrigin->setValue( 0.0 );
+  aOriginLayout->addWidget( myXOrigin );
+
+  aOriginLayout->addWidget( new QLabel("Y", aOriginGroup) );
+  myYOrigin = new QtxDoubleSpinBox( -1000.0, 1000, 0.1, aOriginGroup );
+  myYOrigin->setValue( 0.0 );
+  aOriginLayout->addWidget( myYOrigin );
+
+  aOriginLayout->addWidget( new QLabel("Z", aOriginGroup) );
+  myZOrigin = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aOriginGroup );
+  myZOrigin->setValue( 0.0 );
+  aOriginLayout->addWidget( myZOrigin );
+  
+  QGroupBox* aDirGroup = new QGroupBox( tr( "DIRECTION_TITLE" ), aVectorTab );
+  aVectorTabLayout->addWidget(aDirGroup);
+  QHBoxLayout* aDirLayout = new QHBoxLayout(aDirGroup);
+
+  aDirLayout->addWidget( new QLabel("dX", aDirGroup) );
+  myXDir = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aDirGroup );
+  myXDir->setValue( 0.0 );
+  aDirLayout->addWidget( myXDir );
+
+  aDirLayout->addWidget( new QLabel("dY", aDirGroup) );
+  myYDir = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aDirGroup );
+  myYDir->setValue( 0.0 );
+  aDirLayout->addWidget( myYDir );
+
+  aDirLayout->addWidget( new QLabel("dZ", aDirGroup) );
+  myZDir = new QtxDoubleSpinBox( -1000.0, 1000.0, 0.1, aDirGroup );
+  myZDir->setValue( 0.0 );
+  aDirLayout->addWidget( myZDir );
+
+
+  return aVectorTab;
+}
+
+
+//****************************************************************
+QWidget* VisuGUI_ClippingPlaneMgr::createPlanesTab()
+{
+  QWidget* aPlanesTab = new QWidget(myMethodTab);
+  QGridLayout* aVectorTabLayout = new QGridLayout(aPlanesTab);
+
+  aVectorTabLayout->addWidget(new QLabel(tr("LBL_ORIENTATION"), aPlanesTab), 0, 0);
+  aVectorTabLayout->addWidget(new QLabel(tr("LBL_DISTANCE"), aPlanesTab), 1, 0);
+
+  myPlaneCombo = new QComboBox(aPlanesTab);
+  myPlaneCombo->addItem("|| X-Y");
+  myPlaneCombo->addItem("|| Y-Z");
+  myPlaneCombo->addItem("|| X-Z");
+  aVectorTabLayout->addWidget(myPlaneCombo, 0, 1);
+
+  myDistance = new QtxDoubleSpinBox( -1000, 1000, 1,  aPlanesTab );
+  myDistance->setValue( 0.0 );
+  aVectorTabLayout->addWidget( myDistance, 1, 1 );
+
+  myRotationXLbl = new QLabel(tr("LBL_ROTATION").arg("X"), aPlanesTab);
+  aVectorTabLayout->addWidget(myRotationXLbl, 0, 2);
+
+  myRotX = new QtxDoubleSpinBox( -180.0, 180.0, 1,  aPlanesTab );
+  myRotX->setValue( 0.0 );
+  aVectorTabLayout->addWidget( myRotX, 0, 3 );
+
+  myRotationYLbl = new QLabel(tr("LBL_ROTATION").arg("Y"), aPlanesTab);
+  aVectorTabLayout->addWidget(myRotationYLbl, 1, 2);
+
+  myRotY = new QtxDoubleSpinBox( -180.0, 180.0, 1,  aPlanesTab );
+  myRotY->setValue( 0.0 );
+  aVectorTabLayout->addWidget( myRotY, 1, 3 );
+  
+
+  return aPlanesTab;
+}
+
+
+//****************************************************************
+VisuGUI_ClippingPlaneMgr::~VisuGUI_ClippingPlaneMgr()
+{
+}
diff --git a/src/VISUGUI/VisuGUI_ClippingPlaneMgr.h b/src/VISUGUI/VisuGUI_ClippingPlaneMgr.h
new file mode 100644 (file)
index 0000000..dd898a3
--- /dev/null
@@ -0,0 +1,71 @@
+// Copyright (C) 2005  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef DIALOGBOX_CLIPPINGPLANEMGR_H
+#define DIALOGBOX_CLIPPINGPLANEMGR_H
+
+#include <QDialog>
+
+class VisuGUI;
+class QListView;
+class QLineEdit;
+class QtxDoubleSpinBox;
+class QTabWidget;
+class QLabel;
+class QComboBox;
+class QCheckBox;
+
+class VisuGUI_ClippingPlaneMgr : public QDialog
+{
+  Q_OBJECT
+public:
+
+  VisuGUI_ClippingPlaneMgr(VisuGUI* theModule);
+  ~VisuGUI_ClippingPlaneMgr();
+
+ private:
+  QWidget* createVectorTab();
+  QWidget* createPlanesTab();
+
+  QListView* myPlanesList;
+  QLineEdit* myNameEdt;
+  VisuGUI*   myModule;
+  QTabWidget* myMethodTab;
+
+  QtxDoubleSpinBox* myXOrigin;
+  QtxDoubleSpinBox* myYOrigin;
+  QtxDoubleSpinBox* myZOrigin;
+  QtxDoubleSpinBox* myXDir;
+  QtxDoubleSpinBox* myYDir;
+  QtxDoubleSpinBox* myZDir;
+
+  QLabel* myRotationXLbl;
+  QLabel* myRotationYLbl;
+
+  QComboBox* myPlaneCombo;
+  QtxDoubleSpinBox* myDistance;
+  QtxDoubleSpinBox* myRotX;
+  QtxDoubleSpinBox* myRotY;
+
+  QCheckBox* myAutoApply;
+  QCheckBox* myShowPreview;
+};
+
+#endif
index 21ffa19def49f1026e985849692e55da720fef21..5a7a269e13617d76840e5a804e7b65304cf17b92 100644 (file)
@@ -27,6 +27,7 @@
 //  $Header$
 
 #include "VisuGUI_Module.h"
+#include "VisuGUI_ViewExtender.h"
 
 #include "QtxPopupMgr.h"
 
@@ -183,6 +184,7 @@ VisuGUI_Module::
 VisuGUI_Module() : 
   VisuGUI()
 {
+  myExtender = new VisuGUI_ViewExtender(this);
 }
 
 
index 02abf76e08c74e5d7465f7466a0245f6a23b9ce7..c3c3722a5c2a8a69f537fb62cd99a121baf81a7c 100644 (file)
@@ -31,6 +31,8 @@
 #include "VisuGUI.h"
 #include "STD_Application.h"
 #include "SALOMEDSClient_SObject.hxx"
+#include <CAM_ViewExtender.h>
+#include "VisuGUI_ViewExtender.h"
 
 class SUIT_ViewManager;
 class SVTK_ViewManager;
@@ -81,6 +83,9 @@ public:
   void
   restoreVisualParameters(int savePoint);
 
+  //! Returns Module dedicated extension for Viewer. Returns 0 if module has no extension
+  virtual CAM_ViewExtender* getViewExtender() { return myExtender; }
+
 public slots:
   //! Reimplemented method of the module deactivation.
   virtual 
@@ -160,6 +165,9 @@ protected:
 
   void setProperty( SVTK_ViewWindow*, const QString& );  // set a property (speed_increment, etc ) for SVTK ViewWindow
   void setProperty( SVTK_ViewManager*, const QString& ); // set a property for SVTK ViewWindow // set only 1 property for all ViewWindows of given view manager
+
+
+  VisuGUI_ViewExtender* myExtender;
 };
 
 #endif
diff --git a/src/VISUGUI/VisuGUI_ViewExtender.cxx b/src/VISUGUI/VisuGUI_ViewExtender.cxx
new file mode 100644 (file)
index 0000000..c3273b6
--- /dev/null
@@ -0,0 +1,100 @@
+//  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+//  File   : VisuGUI_ViewExtender.cxx
+//  Author : Vitaly Smetannikov
+//  Module : VISU
+
+
+
+#include "VisuGUI_ViewExtender.h"
+
+// #include <SUIT_Application.h>
+#include "VisuGUI_ClippingPlaneMgr.h"
+#include "VisuGUI.h"
+
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
+
+#include <QtxAction.h>
+#include <QtxActionToolMgr.h>
+#include <QDialog>
+
+//using namespace std;
+
+VisuGUI_ViewExtender::VisuGUI_ViewExtender(VisuGUI* theModule):
+  myModule(theModule),
+  myNonModalDlg(0)
+{
+  QtxAction* aAction;
+  SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr(); 
+  aAction = new QtxAction(tr("MNU_CLIPPING_PLANE_MGR"),
+                         aResourceMgr->loadPixmap("VISU",tr("ICON_VVTK_PLANE_SEGMENTATION_SWITCH")),
+                         tr( "DSK_CLIPPING_PLANE_MGR" ),
+                         0,
+                         this,
+                         false);
+  connect(aAction, SIGNAL( activated() ), this, SLOT( onPlanesMgr() ));
+  myActionsMap[ClippingPlaneMgrId] = aAction;
+}
+
+VisuGUI_ViewExtender::~VisuGUI_ViewExtender()
+{
+}
+
+int VisuGUI_ViewExtender::createToolbar(QtxActionToolMgr* theMgr)
+{
+  int aToolBar = theMgr->createToolBar( QObject::tr("VISU_VIEW_TOOLBAR"));
+  theMgr->append( myActionsMap[ClippingPlaneMgrId], aToolBar );
+  return aToolBar;
+}
+
+void VisuGUI_ViewExtender::contextMenuPopup(QMenu* theMenu)
+{
+  printf("#### contextMenuPopup\n");
+}
+
+void VisuGUI_ViewExtender::onPlanesMgr()
+{
+  myNonModalDlg = new VisuGUI_ClippingPlaneMgr(myModule);
+  connect(myNonModalDlg, SIGNAL( destroyed(QObject*) ), this, SLOT( onDialogDestroy() ));
+  myNonModalDlg->show();
+}
+
+void VisuGUI_ViewExtender::activate()
+{
+}
+
+void VisuGUI_ViewExtender::deactivate()
+{
+  if (myNonModalDlg) {
+    myNonModalDlg->close();
+    myNonModalDlg = 0;
+  }
+}
+
+void VisuGUI_ViewExtender::onDialogDestroy()
+{
+  disconnect(myNonModalDlg, SIGNAL( destroyed(QObject*) ), this, SLOT( onDialogDestroy() ));
+  myNonModalDlg = 0;
+}
diff --git a/src/VISUGUI/VisuGUI_ViewExtender.h b/src/VISUGUI/VisuGUI_ViewExtender.h
new file mode 100644 (file)
index 0000000..fc608a3
--- /dev/null
@@ -0,0 +1,69 @@
+//  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+//  File   : VisuGUI_ViewExtender.h
+//  Author : Vitaly Smetannikov
+//  Module : VISU
+
+
+#ifndef VisuGUI_ViewExtender_HeaderFile
+#define VisuGUI_ViewExtender_HeaderFile
+
+#include <CAM_ViewExtender.h>
+#include <QObject>
+#include <QMap>
+
+class VisuGUI;
+class QtxAction;
+class QDialog;
+
+class VisuGUI_ViewExtender:  public QObject, public CAM_ViewExtender
+{
+  Q_OBJECT
+
+ public:
+  VisuGUI_ViewExtender(VisuGUI* theModule);
+
+  virtual ~VisuGUI_ViewExtender();
+
+  virtual int createToolbar(QtxActionToolMgr* theMgr);
+  virtual void contextMenuPopup(QMenu* theMenu);
+
+  virtual void activate();
+  virtual void deactivate();
+
+private slots:
+  void onPlanesMgr();
+ void onDialogDestroy(); 
+
+ private:
+  enum { ClippingPlaneMgrId };
+
+  QMap<int, QtxAction*> myActionsMap;
+  VisuGUI* myModule;
+
+  QDialog* myNonModalDlg;
+};
+
+
+#endif