do not include <ciso646> with C++20
This commit is contained in:
parent
62f468b57b
commit
c8844853b5
|
@ -30,9 +30,13 @@
|
|||
|
||||
#include <QCommandLineParser>
|
||||
#include <QCoreApplication>
|
||||
#include <ciso646>
|
||||
#include <memory>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
#include "../vmisc/defglobal.h"
|
||||
#endif
|
||||
|
|
|
@ -36,16 +36,18 @@
|
|||
#include "../vgeometry/vlayoutplacelabel.h"
|
||||
#include "../vlayout/vlayoutpiecepath.h"
|
||||
#include "../vlayout/vtextmanager.h"
|
||||
#include "../vmisc/compatibility.h"
|
||||
#include "../vmisc/vcommonsettings.h"
|
||||
#include "../vpatterndb/floatItemData/floatitemdef.h"
|
||||
#include "compatibility.h"
|
||||
#include "svgfont/vsvgfont.h"
|
||||
#include "vpiecegrainline.h"
|
||||
#include "../vwidgets/vpiecegrainline.h"
|
||||
#include "vplayoutliterals.h"
|
||||
#include <QFont>
|
||||
#include <QXmlStreamAttributes>
|
||||
#include <Qt>
|
||||
#include <ciso646>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
|
||||
|
|
|
@ -29,15 +29,19 @@
|
|||
#ifndef VPLAYOUTFILEWRITER_H
|
||||
#define VPLAYOUTFILEWRITER_H
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QLocale>
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QCoreApplication>
|
||||
#include <functional>
|
||||
#include <ciso646>
|
||||
|
||||
#include "../vmisc/literals.h"
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
#include "../layout/layoutdef.h"
|
||||
#include "../qmuparser/qmudef.h"
|
||||
#include "../vmisc/literals.h"
|
||||
|
||||
class VPLayout;
|
||||
class VPSheet;
|
||||
|
@ -75,11 +79,12 @@ private:
|
|||
void WriteMargins(const QMarginsF &margins, bool ignore);
|
||||
void WriteSize(QSizeF size);
|
||||
|
||||
template <typename T>
|
||||
void SetAttribute(const QString &name, const T &value);
|
||||
template <typename T> void SetAttribute(const QString &name, const T &value);
|
||||
|
||||
template <size_t N>
|
||||
void SetAttribute(const QString &name, const char (&value)[N]); //NOLINT(cppcoreguidelines-avoid-c-arrays) NOLINT(hicpp-avoid-c-arrays) NOLINT(modernize-avoid-c-arrays)
|
||||
void SetAttribute(const QString &name,
|
||||
const char (&value)[N]); // NOLINT(cppcoreguidelines-avoid-c-arrays) NOLINT(hicpp-avoid-c-arrays)
|
||||
// NOLINT(modernize-avoid-c-arrays)
|
||||
|
||||
template <typename T>
|
||||
void SetAttributeOrRemoveIf(const QString &name, const T &value,
|
||||
|
@ -87,8 +92,7 @@ private:
|
|||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template<typename T>
|
||||
void VPLayoutFileWriter::SetAttribute(const QString &name, const T &value)
|
||||
template <typename T> void VPLayoutFileWriter::SetAttribute(const QString &name, const T &value)
|
||||
{
|
||||
// See specification for xs:decimal
|
||||
const QLocale locale = QLocale::c();
|
||||
|
@ -96,29 +100,28 @@ void VPLayoutFileWriter::SetAttribute(const QString &name, const T &value)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <>
|
||||
inline void VPLayoutFileWriter::SetAttribute<QString>(const QString &name, const QString &value)
|
||||
template <> inline void VPLayoutFileWriter::SetAttribute<QString>(const QString &name, const QString &value)
|
||||
{
|
||||
writeAttribute(name, value);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <>
|
||||
inline void VPLayoutFileWriter::SetAttribute<QChar>(const QString &name, const QChar &value)
|
||||
template <> inline void VPLayoutFileWriter::SetAttribute<QChar>(const QString &name, const QChar &value)
|
||||
{
|
||||
writeAttribute(name, value);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <>
|
||||
inline void VPLayoutFileWriter::SetAttribute<bool>(const QString &name, const bool &value)
|
||||
template <> inline void VPLayoutFileWriter::SetAttribute<bool>(const QString &name, const bool &value)
|
||||
{
|
||||
writeAttribute(name, value ? trueStr : falseStr);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <size_t N>
|
||||
inline void VPLayoutFileWriter::SetAttribute(const QString &name, const char (&value)[N]) //NOLINT(cppcoreguidelines-avoid-c-arrays) NOLINT(hicpp-avoid-c-arrays) NOLINT(modernize-avoid-c-arrays)
|
||||
inline void VPLayoutFileWriter::SetAttribute(
|
||||
const QString &name, const char (&value)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays)
|
||||
// NOLINT(hicpp-avoid-c-arrays) NOLINT(modernize-avoid-c-arrays)
|
||||
{
|
||||
writeAttribute(name, QString(value));
|
||||
}
|
||||
|
|
|
@ -28,7 +28,11 @@
|
|||
|
||||
#include "dialogdatetimeformats.h"
|
||||
#include "ui_dialogdatetimeformats.h"
|
||||
#include <ciso646>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
DialogDateTimeFormats::DialogDateTimeFormats(const QDate &date, const QStringList &predefinedFormats,
|
||||
|
|
|
@ -28,7 +28,11 @@
|
|||
|
||||
#include "dialogknownmaterials.h"
|
||||
#include "ui_dialogknownmaterials.h"
|
||||
#include <ciso646>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
DialogKnownMaterials::DialogKnownMaterials(QWidget *parent)
|
||||
|
|
|
@ -34,7 +34,11 @@
|
|||
#include <QSet>
|
||||
#include <QStringList>
|
||||
#include <QSvgRenderer>
|
||||
#include <ciso646>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
#include "../vmisc/compatibility.h"
|
||||
|
||||
|
|
|
@ -27,20 +27,24 @@
|
|||
*************************************************************************/
|
||||
#include "vbackgroundpatternimage.h"
|
||||
|
||||
#include "utils.h"
|
||||
#include "../vmisc/compatibility.h"
|
||||
#include "../vmisc/defglobal.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <QMimeType>
|
||||
#include <QBuffer>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QMimeDatabase>
|
||||
#include <QPixmap>
|
||||
#include <QBuffer>
|
||||
#include <QImageReader>
|
||||
#include <ciso646>
|
||||
#include <QMimeDatabase>
|
||||
#include <QMimeType>
|
||||
#include <QPixmap>
|
||||
#include <QSvgRenderer>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
const QString VBackgroundPatternImage::brokenImage = QStringLiteral("://icon/svg/broken_path.svg");
|
||||
|
||||
namespace
|
||||
|
|
|
@ -27,22 +27,25 @@
|
|||
*************************************************************************/
|
||||
#include "vpatternimage.h"
|
||||
|
||||
#include <QBuffer>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QImage>
|
||||
#include <QImageReader>
|
||||
#include <QMimeDatabase>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QRegularExpressionMatch>
|
||||
#include <QSvgRenderer>
|
||||
#include <QDebug>
|
||||
#include <QBuffer>
|
||||
#include <QSize>
|
||||
#include <QFile>
|
||||
#include <ciso646>
|
||||
#include <QSvgRenderer>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
#include "../vmisc/compatibility.h"
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VPatternImage::FromFile(const QString &fileName) -> VPatternImage
|
||||
|
|
|
@ -100,7 +100,10 @@
|
|||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wattributes")
|
||||
|
||||
#include <ciso646>
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
class QLocale;
|
||||
class QChar;
|
||||
|
|
|
@ -24,9 +24,13 @@
|
|||
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
#include <locale>
|
||||
#include <ciso646>
|
||||
#include <QtGlobal>
|
||||
#include <locale>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
#include "qmuparserfixes.h"
|
||||
|
@ -319,11 +323,11 @@ typedef qreal ( *strfun_type2 ) ( const QString &, qreal );
|
|||
typedef qreal (*strfun_type3)(const QString &, qreal, qreal);
|
||||
|
||||
/** @brief Callback used for functions that identify values in a string. */
|
||||
typedef int ( *identfun_type ) ( const QString &sExpr, qmusizetype *nPos, qreal *fVal, const QLocale &locale,
|
||||
bool cNumbers, const QChar &decimal, const QChar &thousand );
|
||||
typedef int (*identfun_type)(const QString &sExpr, qmusizetype *nPos, qreal *fVal, const QLocale &locale, bool cNumbers,
|
||||
const QChar &decimal, const QChar &thousand);
|
||||
|
||||
/** @brief Callback used for variable creation factory functions. */
|
||||
typedef qreal *(*facfun_type)(const QString &, void *);
|
||||
} // end of namespace
|
||||
} // namespace qmu
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,14 +29,27 @@
|
|||
#ifndef DXFDEF_H
|
||||
#define DXFDEF_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <ciso646>
|
||||
#include <QtCore/qcontainerfwd.h>
|
||||
#include <QtGlobal>
|
||||
|
||||
enum class VarMeasurement : quint8 { English=0, Metric=1 };
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
enum class VarMeasurement : quint8
|
||||
{
|
||||
English = 0,
|
||||
Metric = 1
|
||||
};
|
||||
|
||||
// Default drawing units for AutoCAD DesignCenter blocks:
|
||||
enum class VarInsunits : quint8 { Inches=1, Millimeters=4, Centimeters=5 };
|
||||
enum class VarInsunits : quint8
|
||||
{
|
||||
Inches = 1,
|
||||
Millimeters = 4,
|
||||
Centimeters = 5
|
||||
};
|
||||
|
||||
// Helps mark end of string. See VDxfEngine::drawTextItem for more details
|
||||
extern const QString endStringPlaceholder;
|
||||
|
|
|
@ -15,12 +15,16 @@
|
|||
|
||||
#define DRW_VERSION "0.6.3"
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <cmath>
|
||||
#include <unordered_map>
|
||||
#include <QtGlobal>
|
||||
#include <ciso646>
|
||||
#include <cmath>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
#ifdef DRW_ASSERTS
|
||||
#define drw_assert(a) assert(a)
|
||||
|
@ -110,10 +114,12 @@ typedef float dfloat32; /* 32 bit floating point */
|
|||
typedef double ddouble64; /* 64 bit floating point */
|
||||
typedef long double ddouble80; /* 80 bit floating point */
|
||||
|
||||
namespace DRW {
|
||||
namespace DRW
|
||||
{
|
||||
|
||||
//! Version numbers for the DXF Format.
|
||||
enum Version {
|
||||
enum Version
|
||||
{
|
||||
UNKNOWNV, //!< UNKNOWN VERSION.
|
||||
MC00, //!< DWG Release 1.1
|
||||
AC12, //!< DWG Release 1.2
|
||||
|
@ -136,27 +142,15 @@ enum Version {
|
|||
};
|
||||
|
||||
const std::unordered_map<const char *, DRW::Version> dwgVersionStrings{
|
||||
{ "MC0.0", DRW::MC00 },
|
||||
{ "AC1.2", DRW::AC12 },
|
||||
{ "AC1.4", DRW::AC14 },
|
||||
{ "AC1.50", DRW::AC150 },
|
||||
{ "AC2.10", DRW::AC210 },
|
||||
{ "AC1002", DRW::AC1002 },
|
||||
{ "AC1003", DRW::AC1003 },
|
||||
{ "AC1004", DRW::AC1004 },
|
||||
{ "AC1006", DRW::AC1006 },
|
||||
{ "AC1009", DRW::AC1009 },
|
||||
{ "AC1012", DRW::AC1012 },
|
||||
{ "AC1014", DRW::AC1014 },
|
||||
{ "AC1015", DRW::AC1015 },
|
||||
{ "AC1018", DRW::AC1018 },
|
||||
{ "AC1021", DRW::AC1021 },
|
||||
{ "AC1024", DRW::AC1024 },
|
||||
{ "AC1027", DRW::AC1027 },
|
||||
{ "AC1032", DRW::AC1032 },
|
||||
{"MC0.0", DRW::MC00}, {"AC1.2", DRW::AC12}, {"AC1.4", DRW::AC14}, {"AC1.50", DRW::AC150},
|
||||
{"AC2.10", DRW::AC210}, {"AC1002", DRW::AC1002}, {"AC1003", DRW::AC1003}, {"AC1004", DRW::AC1004},
|
||||
{"AC1006", DRW::AC1006}, {"AC1009", DRW::AC1009}, {"AC1012", DRW::AC1012}, {"AC1014", DRW::AC1014},
|
||||
{"AC1015", DRW::AC1015}, {"AC1018", DRW::AC1018}, {"AC1021", DRW::AC1021}, {"AC1024", DRW::AC1024},
|
||||
{"AC1027", DRW::AC1027}, {"AC1032", DRW::AC1032},
|
||||
};
|
||||
|
||||
enum error {
|
||||
enum error
|
||||
{
|
||||
BAD_NONE, /*!< No error. */
|
||||
BAD_UNKNOWN, /*!< UNKNOWN. */
|
||||
BAD_OPEN, /*!< error opening file. */
|
||||
|
@ -174,7 +168,8 @@ BAD_READ_SECTION, /*!< error in sections read process. */
|
|||
BAD_CODE_PARSED, /*!< error in any parseCodes() method. */
|
||||
};
|
||||
|
||||
enum class DebugLevel {
|
||||
enum class DebugLevel
|
||||
{
|
||||
None,
|
||||
Debug
|
||||
};
|
||||
|
@ -184,7 +179,8 @@ enum class DebugLevel {
|
|||
*
|
||||
* The base class is silent and ignores all debugging.
|
||||
*/
|
||||
class DebugPrinter {
|
||||
class DebugPrinter
|
||||
{
|
||||
public:
|
||||
virtual void printS(const std::string &s) { (void)s; }
|
||||
virtual void printI(long long int i) { (void)i; }
|
||||
|
@ -192,8 +188,18 @@ public:
|
|||
virtual void printD(double d) { (void)d; }
|
||||
virtual void printH(long long int i) { (void)i; }
|
||||
virtual void printB(int i) { (void)i; }
|
||||
virtual void printHL(int c, int s, int h){(void)c;(void)s;(void)h;}
|
||||
virtual void printPT(double x, double y, double z){(void)x;(void)y;(void)z;}
|
||||
virtual void printHL(int c, int s, int h)
|
||||
{
|
||||
(void)c;
|
||||
(void)s;
|
||||
(void)h;
|
||||
}
|
||||
virtual void printPT(double x, double y, double z)
|
||||
{
|
||||
(void)x;
|
||||
(void)y;
|
||||
(void)z;
|
||||
}
|
||||
DebugPrinter() = default;
|
||||
virtual ~DebugPrinter() = default;
|
||||
};
|
||||
|
@ -206,7 +212,8 @@ public:
|
|||
void setCustomDebugPrinter(DebugPrinter *printer);
|
||||
|
||||
//! Special codes for colors
|
||||
enum ColorCodes {
|
||||
enum ColorCodes
|
||||
{
|
||||
black = 250,
|
||||
green = 3,
|
||||
red = 1,
|
||||
|
@ -228,18 +235,21 @@ enum ColorCodes {
|
|||
};
|
||||
|
||||
//! Spaces
|
||||
enum Space {
|
||||
enum Space
|
||||
{
|
||||
ModelSpace = 0,
|
||||
PaperSpace = 1
|
||||
};
|
||||
|
||||
//! Special kinds of handles
|
||||
enum HandleCodes {
|
||||
enum HandleCodes
|
||||
{
|
||||
NoHandle = 0
|
||||
};
|
||||
|
||||
//! Shadow mode
|
||||
enum ShadowMode {
|
||||
enum ShadowMode
|
||||
{
|
||||
CastAndReceieveShadows = 0,
|
||||
CastShadows = 1,
|
||||
ReceiveShadows = 2,
|
||||
|
@ -247,17 +257,20 @@ enum ShadowMode {
|
|||
};
|
||||
|
||||
//! Special kinds of materials
|
||||
enum MaterialCodes {
|
||||
enum MaterialCodes
|
||||
{
|
||||
MaterialByLayer = 0
|
||||
};
|
||||
|
||||
//! Special kinds of plot styles
|
||||
enum PlotStyleCodes {
|
||||
enum PlotStyleCodes
|
||||
{
|
||||
DefaultPlotStyle = 0
|
||||
};
|
||||
|
||||
//! Special kinds of transparencies
|
||||
enum TransparencyCodes {
|
||||
enum TransparencyCodes
|
||||
{
|
||||
Opaque = 0,
|
||||
Transparent = -1
|
||||
};
|
||||
|
@ -286,20 +299,23 @@ static inline auto DRW_FuzzyComparePossibleNulls(double p1, double p2) -> bool
|
|||
* Class to handle 3D coordinate point
|
||||
* @author Rallaz
|
||||
*/
|
||||
class DRW_Coord {
|
||||
class DRW_Coord
|
||||
{
|
||||
public:
|
||||
DRW_Coord() = default;
|
||||
DRW_Coord(double ix, double iy, double iz)
|
||||
: x(ix),
|
||||
y(iy),
|
||||
z(iz)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
DRW_Coord(const DRW_Coord &data)
|
||||
: x(data.x),
|
||||
y(data.y),
|
||||
z(data.z)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
auto operator=(const DRW_Coord &data) -> DRW_Coord &
|
||||
{
|
||||
|
@ -314,10 +330,12 @@ public:
|
|||
return *this;
|
||||
}
|
||||
/*!< convert to unitary vector */
|
||||
void unitize(){
|
||||
void unitize()
|
||||
{
|
||||
double dist;
|
||||
dist = hypot(hypot(x, y), z);
|
||||
if (dist > 0.0) {
|
||||
if (dist > 0.0)
|
||||
{
|
||||
x = x / dist;
|
||||
y = y / dist;
|
||||
z = z / dist;
|
||||
|
@ -330,13 +348,13 @@ public:
|
|||
double z{0};
|
||||
};
|
||||
|
||||
|
||||
//! Class to handle vertex
|
||||
/*!
|
||||
* Class to handle vertex for lwpolyline entity
|
||||
* @author Rallaz
|
||||
*/
|
||||
class DRW_Vertex2D {
|
||||
class DRW_Vertex2D
|
||||
{
|
||||
public:
|
||||
DRW_Vertex2D()
|
||||
: x(),
|
||||
|
@ -353,7 +371,8 @@ public:
|
|||
stawidth(0),
|
||||
endwidth(0),
|
||||
bulge(b)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
double x; /*!< x coordinate, code 10 */
|
||||
|
@ -363,15 +382,16 @@ public:
|
|||
double bulge; /*!< bulge, code 42 */
|
||||
};
|
||||
|
||||
|
||||
//! Class to handle header vars
|
||||
/*!
|
||||
* Class to handle header vars
|
||||
* @author Rallaz
|
||||
*/
|
||||
class DRW_Variant {
|
||||
class DRW_Variant
|
||||
{
|
||||
public:
|
||||
enum TYPE {
|
||||
enum TYPE
|
||||
{
|
||||
STRING,
|
||||
INTEGER,
|
||||
DOUBLE,
|
||||
|
@ -385,7 +405,8 @@ public:
|
|||
code(),
|
||||
sdata(),
|
||||
vdata()
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
DRW_Variant(int c, dint32 i)
|
||||
: content(),
|
||||
|
@ -459,18 +480,56 @@ public:
|
|||
|
||||
~DRW_Variant() = default;
|
||||
|
||||
void addString(const UTF8STRING &s) {setType(STRING); sdata = s; content.s = &sdata;}
|
||||
void addInt(int i) {setType(INTEGER); content.i = i;}
|
||||
void addDouble(double d) {setType(DOUBLE); content.d = d;}
|
||||
void addCoord() {setType(COORD); vdata.x=0.0; vdata.y=0.0; vdata.z=0.0; content.v = &vdata;}
|
||||
void addCoord(const DRW_Coord &v) {setType(COORD); vdata = v; content.v = &vdata;}
|
||||
void addString(const UTF8STRING &s)
|
||||
{
|
||||
setType(STRING);
|
||||
sdata = s;
|
||||
content.s = &sdata;
|
||||
}
|
||||
void addInt(int i)
|
||||
{
|
||||
setType(INTEGER);
|
||||
content.i = i;
|
||||
}
|
||||
void addDouble(double d)
|
||||
{
|
||||
setType(DOUBLE);
|
||||
content.d = d;
|
||||
}
|
||||
void addCoord()
|
||||
{
|
||||
setType(COORD);
|
||||
vdata.x = 0.0;
|
||||
vdata.y = 0.0;
|
||||
vdata.z = 0.0;
|
||||
content.v = &vdata;
|
||||
}
|
||||
void addCoord(const DRW_Coord &v)
|
||||
{
|
||||
setType(COORD);
|
||||
vdata = v;
|
||||
content.v = &vdata;
|
||||
}
|
||||
void setType(TYPE t) { type = t; }
|
||||
void setCoordX(double d) { if (type == COORD) vdata.x = d;}
|
||||
void setCoordY(double d) { if (type == COORD) vdata.y = d;}
|
||||
void setCoordZ(double d) { if (type == COORD) vdata.z = d;}
|
||||
void setCoordX(double d)
|
||||
{
|
||||
if (type == COORD)
|
||||
vdata.x = d;
|
||||
}
|
||||
void setCoordY(double d)
|
||||
{
|
||||
if (type == COORD)
|
||||
vdata.y = d;
|
||||
}
|
||||
void setCoordZ(double d)
|
||||
{
|
||||
if (type == COORD)
|
||||
vdata.z = d;
|
||||
}
|
||||
|
||||
private:
|
||||
typedef union {
|
||||
typedef union
|
||||
{
|
||||
UTF8STRING *s;
|
||||
dint32 i;
|
||||
double d;
|
||||
|
@ -495,9 +554,11 @@ private:
|
|||
* returns widthDefault.
|
||||
* @author Rallaz
|
||||
*/
|
||||
class DRW_LW_Conv{
|
||||
class DRW_LW_Conv
|
||||
{
|
||||
public:
|
||||
enum lineWidth {
|
||||
enum lineWidth
|
||||
{
|
||||
width00 = 0, /*!< 0.00mm (dxf 0)*/
|
||||
width01 = 1, /*!< 0.05mm (dxf 5)*/
|
||||
width02 = 2, /*!< 0.09mm (dxf 9)*/
|
||||
|
@ -529,7 +590,8 @@ public:
|
|||
|
||||
static auto lineWidth2dxfInt(lineWidth lw) -> int
|
||||
{
|
||||
switch (lw){
|
||||
switch (lw)
|
||||
{
|
||||
case widthByLayer:
|
||||
return -1;
|
||||
case widthByBlock:
|
||||
|
@ -592,7 +654,8 @@ public:
|
|||
|
||||
static auto dxfInt2lineWidth(int i) -> lineWidth
|
||||
{
|
||||
if (i<0) {
|
||||
if (i < 0)
|
||||
{
|
||||
if (i == -1)
|
||||
return widthByLayer;
|
||||
if (i == -2)
|
||||
|
|
|
@ -13,18 +13,23 @@
|
|||
#ifndef LIBDXFRW_H
|
||||
#define LIBDXFRW_H
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include "drw_entities.h"
|
||||
#include "drw_objects.h"
|
||||
#include "drw_header.h"
|
||||
#include "drw_interface.h"
|
||||
#include <ciso646>
|
||||
#include "drw_objects.h"
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
class dxfReader;
|
||||
class dxfWriter;
|
||||
|
||||
class dxfRW {
|
||||
class dxfRW
|
||||
{
|
||||
public:
|
||||
explicit dxfRW(const char *name);
|
||||
~dxfRW();
|
||||
|
|
|
@ -33,6 +33,11 @@
|
|||
#include <QString>
|
||||
#include <QtMath>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
#include "../vmisc/defglobal.h"
|
||||
#endif
|
||||
|
|
|
@ -32,9 +32,13 @@
|
|||
#include <QPainterPath>
|
||||
#include <QSize>
|
||||
#include <QTransform>
|
||||
#include <ciso646>
|
||||
#include <climits>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
enum class LayoutExportFormats : qint8
|
||||
{
|
||||
SVG = 0,
|
||||
|
|
|
@ -50,7 +50,10 @@
|
|||
|
||||
template <class T> class QSharedPointer;
|
||||
|
||||
#include <ciso646>
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
// Backport of relaxed constexpr
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||
|
|
|
@ -53,6 +53,11 @@
|
|||
#include "../vmisc/backport/text.h"
|
||||
#endif
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
class QPaintDevice;
|
||||
class QPixmap;
|
||||
class QPoint;
|
||||
|
@ -60,8 +65,6 @@ class QPointF;
|
|||
class QPolygonF;
|
||||
class QRectF;
|
||||
|
||||
#include <ciso646>
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
static inline auto svgEngineFeatures() -> QPaintEngine::PaintEngineFeatures
|
||||
{
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#ifndef VPROPERTY_H
|
||||
#define VPROPERTY_H
|
||||
|
||||
|
||||
#include <QAbstractItemDelegate>
|
||||
#include <QEvent>
|
||||
#include <QMap>
|
||||
|
@ -32,30 +31,39 @@
|
|||
#include <QStringList>
|
||||
#include <QStyleOptionViewItem>
|
||||
#include <QVariant>
|
||||
#include <Qt>
|
||||
#include <QtGlobal>
|
||||
#include <QtCore/qcontainerfwd.h>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
#include "../vmisc/backport/qoverload.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
|
||||
#include <ciso646>
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
#include "vpropertydef.h"
|
||||
|
||||
namespace VPE
|
||||
{
|
||||
|
||||
enum class Property : qint8 {Simple, Complex};
|
||||
enum class Property : qint8
|
||||
{
|
||||
Simple,
|
||||
Complex
|
||||
};
|
||||
|
||||
static const int MyCustomEventType = 1099;
|
||||
|
||||
class VPROPERTYEXPLORERSHARED_EXPORT UserChangeEvent : public QEvent
|
||||
{
|
||||
public:
|
||||
UserChangeEvent() : QEvent(static_cast<QEvent::Type>(MyCustomEventType)) {}
|
||||
UserChangeEvent()
|
||||
: QEvent(static_cast<QEvent::Type>(MyCustomEventType))
|
||||
{
|
||||
}
|
||||
virtual ~UserChangeEvent() override;
|
||||
};
|
||||
|
||||
|
@ -68,6 +76,7 @@ QT_WARNING_DISABLE_GCC("-Wsuggest-final-methods")
|
|||
class VPROPERTYEXPLORERSHARED_EXPORT VProperty : public QObject
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
|
||||
public:
|
||||
enum DPC_DisplayColumn
|
||||
{
|
||||
|
@ -241,6 +250,6 @@ private:
|
|||
|
||||
QT_WARNING_POP
|
||||
|
||||
}
|
||||
} // namespace VPE
|
||||
|
||||
#endif // VPROPERTY_H
|
||||
|
|
|
@ -44,7 +44,10 @@
|
|||
#include "../vlayout/vrawsapoint.h"
|
||||
#include "../vlayout/vsapoint.h"
|
||||
|
||||
#include <ciso646>
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define V_UNUSED __attribute__((unused))
|
||||
|
@ -81,7 +84,9 @@ class VRawSAPoint;
|
|||
class AbstractTest : public QObject
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
public : explicit AbstractTest(QObject *parent = nullptr);
|
||||
|
||||
public:
|
||||
explicit AbstractTest(QObject *parent = nullptr);
|
||||
|
||||
template <class T> static auto VectorFromJson(const QString &json) -> QVector<T>;
|
||||
|
||||
|
|
|
@ -29,7 +29,11 @@
|
|||
|
||||
#include <QPainter>
|
||||
#include <QTextLayout>
|
||||
#include <ciso646>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VElidedLabel::VElidedLabel(QWidget *parent)
|
||||
|
|
|
@ -27,7 +27,10 @@
|
|||
*************************************************************************/
|
||||
#include "vplaintextedit.h"
|
||||
|
||||
#include <ciso646>
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPlainTextEdit::VPlainTextEdit(QWidget *parent)
|
||||
|
|
|
@ -32,7 +32,11 @@
|
|||
#include <QFile>
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
#include <ciso646>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
#include "../vmisc/defglobal.h"
|
||||
|
|
|
@ -30,7 +30,11 @@
|
|||
#include "../vmisc/commandoptions.h"
|
||||
|
||||
#include <QtTest>
|
||||
#include <ciso646>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
TST_VCommandLine::TST_VCommandLine(QObject *parent)
|
||||
|
|
|
@ -30,7 +30,11 @@
|
|||
#include "../vmisc/vlockguard.h"
|
||||
|
||||
#include <QtTest>
|
||||
#include <ciso646>
|
||||
|
||||
// Header <ciso646> is removed in C++20.
|
||||
#if __cplusplus <= 201703L
|
||||
#include <ciso646> // and, not, or
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
TST_VLockGuard::TST_VLockGuard(QObject *parent)
|
||||
|
|
Loading…
Reference in New Issue
Block a user