Merged in ValentinaZhuravska/valentina/feature (pull request #70)
Several fixes for building with MSVC. Still a lot errors. No successful build yet. --HG-- branch : develop
This commit is contained in:
commit
b02b890486
|
@ -31,6 +31,10 @@
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#ifdef Q_CC_MSVC
|
||||||
|
#include <ciso646>
|
||||||
|
#endif /* Q_CC_MSVC */
|
||||||
|
|
||||||
enum class VarMeasurement : unsigned char { English=0, Metric=1 };
|
enum class VarMeasurement : unsigned char { English=0, Metric=1 };
|
||||||
|
|
||||||
//Default drawing units for AutoCAD DesignCenter blocks:
|
//Default drawing units for AutoCAD DesignCenter blocks:
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#ifndef VLAYOUTDEF_H
|
#ifndef VLAYOUTDEF_H
|
||||||
#define VLAYOUTDEF_H
|
#define VLAYOUTDEF_H
|
||||||
|
|
||||||
|
#ifdef Q_CC_MSVC
|
||||||
|
#include <ciso646>
|
||||||
|
#endif /* Q_CC_MSVC */
|
||||||
|
|
||||||
enum class EquidistantType : char { OpenEquidistant, CloseEquidistant };
|
enum class EquidistantType : char { OpenEquidistant, CloseEquidistant };
|
||||||
|
|
||||||
enum class LayoutErrors : char
|
enum class LayoutErrors : char
|
||||||
|
|
|
@ -38,6 +38,10 @@
|
||||||
|
|
||||||
#include "debugbreak.h"
|
#include "debugbreak.h"
|
||||||
|
|
||||||
|
#ifdef Q_CC_MSVC
|
||||||
|
#include <ciso646>
|
||||||
|
#endif /* Q_CC_MSVC */
|
||||||
|
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
|
|
||||||
#define SceneSize 50000
|
#define SceneSize 50000
|
||||||
|
|
|
@ -74,6 +74,62 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv)
|
||||||
VAbstractApplication::~VAbstractApplication()
|
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
|
Unit VAbstractApplication::patternUnit() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,9 +36,9 @@
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
#include "vsettings.h"
|
#include "vsettings.h"
|
||||||
#include "vlockguard.h"
|
#include "vlockguard.h"
|
||||||
|
#include "../vpatterndb/vtranslatevars.h"
|
||||||
|
|
||||||
class VAbstractApplication;// use in define
|
class VAbstractApplication;// use in define
|
||||||
class VTranslateVars;
|
|
||||||
class VAbstractPattern;
|
class VAbstractPattern;
|
||||||
class VMainGraphicsView;
|
class VMainGraphicsView;
|
||||||
class QUndoStack;
|
class QUndoStack;
|
||||||
|
@ -137,17 +137,6 @@ private:
|
||||||
void ClearTranslation();
|
void ClearTranslation();
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
inline MeasurementsType VAbstractApplication::patternType() const
|
|
||||||
{
|
|
||||||
return _patternType;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
inline void VAbstractApplication::setPatternType(const MeasurementsType &patternType)
|
|
||||||
{
|
|
||||||
_patternType = patternType;
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -158,48 +147,4 @@ inline QString VAbstractApplication::LocaleToString(const T &value)
|
||||||
return loc.toString(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
|
#endif // VABSTRACTAPPLICATION_H
|
||||||
|
|
|
@ -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);
|
qsort(del.points, num_points, sizeof(point2d_t*), cmp_points);
|
||||||
|
|
||||||
if( num_points >= 3 ) {
|
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 );
|
del_build_faces( &del );
|
||||||
|
|
||||||
unsigned int fbuff_size = 0;
|
|
||||||
for( i = 0; i < del.num_faces; i++ )
|
for( i = 0; i < del.num_faces; i++ )
|
||||||
fbuff_size += del.faces[i].num_verts + 1;
|
fbuff_size += del.faces[i].num_verts + 1;
|
||||||
|
|
||||||
faces = (unsigned int*)malloc(sizeof(unsigned int) * fbuff_size);
|
faces = (unsigned int*)malloc(sizeof(unsigned int) * fbuff_size);
|
||||||
|
|
||||||
unsigned int j = 0;
|
|
||||||
for( i = 0; i < del.num_faces; i++ )
|
for( i = 0; i < del.num_faces; i++ )
|
||||||
{
|
{
|
||||||
halfedge_t *curr;
|
halfedge_t *curr;
|
||||||
|
|
|
@ -34,14 +34,13 @@
|
||||||
#include "../vgeometry/vgobject.h"
|
#include "../vgeometry/vgobject.h"
|
||||||
#include "../ifc/exception/vexceptionbadid.h"
|
#include "../ifc/exception/vexceptionbadid.h"
|
||||||
#include "../vgeometry/vabstractcurve.h"
|
#include "../vgeometry/vabstractcurve.h"
|
||||||
|
#include "vtranslatevars.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
|
|
||||||
class VTranslateVars;
|
|
||||||
|
|
||||||
#if defined(Q_CC_INTEL)
|
#if defined(Q_CC_INTEL)
|
||||||
#pragma warning( push )
|
#pragma warning( push )
|
||||||
#pragma warning( disable: 2021 )
|
#pragma warning( disable: 2021 )
|
||||||
|
|
Loading…
Reference in New Issue
Block a user