diff --git a/src/libs/vdxf/dxfdef.h b/src/libs/vdxf/dxfdef.h index 6d70eada1..234db98d8 100644 --- a/src/libs/vdxf/dxfdef.h +++ b/src/libs/vdxf/dxfdef.h @@ -31,6 +31,10 @@ #include +#ifdef Q_CC_MSVC + #include +#endif /* Q_CC_MSVC */ + enum class VarMeasurement : unsigned char { English=0, Metric=1 }; //Default drawing units for AutoCAD DesignCenter blocks: diff --git a/src/libs/vlayout/vlayoutdef.h b/src/libs/vlayout/vlayoutdef.h index 3c58dbdde..19fbcc297 100644 --- a/src/libs/vlayout/vlayoutdef.h +++ b/src/libs/vlayout/vlayoutdef.h @@ -29,6 +29,10 @@ #ifndef VLAYOUTDEF_H #define VLAYOUTDEF_H +#ifdef Q_CC_MSVC + #include +#endif /* Q_CC_MSVC */ + enum class EquidistantType : char { OpenEquidistant, CloseEquidistant }; enum class LayoutErrors : char diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index 6aca40422..585a0fea7 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -38,6 +38,10 @@ #include "debugbreak.h" +#ifdef Q_CC_MSVC + #include +#endif /* Q_CC_MSVC */ + class QComboBox; #define SceneSize 50000 diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 5be987414..300319907 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -74,6 +74,62 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv) VAbstractApplication::~VAbstractApplication() {} +//--------------------------------------------------------------------------------------------------------------------- +MeasurementsType VAbstractApplication::patternType() const +{ + return _patternType; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractApplication::setPatternType(const MeasurementsType &patternType) +{ + _patternType = patternType; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractApplication::setCurrentDocument(VAbstractPattern *doc) +{ + this->doc = doc; +} + +//--------------------------------------------------------------------------------------------------------------------- +VAbstractPattern *VAbstractApplication::getCurrentDocument() const +{ + SCASSERT(doc != nullptr) + return doc; +} + +//--------------------------------------------------------------------------------------------------------------------- +bool VAbstractApplication::getOpeningPattern() const +{ + return openingPattern; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractApplication::setOpeningPattern() +{ + openingPattern = !openingPattern; +} + +//--------------------------------------------------------------------------------------------------------------------- +QWidget *VAbstractApplication::getMainWindow() const +{ + return mainWindow; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractApplication::setMainWindow(QWidget *value) +{ + SCASSERT(value != nullptr) + mainWindow = value; +} + +//--------------------------------------------------------------------------------------------------------------------- +QUndoStack *VAbstractApplication::getUndoStack() const +{ + return undoStack; +} + //--------------------------------------------------------------------------------------------------------------------- Unit VAbstractApplication::patternUnit() const { diff --git a/src/libs/vmisc/vabstractapplication.h b/src/libs/vmisc/vabstractapplication.h index 2a1e9361e..a02916d4c 100644 --- a/src/libs/vmisc/vabstractapplication.h +++ b/src/libs/vmisc/vabstractapplication.h @@ -36,9 +36,9 @@ #include "def.h" #include "vsettings.h" #include "vlockguard.h" +#include "../vpatterndb/vtranslatevars.h" class VAbstractApplication;// use in define -class VTranslateVars; class VAbstractPattern; class VMainGraphicsView; class QUndoStack; @@ -137,17 +137,6 @@ private: void ClearTranslation(); }; -//--------------------------------------------------------------------------------------------------------------------- -inline MeasurementsType VAbstractApplication::patternType() const -{ - return _patternType; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline void VAbstractApplication::setPatternType(const MeasurementsType &patternType) -{ - _patternType = patternType; -} //--------------------------------------------------------------------------------------------------------------------- template @@ -158,48 +147,4 @@ inline QString VAbstractApplication::LocaleToString(const T &value) return loc.toString(value); } -//--------------------------------------------------------------------------------------------------------------------- -inline void VAbstractApplication::setCurrentDocument(VAbstractPattern *doc) -{ - this->doc = doc; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline VAbstractPattern *VAbstractApplication::getCurrentDocument() const -{ - SCASSERT(doc != nullptr) - return doc; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline bool VAbstractApplication::getOpeningPattern() const -{ - return openingPattern; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline void VAbstractApplication::setOpeningPattern() -{ - openingPattern = !openingPattern; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline QWidget *VAbstractApplication::getMainWindow() const -{ - return mainWindow; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline void VAbstractApplication::setMainWindow(QWidget *value) -{ - SCASSERT(value != nullptr) - mainWindow = value; -} - -//--------------------------------------------------------------------------------------------------------------------- -inline QUndoStack *VAbstractApplication::getUndoStack() const -{ - return undoStack; -} - #endif // VABSTRACTAPPLICATION_H diff --git a/src/libs/vobj/delaunay.c b/src/libs/vobj/delaunay.c index 37cd77cc4..46c9e040a 100644 --- a/src/libs/vobj/delaunay.c +++ b/src/libs/vobj/delaunay.c @@ -1024,17 +1024,17 @@ delaunay2d_t* delaunay2d_from(del_point2d_t *points, unsigned int num_points) { qsort(del.points, num_points, sizeof(point2d_t*), cmp_points); if( num_points >= 3 ) { - del_divide_and_conquer( &del, 0, num_points - 1 ); + unsigned int fbuff_size = 0; + unsigned int j = 0; + del_divide_and_conquer( &del, 0, num_points - 1 ); del_build_faces( &del ); - unsigned int fbuff_size = 0; for( i = 0; i < del.num_faces; i++ ) fbuff_size += del.faces[i].num_verts + 1; faces = (unsigned int*)malloc(sizeof(unsigned int) * fbuff_size); - unsigned int j = 0; for( i = 0; i < del.num_faces; i++ ) { halfedge_t *curr; diff --git a/src/libs/vpatterndb/vcontainer.h b/src/libs/vpatterndb/vcontainer.h index ec13d2dfa..21becd502 100644 --- a/src/libs/vpatterndb/vcontainer.h +++ b/src/libs/vpatterndb/vcontainer.h @@ -34,14 +34,13 @@ #include "../vgeometry/vgobject.h" #include "../ifc/exception/vexceptionbadid.h" #include "../vgeometry/vabstractcurve.h" +#include "vtranslatevars.h" #include #include #include #include -class VTranslateVars; - #if defined(Q_CC_INTEL) #pragma warning( push ) #pragma warning( disable: 2021 )