From 5ba7ec73c17fb3f5eaf46598542e8306006adb85 Mon Sep 17 00:00:00 2001 From: ana Date: Mon, 20 Oct 2014 14:55:05 +0400 Subject: [PATCH] Porting on windows --- src/PVViewer/CMakeLists.txt | 2 ++ src/PVViewer/PVViewer.h | 32 ++++++++++++++++++++++++ src/PVViewer/PVViewer_Behaviors.h | 4 ++- src/PVViewer/PVViewer_EngineWrapper.h | 4 ++- src/PVViewer/PVViewer_GUIElements.h | 4 ++- src/PVViewer/PVViewer_LogWindowAdapter.h | 4 ++- src/PVViewer/PVViewer_ViewManager.h | 4 ++- src/PVViewer/PVViewer_ViewModel.h | 4 ++- src/PVViewer/PVViewer_ViewWindow.h | 4 ++- 9 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 src/PVViewer/PVViewer.h diff --git a/src/PVViewer/CMakeLists.txt b/src/PVViewer/CMakeLists.txt index 8a43e577c..5c02e6185 100644 --- a/src/PVViewer/CMakeLists.txt +++ b/src/PVViewer/CMakeLists.txt @@ -48,6 +48,7 @@ SET(_link_LIBRARIES ${KERNEL_LDFLAGS} ${KERNEL_SALOMELocalTrace} ${KERNEL_OpUtil} ${GUI_LDFLAGS} suit Event PyInterp ${_PARAVIEW_APP_COMPO_LIB} + vtkRenderingFreeTypeOpenGL ) # --- headers --- @@ -63,6 +64,7 @@ SET(_moc_HEADERS # header files / no moc processing SET(_other_HEADERS + PVViewer.h PVViewer_LogWindowAdapter.h PVViewer_EngineWrapper.h ) diff --git a/src/PVViewer/PVViewer.h b/src/PVViewer/PVViewer.h new file mode 100644 index 000000000..7783389fb --- /dev/null +++ b/src/PVViewer/PVViewer.h @@ -0,0 +1,32 @@ +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D +// +// 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, or (at your option) any later version. +// +// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com + +#ifndef PVVIEWER_H +#define PVVIEWER_H + +#ifdef WIN32 +#if defined PVViewer_EXPORTS +#define PVVIEWER_EXPORT __declspec(dllexport) +#else +#define PVVIEWER_EXPORT __declspec(dllimport) +#endif +#else +#define PVVIEWER_EXPORT +#endif + +#endif //PVVIEWER_H diff --git a/src/PVViewer/PVViewer_Behaviors.h b/src/PVViewer/PVViewer_Behaviors.h index fa2d32af8..070fb26bf 100644 --- a/src/PVViewer/PVViewer_Behaviors.h +++ b/src/PVViewer/PVViewer_Behaviors.h @@ -22,6 +22,8 @@ #ifndef PVGUIBEHAVIORS_H_ #define PVGUIBEHAVIORS_H_ +#include "PVViewer.h" + #include class SalomeApp_Module; @@ -33,7 +35,7 @@ class pqPropertiesPanel; * Qt/ApplicationComponents/pqParaViewBehaviors.cxx * Except a few ones, behaviors are destroyed when the module is destroyed. */ -class PVViewer_Behaviors: public QObject +class PVVIEWER_EXPORT PVViewer_Behaviors: public QObject { Q_OBJECT diff --git a/src/PVViewer/PVViewer_EngineWrapper.h b/src/PVViewer/PVViewer_EngineWrapper.h index c4a9e7471..8400985d5 100644 --- a/src/PVViewer/PVViewer_EngineWrapper.h +++ b/src/PVViewer/PVViewer_EngineWrapper.h @@ -21,6 +21,8 @@ #ifndef PVVIEWERENGINEWRAPPER_H_ #define PVVIEWERENGINEWRAPPER_H_ +#include "PVViewer.h" + #include #include @@ -38,7 +40,7 @@ * (Two implementations are provided: one with CORBA dynamic invokation from C++, one using * Python - see commented elements in the .cxx file) */ -class PVViewer_EngineWrapper +class PVVIEWER_EXPORT PVViewer_EngineWrapper { public: //! Returns the unique instance of the engine. diff --git a/src/PVViewer/PVViewer_GUIElements.h b/src/PVViewer/PVViewer_GUIElements.h index ca0634e03..aa22f4b2d 100644 --- a/src/PVViewer/PVViewer_GUIElements.h +++ b/src/PVViewer/PVViewer_GUIElements.h @@ -21,6 +21,8 @@ #ifndef PVVIEWERGUIELEMENTS_H_ #define PVVIEWERGUIELEMENTS_H_ +#include "PVViewer.h" + #include class pqPropertiesPanel; @@ -34,7 +36,7 @@ class QMenu; * For example sources menu should be built *before* loading ParaView's configuration, so that the * list of sources gets properly populated. */ -class PVViewer_GUIElements: public QObject +class PVVIEWER_EXPORT PVViewer_GUIElements: public QObject { Q_OBJECT diff --git a/src/PVViewer/PVViewer_LogWindowAdapter.h b/src/PVViewer/PVViewer_LogWindowAdapter.h index 863ddbcb8..a6b60d462 100644 --- a/src/PVViewer/PVViewer_LogWindowAdapter.h +++ b/src/PVViewer/PVViewer_LogWindowAdapter.h @@ -20,6 +20,8 @@ #ifndef _PVViewer_LogWindowAdapter_h #define _PVViewer_LogWindowAdapter_h +#include "PVViewer.h" + #include class LogWindow; @@ -32,7 +34,7 @@ vtkOutputWindow::setInstance() static method. This class is based on pqOutputWindow ParaView class. */ -class PVViewer_LogWindowAdapter : public vtkOutputWindow +class PVVIEWER_EXPORT PVViewer_LogWindowAdapter : public vtkOutputWindow { public: static PVViewer_LogWindowAdapter *New(); diff --git a/src/PVViewer/PVViewer_ViewManager.h b/src/PVViewer/PVViewer_ViewManager.h index 0925698f7..fad78159f 100644 --- a/src/PVViewer/PVViewer_ViewManager.h +++ b/src/PVViewer/PVViewer_ViewManager.h @@ -19,6 +19,8 @@ #ifndef PVViewer_VIEWMANAGER_H #define PVViewer_VIEWMANAGER_H +#include "PVViewer.h" + #include class PVViewer_EngineWrapper; @@ -32,7 +34,7 @@ class pqPropertiesPanel; class pqPipelineBrowserWidget; class LogWindow; -class PVViewer_ViewManager : public SUIT_ViewManager +class PVVIEWER_EXPORT PVViewer_ViewManager : public SUIT_ViewManager { Q_OBJECT diff --git a/src/PVViewer/PVViewer_ViewModel.h b/src/PVViewer/PVViewer_ViewModel.h index e70f663cb..5f685cd4b 100644 --- a/src/PVViewer/PVViewer_ViewModel.h +++ b/src/PVViewer/PVViewer_ViewModel.h @@ -19,13 +19,15 @@ #if !defined(_PVViewer_VIEWMODEL_H) #define _PVViewer_VIEWMODEL_H +#include "PVViewer.h" + #include class SUIT_ViewWindow; class SUIT_Desktop; class SUIT_Desktop; -class PVViewer_Viewer: public SUIT_ViewModel +class PVVIEWER_EXPORT PVViewer_Viewer: public SUIT_ViewModel { Q_OBJECT diff --git a/src/PVViewer/PVViewer_ViewWindow.h b/src/PVViewer/PVViewer_ViewWindow.h index e3ff387ce..595fb0509 100644 --- a/src/PVViewer/PVViewer_ViewWindow.h +++ b/src/PVViewer/PVViewer_ViewWindow.h @@ -23,6 +23,8 @@ #ifndef PVViewer_VIEWWINDOW_H #define PVViewer_VIEWWINDOW_H +#include "PVViewer.h" + #include #include @@ -30,7 +32,7 @@ class SUIT_Desktop; class PVViewer_Viewer; class pqTabbedMultiViewWidget; -class PVViewer_ViewWindow : public SUIT_ViewWindow +class PVVIEWER_EXPORT PVViewer_ViewWindow : public SUIT_ViewWindow { Q_OBJECT -- 2.39.2