Win32 compatibility

This commit is contained in:
ana 2014-07-02 13:20:45 +04:00
parent a0e22ed86a
commit 9e822ecfcd
8 changed files with 56 additions and 5 deletions

View File

@ -25,6 +25,7 @@ INCLUDE(UseQt4Ext)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${QT_INCLUDES} ${QT_INCLUDES}
${GUI_INCLUDE_DIRS} ${GUI_INCLUDE_DIRS}
${CAS_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/GEOMGUI ${PROJECT_SOURCE_DIR}/src/GEOMGUI
${PROJECT_SOURCE_DIR}/src/GEOMBase ${PROJECT_SOURCE_DIR}/src/GEOMBase
${PROJECT_SOURCE_DIR}/src/GEOM ${PROJECT_SOURCE_DIR}/src/GEOM
@ -39,6 +40,7 @@ INCLUDE_DIRECTORIES(
ADD_DEFINITIONS( ADD_DEFINITIONS(
${QT_DEFINITIONS} ${QT_DEFINITIONS}
${GUI_DEFINITIONS} ${GUI_DEFINITIONS}
${OMNIORB_DEFINITIONS}
${CAS_DEFINITIONS} ${CAS_DEFINITIONS}
) )
@ -49,6 +51,7 @@ SET(_link_LIBRARIES
${GUI_GraphicsView} ${GUI_GraphicsView}
GEOM GEOM
GEOMBase GEOMBase
GEOMToolsGUI
) )
# --- headers --- # --- headers ---
@ -57,6 +60,7 @@ SET(DependencyTree_HEADERS
DependencyTree_Arrow.h DependencyTree_Arrow.h
DependencyTree_Object.h DependencyTree_Object.h
DependencyTree_Selector.h DependencyTree_Selector.h
DependencyTree.h
) )
# header files / to be processed by moc # header files / to be processed by moc

View File

@ -0,0 +1,33 @@
// Copyright (C) 2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// 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 DEPENDENCYTREE_H
#define DEPENDENCYTREE_H
#if defined WIN32
# if defined DEPENDENCYTREE_EXPORTS || defined DependencyTree_EXPORTS
# define DEPENDENCYTREE_EXPORT __declspec( dllexport )
# else
# define DEPENDENCYTREE_EXPORT __declspec( dllimport )
# endif
#else
# define DEPENDENCYTREE_EXPORT
#endif
#endif // DEPENDENCYTREE_H

View File

@ -28,6 +28,10 @@
// Qt includes // Qt includes
#include <QPainter> #include <QPainter>
#ifdef _MSC_VER
#define _USE_MATH_DEFINES
#endif
#include <math.h> #include <math.h>
const qreal arrowSize = 20; const qreal arrowSize = 20;

View File

@ -22,9 +22,11 @@
#include <QGraphicsLineItem> #include <QGraphicsLineItem>
#include "DependencyTree.h"
class DependencyTree_Object; class DependencyTree_Object;
class DependencyTree_Arrow : public QGraphicsLineItem class DEPENDENCYTREE_EXPORT DependencyTree_Arrow : public QGraphicsLineItem
{ {
public: public:

View File

@ -28,7 +28,9 @@
#include <QPen> #include <QPen>
class DependencyTree_Object: public GraphicsView_Object #include "DependencyTree.h"
class DEPENDENCYTREE_EXPORT DependencyTree_Object: public GraphicsView_Object
{ {
public: public:

View File

@ -22,10 +22,12 @@
#include <LightApp_GVSelector.h> #include <LightApp_GVSelector.h>
#include "DependencyTree.h"
class DependencyTree_ViewModel; class DependencyTree_ViewModel;
class DependencyTree_View; class DependencyTree_View;
class DependencyTree_Selector: public LightApp_GVSelector class DEPENDENCYTREE_EXPORT DependencyTree_Selector: public LightApp_GVSelector
{ {
public: public:

View File

@ -35,6 +35,8 @@
#include <QSpinBox> #include <QSpinBox>
#include <QCheckBox> #include <QCheckBox>
#include "DependencyTree.h"
class DependencyTree_Object; class DependencyTree_Object;
class DependencyTree_Arrow; class DependencyTree_Arrow;
class DependencyTree_View; class DependencyTree_View;
@ -42,7 +44,7 @@ class DependencyTree_View;
typedef std::map<std::string,DependencyTree_Object*> EntryObjectMap; typedef std::map<std::string,DependencyTree_Object*> EntryObjectMap;
typedef std::map<std::pair<DependencyTree_Object*,DependencyTree_Object*>,DependencyTree_Arrow*> ArrowsInfo; typedef std::map<std::pair<DependencyTree_Object*,DependencyTree_Object*>,DependencyTree_Arrow*> ArrowsInfo;
class DependencyTree_View: public GraphicsView_ViewPort class DEPENDENCYTREE_EXPORT DependencyTree_View: public GraphicsView_ViewPort
{ {
Q_OBJECT Q_OBJECT

View File

@ -22,7 +22,9 @@
#include <GraphicsView_Viewer.h> #include <GraphicsView_Viewer.h>
class DependencyTree_ViewModel: public GraphicsView_Viewer #include "DependencyTree.h"
class DEPENDENCYTREE_EXPORT DependencyTree_ViewModel: public GraphicsView_Viewer
{ {
Q_OBJECT Q_OBJECT