From: env Date: Wed, 3 Aug 2005 08:21:57 +0000 (+0000) Subject: ENV: Windows porting X-Git-Tag: T_3_0_2a1~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fa8894197b6071711590f52fe4ed24db69bee91a;p=modules%2Fgui.git ENV: Windows porting --- diff --git a/src/Plot2d/Plot2d_SetupCurveDlg.cxx b/src/Plot2d/Plot2d_SetupCurveDlg.cxx index c0f0d5a0c..1f6c3729d 100644 --- a/src/Plot2d/Plot2d_SetupCurveDlg.cxx +++ b/src/Plot2d/Plot2d_SetupCurveDlg.cxx @@ -19,7 +19,10 @@ #include #include #include + +#ifndef WNT using namespace std; +#endif #define MARGIN_SIZE 11 #define SPACING_SIZE 6 diff --git a/src/Qtx/QtxResourceEdit.h b/src/Qtx/QtxResourceEdit.h index 3aaca30d6..6855f22b6 100644 --- a/src/Qtx/QtxResourceEdit.h +++ b/src/Qtx/QtxResourceEdit.h @@ -91,7 +91,7 @@ private: Descr: Class for incapsulation of one preference item */ -class QtxResourceEdit::Item +class QTX_EXPORT QtxResourceEdit::Item { public: Item( QtxResourceEdit*, Item* = 0 ); diff --git a/src/SPlot2d/SPlot2d_Prs.cxx b/src/SPlot2d/SPlot2d_Prs.cxx index 3f9fdc6b6..980877d2d 100644 --- a/src/SPlot2d/SPlot2d_Prs.cxx +++ b/src/SPlot2d/SPlot2d_Prs.cxx @@ -3,7 +3,9 @@ // Module : SUIT #include "SPlot2d_Prs.h" +#ifndef WNT using namespace std; +#endif //========================================================== /*! diff --git a/src/SPlot2d/SPlot2d_SetupPlot2dDlg.cxx b/src/SPlot2d/SPlot2d_SetupPlot2dDlg.cxx index 0e1cb4b64..d53a8f9f9 100644 --- a/src/SPlot2d/SPlot2d_SetupPlot2dDlg.cxx +++ b/src/SPlot2d/SPlot2d_SetupPlot2dDlg.cxx @@ -439,7 +439,11 @@ void SPlot2d_SetupPlot2dDlg::enableControls() break; } } +#ifndef WNT for ( int i = 0; i < myItems.count(); i++ ) { +#else + for ( i = 0; i < myItems.count(); i++ ) { +#endif if ( myItems.at( i )->isVerticalOn() ) bVSet = true; myItems.at( i )->enableWidgets( bHSet && myItems.at( i )->isVerticalOn() ); diff --git a/src/STD/STD_CloseDlg.cxx b/src/STD/STD_CloseDlg.cxx index ab78c0795..a894f54b3 100644 --- a/src/STD/STD_CloseDlg.cxx +++ b/src/STD/STD_CloseDlg.cxx @@ -6,7 +6,9 @@ #include #include +#ifndef WNT using namespace std; +#endif //================================================================================ /*! diff --git a/src/STD/STD_LoadStudiesDlg.cxx b/src/STD/STD_LoadStudiesDlg.cxx index 96c8882f8..f34716a59 100644 --- a/src/STD/STD_LoadStudiesDlg.cxx +++ b/src/STD/STD_LoadStudiesDlg.cxx @@ -4,7 +4,10 @@ #include #include #include + +#ifndef WNT using namespace std; +#endif #define SPACING_SIZE 6 #define MARGIN_SIZE 11 diff --git a/src/STD/STD_LoadStudiesDlg.h b/src/STD/STD_LoadStudiesDlg.h index c05ea2226..52786808f 100644 --- a/src/STD/STD_LoadStudiesDlg.h +++ b/src/STD/STD_LoadStudiesDlg.h @@ -3,6 +3,7 @@ #include #include +#include class QVBoxLayout; class QHBoxLayout; class QGridLayout; @@ -15,7 +16,7 @@ class QPushButton; * \brief Describes a dialog box that gives a list of opened studies. * */ -class STD_LoadStudiesDlg : public QDialog +class STD_EXPORT STD_LoadStudiesDlg : public QDialog { Q_OBJECT diff --git a/src/SUPERVGraph/SUPERVGraph.cxx b/src/SUPERVGraph/SUPERVGraph.cxx index 35105cfe8..2b8f3d87f 100755 --- a/src/SUPERVGraph/SUPERVGraph.cxx +++ b/src/SUPERVGraph/SUPERVGraph.cxx @@ -26,10 +26,11 @@ // Module : SALOME // $Header$ -using namespace std; #include "SUPERVGraph.h" #include "SUPERVGraph_ViewFrame.h" +using namespace std; + SUIT_ViewWindow* SUPERVGraph::createView(SUIT_Desktop* parent) { return new SUPERVGraph_ViewFrame( parent/*, "vtkView"*/ ); diff --git a/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx b/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx index b46810483..b98788db7 100755 --- a/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx +++ b/src/SUPERVGraph/SUPERVGraph_ViewFrame.cxx @@ -26,7 +26,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "SUPERVGraph_ViewFrame.h" #include "utilities.h" @@ -35,6 +34,8 @@ using namespace std; #include #include +using namespace std; + SUPERVGraph_View::SUPERVGraph_View( QWidget* theParent ): QWidget( theParent ) { diff --git a/src/SVTK/SVTK_CubeAxesActor2D.cxx b/src/SVTK/SVTK_CubeAxesActor2D.cxx index 55eb8df7d..3fdcf72f3 100644 --- a/src/SVTK/SVTK_CubeAxesActor2D.cxx +++ b/src/SVTK/SVTK_CubeAxesActor2D.cxx @@ -204,7 +204,11 @@ static void ChangeValues(float* aArray1,float* aArray2,float *aRange1,float* aRa for (int i=0; i<4; i++){ tmp = aArray1[i]; aArray1[i] = aArray2[i]; aArray2[i] = tmp; } +#ifndef WNT for(int i=0;i<2; i++){ +#else + for(i=0;i<2; i++){ +#endif tmp = aRange1[i]; aRange1[i] = aRange2[i]; aRange2[i] = tmp; } } @@ -440,19 +444,31 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport) // XCoords coordinates for X grid vtkFloatArray *XCoords = vtkFloatArray::New(); +#ifndef WNT for(int i=0;iInsertNextValue(val); } // YCoords coordinates for Y grid vtkFloatArray *YCoords = vtkFloatArray::New(); +#ifndef WNT for(int i=0;iInsertNextValue(val); } // ZCoords coordinates for Z grid vtkFloatArray *ZCoords = vtkFloatArray::New(); +#ifndef WNT for(int i=0;iInsertNextValue(val); } @@ -512,7 +528,11 @@ int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport) p[5][1] = YCoords->GetValue(numOfLabelsY-1); p[5][2] = aMiddleZ; +#ifndef WNT for(int i=0;i<3;i++) +#else + for(i=0;i<3;i++) +#endif for(int j=0;j<6;j++) vecs[j][i] = p[j][i] - aCPosition[i]; if ( vtkMath::Dot(vecs[0],aCDirection) < vtkMath::Dot(vecs[1],aCDirection)) diff --git a/src/SVTK/SVTK_CubeAxesActor2D.h b/src/SVTK/SVTK_CubeAxesActor2D.h index 69d5efd8c..1de1c1ce8 100644 --- a/src/SVTK/SVTK_CubeAxesActor2D.h +++ b/src/SVTK/SVTK_CubeAxesActor2D.h @@ -41,7 +41,13 @@ class vtkPolyDataMapper; class vtkRectilinearGridGeometryFilter; class VTKViewer_Transform; +#include + +#ifndef WNT class VTK_HYBRID_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D +#else +class SVTK_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D +#endif { public: vtkTypeRevisionMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D); diff --git a/src/SVTK/SVTK_RenderWindow.cxx b/src/SVTK/SVTK_RenderWindow.cxx index f2472a730..ef58739a7 100644 --- a/src/SVTK/SVTK_RenderWindow.cxx +++ b/src/SVTK/SVTK_RenderWindow.cxx @@ -14,6 +14,8 @@ //#include //#include //#include +#else +#include #endif #if QT_VERSION > 300 diff --git a/src/SalomeApp/SalomeApp_DataObject.cxx b/src/SalomeApp/SalomeApp_DataObject.cxx index 70e0e1546..235115a12 100644 --- a/src/SalomeApp/SalomeApp_DataObject.cxx +++ b/src/SalomeApp/SalomeApp_DataObject.cxx @@ -148,7 +148,11 @@ QString SalomeApp_DataObject::text( const int id ) const switch ( id ) { case CT_Value: +#ifndef WNT if ( componentObject() != this ) +#else + if ( componentObject() != (SUIT_DataObject*)this ) +#endif txt = value( referencedObject() ); break; case CT_Entry: diff --git a/src/SalomeApp/SalomeApp_DataOwner.cxx b/src/SalomeApp/SalomeApp_DataOwner.cxx index fe7c6b19f..4035b214f 100644 --- a/src/SalomeApp/SalomeApp_DataOwner.cxx +++ b/src/SalomeApp/SalomeApp_DataOwner.cxx @@ -6,7 +6,7 @@ #include #endif -#include +#include /*!Constructor. Initialize by \a theEntry.*/ SalomeApp_DataOwner diff --git a/src/SalomeApp/SalomeApp_ImportOperation.cxx b/src/SalomeApp/SalomeApp_ImportOperation.cxx index ae1cb54ad..5543f903f 100644 --- a/src/SalomeApp/SalomeApp_ImportOperation.cxx +++ b/src/SalomeApp/SalomeApp_ImportOperation.cxx @@ -29,7 +29,9 @@ #include "SalomeApp_ImportOperation.h" #include +#ifndef WNT using namespace std; +#endif /*!Constructor. Do nothing.*/ SalomeApp_ImportOperation::SalomeApp_ImportOperation( SUIT_Application* app ) : diff --git a/src/SalomeApp/SalomeApp_ModuleDlg.cxx b/src/SalomeApp/SalomeApp_ModuleDlg.cxx index f9c2d1e48..0b1ebc7e7 100644 --- a/src/SalomeApp/SalomeApp_ModuleDlg.cxx +++ b/src/SalomeApp/SalomeApp_ModuleDlg.cxx @@ -15,7 +15,10 @@ #include #include #include + +#ifndef WNT using namespace std; +#endif /*!Default icon*/ static const char* const default_icon[] = { diff --git a/src/SalomeApp/SalomeApp_NameDlg.cxx b/src/SalomeApp/SalomeApp_NameDlg.cxx index 4380e3006..632404f52 100644 --- a/src/SalomeApp/SalomeApp_NameDlg.cxx +++ b/src/SalomeApp/SalomeApp_NameDlg.cxx @@ -19,7 +19,10 @@ #include #include #include + +#ifndef WNT using namespace std; +#endif /*! Constructor diff --git a/src/SalomeApp/SalomeApp_Selection.cxx b/src/SalomeApp/SalomeApp_Selection.cxx index 2395fc377..8115b435c 100644 --- a/src/SalomeApp/SalomeApp_Selection.cxx +++ b/src/SalomeApp/SalomeApp_Selection.cxx @@ -75,7 +75,11 @@ QtxValue SalomeApp_Selection::globalParam( const QString& p ) const if ( p == "client" ) return QtxValue( myPopupClient ); else if ( p == "isActiveView" ) return QtxValue( (bool)activeVW() ); else if ( p == "activeView" ) return QtxValue( activeViewType() ); +#ifndef WNT else return QtxPopupMgr::Selection::globalParam( p ); +#else + else return Selection::globalParam( p ); +#endif } /*! diff --git a/src/Session/InquireServersQThread.cxx b/src/Session/InquireServersQThread.cxx index 997a73ab7..3a4b9ddd6 100755 --- a/src/Session/InquireServersQThread.cxx +++ b/src/Session/InquireServersQThread.cxx @@ -7,7 +7,6 @@ // Module : SALOME // $Header$ -using namespace std; #include "InquireServersQThread.h" #include @@ -39,6 +38,8 @@ using namespace std; #include "utilities.h" #include "OpUtil.hxx" +using namespace std; + #include CORBA_CLIENT_HEADER(SALOME_Session) #include CORBA_CLIENT_HEADER(SALOME_Registry) #include CORBA_CLIENT_HEADER(SALOMEDS) @@ -324,11 +325,18 @@ bool InquireServersQThread::AskServer(int iteration, QString ** errMessage) //will be set true if we get response from server bool IsPassed = false; QString errDescription; +#ifdef WNT + int i; +#endif switch (iteration) { case 1: //First checking - existence of Naming Service +#ifndef WNT for (int i = myRepeat; i ; i--) +#else + for (i = myRepeat; i ; i--) +#endif { try { diff --git a/src/Session/InquireServersQThread.h b/src/Session/InquireServersQThread.h index d1d3c31b8..b97bfd012 100755 --- a/src/Session/InquireServersQThread.h +++ b/src/Session/InquireServersQThread.h @@ -11,12 +11,18 @@ #include #include +#ifdef WNT +#include +#else +#define SALOME_WNT_EXPORT +#endif + /********************************************************** ** Class: InquireEvent ** Descr: Contains QCustomEvents for posting to InquireServersQThread ** Level: Private ***********************************************************/ -class InquireEvent : public QCustomEvent +class SALOME_WNT_EXPORT InquireEvent : public QCustomEvent { public: @@ -33,7 +39,7 @@ public: class InquireServersGUI; -class InquireServersQThread : public QThread +class SALOME_WNT_EXPORT InquireServersQThread : public QThread { public: InquireServersQThread( InquireServersGUI* r ); @@ -78,7 +84,7 @@ private: class QLabel; class QFrame; class QProgressBar; -class InquireServersGUI : public QVBox +class SALOME_WNT_EXPORT InquireServersGUI : public QVBox { Q_OBJECT diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index b52c9b040..c6e3aefe9 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -34,7 +34,9 @@ #include "InquireServersQThread.h" // splash #include +#ifndef WNT #include +#endif #include #include diff --git a/src/Session/SalomeApp_Engine_i.cxx b/src/Session/SalomeApp_Engine_i.cxx index 07fd50945..27cc1cdd3 100644 --- a/src/Session/SalomeApp_Engine_i.cxx +++ b/src/Session/SalomeApp_Engine_i.cxx @@ -32,7 +32,9 @@ #include "utilities.h" -#include +#include + +using namespace std; SalomeApp_Engine_i* SalomeApp_Engine_i::myInstance = NULL; diff --git a/src/Session/SalomeApp_Engine_i.hxx b/src/Session/SalomeApp_Engine_i.hxx index fe840692c..b3c79a101 100755 --- a/src/Session/SalomeApp_Engine_i.hxx +++ b/src/Session/SalomeApp_Engine_i.hxx @@ -37,7 +37,13 @@ #include #include CORBA_SERVER_HEADER(SalomeApp_Engine) -class SalomeApp_Engine_i: public POA_SalomeApp::Engine, +#ifdef WNT +#include +#else +#define SALOME_WNT_EXPORT +#endif + +class SALOME_WNT_EXPORT SalomeApp_Engine_i: public POA_SalomeApp::Engine, public Engines_Component_i { public: diff --git a/src/Session/Session_ServerLauncher.hxx b/src/Session/Session_ServerLauncher.hxx index cb3bec809..8791b6698 100755 --- a/src/Session/Session_ServerLauncher.hxx +++ b/src/Session/Session_ServerLauncher.hxx @@ -38,6 +38,13 @@ #include #include + +#ifdef WNT +#include +#else +#define SALOME_WNT_EXPORT +#endif + using namespace std; class ServArg @@ -53,7 +60,7 @@ inline ServArg::ServArg(int servType, int firstArg, int lastArg): _servType(servType),_firstArg(firstArg),_lastArg(lastArg) {} -class Session_ServerLauncher: public QThread +class SALOME_WNT_EXPORT Session_ServerLauncher: public QThread { public: Session_ServerLauncher(); diff --git a/src/Session/Session_ServerThread.cxx b/src/Session/Session_ServerThread.cxx index af3956a5f..47f8bff0f 100755 --- a/src/Session/Session_ServerThread.cxx +++ b/src/Session/Session_ServerThread.cxx @@ -118,7 +118,11 @@ void Session_ServerThread::Init() MESSAGE("Session_ServerThread::Init "<< _argv[0]); for (int i=0; i<_argc; i++) SCRUTE(_argv[i]); +#ifndef WNT for (int i=0; i + class vtkRenderer; -extern void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint = false); -extern int ComputeVisiblePropBounds(vtkRenderer* theRenderer, float theBounds[6]); -extern void ResetCameraClippingRange(vtkRenderer* theRenderer); -extern bool ComputeTrihedronSize(vtkRenderer* theRenderer, double& theNewSize, +VTKVIEWER_EXPORT extern void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint = false); +VTKVIEWER_EXPORT extern int ComputeVisiblePropBounds(vtkRenderer* theRenderer, float theBounds[6]); +VTKVIEWER_EXPORT extern void ResetCameraClippingRange(vtkRenderer* theRenderer); +VTKVIEWER_EXPORT extern bool ComputeTrihedronSize(vtkRenderer* theRenderer, double& theNewSize, const double theSize, const float theSizeInPercents); #ifndef max