From: abd Date: Fri, 8 Aug 2008 07:24:59 +0000 (+0000) Subject: Merging with BR_WPdev_For_5_0 X-Git-Tag: TG_TRIPOLI_qt4_porting~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4ceaa34404ec57fad2f3a08423f5dd03b3f9c1f3;p=modules%2Fgui.git Merging with BR_WPdev_For_5_0 --- diff --git a/src/OCCViewer/OCCViewer_ViewPort.cxx b/src/OCCViewer/OCCViewer_ViewPort.cxx index 166a7bb34..d21fb39f3 100755 --- a/src/OCCViewer/OCCViewer_ViewPort.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort.cxx @@ -34,11 +34,11 @@ #include #include #include -#include #include #if !defined WNT +#include #include #include #include diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 9347a441a..b42f2d796 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -67,6 +67,10 @@ static QEvent* l_mbPressEvent = 0; +#ifdef WIN32 +# include +#endif + const char* imageZoomCursor[] = { "32 32 3 1", ". c None", @@ -888,6 +892,9 @@ void OCCViewer_ViewWindow::drawRect() { if ( !myRectBand ) { myRectBand = new QRubberBand( QRubberBand::Rectangle, myViewPort ); +#ifdef WIN32 + myRectBand->setStyle(new QWindowsStyle); +#endif QPalette palette; palette.setColor(myRectBand->foregroundRole(), Qt::white); myRectBand->setPalette(palette); diff --git a/src/SVTK/SALOME_Actor.h b/src/SVTK/SALOME_Actor.h index db4e2e56e..4316ef3dc 100644 --- a/src/SVTK/SALOME_Actor.h +++ b/src/SVTK/SALOME_Actor.h @@ -54,8 +54,8 @@ class SVTK_Actor; class SVTK_RectPicker; class SVTK_InteractorStyle; -extern int SALOME_POINT_SIZE; -extern int SALOME_LINE_WIDTH; +SVTK_EXPORT extern int SALOME_POINT_SIZE; +SVTK_EXPORT extern int SALOME_LINE_WIDTH; #ifdef WIN32 #pragma warning ( disable:4251 ) diff --git a/src/SVTK/SVTK_RenderWindowInteractor.cxx b/src/SVTK/SVTK_RenderWindowInteractor.cxx index 56236ad89..66287bf79 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.cxx +++ b/src/SVTK/SVTK_RenderWindowInteractor.cxx @@ -37,7 +37,9 @@ // QT Includes // Put Qt includes before the X11 includes which #define the symbol None // (see SVTK_SpaceMouse.h) to avoid the compilation error. -#include +#ifndef WIN32 +# include +#endif #include #include "SVTK_SpaceMouse.h" @@ -414,10 +416,10 @@ QVTK_RenderWindowInteractor /*! To handle native Win32 events (from such devices as SpaceMouse) */ -bool QVTK_RenderWindowInteractor::winEvent( MSG* msg ) +bool QVTK_RenderWindowInteractor::winEvent( MSG* msg, long* result ) { // TODO: Implement event handling for SpaceMouse - return QWidget::winEvent( msg ); + return QWidget::winEvent( msg, result); } #else diff --git a/src/SVTK/SVTK_RenderWindowInteractor.h b/src/SVTK/SVTK_RenderWindowInteractor.h index 51aa1ec59..ab5f9c182 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.h +++ b/src/SVTK/SVTK_RenderWindowInteractor.h @@ -122,7 +122,7 @@ class SVTK_EXPORT QVTK_RenderWindowInteractor: public QWidget //! To handle native events (from such devices as SpaceMouse) #ifdef WIN32 - virtual bool winEvent( MSG* ); + virtual bool winEvent( MSG*, long* ); #else virtual bool x11Event( XEvent *e ); #endif diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 8032dcce4..9f656ddb2 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -65,6 +65,8 @@ #include #include +#include + /*! - read arguments, define list of server to launch with their arguments. * - wait for naming service * - create and run a thread for launch of all servers diff --git a/src/Session/Session_Session_i.cxx b/src/Session/Session_Session_i.cxx index 88d2b3fad..089c223f0 100755 --- a/src/Session/Session_Session_i.cxx +++ b/src/Session/Session_Session_i.cxx @@ -34,11 +34,9 @@ #include "SALOME_Event.h" #include "SUIT_Session.h" -//#include "SUIT_Application.h" #include "SUIT_Desktop.h" #include "SUIT_Study.h" -//#include #include #include @@ -46,6 +44,11 @@ #include #include +#ifdef WNT +# include +#endif + + using namespace std; /*! @@ -203,6 +206,15 @@ CORBA::Long SALOME_Session_i::GetActiveStudyId() return aStudyId; } +CORBA::Long SALOME_Session_i::getPID() { + return (CORBA::Long) +#ifndef WNT + getpid(); +#else + _getpid(); +#endif +} + bool SALOME_Session_i::restoreVisualState(CORBA::Long theSavePoint) { class TEvent: public SALOME_Event { diff --git a/src/Session/Session_Session_i.hxx b/src/Session/Session_Session_i.hxx index efef52f60..fc7a1e56e 100755 --- a/src/Session/Session_Session_i.hxx +++ b/src/Session/Session_Session_i.hxx @@ -69,7 +69,7 @@ public: CORBA::Long GetActiveStudyId(); void ping(){}; - CORBA::Long getPID() { return (CORBA::Long)getpid(); }; + CORBA::Long getPID(); //! Restors a visual state of the study at theSavePoint bool restoreVisualState(CORBA::Long theSavePoint);