SVTK_Selector.h \
SVTK_Selection.h \
SVTK_SelectionEvent.h \
+ SVTK_SpaceMouse.h \
+ SVTK_SpaceMouseEvent.h \
SVTK_ViewModelBase.h
# Libraries targets
SVTK_RenderWindow.cxx \
SVTK_InteractorStyle.cxx \
SVTK_RenderWindowInteractor.cxx \
+ SVTK_SpaceMouse.cxx \
SVTK_Selector.cxx
LIB_MOC = SVTK_RenderWindowInteractor.h \
#include "SVTK_RenderWindow.h"
#include "SVTK_ViewWindow.h"
#include "SVTK_Selection.h"
+#include "SVTK_SpaceMouseEvent.h"
+#include "SVTK_Selector.h"
#include "SALOME_Actor.h"
-#include "SVTK_Selector.h"
#include "SALOME_ListIteratorOfListIO.hxx"
#include "SALOME_ListIO.hxx"
+#include "SUIT_Session.h"
+#include "SUIT_ResourceMgr.h"
+
#include <vtkObjectFactory.h>
#include <vtkMath.h>
#include <vtkCommand.h>
#include <vtkPicker.h>
#include <vtkRenderWindow.h>
#include <vtkRenderWindowInteractor.h>
+#include <vtkCallbackCommand.h>
+#include <vtkRendererCollection.h>
#include <qapplication.h>
//VRV: porting on Qt 3.0.5
this->ForcedState = VTK_INTERACTOR_STYLE_CAMERA_NONE;
loadCursors();
+ // set custom event handling function (to handle 3d space mouse events)
+ EventCallbackCommand->SetCallback( SVTK_InteractorStyle::ProcessEvents );
+
myPicker = vtkPicker::New();
myPicker->Delete();
// called during viewer operation when user moves mouse (!put necessary processing here!)
+//----------------------------------------------------------------------------
void
SVTK_InteractorStyle
::onOperation(QPoint mousePos)
// called when user moves mouse inside viewer window and there is no active viewer operation
// (!put necessary processing here!)
+//----------------------------------------------------------------------------
void
SVTK_InteractorStyle
::onCursorMove(QPoint mousePos)
}
// called on finsh GlobalPan operation
+//----------------------------------------------------------------------------
void
SVTK_InteractorStyle
::Place(const int theX, const int theY)
// Translates view from Point to Point
+//----------------------------------------------------------------------------
void
SVTK_InteractorStyle
::TranslateView(int toX, int toY, int fromX, int fromY)
motionVector[2] + viewPoint[2]);
}
+//----------------------------------------------------------------------------
void
SVTK_InteractorStyle
::SetFilter( const Handle(VTKViewer_Filter)& theFilter )
myFilters[ theFilter->GetId() ] = theFilter;
}
+//----------------------------------------------------------------------------
bool
SVTK_InteractorStyle
::IsFilterPresent( const int theId )
return myFilters.find( theId ) != myFilters.end();
}
+//----------------------------------------------------------------------------
void
SVTK_InteractorStyle
::RemoveFilter( const int theId )
myFilters.erase( theId );
}
-
+//----------------------------------------------------------------------------
bool
SVTK_InteractorStyle
::IsValid( SALOME_Actor* theActor,
return true;
}
+//----------------------------------------------------------------------------
Handle(VTKViewer_Filter)
SVTK_InteractorStyle
::GetFilter( const int theId )
return IsFilterPresent( theId ) ? myFilters[ theId ] : Handle(VTKViewer_Filter)();
}
+//----------------------------------------------------------------------------
void
SVTK_InteractorStyle
::IncrementalPan( const int incrX, const int incrY )
this->PanXY( incrX, incrY, 0, 0 );
}
+//----------------------------------------------------------------------------
void
SVTK_InteractorStyle
::IncrementalZoom( const int incr )
this->DollyXY( incr, incr );
}
+//----------------------------------------------------------------------------
void
SVTK_InteractorStyle
::IncrementalRotate( const int incrX, const int incrY )
{
this->RotateXY( incrX, -incrY );
}
+
+//----------------------------------------------------------------------------
+void
+SVTK_InteractorStyle
+::SetInteractor( vtkRenderWindowInteractor* interactor )
+{
+ // register EventCallbackCommand as observer of standard events (keypress, mousemove, etc)
+ vtkInteractorStyle::SetInteractor( interactor );
+
+ // register EventCallbackCommand as observer of custorm event (3d space mouse event)
+ interactor->AddObserver( SpaceMouseMoveEvent, EventCallbackCommand, Priority );
+ interactor->AddObserver( SpaceMouseButtonEvent, EventCallbackCommand, Priority );
+}
+
+//----------------------------------------------------------------------------
+void
+SVTK_InteractorStyle
+::onSpaceMouseMove( double* data )
+{
+ // printf( "x=%+5.0lf y=%+5.0lf z=%+5.0lf a=%+5.0lf b=%+5.0lf c=%+5.0lf\n",
+ // data[0], data[1], data[2], data[3], data[4], data[5] );
+
+ // general things, do SetCurrentRenderer() within FindPokedRenderer()
+ int x, y;
+ Interactor->GetEventPosition( x, y ); // current mouse position (from last mouse move event or any other event)
+ FindPokedRenderer( x, y ); // calls SetCurrentRenderer
+
+ IncrementalZoom( (int)data[2] ); // 1. push toward / pull backward = zoom out / zoom in
+ IncrementalPan( (int)data[0], (int)data[1] );// 2. pull up / push down = pan up / down, 3. move left / right = pan left / right
+ IncrementalRotate( 0, (int)data[4] ); // 4. twist the control = rotate around Y axis
+}
+
+//----------------------------------------------------------------------------
+void
+SVTK_InteractorStyle
+::onSpaceMouseButton( int button )
+{
+ // printf( "Button pressed [%d] \n", button );
+ SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
+ if ( resMgr->integerValue( "VISU", "spacemouse_func1_btn" ) == button )
+ DecreaseSpeedIncrement();
+ if ( resMgr->integerValue( "VISU", "spacemouse_func2_btn" ) == button )
+ IncreaseSpeedIncrement();
+ if ( resMgr->integerValue( "VISU", "spacemouse_func3_btn" ) == button )
+ DecreaseGaussPointMagnification();
+ if ( resMgr->integerValue( "VISU", "spacemouse_func4_btn" ) == button )
+ IncreaseGaussPointMagnification();
+ if ( resMgr->integerValue( "VISU", "spacemouse_func5_btn" ) == button )
+ DominantCombinedSwitch();
+}
+
+//----------------------------------------------------------------------------
+void
+SVTK_InteractorStyle
+::DecreaseSpeedIncrement()
+{
+ printf( "\n--DecreaseSpeedIncrement() NOT IMPLEMENTED--\n" );
+
+}
+
+//----------------------------------------------------------------------------
+void
+SVTK_InteractorStyle
+::IncreaseSpeedIncrement()
+{
+ printf( "\n--IncreaseSpeedIncrement() NOT IMPLEMENTED--\n" );
+}
+
+//----------------------------------------------------------------------------
+void
+SVTK_InteractorStyle
+::DecreaseGaussPointMagnification()
+{
+ printf( "\n--DecreaseGaussPointMagnification() NOT IMPLEMENTED--\n" );
+}
+
+//----------------------------------------------------------------------------
+void
+SVTK_InteractorStyle
+::IncreaseGaussPointMagnification()
+{
+ printf( "\n--IncreaseGaussPointMagnification() NOT IMPLEMENTED--\n" );
+}
+
+//----------------------------------------------------------------------------
+void
+SVTK_InteractorStyle
+::DominantCombinedSwitch()
+{
+ printf( "\n--DominantCombinedSwitch() NOT IMPLEMENTED--\n" );
+}
+
+//----------------------------------------------------------------------------
+void
+SVTK_InteractorStyle
+::ProcessEvents( vtkObject* object,
+ unsigned long event,
+ void* clientData,
+ void* callData )
+{
+ if ( event != SpaceMouseMoveEvent && event != SpaceMouseButtonEvent )
+ vtkInteractorStyle::ProcessEvents( object, event, clientData, callData );
+
+ else if ( clientData && callData ) {
+ vtkObject* anObject = reinterpret_cast<vtkObject*>( clientData );
+ SVTK_InteractorStyle* self = dynamic_cast<SVTK_InteractorStyle*>( anObject );
+ if ( self ) {
+ switch ( event ) {
+ case SpaceMouseMoveEvent :
+ self->onSpaceMouseMove( (double*)callData );
+ break;
+ case SpaceMouseButtonEvent :
+ self->onSpaceMouseButton( *((int*)callData) );
+ break;
+ }
+ }
+ }
+}
+
#include <vtkInteractorStyle.h>
#include <vtkSmartPointer.h>
+class vtkCell;
+class vtkRenderWindowInteractor;
+
#include <qobject.h>
#include <qcursor.h>
#include <qevent.h>
SVTK_SelectionEvent GetSelectionEvent();
+ //merge with V2_2_0_VISU_improvements:void setTriedron(VTKViewer_Trihedron* theTrihedron);
+ void setPreselectionProp(const double& theRed = 0,
+ const double& theGreen = 1,
+ const double& theBlue = 1,
+ const int& theWidth = 5);
+
+ // redefined in order to add an observer (callback) for custorm event (space mouse event)
+ virtual void SetInteractor( vtkRenderWindowInteractor* );
+
// VTK events
virtual void OnMouseMove();
virtual void OnLeftButtonDown();
void Place(const int theX, const int theY);
void TranslateView(int toX, int toY, int fromX, int fromY);
+ // custom event handling function (to handle 3d space mouse events)
+ static void ProcessEvents( vtkObject* object, unsigned long event,
+ void* clientData, void* callData );
+
float MotionFactor;
float RadianToDegree; // constant: for conv from deg to rad
double myScale;
void onCursorMove(QPoint mousePos);
void setCursor(const int operation);
+ void onSpaceMouseMove( double* data );
+ void onSpaceMouseButton( int button );
+
+ void DecreaseSpeedIncrement();
+ void IncreaseSpeedIncrement();
+ void DecreaseGaussPointMagnification();
+ void IncreaseGaussPointMagnification();
+ void DominantCombinedSwitch();
+
signals:
void RenderWindowModified() ;
#include "VTKViewer_Algorithm.h"
#include "SVTK_Functor.h"
#include "SALOME_Actor.h"
+#include "SVTK_SpaceMouse.h"
+#include "SVTK_SpaceMouseEvent.h"
#include <stdio.h>
#include <stdlib.h>
// QT Includes
#include <qcolordialog.h>
+#include <qwidget.h>
+#include <qpaintdevice.h>
#include "utilities.h"
{
if(MYDEBUG) INFOS("SVTK_RenderWindowInteractor::~SVTK_RenderWindowInteractor()");
+ // stop 3d space mouse driver
+ SVTK_SpaceMouse* sm = SVTK_SpaceMouse::getInstance();
+ if ( sm->isSpaceMouseOn() )
+ sm->close( x11Display() );
+
delete mTimer ;
myInteractor->Delete();
SVTK_RenderWindowInteractor
::GetDisplayMode()
{
- return myDisplayMode;
+ return myDisplayMode;
}
myInteractor->SetEventInformation( event->x(), event->y(),
( event->state() & ControlButton ),
( event->state() & ShiftButton ) );
-
myInteractor->MouseMoveEvent();
//emit MouseMove( event ) ;
theRenderer->SetBackground( selColor.red()/255., selColor.green()/255., selColor.blue()/255. );
}
+//----------------------------------------------------------------------------
+bool
+SVTK_RenderWindowInteractor
+::x11Event( XEvent *xEvent )
+{
+ // handle 3d space mouse events
+ SVTK_SpaceMouse* sm = SVTK_SpaceMouse::getInstance();
+ if ( sm->isSpaceMouseOn() && xEvent->type == ClientMessage ) {
+ SVTK_SpaceMouse::MoveEvent spaceMouseEvent;
+ int type = sm->translateEvent( x11Display(), xEvent, &spaceMouseEvent, 1.0, 1.0 );
+ switch ( type )
+ {
+ case SVTK_SpaceMouse::SpaceMouseMove :
+ myInteractor->InvokeEvent( SpaceMouseMoveEvent, spaceMouseEvent.data );
+ break;
+ case SVTK_SpaceMouse::SpaceButtonPress :
+ myInteractor->InvokeEvent( SpaceMouseButtonEvent, &spaceMouseEvent.button );
+ break;
+ case SVTK_SpaceMouse::SpaceButtonRelease :
+ break;
+ }
+ return true; // stop handling the event
+ }
+
+ return SVTK_RenderWindow::x11Event( xEvent );
+}
+
+//----------------------------------------------------------------------------
+void
+SVTK_RenderWindowInteractor
+::focusInEvent ( QFocusEvent* event )
+{
+ QWidget::focusInEvent( event );
+
+ // register set space mouse events receiver
+ SVTK_SpaceMouse* sm = SVTK_SpaceMouse::getInstance();
+ if ( !sm->isSpaceMouseOn() ) {// initialize 3D space mouse driver
+ sm->initialize( x11Display(), winId() );
+ if ( !sm->isSpaceMouseOn() )
+ printf( "\nError: 3D Space Mouse driver was not started.\n" );
+ }
+ else
+ SVTK_SpaceMouse::getInstance()->setWindow( x11Display(), winId() );
+}
+
+//----------------------------------------------------------------------------
+void
+SVTK_RenderWindowInteractor
+::focusOutEvent ( QFocusEvent* event )
+{
+ QWidget::focusInEvent( event );
+ // unregister set space mouse events receiver
+ if ( SVTK_SpaceMouse::getInstance()->isSpaceMouseOn() )
+ SVTK_SpaceMouse::getInstance()->setWindow( x11Display(), 0 );
+}
+
//----------------------------------------------------------------------------
void
SVTK_RenderWindowInteractor
virtual void keyPressEvent( QKeyEvent* );
virtual void keyReleaseEvent( QKeyEvent* );
virtual void contextMenuEvent( QContextMenuEvent * e );
+ virtual bool x11Event( XEvent *e );
virtual void paintEvent( QPaintEvent* );
virtual void resizeEvent( QResizeEvent* );
virtual void onChangeBackgroundColor();
+ // reimplemented from QWidget in order to set window - receiver
+ // of space mouse events.
+ virtual void focusInEvent ( QFocusEvent* );
+ virtual void focusOutEvent( QFocusEvent* );
+
private slots:
// Not all of these slots are needed in VTK_MAJOR_VERSION=3,
// but moc does not understand "#if VTK_MAJOR_VERSION". Hence,
--- /dev/null
+// 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 : SVTK_SpaceMouse.cxx
+// Author : Alexander SLADKOV
+// Module : SALOME
+// $Header$
+
+#include <string.h>
+#include <math.h>
+#include <stdio.h>
+
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xatom.h>
+#include <X11/keysym.h>
+
+#include "SVTK_SpaceMouse.h"
+
+//---------------------------------------------
+SVTK_SpaceMouse* SVTK_SpaceMouse::myInstance = 0;
+
+//---------------------------------------------
+SVTK_SpaceMouse* SVTK_SpaceMouse::getInstance()
+{
+ if ( !myInstance )
+ myInstance = new SVTK_SpaceMouse();
+ return myInstance;
+}
+
+//---------------------------------------------
+SVTK_SpaceMouse::SVTK_SpaceMouse()
+{
+ win = InputFocus;
+ spaceMouseOn = 0;
+}
+
+//---------------------------------------------
+int SVTK_SpaceMouse::initialize( Display *display, Window window )
+{
+ XMotionEvent = XInternAtom( display, "MotionEvent", 1 );
+ XButtonPressEvent = XInternAtom( display, "ButtonPressEvent", 1 );
+ XButtonReleaseEvent = XInternAtom( display, "ButtonReleaseEvent", 1 );
+ XCommandEvent = XInternAtom( display, "CommandEvent", 1 );
+
+ spaceMouseOn = (XMotionEvent != 0) &&
+ (XButtonPressEvent != 0) &&
+ (XButtonReleaseEvent != 0) &&
+ (XCommandEvent != 0);
+ if ( !spaceMouseOn )
+ return 0;
+
+ spaceMouseOn = setWindow( display, window );
+ if ( !spaceMouseOn )
+ return 0;
+
+ return spaceMouseOn;
+}
+
+//---------------------------------------------
+static int errorCallback( Display *display, XErrorEvent *Error )
+{
+ char msg[ 128 ];
+ if ( Error->error_code != BadWindow ) {
+ XGetErrorText( display,Error->error_code,msg,sizeof( msg ) );
+ fprintf( stderr, "SpaceMouse reported error = %s. Exit ... \n", msg );
+ }
+ return 0;
+}
+
+//---------------------------------------------
+int SVTK_SpaceMouse::setWindow( Display *display, Window window )
+{
+ XTextProperty winName;
+ XEvent xEvent;
+ Atom type;
+ int format;
+ unsigned long NItems, BytesReturn;
+ unsigned char *PropReturn;
+ Window root;
+ int result;
+ int (*errorHandler)(Display *,XErrorEvent *);
+
+ result = 1;
+ errorHandler = XSetErrorHandler( errorCallback );
+
+ root = RootWindow( display, DefaultScreen(display) );
+
+ PropReturn = NULL;
+ XGetWindowProperty( display, root, XCommandEvent, 0,1, 0,
+ AnyPropertyType, &type, &format, &NItems,
+ &BytesReturn, &PropReturn );
+
+ win = InputFocus;
+ if ( PropReturn != NULL ) {
+ win = *(Window *) PropReturn;
+ XFree( PropReturn );
+ }
+ else
+ return result = 0;
+
+ if ( XGetWMName( display, win, &winName ) == 0 )
+ return result = 0;
+
+ if ( strcmp( (char *) "Magellan Window", (char *) winName.value) != 0 )
+ return result = 0;
+
+ xEvent.type = ClientMessage;
+ xEvent.xclient.format = 16;
+ xEvent.xclient.send_event = 0;
+ xEvent.xclient.display = display;
+ xEvent.xclient.window = win;
+ xEvent.xclient.message_type = XCommandEvent;
+
+ xEvent.xclient.data.s[0] = (short) ((window>>16)&0x0000FFFF);
+ xEvent.xclient.data.s[1] = (short) (window&0x0000FFFF);
+ xEvent.xclient.data.s[2] = 27695;
+
+ if ( XSendEvent( display, win, 0, 0x0000, &xEvent ) == 0 )
+ return result = 0;
+
+ XFlush( display );
+
+ XSetErrorHandler( errorHandler );
+ return result;
+}
+
+//---------------------------------------------
+int SVTK_SpaceMouse::close(Display *display)
+{
+ initialize( display, (Window)InputFocus );
+ spaceMouseOn = 0;
+
+ return 1;
+}
+
+//---------------------------------------------
+int SVTK_SpaceMouse::translateEvent( Display* display, XEvent* xEvent, MoveEvent* spaceMouseEvent,
+ double scale, double rScale )
+{
+ if ( !spaceMouseOn )
+ return 0;
+
+ if ( xEvent->type == ClientMessage ) {
+ if ( xEvent->xclient.message_type == XMotionEvent ) {
+ spaceMouseEvent->type = SpaceMouseMove;
+ spaceMouseEvent->data[ x ] =
+ xEvent->xclient.data.s[2] * scale;
+ spaceMouseEvent->data[ y ] =
+ xEvent->xclient.data.s[3] * scale;
+ spaceMouseEvent->data[ z ] =
+ xEvent->xclient.data.s[4] * scale;
+ spaceMouseEvent->data[ a ] =
+ xEvent->xclient.data.s[5] * rScale;
+ spaceMouseEvent->data[ b ] =
+ xEvent->xclient.data.s[6] * rScale;
+ spaceMouseEvent->data[ c ] =
+ xEvent->xclient.data.s[7] * rScale;
+ spaceMouseEvent->period = xEvent->xclient.data.s[8];
+ return 1;
+ }
+ else if ( xEvent->xclient.message_type == XButtonPressEvent ) {
+ spaceMouseEvent->type = SpaceButtonPress;
+ spaceMouseEvent->button = xEvent->xclient.data.s[2];
+ return 2;
+ }
+ else if ( xEvent->xclient.message_type == XButtonReleaseEvent ) {
+ spaceMouseEvent->type = SpaceButtonRelease;
+ spaceMouseEvent->button = xEvent->xclient.data.s[2];
+ return 3;
+ }
+ }
+ return (!display);
+}
+
--- /dev/null
+// 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 : SVTK_SpaceMouse.h
+// Author : Alexander SLADKOV
+// Module : SALOME
+// $Header$
+
+#ifndef SVTK_SpaceMouse_h
+#define SVTK_SpaceMouse_h
+
+extern "C"
+{
+#include <X11/X.h>
+#include <X11/Xlib.h>
+}
+
+class SVTK_SpaceMouse
+{
+ public:
+
+ // access to SpaceMouse utility class
+ static SVTK_SpaceMouse* getInstance();
+
+ enum MoveData { x, y, z, a, b, c };
+ enum EventType { SpaceMouseMove = 1, SpaceButtonPress, SpaceButtonRelease };
+
+ typedef struct {
+ int type;
+ int button;
+ double data[6];
+ int period;
+ } MoveEvent;
+
+ bool isSpaceMouseOn() const { return spaceMouseOn != 0; }
+
+ int initialize ( Display*, Window );
+ int setWindow ( Display*, Window );
+ int translateEvent ( Display*, XEvent*, MoveEvent*, double, double );
+ int close ( Display* );
+
+ private:
+ SVTK_SpaceMouse();
+ static SVTK_SpaceMouse* myInstance;
+
+ Atom XMotionEvent;
+ Atom XButtonPressEvent;
+ Atom XButtonReleaseEvent;
+ Atom XCommandEvent;
+
+ Window win;
+ int spaceMouseOn;
+};
+
+#endif
--- /dev/null
+// 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 : SVTK_SpaceMouseEvent.h
+// Author : Alexander SLADKOV
+// Module : SALOME
+// $Header$
+
+#ifndef SVTK_SpaceMouseEvent_h
+#define SVTK_SpaceMouseEvent_h
+
+#include <vtkCommand.h>
+
+enum SpaceMouseEvent {
+ SpaceMouseMoveEvent = vtkCommand::UserEvent+1,
+ SpaceMouseButtonEvent
+};
+
+#endif
this, SIGNAL(contextMenuRequested( QContextMenuEvent * )) );
onResetView();
+
+ setFocusProxy( myView ); // send focus events to myView (fixes a bug
+ // when on module activation myView received focusOutEvent
}
//----------------------------------------------------------------------------