2014-12-10 19:01:33 +01:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file ifcdef.h
|
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
|
|
|
** @date 10 12, 2014
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
2017-10-05 11:20:01 +02:00
|
|
|
** This source code is part of the Valentina project, a pattern making
|
2014-12-10 19:01:33 +01:00
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
2015-02-27 11:27:48 +01:00
|
|
|
** Copyright (C) 2013-2015 Valentina project
|
2020-01-31 07:00:05 +01:00
|
|
|
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
2014-12-10 19:01:33 +01:00
|
|
|
**
|
|
|
|
** Valentina is free software: you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation, either version 3 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
|
|
|
** Valentina 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 General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
#ifndef IFCDEF_H
|
|
|
|
#define IFCDEF_H
|
|
|
|
|
2019-11-15 08:51:31 +01:00
|
|
|
#include <QtGlobal>
|
|
|
|
#ifdef Q_OS_WIN
|
2022-03-17 12:35:49 +01:00
|
|
|
// extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
2019-11-15 08:51:31 +01:00
|
|
|
# include <qt_windows.h>
|
|
|
|
#endif /*Q_OS_WIN*/
|
|
|
|
|
2021-09-11 18:39:38 +02:00
|
|
|
#include <QColor>
|
2019-12-13 09:51:29 +01:00
|
|
|
#include <QFont>
|
2016-08-08 13:44:49 +02:00
|
|
|
#include <QString>
|
|
|
|
#include <QStringList>
|
|
|
|
|
2019-03-26 16:15:03 +01:00
|
|
|
#include "../vmisc/typedef.h"
|
2015-06-18 19:23:24 +02:00
|
|
|
#include "../vmisc/def.h"
|
2022-08-22 10:34:02 +02:00
|
|
|
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
2017-08-21 14:58:10 +02:00
|
|
|
#include "../vmisc/diagnostic.h"
|
2022-08-22 10:34:02 +02:00
|
|
|
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
2014-12-18 12:34:32 +01:00
|
|
|
|
2015-08-25 12:35:50 +02:00
|
|
|
extern const QString CustomMSign;
|
|
|
|
extern const QString CustomIncrSign;
|
2015-07-22 11:44:31 +02:00
|
|
|
|
2014-12-10 19:01:33 +01:00
|
|
|
// Detect whether the compiler supports C++11 noexcept exception specifications.
|
|
|
|
# if defined(__clang__)
|
|
|
|
# if __has_feature(cxx_noexcept)
|
|
|
|
# define V_NOEXCEPT_EXPR(x) noexcept(x) // Clang 3.0 and above have noexcept
|
|
|
|
# endif
|
|
|
|
# elif defined(__GNUC__)
|
|
|
|
# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
|
|
|
|
# define V_NOEXCEPT_EXPR(x) noexcept(x) // GCC 4.7 and following have noexcept
|
|
|
|
# endif
|
2016-07-29 11:07:44 +02:00
|
|
|
# elif defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026
|
|
|
|
# define V_NOEXCEPT_EXPR(x) noexcept(x) // Visual Studio 2015 and following have noexcept
|
2014-12-10 19:01:33 +01:00
|
|
|
# else
|
|
|
|
# define V_NOEXCEPT_EXPR(x)
|
|
|
|
# endif
|
|
|
|
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString AttrType;
|
|
|
|
extern const QString AttrMx;
|
|
|
|
extern const QString AttrMy;
|
|
|
|
extern const QString AttrName;
|
2022-11-10 10:30:08 +01:00
|
|
|
extern const QString AttrShortName;
|
2020-04-22 13:32:25 +02:00
|
|
|
extern const QString AttrUUID;
|
2021-08-31 11:07:26 +02:00
|
|
|
extern const QString AttrGradationLabel;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString AttrMx1;
|
|
|
|
extern const QString AttrMy1;
|
|
|
|
extern const QString AttrName1;
|
|
|
|
extern const QString AttrMx2;
|
|
|
|
extern const QString AttrMy2;
|
|
|
|
extern const QString AttrName2;
|
|
|
|
extern const QString AttrBaseLineP1;
|
|
|
|
extern const QString AttrBaseLineP2;
|
|
|
|
extern const QString AttrDartP1;
|
|
|
|
extern const QString AttrDartP2;
|
|
|
|
extern const QString AttrDartP3;
|
|
|
|
extern const QString AttrX;
|
|
|
|
extern const QString AttrY;
|
|
|
|
extern const QString AttrTypeLine;
|
2017-07-20 16:38:56 +02:00
|
|
|
extern const QString AttrCut;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString AttrLength;
|
|
|
|
extern const QString AttrBasePoint;
|
|
|
|
extern const QString AttrFirstPoint;
|
|
|
|
extern const QString AttrSecondPoint;
|
|
|
|
extern const QString AttrThirdPoint;
|
|
|
|
extern const QString AttrCenter;
|
|
|
|
extern const QString AttrRadius;
|
2016-12-17 02:53:47 +01:00
|
|
|
extern const QString AttrRadius1;
|
|
|
|
extern const QString AttrRadius2;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString AttrAngle;
|
|
|
|
extern const QString AttrAngle1;
|
|
|
|
extern const QString AttrAngle2;
|
2016-12-17 02:53:47 +01:00
|
|
|
extern const QString AttrRotationAngle;
|
2016-02-26 15:38:42 +01:00
|
|
|
extern const QString AttrLength1;
|
|
|
|
extern const QString AttrLength2;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString AttrP1Line;
|
|
|
|
extern const QString AttrP2Line;
|
|
|
|
extern const QString AttrP1Line1;
|
|
|
|
extern const QString AttrP2Line1;
|
|
|
|
extern const QString AttrP1Line2;
|
|
|
|
extern const QString AttrP2Line2;
|
|
|
|
extern const QString AttrPShoulder;
|
|
|
|
extern const QString AttrPoint1;
|
|
|
|
extern const QString AttrPoint2;
|
2016-03-10 14:55:04 +01:00
|
|
|
extern const QString AttrPoint3;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString AttrPoint4;
|
2016-02-26 15:38:42 +01:00
|
|
|
extern const QString AttrKAsm1;// TODO. Delete if minimal supported version is 0.2.7
|
|
|
|
extern const QString AttrKAsm2;// TODO. Delete if minimal supported version is 0.2.7
|
2016-02-27 15:49:10 +01:00
|
|
|
extern const QString AttrKCurve;// TODO. Delete if minimal supported version is 0.2.7
|
2016-02-15 15:30:48 +01:00
|
|
|
extern const QString AttrDuplicate;
|
2017-10-11 12:51:06 +02:00
|
|
|
extern const QString AttrAScale;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString AttrPathPoint;
|
|
|
|
extern const QString AttrPSpline;
|
|
|
|
extern const QString AttrAxisP1;
|
|
|
|
extern const QString AttrAxisP2;
|
|
|
|
extern const QString AttrCurve;
|
2016-01-24 17:15:08 +01:00
|
|
|
extern const QString AttrCurve1;
|
|
|
|
extern const QString AttrCurve2;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString AttrLineColor;
|
|
|
|
extern const QString AttrColor;
|
2017-05-16 12:07:53 +02:00
|
|
|
extern const QString AttrPenStyle;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString AttrFirstArc;
|
|
|
|
extern const QString AttrSecondArc;
|
|
|
|
extern const QString AttrCrossPoint;
|
2016-01-24 17:15:08 +01:00
|
|
|
extern const QString AttrVCrossPoint;
|
|
|
|
extern const QString AttrHCrossPoint;
|
2016-09-17 11:10:03 +02:00
|
|
|
extern const QString AttrAxisType;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString AttrC1Center;
|
|
|
|
extern const QString AttrC2Center;
|
|
|
|
extern const QString AttrC1Radius;
|
|
|
|
extern const QString AttrC2Radius;
|
|
|
|
extern const QString AttrCCenter;
|
|
|
|
extern const QString AttrTangent;
|
|
|
|
extern const QString AttrCRadius;
|
|
|
|
extern const QString AttrArc;
|
2016-05-12 21:11:21 +02:00
|
|
|
extern const QString AttrSuffix;
|
2019-08-12 13:03:38 +02:00
|
|
|
extern const QString AttrItem;
|
2016-05-12 21:11:21 +02:00
|
|
|
extern const QString AttrIdObject;
|
2016-06-26 13:36:12 +02:00
|
|
|
extern const QString AttrInLayout;
|
2018-02-03 13:18:32 +01:00
|
|
|
extern const QString AttrForbidFlipping;
|
|
|
|
extern const QString AttrForceFlipping;
|
2022-11-04 16:16:50 +01:00
|
|
|
extern const QString AttrSewLineOnDrawing;
|
2016-12-01 19:47:15 +01:00
|
|
|
extern const QString AttrClosed;
|
2017-09-17 18:52:18 +02:00
|
|
|
extern const QString AttrShowLabel;
|
2017-09-20 09:19:02 +02:00
|
|
|
extern const QString AttrShowLabel1;
|
|
|
|
extern const QString AttrShowLabel2;
|
2017-10-15 11:25:20 +02:00
|
|
|
extern const QString AttrWidth;
|
|
|
|
extern const QString AttrHeight;
|
|
|
|
extern const QString AttrPlaceLabelType;
|
2017-10-23 09:45:58 +02:00
|
|
|
extern const QString AttrVersion;
|
2022-11-14 17:02:00 +01:00
|
|
|
extern const QString AttrFirstToContour;
|
|
|
|
extern const QString AttrLastToContour;
|
2020-10-27 15:21:51 +01:00
|
|
|
extern const QString AttrNotes;
|
2020-11-04 10:01:20 +01:00
|
|
|
extern const QString AttrAlias;
|
2020-11-04 17:14:21 +01:00
|
|
|
extern const QString AttrAlias1;
|
|
|
|
extern const QString AttrAlias2;
|
2021-05-08 09:54:14 +02:00
|
|
|
extern const QString AttrCurve1Alias1;
|
|
|
|
extern const QString AttrCurve1Alias2;
|
|
|
|
extern const QString AttrCurve2Alias1;
|
|
|
|
extern const QString AttrCurve2Alias2;
|
2022-02-18 15:32:43 +01:00
|
|
|
extern const QString AttrLayoutVersion;
|
2015-08-11 15:41:03 +02:00
|
|
|
|
2020-11-10 11:40:37 +01:00
|
|
|
extern const QString TypeLineDefault;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString TypeLineNone;
|
|
|
|
extern const QString TypeLineLine;
|
|
|
|
extern const QString TypeLineDashLine;
|
|
|
|
extern const QString TypeLineDotLine;
|
|
|
|
extern const QString TypeLineDashDotLine;
|
|
|
|
extern const QString TypeLineDashDotDotLine;
|
|
|
|
|
2017-05-16 12:07:53 +02:00
|
|
|
QStringList StylesList();
|
|
|
|
Qt::PenStyle LineStyleToPenStyle(const QString &typeLine);
|
|
|
|
QString PenStyleToLineStyle(Qt::PenStyle penStyle);
|
2020-11-10 11:40:37 +01:00
|
|
|
QIcon PenStylePic(Qt::PenStyle style);
|
2017-05-16 12:07:53 +02:00
|
|
|
QMap<QString, QIcon> LineStylesPics();
|
|
|
|
QMap<QString, QIcon> CurvePenStylesPics();
|
|
|
|
|
2020-11-10 11:40:37 +01:00
|
|
|
extern const QString ColorDefault;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString ColorBlack;
|
|
|
|
extern const QString ColorGreen;
|
|
|
|
extern const QString ColorBlue;
|
|
|
|
extern const QString ColorDarkRed;
|
|
|
|
extern const QString ColorDarkGreen;
|
|
|
|
extern const QString ColorDarkBlue;
|
|
|
|
extern const QString ColorYellow;
|
2016-10-16 19:23:40 +02:00
|
|
|
extern const QString ColorLightSalmon;
|
|
|
|
extern const QString ColorGoldenRod;
|
|
|
|
extern const QString ColorOrange;
|
|
|
|
extern const QString ColorDeepPink;
|
|
|
|
extern const QString ColorViolet;
|
|
|
|
extern const QString ColorDarkViolet;
|
|
|
|
extern const QString ColorMediumSeaGreen;
|
|
|
|
extern const QString ColorLime;
|
|
|
|
extern const QString ColorDeepSkyBlue;
|
|
|
|
extern const QString ColorCornFlowerBlue;
|
|
|
|
|
2015-08-11 15:41:03 +02:00
|
|
|
|
|
|
|
// variables name
|
|
|
|
// Hacks for avoiding the linker error "undefined reference to"
|
|
|
|
#define SPL_ "Spl_"
|
|
|
|
#define ARC_ "Arc_"
|
2017-08-08 17:27:36 +02:00
|
|
|
#define ELARC_ "ElArc_"
|
2015-08-11 15:41:03 +02:00
|
|
|
|
2017-03-28 09:18:19 +02:00
|
|
|
extern const QString measurement_;
|
|
|
|
extern const QString increment_;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString line_;
|
|
|
|
extern const QString angleLine_;
|
|
|
|
extern const QString arc_;
|
2017-08-08 17:27:36 +02:00
|
|
|
extern const QString elarc_;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString spl_;
|
|
|
|
extern const QString splPath;
|
|
|
|
extern const QString radius_V;
|
|
|
|
extern const QString radiusArc_;
|
2017-08-08 17:27:36 +02:00
|
|
|
extern const QString radius1ElArc_;
|
|
|
|
extern const QString radius2ElArc_;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString angle1_V;
|
|
|
|
extern const QString angle2_V;
|
2016-09-24 19:44:06 +02:00
|
|
|
extern const QString c1Length_V;
|
|
|
|
extern const QString c2Length_V;
|
2016-09-26 21:33:28 +02:00
|
|
|
extern const QString c1LengthSpl_;
|
|
|
|
extern const QString c2LengthSpl_;
|
|
|
|
extern const QString c1LengthSplPath;
|
|
|
|
extern const QString c2LengthSplPath;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString angle1Arc_;
|
|
|
|
extern const QString angle2Arc_;
|
2017-08-08 17:27:36 +02:00
|
|
|
extern const QString angle1ElArc_;
|
|
|
|
extern const QString angle2ElArc_;
|
2015-08-11 15:41:03 +02:00
|
|
|
extern const QString angle1Spl_;
|
|
|
|
extern const QString angle2Spl_;
|
|
|
|
extern const QString angle1SplPath;
|
|
|
|
extern const QString angle2SplPath;
|
2016-04-01 23:15:04 +02:00
|
|
|
extern const QString seg_;
|
2016-06-23 19:20:21 +02:00
|
|
|
extern const QString currentLength;
|
2017-01-20 14:58:35 +01:00
|
|
|
extern const QString currentSeamAllowance;
|
2018-01-05 20:07:47 +01:00
|
|
|
extern const QString rotation_V;
|
|
|
|
extern const QString rotationElArc_;
|
2022-11-10 10:30:08 +01:00
|
|
|
extern const QString pieceArea_;
|
2015-08-11 15:41:03 +02:00
|
|
|
|
|
|
|
extern const QStringList builInVariables;
|
|
|
|
|
2017-08-15 09:44:00 +02:00
|
|
|
QT_WARNING_PUSH
|
|
|
|
QT_WARNING_DISABLE_GCC("-Weffc++")
|
|
|
|
|
|
|
|
struct VLabelTemplateLine
|
|
|
|
{
|
|
|
|
QString line;
|
|
|
|
bool bold;
|
|
|
|
bool italic;
|
|
|
|
int alignment;
|
2017-08-15 17:10:15 +02:00
|
|
|
int fontSizeIncrement;
|
2017-08-15 09:44:00 +02:00
|
|
|
};
|
|
|
|
|
2019-12-13 09:51:29 +01:00
|
|
|
struct VWatermarkData
|
|
|
|
{
|
|
|
|
int opacity{20};
|
2019-12-30 13:43:06 +01:00
|
|
|
bool showText{true};
|
2019-12-13 09:51:29 +01:00
|
|
|
QString text{};
|
|
|
|
int textRotation{0};
|
|
|
|
QFont font{};
|
2019-12-30 13:43:06 +01:00
|
|
|
bool showImage{true};
|
2019-12-13 09:51:29 +01:00
|
|
|
QString path{};
|
|
|
|
int imageRotation{0};
|
|
|
|
bool grayscale{false};
|
2021-09-11 18:39:38 +02:00
|
|
|
bool invalidFile{false};
|
|
|
|
QColor textColor{Qt::black};
|
2019-12-13 09:51:29 +01:00
|
|
|
};
|
|
|
|
|
2017-08-15 09:44:00 +02:00
|
|
|
QT_WARNING_POP
|
|
|
|
|
2014-12-10 19:01:33 +01:00
|
|
|
#endif // IFCDEF_H
|