Base: split export/import macros from FCConfig.h and move them to FCGlobal.h
The FCGlobal.h can be included in a Global.h header file of an extension module. The reason is that some IDEs (e.g. QtCreator) fails to detect the export/import macros when only defined in the PreCompiled.h files and thus raise a parser warning.
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#ifndef IMAGEBASE_H
|
||||
#define IMAGEBASE_H
|
||||
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
namespace Image
|
||||
{
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <App/GeoFeature.h>
|
||||
#include <App/PropertyFile.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
namespace Image
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#else
|
||||
#include "GLImageBox.h"
|
||||
#endif
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
class QSlider;
|
||||
class QAction;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#define IMAGE_ViewProviderImagePlane_H
|
||||
|
||||
#include <Gui/ViewProviderGeometryObject.h>
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
class SoCoordinate3;
|
||||
class SoDrawStyle;
|
||||
@@ -48,12 +49,12 @@ public:
|
||||
void attach(App::DocumentObject *pcObject);
|
||||
void setDisplayMode(const char* ModeName);
|
||||
std::vector<std::string> getDisplayModes() const;
|
||||
void updateData(const App::Property*);
|
||||
|
||||
private:
|
||||
bool loadSvg(const char*, float x, float y, QImage& img);
|
||||
|
||||
protected:
|
||||
void updateData(const App::Property*);
|
||||
|
||||
private:
|
||||
bool loadSvg(const char*, float x, float y, QImage& img);
|
||||
|
||||
protected:
|
||||
SoCoordinate3 * pcCoords;
|
||||
SoTexture2 * texture;
|
||||
};
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#define IMAGE_WORKBENCH_H
|
||||
|
||||
#include <Gui/Workbench.h>
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
namespace ImageGui {
|
||||
|
||||
|
||||
32
src/Mod/Image/ImageGlobal.h
Normal file
32
src/Mod/Image/ImageGlobal.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) Imetric 4D Imaging Sarl *
|
||||
* *
|
||||
* Author: Werner Mayer *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <FCGlobal.h>
|
||||
|
||||
#ifndef IMAGE_GLOBAL_H
|
||||
#define IMAGE_GLOBAL_H
|
||||
|
||||
|
||||
// Image
|
||||
#ifndef ImageExport
|
||||
#ifdef Image_EXPORTS
|
||||
# define ImageExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define ImageExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// ImageGui
|
||||
#ifndef ImageGuiExport
|
||||
#ifdef ImageGui_EXPORTS
|
||||
# define ImageGuiExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define ImageGuiExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //IMAGE_GLOBAL_H
|
||||
@@ -28,6 +28,9 @@
|
||||
#include <Mod/Mesh/App/WildMagic4/Wm4QuadricSurface.h>
|
||||
#include <Mod/Mesh/App/WildMagic4/Wm4Eigen.h>
|
||||
#include <Mod/Mesh/App/WildMagic4/Wm4ImplicitSurface.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <set>
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
#ifndef MESH_DEFINITIONS_H
|
||||
#define MESH_DEFINITIONS_H
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
// default values
|
||||
#define MESH_MIN_PT_DIST 1.0e-6f
|
||||
#define MESH_MIN_EDGE_LEN 1.0e-3f
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
#ifndef VISITOR_H
|
||||
#define VISITOR_H
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace MeshCore {
|
||||
|
||||
class MeshFacet;
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Mesh
|
||||
{
|
||||
|
||||
@@ -24,10 +24,13 @@
|
||||
#ifndef MESH_MESHPOINT_H
|
||||
#define MESH_MESHPOINT_H
|
||||
|
||||
#include <climits>
|
||||
#include <Base/Matrix.h>
|
||||
#include <Base/Vector3D.h>
|
||||
|
||||
#include "Mesh.h"
|
||||
#include <Base/Handle.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
using Base::Vector3d;
|
||||
|
||||
@@ -59,4 +62,4 @@ public:
|
||||
} // namespace Mesh
|
||||
|
||||
|
||||
#endif // MESH_MESH_H
|
||||
#endif // MESH_MESHPOINT_H
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
#ifndef MESHGUI_DLGSETTINGSIMPORTEXPORTIMP_H
|
||||
#define MESHGUI_DLGSETTINGSIMPORTEXPORTIMP_H
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
#include <Gui/PropertyPage.h>
|
||||
|
||||
namespace MeshGui {
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
#ifndef MESHGUI_DLGSETTINGSMESHVIEW_H
|
||||
#define MESHGUI_DLGSETTINGSMESHVIEW_H
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
#include <Gui/PropertyPage.h>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <QDialog>
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
class QButtonGroup;
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <Gui/SelectionObject.h>
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace Gui {
|
||||
class View3DInventorViewer;
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
#define MESHGUI_PROPERTYEDITOR_MESH_H
|
||||
|
||||
#include <Gui/propertyeditor/PropertyItem.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace MeshGui {
|
||||
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
#include <QWidget>
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
// forward declarations
|
||||
namespace Mesh { class Feature; }
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
#include <Inventor/engines/SoSubEngine.h>
|
||||
#include <Inventor/fields/SoSFBool.h>
|
||||
#include <Inventor/fields/SoMFColor.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
class SoGLCoordinateElement;
|
||||
class SoTextureCoordinateBundle;
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#include <Inventor/nodes/SoSubNode.h>
|
||||
#include <Inventor/nodes/SoShape.h>
|
||||
#include <Inventor/elements/SoReplacedElement.h>
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
|
||||
namespace MeshGui {
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
#ifndef MESH_WORKBENCH_H
|
||||
#define MESH_WORKBENCH_H
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#include <Mod/Mesh/MeshGlobal.h>
|
||||
#endif
|
||||
#include <Gui/Workbench.h>
|
||||
|
||||
namespace MeshGui {
|
||||
|
||||
47
src/Mod/Mesh/MeshGlobal.h
Normal file
47
src/Mod/Mesh/MeshGlobal.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2019 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 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 Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <FCGlobal.h>
|
||||
|
||||
#ifndef MESH_GLOBAL_H
|
||||
#define MESH_GLOBAL_H
|
||||
|
||||
|
||||
// Mesh
|
||||
#ifndef MeshExport
|
||||
#ifdef Mesh_EXPORTS
|
||||
# define MeshExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define MeshExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// MeshGui
|
||||
#ifndef MeshGuiExport
|
||||
#ifdef MeshGui_EXPORTS
|
||||
# define MeshGuiExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define MeshGuiExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //MESH_GLOBAL_H
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyGeo.h>
|
||||
#include <Mod/Points/PointsGlobal.h>
|
||||
|
||||
namespace Points
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <Gui/ViewProviderPythonFeature.h>
|
||||
#include <Gui/ViewProviderBuilder.h>
|
||||
#include <Inventor/SbVec2f.h>
|
||||
#include <Mod/Points/PointsGlobal.h>
|
||||
|
||||
|
||||
class SoSwitch;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#define POINTS_WORKBENCH_H
|
||||
|
||||
#include <Gui/Workbench.h>
|
||||
#include <Mod/Points/PointsGlobal.h>
|
||||
|
||||
namespace PointsGui {
|
||||
|
||||
|
||||
47
src/Mod/Points/PointsGlobal.h
Normal file
47
src/Mod/Points/PointsGlobal.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2019 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 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 Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <FCGlobal.h>
|
||||
|
||||
#ifndef POINTS_GLOBAL_H
|
||||
#define POINTS_GLOBAL_H
|
||||
|
||||
|
||||
// Points
|
||||
#ifndef PointsExport
|
||||
#ifdef Points_EXPORTS
|
||||
# define PointsExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define PointsExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// PointsGui
|
||||
#ifndef PointsGuiExport
|
||||
#ifdef PointsGui_EXPORTS
|
||||
# define PointsGuiExport FREECAD_DECL_EXPORT
|
||||
#else
|
||||
# define PointsGuiExport FREECAD_DECL_IMPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //POINTS_GLOBAL_H
|
||||
Reference in New Issue
Block a user