Windows porting

This commit is contained in:
szy 2005-08-19 11:51:38 +00:00
parent a8a220072b
commit 409b095d25
26 changed files with 178 additions and 42 deletions

View File

@ -26,7 +26,6 @@
// Module : GEOM // Module : GEOM
// $Header$ // $Header$
using namespace std;
#include "BasicGUI.h" #include "BasicGUI.h"
#include "GeometryGUI.h" #include "GeometryGUI.h"
@ -56,6 +55,8 @@ using namespace std;
#include "BasicGUI_WorkingPlaneDlg.h" // Method WORKING PLANE #include "BasicGUI_WorkingPlaneDlg.h" // Method WORKING PLANE
#include "BasicGUI_MarkerDlg.h" // Method REPAIR #include "BasicGUI_MarkerDlg.h" // Method REPAIR
using namespace std;
BasicGUI* BasicGUI::myGUIObject = 0; BasicGUI* BasicGUI::myGUIObject = 0;
//======================================================================= //=======================================================================

View File

@ -34,6 +34,11 @@
#include <V3d_View.hxx> #include <V3d_View.hxx>
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
//================================================================================= //=================================================================================
// class : BasicGUI // class : BasicGUI
// purpose : // purpose :

View File

@ -31,7 +31,11 @@
#include "GEOMBase_Skeleton.h" #include "GEOMBase_Skeleton.h"
#include "DlgRef_3Sel_QTD.h" #include "DlgRef_3Sel_QTD.h"
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
//================================================================================= //=================================================================================
// class : BasicGUI_ArcDlg // class : BasicGUI_ArcDlg
// purpose : // purpose :

View File

@ -38,7 +38,11 @@
//#include "GEOM_EdgeFilter.hxx" //#include "GEOM_EdgeFilter.hxx"
//#include "GEOM_ShapeTypeFilter.hxx" //#include "GEOM_ShapeTypeFilter.hxx"
#include <gp_Dir.hxx> #include <gp_Dir.hxx>
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
//================================================================================= //=================================================================================
// class : BasicGUI_CircleDlg // class : BasicGUI_CircleDlg

View File

@ -32,7 +32,11 @@
#include "DlgRef_1Sel_QTD.h" #include "DlgRef_1Sel_QTD.h"
#include "BasicGUI.h" #include "BasicGUI.h"
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
//#include "GEOM_ShapeTypeFilter.hxx" //#include "GEOM_ShapeTypeFilter.hxx"
//================================================================================= //=================================================================================

View File

@ -36,7 +36,11 @@
//#include "GEOM_ShapeTypeFilter.hxx" //#include "GEOM_ShapeTypeFilter.hxx"
//#include "GEOM_EdgeFilter.hxx" //#include "GEOM_EdgeFilter.hxx"
#include <gp_Dir.hxx> #include <gp_Dir.hxx>
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
//================================================================================= //=================================================================================
// class : BasicGUI_EllipseDlg // class : BasicGUI_EllipseDlg
// purpose : // purpose :

View File

@ -32,6 +32,11 @@
#include "GEOMBase_Skeleton.h" #include "GEOMBase_Skeleton.h"
#include "DlgRef_2Sel_QTD.h" #include "DlgRef_2Sel_QTD.h"
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
//================================================================================= //=================================================================================
// class : BasicGUI_LineDlg // class : BasicGUI_LineDlg

View File

@ -37,6 +37,12 @@
class DlgRef_SpinBox; class DlgRef_SpinBox;
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
class BasicGUI_MarkerDlg : public GEOMBase_Skeleton class BasicGUI_MarkerDlg : public GEOMBase_Skeleton
{ {
Q_OBJECT Q_OBJECT

View File

@ -34,6 +34,11 @@
#include "DlgRef_2Sel1Spin.h" #include "DlgRef_2Sel1Spin.h"
#include "DlgRef_3Sel1Spin.h" #include "DlgRef_3Sel1Spin.h"
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
//================================================================================= //=================================================================================
// class : BasicGUI_PlaneDlg // class : BasicGUI_PlaneDlg

View File

@ -26,7 +26,6 @@
// Module : GEOM // Module : GEOM
// $Header$ // $Header$
using namespace std;
#include "BasicGUI_PointDlg.h" #include "BasicGUI_PointDlg.h"
#include "SUIT_Session.h" #include "SUIT_Session.h"
@ -47,7 +46,7 @@ using namespace std;
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <qapplication.h> #include <qapplication.h>
using namespace std;
//================================================================================= //=================================================================================
// class : BasicGUI_PointDlg() // class : BasicGUI_PointDlg()
// purpose : Constructs a BasicGUI_PointDlg which is a child of 'parent', with the // purpose : Constructs a BasicGUI_PointDlg which is a child of 'parent', with the

View File

@ -37,6 +37,11 @@
class QLineEdit; class QLineEdit;
class QGroupBox; class QGroupBox;
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
//================================================================================= //=================================================================================
// class : BasicGUI_PointDlg // class : BasicGUI_PointDlg
// purpose : // purpose :

View File

@ -26,7 +26,6 @@
// Module : GEOM // Module : GEOM
// $Header$ // $Header$
using namespace std;
#include "BasicGUI_VectorDlg.h" #include "BasicGUI_VectorDlg.h"
#include "SUIT_Desktop.h" #include "SUIT_Desktop.h"
@ -40,6 +39,8 @@ using namespace std;
#include "utilities.h" #include "utilities.h"
using namespace std;
//================================================================================= //=================================================================================
// class : BasicGUI_VectorDlg() // class : BasicGUI_VectorDlg()
// purpose : Constructs a BasicGUI_VectorDlg which is a child of 'parent', with the // purpose : Constructs a BasicGUI_VectorDlg which is a child of 'parent', with the

View File

@ -36,6 +36,11 @@
#include "BasicGUI.h" #include "BasicGUI.h"
//#include "GEOM_ShapeTypeFilter.hxx" //#include "GEOM_ShapeTypeFilter.hxx"
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
//================================================================================= //=================================================================================
// class : BasicGUI_VectorDlg // class : BasicGUI_VectorDlg
// purpose : // purpose :

View File

@ -25,7 +25,6 @@
// Author : Lucien PIGNOLONI // Author : Lucien PIGNOLONI
// Module : GEOM // Module : GEOM
using namespace std;
#include "BasicGUI_WorkingPlaneDlg.h" #include "BasicGUI_WorkingPlaneDlg.h"
#include "GEOMBase.h" #include "GEOMBase.h"
@ -53,6 +52,8 @@ using namespace std;
#include <qcheckbox.h> #include <qcheckbox.h>
#include <qlabel.h> #include <qlabel.h>
using namespace std;
//================================================================================= //=================================================================================
// class : BasicGUI_WorkingPlaneDlg() // class : BasicGUI_WorkingPlaneDlg()
// purpose : Constructs a BasicGUI_WorkingPlaneDlg which is a child of 'parent', with the // purpose : Constructs a BasicGUI_WorkingPlaneDlg which is a child of 'parent', with the

View File

@ -33,19 +33,22 @@
#include "DlgRef_2Sel_QTD.h" #include "DlgRef_2Sel_QTD.h"
#include "DlgRef_3Check_QTD.h" #include "DlgRef_3Check_QTD.h"
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
//================================================================================= //=================================================================================
// class : BasicGUI_WorkingPlaneDlg // class : BasicGUI_WorkingPlaneDlg
// purpose : // purpose :
//================================================================================= //=================================================================================
class BasicGUI_WorkingPlaneDlg : public GEOMBase_Skeleton class BASICGUI_WNT_EXPORT BasicGUI_WorkingPlaneDlg : public GEOMBase_Skeleton
{ {
Q_OBJECT Q_OBJECT
public: public:
BasicGUI_WorkingPlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); BasicGUI_WorkingPlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~BasicGUI_WorkingPlaneDlg(); ~BasicGUI_WorkingPlaneDlg();
virtual void closeEvent( QCloseEvent* e ); virtual void closeEvent( QCloseEvent* e );
private: private:

View File

@ -31,10 +31,15 @@
#include "GEOMGUI.h" #include "GEOMGUI.h"
#include "GEOMBase.h" #include "GEOMBase.h"
#ifdef WNT //#ifdef WNT
#include <SALOME_WNT.hxx> //#include <SALOME_WNT.hxx>
//#else
//#define SALOME_WNT_EXPORT
//#endif
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define DISPLAYGUI_WNT_EXPORT __declspec( dllexport )
#else #else
#define SALOME_WNT_EXPORT #define DISPLAYGUI_WNT_EXPORT
#endif #endif
//================================================================================= //=================================================================================
// class : GEOMBase_Display // class : GEOMBase_Display

View File

@ -40,6 +40,17 @@
// QT Includes // QT Includes
#include <qstring.h> #include <qstring.h>
//#if defined WNT
//#include <SALOME_WNT.hxx>
//#else
//#define SALOME_WNT_EXPORT
//#endif
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define GEOMBASE_WNT_EXPORT __declspec( dllexport )
#else
#define GEOMBASE_WNT_EXPORT
#endif
class GEOM_Actor; class GEOM_Actor;
class SALOME_ListIO; class SALOME_ListIO;
@ -51,7 +62,7 @@ class QWidget;
// class : GEOMBase // class : GEOMBase
// purpose : // purpose :
//================================================================================= //=================================================================================
class GEOMBase class GEOMBASE_WNT_EXPORT GEOMBase
{ {
public : public :
GEOMBase(); GEOMBase();

View File

@ -38,7 +38,16 @@
#include <qstring.h> #include <qstring.h>
#include <list> #include <list>
//#if defined WNT
//#include <SALOME_WNT.hxx>
//#else
//#define SALOME_WNT_EXPORT
//#endif
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define GEOMBASE_WNT_EXPORT __declspec( dllexport )
#else
#define GEOMBASE_WNT_EXPORT
#endif
typedef std::list<GEOM::GEOM_Object_ptr> ObjectList; typedef std::list<GEOM::GEOM_Object_ptr> ObjectList;
class SalomeApp_Study; class SalomeApp_Study;
@ -55,7 +64,7 @@ class TColStd_MapOfInteger;
// performing common operations (display/erase, selection activation, // performing common operations (display/erase, selection activation,
// publication in a study, transaction management) // publication in a study, transaction management)
//================================================================ //================================================================
class GEOMBase_Helper class GEOMBASE_WNT_EXPORT GEOMBase_Helper
{ {
public: public:
GEOMBase_Helper( SUIT_Desktop* ); GEOMBase_Helper( SUIT_Desktop* );

View File

@ -42,14 +42,25 @@
#include <qpushbutton.h> #include <qpushbutton.h>
#include <qradiobutton.h> #include <qradiobutton.h>
#include <qbuttongroup.h> #include <qbuttongroup.h>
//#if defined WNT
//#include <SALOME_WNT.hxx>
//#else
//#define SALOME_WNT_EXPORT
//#endif
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define GEOMBASE_WNT_EXPORT __declspec( dllexport )
#else
#define GEOMBASE_WNT_EXPORT
#endif
class GEOMBase_Skeleton : public DlgRef_Skeleton_QTD, public GEOMBase_Helper class GEOMBASE_WNT_EXPORT GEOMBase_Skeleton : public DlgRef_Skeleton_QTD, public GEOMBase_Helper
{ {
Q_OBJECT Q_OBJECT
public: public:
GEOMBase_Skeleton(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0); GEOMBase_Skeleton(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
~GEOMBase_Skeleton(); ~GEOMBase_Skeleton();
// int getConstructorId() const; // returns id of a selected "constructor" radio button or '-1' in case of error
private : private :
void Init(); void Init();

View File

@ -31,9 +31,11 @@
#include "SUIT_Operation.h" #include "SUIT_Operation.h"
#include <SALOMEconfig.h> #include <SALOMEconfig.h>
#include <Standard_Macro.hxx>
#include CORBA_CLIENT_HEADER(GEOM_Gen) #include CORBA_CLIENT_HEADER(GEOM_Gen)
class GEOM_Operation : public SUIT_Operation
class Standard_EXPORT GEOM_Operation : public SUIT_Operation
{ {
public: public:
GEOM_Operation( SUIT_Application*, GEOM::GEOM_IOperations_ptr ); GEOM_Operation( SUIT_Application*, GEOM::GEOM_IOperations_ptr );

View File

@ -28,6 +28,8 @@
#include <Standard_Stream.hxx> #include <Standard_Stream.hxx>
#include <Standard_Stream.hxx>
#include <strstream> #include <strstream>
#include "GEOM_Client.hxx" #include "GEOM_Client.hxx"

View File

@ -51,11 +51,16 @@ class TopoDS_Shape;
#ifndef _Standard_Macro_HeaderFile #ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>
#endif #endif
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define GEOMCLIENT_WNT_EXPORT __declspec( dllexport )
#else
#define GEOMCLIENT_WNT_EXPORT
#endif
//===================================================================== //=====================================================================
// GEOM_Client : class definition // GEOM_Client : class definition
//===================================================================== //=====================================================================
class GEOM_Client { class GEOMCLIENT_WNT_EXPORT GEOM_Client {
public: public:
@ -73,15 +78,24 @@ public:
} }
// Methods PUBLIC // Methods PUBLIC
// //
Standard_EXPORT GEOM_Client(); //Standard_EXPORT
Standard_EXPORT GEOM_Client(Engines::Container_ptr client); GEOM_Client();
Standard_EXPORT Standard_Integer Find( const TCollection_AsciiString& IOR, TopoDS_Shape& S ) ; //Standard_EXPORT
Standard_EXPORT Standard_Integer Find( const TopoDS_Shape& S, TCollection_AsciiString& IOR ) ; GEOM_Client(Engines::Container_ptr client);
Standard_EXPORT void Bind( const TCollection_AsciiString& IOR, const TopoDS_Shape& S ) ; //Standard_EXPORT
Standard_EXPORT TopoDS_Shape GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_ptr aShape ); Standard_Integer Find( const TCollection_AsciiString& IOR, TopoDS_Shape& S ) ;
Standard_EXPORT void RemoveShapeFromBuffer( const TCollection_AsciiString& IOR ) ; //Standard_EXPORT
Standard_EXPORT void ClearClientBuffer() ; Standard_Integer Find( const TopoDS_Shape& S, TCollection_AsciiString& IOR ) ;
Standard_EXPORT unsigned int BufferLength() ; //Standard_EXPORT
void Bind( const TCollection_AsciiString& IOR, const TopoDS_Shape& S ) ;
//Standard_EXPORT
TopoDS_Shape GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_ptr aShape );
//Standard_EXPORT
void RemoveShapeFromBuffer( const TCollection_AsciiString& IOR ) ;
//Standard_EXPORT
void ClearClientBuffer() ;
//Standard_EXPORT
unsigned int BufferLength() ;
TopoDS_Shape Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_ptr aShape); TopoDS_Shape Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_ptr aShape);
private: private:

View File

@ -37,11 +37,21 @@ class QMouseEvent;
class QKeyEvent; class QKeyEvent;
class GeometryGUI; class GeometryGUI;
//#ifdef WNT
//#include <SALOME_WNT.hxx>
//#else
//#define SALOME_WNT_EXPORT
//#endif
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define GEOMGUI_WNT_EXPORT __declspec( dllexport )
#else
#define GEOMGUI_WNT_EXPORT
#endif
//================================================================================= //=================================================================================
// class : GEOMGUI // class : GEOMGUI
// purpose : Base class for all geometry GUI subclasses // purpose : Base class for all geometry GUI subclasses
//================================================================================= //=================================================================================
class GEOMGUI : public QObject class GEOMGUI_WNT_EXPORT GEOMGUI : public QObject
{ {
public : public :
// Constructor // Constructor

View File

@ -52,14 +52,18 @@ class SalomeApp_SelectionMgr;
class SalomeApp_Study; class SalomeApp_Study;
class SUIT_SelectionFilter; class SUIT_SelectionFilter;
//class SALOME_Selection; //class SALOME_Selection;
//#ifdef WNT
#ifdef WNT //#include <SALOME_WNT.hxx>
#include <SALOME_WNT.hxx> //#else
//#define SALOME_WNT_EXPORT
//#endif
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define GEOMGUI_WNT_EXPORT __declspec( dllexport )
#else #else
#define SALOME_WNT_EXPORT #define GEOMGUI_WNT_EXPORT
#endif #endif
class SALOME_WNT_EXPORT GEOM_Displayer : public SALOME_Displayer class GEOMGUI_WNT_EXPORT GEOM_Displayer : public SALOME_Displayer
{ {
public: public:

View File

@ -67,14 +67,19 @@
#include <vtkCamera.h> #include <vtkCamera.h>
#include <vtkRenderer.h> #include <vtkRenderer.h>
extern "C" { extern "C" {
Standard_EXPORT CAM_Module* createModule() { Standard_EXPORT CAM_Module* createModule() {
return new GeometryGUI(); return new GeometryGUI();
} }
} }
GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil(); GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil();
GEOM::GEOM_Gen_var GeometryGUI::GetGeomGen() { return GeometryGUI::myComponentGeom; }
bool GeometryGUI::InitGeomGen() bool GeometryGUI::InitGeomGen()
{ {
GeometryGUI aGG; GeometryGUI aGG;

View File

@ -53,6 +53,18 @@
#define SALOME_WNT_EXPORT #define SALOME_WNT_EXPORT
#endif #endif
//#if defined WNT
//#include <SALOME_WNT.hxx>
//#else
//#define SALOME_WNT_EXPORT
//#endif
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define GEOMGUI_WNT_EXPORT __declspec( dllexport )
#else
#define GEOMGUI_WNT_EXPORT
#endif
typedef QMap<QString, GEOMGUI*> GUIMap; typedef QMap<QString, GEOMGUI*> GUIMap;
class QDialog; class QDialog;
@ -61,12 +73,11 @@ class GEOMGUI_OCCSelector;
class SalomeApp_VTKSelector; class SalomeApp_VTKSelector;
class SUIT_ViewManager; class SUIT_ViewManager;
//================================================================================= //=================================================================================
// class : GeometryGUI // class : GeometryGUI
// purpose : // purpose :
//================================================================================= //=================================================================================
class SALOME_WNT_EXPORT GeometryGUI : public SalomeApp_Module class GEOMGUI_WNT_EXPORT GeometryGUI : public SalomeApp_Module
{ {
Q_OBJECT; Q_OBJECT;
@ -82,7 +93,7 @@ public:
static bool InitGeomGen(); //BugID IPAL9186: SRN: To be called by Python scripts static bool InitGeomGen(); //BugID IPAL9186: SRN: To be called by Python scripts
static GEOM::GEOM_Gen_var GetGeomGen() { return myComponentGeom; } static GEOM::GEOM_Gen_var GetGeomGen();// { return GeometryGUI::myComponentGeom; }
static CORBA::Object_var ClientSObjectToObject (_PTR(SObject) theSObject); static CORBA::Object_var ClientSObjectToObject (_PTR(SObject) theSObject);
static SALOMEDS::Study_var ClientStudyToStudy (_PTR(Study) theStudy); static SALOMEDS::Study_var ClientStudyToStudy (_PTR(Study) theStudy);
@ -157,9 +168,9 @@ private:
const bool isExpandAll = false, const bool isOCC = false, const bool isExpandAll = false, const bool isOCC = false,
const int parentId = -1 ); const int parentId = -1 );
private: public:
static GEOM::GEOM_Gen_var myComponentGeom; // GEOM engine static GEOM::GEOM_Gen_var myComponentGeom; // GEOM engine!!!
private:
GUIMap myGUIMap; // GUI libraries map GUIMap myGUIMap; // GUI libraries map
QDialog* myActiveDialogBox; // active dialog box QDialog* myActiveDialogBox; // active dialog box
GEOM_Client myShapeReader; // geom shape reader GEOM_Client myShapeReader; // geom shape reader