From bd7c31d320b678dd12cd2a429c4ba35b57285c14 Mon Sep 17 00:00:00 2001 From: abd Date: Tue, 7 Oct 2008 13:23:26 +0000 Subject: [PATCH] Fix compilation problems on Win32 Platform: - export classes --- src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h | 4 +- src/DlgRef/DlgRef_2Sel2List_QTD.h | 4 +- src/DlgRef/DlgRef_2Sel3Spin2Rb.cxx | 82 ++++++++++++------------- src/DlgRef/DlgRef_2Sel3Spin2Rb.h | 61 ++++++++---------- src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.h | 4 +- src/GEOMImpl/GEOMImpl_IPipeBiNormal.hxx | 3 +- src/GEOMImpl/GEOM_GEOMImpl.hxx | 22 +++---- src/OBJECT/GEOM_OBJECT_defs.hxx | 22 +++---- 8 files changed, 93 insertions(+), 109 deletions(-) diff --git a/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h index 0f7fbc84b..1d856dbf5 100644 --- a/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h +++ b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h @@ -10,6 +10,8 @@ #ifndef DLGREF_1SEL5SPIN1CHECK_QTD_H #define DLGREF_1SEL5SPIN1CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include @@ -24,7 +26,7 @@ class QSpinBox; class QCheckBox; class QLineEdit; -class DlgRef_1Sel5Spin1Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_1Sel5Spin1Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel2List_QTD.h b/src/DlgRef/DlgRef_2Sel2List_QTD.h index b2ea00299..96add6d5e 100644 --- a/src/DlgRef/DlgRef_2Sel2List_QTD.h +++ b/src/DlgRef/DlgRef_2Sel2List_QTD.h @@ -10,6 +10,8 @@ #ifndef DLGREF_2SEL2LIST_QTD_H #define DLGREF_2SEL2LIST_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include @@ -23,7 +25,7 @@ class QComboBox; class QLabel; class QPushButton; -class DlgRef_2Sel2List_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_2Sel2List_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel3Spin2Rb.cxx b/src/DlgRef/DlgRef_2Sel3Spin2Rb.cxx index a17d55e41..f310e2287 100755 --- a/src/DlgRef/DlgRef_2Sel3Spin2Rb.cxx +++ b/src/DlgRef/DlgRef_2Sel3Spin2Rb.cxx @@ -1,41 +1,41 @@ -// File : DlgRef_2Sel2Spin.cxx -// Author : Dmitry MATVEITCHEV -// Module : GEOM -// $Header: - -#include "DlgRef_2Sel3Spin2Rb.h" -#include - -#include -#include -#include -#include - -/* - * Constructs a DlgRef_2Sel3Spin2Rb which is a child of 'parent', with the - * name 'name' and widget flags set to 'f' - */ -DlgRef_2Sel3Spin2Rb::DlgRef_2Sel3Spin2Rb(QWidget* parent, const char* name, WFlags fl) - :DlgRef_2Sel3Spin2Rb_QTD(parent, name, fl) -{ - SpinBox1->close(TRUE); - SpinBox2->close(TRUE); - SpinBox3->close(TRUE); - RadioButton1->setChecked(true); - SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX"); - Layout2->addMultiCellWidget(SpinBox_DX, 0, 0, 2, 4); - SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY"); - Layout2->addWidget(SpinBox_DY, 1, 2); - SpinBox_DZ = new DlgRef_SpinBox(GroupBox1, "SpinBox_DZ"); - Layout2->addWidget(SpinBox_DZ, 1, 4); - SpinBox_DY->setEnabled(false); - SpinBox_DZ->setEnabled(false); -} - -/* - * Destroys the object and frees any allocated resources - */ -DlgRef_2Sel3Spin2Rb::~DlgRef_2Sel3Spin2Rb() -{ - // no need to delete child widgets, Qt does it all for us -} +// File : DlgRef_2Sel2Spin.cxx +// Author : Dmitry MATVEITCHEV +// Module : GEOM +// $Header: + +#include "DlgRef_2Sel3Spin2Rb.h" +#include + +#include +#include +#include +#include + +/* + * Constructs a DlgRef_2Sel3Spin2Rb which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + */ +DlgRef_2Sel3Spin2Rb::DlgRef_2Sel3Spin2Rb(QWidget* parent, const char* name, WFlags fl) + :DlgRef_2Sel3Spin2Rb_QTD(parent, name, fl) +{ + SpinBox1->close(TRUE); + SpinBox2->close(TRUE); + SpinBox3->close(TRUE); + RadioButton1->setChecked(true); + SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX"); + Layout2->addMultiCellWidget(SpinBox_DX, 0, 0, 2, 4); + SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY"); + Layout2->addWidget(SpinBox_DY, 1, 2); + SpinBox_DZ = new DlgRef_SpinBox(GroupBox1, "SpinBox_DZ"); + Layout2->addWidget(SpinBox_DZ, 1, 4); + SpinBox_DY->setEnabled(false); + SpinBox_DZ->setEnabled(false); +} + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_2Sel3Spin2Rb::~DlgRef_2Sel3Spin2Rb() +{ + // no need to delete child widgets, Qt does it all for us +} diff --git a/src/DlgRef/DlgRef_2Sel3Spin2Rb.h b/src/DlgRef/DlgRef_2Sel3Spin2Rb.h index e651662f7..cc145fd79 100755 --- a/src/DlgRef/DlgRef_2Sel3Spin2Rb.h +++ b/src/DlgRef/DlgRef_2Sel3Spin2Rb.h @@ -1,34 +1,27 @@ -// File : DlgRef_2Sel3Spin2Rb.h -// Author : Dmitry MATVEITCHEV -// Module : GEOM -// $Header: - -#ifndef DLGREF_2SEL3SPIN2RB_H -#define DLGREF_2SEL3SPIN2RB_H - -#include "DlgRef_2Sel3Spin2Rb_QTD.h" -#include "DlgRef_SpinBox.h" -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_2Sel3Spin2Rb : public DlgRef_2Sel3Spin2Rb_QTD -{ - Q_OBJECT - -public: - DlgRef_2Sel3Spin2Rb(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); - ~DlgRef_2Sel3Spin2Rb(); - - DlgRef_SpinBox* SpinBox_DX; - DlgRef_SpinBox* SpinBox_DY; - DlgRef_SpinBox* SpinBox_DZ; -}; - -#endif // DLGREF_2SEL3SPIN2RB_H +// File : DlgRef_2Sel3Spin2Rb.h +// Author : Dmitry MATVEITCHEV +// Module : GEOM +// $Header: + +#ifndef DLGREF_2SEL3SPIN2RB_H +#define DLGREF_2SEL3SPIN2RB_H + +#include "GEOM_DlgRef.hxx" + +#include "DlgRef_2Sel3Spin2Rb_QTD.h" +#include "DlgRef_SpinBox.h" + +class GEOM_DLGREF_EXPORT DlgRef_2Sel3Spin2Rb : public DlgRef_2Sel3Spin2Rb_QTD +{ + Q_OBJECT + +public: + DlgRef_2Sel3Spin2Rb(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); + ~DlgRef_2Sel3Spin2Rb(); + + DlgRef_SpinBox* SpinBox_DX; + DlgRef_SpinBox* SpinBox_DY; + DlgRef_SpinBox* SpinBox_DZ; +}; + +#endif // DLGREF_2SEL3SPIN2RB_H diff --git a/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.h b/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.h index a05f7fa09..0bd2b1fb1 100644 --- a/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.h +++ b/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.h @@ -10,6 +10,8 @@ #ifndef DLGREF_3SEL3SPIN2CHECK_QTD_H #define DLGREF_3SEL3SPIN2CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include @@ -24,7 +26,7 @@ class QLineEdit; class QPushButton; class QCheckBox; -class DlgRef_3Sel3Spin2Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_3Sel3Spin2Check_QTD : public QWidget { Q_OBJECT diff --git a/src/GEOMImpl/GEOMImpl_IPipeBiNormal.hxx b/src/GEOMImpl/GEOMImpl_IPipeBiNormal.hxx index 38d62fa2e..c90030c2a 100644 --- a/src/GEOMImpl/GEOMImpl_IPipeBiNormal.hxx +++ b/src/GEOMImpl/GEOMImpl_IPipeBiNormal.hxx @@ -22,6 +22,7 @@ #ifndef _GEOMImpl_IPIPEBINORMAL_HXX_ #define _GEOMImpl_IPIPEBINORMAL_HXX_ +#include "GEOM_GEOMImpl.hxx" #include "GEOM_Function.hxx" #ifndef _GEOMImpl_IPIPE_HXX_ @@ -32,7 +33,7 @@ #define PIPE_ARG_PATH 2 #define PIPE_ARG_VEC 3 -class GEOMImpl_IPipeBiNormal : public GEOMImpl_IPipe +class GEOMIMPL_EXPORT GEOMImpl_IPipeBiNormal : public GEOMImpl_IPipe { public: diff --git a/src/GEOMImpl/GEOM_GEOMImpl.hxx b/src/GEOMImpl/GEOM_GEOMImpl.hxx index a8f4a439f..b5cc2dff0 100755 --- a/src/GEOMImpl/GEOM_GEOMImpl.hxx +++ b/src/GEOMImpl/GEOM_GEOMImpl.hxx @@ -26,22 +26,14 @@ #ifndef _GEOM_GEOMImpl_HXX_ #define _GEOM_GEOMImpl_HXX_ -#ifdef WNT - #if defined GEOMIMPL_EXPORTS - #if defined WIN32 - #define GEOMIMPL_EXPORT __declspec( dllexport ) - #else - #define GEOMIMPL_EXPORT - #endif - #else - #if defined WIN32 - #define GEOMIMPL_EXPORT __declspec( dllimport ) - #else - #define GEOMIMPL_EXPORT - #endif - #endif +#ifdef WIN32 +# ifdef GEOMIMPL_EXPORTS +# define GEOMIMPL_EXPORT __declspec( dllexport ) +# else +# define GEOMIMPL_EXPORT __declspec( dllimport ) +# endif #else - #define GEOMIMPL_EXPORT +# define GEOMIMPL_EXPORT #endif #endif diff --git a/src/OBJECT/GEOM_OBJECT_defs.hxx b/src/OBJECT/GEOM_OBJECT_defs.hxx index 3377ce908..eeab1fcfe 100755 --- a/src/OBJECT/GEOM_OBJECT_defs.hxx +++ b/src/OBJECT/GEOM_OBJECT_defs.hxx @@ -26,22 +26,14 @@ #ifndef _GEOM_OBJECT_defs_HXX_ #define _GEOM_OBJECT_defs_HXX_ -#ifdef WNT - #if defined OBJECT_EXPORTS - #if defined WIN32 - #define GEOM_OBJECT_EXPORT __declspec( dllexport ) - #else - #define GEOM_OBJECT_EXPORT - #endif - #else - #if defined WIN32 - #define GEOM_OBJECT_EXPORT __declspec( dllimport ) - #else - #define GEOM_OBJECT_EXPORT - #endif - #endif +#ifdef WIN32 +# ifdef GEOM_OBJECT_EXPORTS +# define GEOM_OBJECT_EXPORT __declspec( dllexport ) +# else +# define GEOM_OBJECT_EXPORT __declspec( dllimport ) +# endif #else - #define GEOM_OBJECT_EXPORT +# define GEOM_OBJECT_EXPORT #endif #endif -- 2.39.2